@atlaskit/link-picker 1.13.1 → 1.13.2

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 (54) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/version.json +1 -1
  3. package/dist/es2019/version.json +1 -1
  4. package/dist/esm/version.json +1 -1
  5. package/package.json +5 -13
  6. package/report.api.md +3 -3
  7. package/dist/types-ts4.0/analytics.codegen.d.ts +0 -63
  8. package/dist/types-ts4.0/common/analytics/context.d.ts +0 -29
  9. package/dist/types-ts4.0/common/analytics/experiences.d.ts +0 -11
  10. package/dist/types-ts4.0/common/analytics/index.d.ts +0 -2
  11. package/dist/types-ts4.0/common/analytics/input-field-tracking.d.ts +0 -17
  12. package/dist/types-ts4.0/common/constants.d.ts +0 -2
  13. package/dist/types-ts4.0/common/generic-error-svg/index.d.ts +0 -4
  14. package/dist/types-ts4.0/common/generic-error-svg/styled.d.ts +0 -1
  15. package/dist/types-ts4.0/common/utils/url.d.ts +0 -5
  16. package/dist/types-ts4.0/controllers/session-provider/index.d.ts +0 -10
  17. package/dist/types-ts4.0/controllers/use-fix-height/index.d.ts +0 -8
  18. package/dist/types-ts4.0/index.d.ts +0 -3
  19. package/dist/types-ts4.0/services/use-plugins/index.d.ts +0 -14
  20. package/dist/types-ts4.0/services/use-plugins/reducer.d.ts +0 -33
  21. package/dist/types-ts4.0/services/use-plugins/utils.d.ts +0 -18
  22. package/dist/types-ts4.0/services/use-search-query/index.d.ts +0 -3
  23. package/dist/types-ts4.0/ui/error-boundary/error-boundary-base/index.d.ts +0 -18
  24. package/dist/types-ts4.0/ui/error-boundary/error-boundary-fallback/index.d.ts +0 -3
  25. package/dist/types-ts4.0/ui/error-boundary/index.d.ts +0 -7
  26. package/dist/types-ts4.0/ui/index.d.ts +0 -5
  27. package/dist/types-ts4.0/ui/link-picker/announcer.d.ts +0 -22
  28. package/dist/types-ts4.0/ui/link-picker/browser.d.ts +0 -15
  29. package/dist/types-ts4.0/ui/link-picker/form-footer/index.d.ts +0 -13
  30. package/dist/types-ts4.0/ui/link-picker/form-footer/styled.d.ts +0 -1
  31. package/dist/types-ts4.0/ui/link-picker/index.d.ts +0 -75
  32. package/dist/types-ts4.0/ui/link-picker/link-search-error/index.d.ts +0 -20
  33. package/dist/types-ts4.0/ui/link-picker/link-search-list/index.d.ts +0 -42
  34. package/dist/types-ts4.0/ui/link-picker/link-search-list/link-search-no-results/index.d.ts +0 -19
  35. package/dist/types-ts4.0/ui/link-picker/link-search-list/link-search-no-results/no-results-svg/index.d.ts +0 -4
  36. package/dist/types-ts4.0/ui/link-picker/link-search-list/link-search-no-results/no-results-svg/styled.d.ts +0 -1
  37. package/dist/types-ts4.0/ui/link-picker/link-search-list/link-search-no-results/styled.d.ts +0 -1
  38. package/dist/types-ts4.0/ui/link-picker/link-search-list/styled.d.ts +0 -4
  39. package/dist/types-ts4.0/ui/link-picker/link-search-list/use-track-results-shown/index.d.ts +0 -2
  40. package/dist/types-ts4.0/ui/link-picker/list-item/index.d.ts +0 -17
  41. package/dist/types-ts4.0/ui/link-picker/list-item/styled.d.ts +0 -9
  42. package/dist/types-ts4.0/ui/link-picker/messages.d.ts +0 -85
  43. package/dist/types-ts4.0/ui/link-picker/styled.d.ts +0 -9
  44. package/dist/types-ts4.0/ui/link-picker/text-input/index.d.ts +0 -18
  45. package/dist/types-ts4.0/ui/link-picker/text-input/styled.d.ts +0 -2
  46. package/dist/types-ts4.0/ui/link-picker/track-mount/index.d.ts +0 -5
  47. package/dist/types-ts4.0/ui/link-picker/track-tab-viewed/index.d.ts +0 -4
  48. package/dist/types-ts4.0/ui/link-picker/transformTimeStamp.d.ts +0 -3
  49. package/dist/types-ts4.0/ui/link-picker/utils.d.ts +0 -10
  50. package/dist/types-ts4.0/ui/loader-fallback/index.d.ts +0 -3
  51. package/dist/types-ts4.0/ui/scrolling-tabs/index.d.ts +0 -7
  52. package/dist/types-ts4.0/ui/scrolling-tabs/scrolling-tabs.d.ts +0 -11
  53. package/dist/types-ts4.0/ui/scrolling-tabs/styles.d.ts +0 -6
  54. package/dist/types-ts4.0/ui/types.d.ts +0 -59
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/link-picker
2
2
 
3
+ ## 1.13.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 1.13.1
4
10
 
5
11
  ### Patch Changes
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "1.13.1",
3
+ "version": "1.13.2",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "1.13.1",
3
+ "version": "1.13.2",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "1.13.1",
3
+ "version": "1.13.2",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "1.13.1",
3
+ "version": "1.13.2",
4
4
  "description": "Standalone link picker",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "publishConfig": {
@@ -20,14 +20,6 @@
20
20
  "module": "dist/esm/index.js",
21
21
  "module:es2019": "dist/es2019/index.js",
22
22
  "types": "dist/types/index.d.ts",
23
- "typesVersions": {
24
- ">=4.0 <4.5": {
25
- "*": [
26
- "dist/types-ts4.0/*",
27
- "dist/types-ts4.0/index.d.ts"
28
- ]
29
- }
30
- },
31
23
  "sideEffects": false,
32
24
  "atlaskit:src": "src/index.ts",
33
25
  "af:exports": {
@@ -43,13 +35,13 @@
43
35
  "@atlaskit/button": "^16.4.0",
44
36
  "@atlaskit/empty-state": "^7.4.0",
45
37
  "@atlaskit/form": "^8.7.0",
46
- "@atlaskit/frontend-utilities": "^2.0.0",
38
+ "@atlaskit/frontend-utilities": "^2.1.0",
47
39
  "@atlaskit/icon": "^21.11.0",
48
40
  "@atlaskit/spinner": "^15.2.0",
49
41
  "@atlaskit/tabs": "^13.3.0",
50
42
  "@atlaskit/textfield": "^5.3.0",
51
43
  "@atlaskit/theme": "^12.2.0",
52
- "@atlaskit/tokens": "^0.10.0",
44
+ "@atlaskit/tokens": "^0.11.0",
53
45
  "@atlaskit/tooltip": "^17.6.0",
54
46
  "@atlaskit/ufo": "^0.1.0",
55
47
  "@atlaskit/visually-hidden": "^1.1.0",
@@ -82,7 +74,7 @@
82
74
  "@atlaskit/webdriver-runner": "*",
83
75
  "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
84
76
  "@atlassian/link-picker-atlassian-plugin": "^23.0.0",
85
- "@atlassian/link-picker-plugins": "^11.0.0",
77
+ "@atlassian/link-picker-plugins": "^11.1.0",
86
78
  "@atlassian/recent-work-client": "^1.6.0",
87
79
  "@atlassian/search-provider": "^2.3.0",
88
80
  "@testing-library/dom": "^8.17.1",
@@ -98,7 +90,7 @@
98
90
  "lodash": "^4.17.21",
99
91
  "mockdate": "^3.0.2",
100
92
  "node-fetch": "^2.6.7",
101
- "prettier": "^2.1.1",
93
+ "prettier": "^2.7.0",
102
94
  "react-dom": "^16.8.0",
103
95
  "sinon": "^2.2.0",
104
96
  "typescript": "4.5.5"
package/report.api.md CHANGED
@@ -25,9 +25,9 @@ import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
25
25
  export type LinkInputType = 'manual' | 'typeAhead';
26
26
 
27
27
  // @public (undocumented)
28
- export const LinkPicker: React_2.MemoExoticComponent<(
29
- props: LinkPickerProps,
30
- ) => JSX.Element>;
28
+ export const LinkPicker: React_2.MemoExoticComponent<
29
+ (props: LinkPickerProps) => JSX.Element
30
+ >;
31
31
 
32
32
  // @public (undocumented)
33
33
  export interface LinkPickerPlugin {
@@ -1,63 +0,0 @@
1
- /**
2
- * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
- *
4
- * Generates analytics utilities from the package analytics spec yaml
5
- *
6
- * @codegen <<SignedSource::758b8a20cae1b6d410cecd4493453a21>>
7
- * @codegenCommand yarn workspace @atlaskit/link-picker run codegen-analytics
8
- */
9
- export declare type PackageMetaDataType = {
10
- packageName: '@atlaskit/link-picker';
11
- packageVersion: string;
12
- source: 'linkPicker';
13
- componentName: 'linkPicker';
14
- };
15
- export declare type LinkPickerAnalyticsContextType = {
16
- linkState: 'editLink' | 'newLink';
17
- linkFieldContent: 'url' | 'text_string' | null;
18
- linkFieldContentInputMethod: 'manual' | 'paste' | 'searchResult' | null;
19
- linkFieldContentInputSource: string | null;
20
- displayTextFieldContent: 'text_string' | null;
21
- displayTextFieldContentInputMethod: 'manual' | 'paste' | null;
22
- tab: string | null;
23
- };
24
- export declare type FormSubmittedLinkPickerAttributesType = {};
25
- export declare type InlineDialogViewedLinkPickerAttributesType = {};
26
- export declare type InlineDialogClosedLinkPickerAttributesType = {};
27
- export declare type TextFieldUpdatedLinkFieldAttributesType = {};
28
- export declare type TextFieldUpdatedDisplayTextFieldAttributesType = {};
29
- export declare type TabViewedAttributesType = {};
30
- export declare type LinkPickerUnhandledErrorCaughtAttributesType = {
31
- browserInfo: string;
32
- error: string;
33
- componentStack: string | null;
34
- };
35
- export declare type SearchResultsShownPreQuerySearchResultsAttributesType = {
36
- resultCount: number;
37
- };
38
- export declare type SearchResultsShownPostQuerySearchResultsAttributesType = {
39
- resultCount: number;
40
- };
41
- export declare type ResultsResolveFailedAttributesType = {
42
- error: string;
43
- };
44
- declare type AnalyticsEventAttributes = {
45
- 'ui.form.submitted.linkPicker': FormSubmittedLinkPickerAttributesType;
46
- 'ui.inlineDialog.viewed.linkPicker': InlineDialogViewedLinkPickerAttributesType;
47
- 'ui.inlineDialog.closed.linkPicker': InlineDialogClosedLinkPickerAttributesType;
48
- 'ui.textField.updated.linkField': TextFieldUpdatedLinkFieldAttributesType;
49
- 'ui.textField.updated.displayTextField': TextFieldUpdatedDisplayTextFieldAttributesType;
50
- 'ui.tab.viewed': TabViewedAttributesType;
51
- 'ui.linkPicker.unhandledErrorCaught': LinkPickerUnhandledErrorCaughtAttributesType;
52
- 'ui.searchResults.shown.preQuerySearchResults': SearchResultsShownPreQuerySearchResultsAttributesType;
53
- 'ui.searchResults.shown.postQuerySearchResults': SearchResultsShownPostQuerySearchResultsAttributesType;
54
- 'operational.resultsResolve.failed': ResultsResolveFailedAttributesType;
55
- };
56
- declare function createEventPayload<K extends keyof AnalyticsEventAttributes>(eventKey: K, attributes: AnalyticsEventAttributes[K]): {
57
- eventType: string;
58
- actionSubject: string;
59
- action: string;
60
- actionSubjectId: string;
61
- attributes: AnalyticsEventAttributes[K];
62
- };
63
- export default createEventPayload;
@@ -1,29 +0,0 @@
1
- import React from 'react';
2
- import { LinkPickerAnalyticsContextType } from '../../analytics.codegen';
3
- declare type AnalyticsContextAttributesType = LinkPickerAnalyticsContextType;
4
- export declare type TrackAttribute = <K extends keyof LinkPickerAnalyticsContextType>(attribute: K, value: AnalyticsContextAttributesType[K]) => void;
5
- interface AnalyticsContextType {
6
- /**
7
- * Update a single attribute in the analytics context
8
- */
9
- trackAttribute: TrackAttribute;
10
- /**
11
- * Update a set of attributes in the analytics context
12
- */
13
- trackAttributes: (attributes: Partial<LinkPickerAnalyticsContextType>) => void;
14
- /**
15
- * Retrieve the current set of attributes
16
- * Can be used by components to derive/compute new attributes for specific events
17
- */
18
- getAttributes: () => LinkPickerAnalyticsContextType;
19
- }
20
- /**
21
- * Hook that exposes the context-level attribute getters and setters.
22
- */
23
- export declare const useLinkPickerAnalytics: () => AnalyticsContextType;
24
- /**
25
- * Wraps a component with the analytics context + listener to update events with contextual-level attributes.
26
- * Should be implemented once at the root of the link picker.
27
- */
28
- export declare function withLinkPickerAnalyticsContext<P>(WrappedComponent: React.ComponentType<P>): React.ComponentType<P>;
29
- export {};
@@ -1,11 +0,0 @@
1
- import { CustomData } from '@atlaskit/ufo';
2
- export declare const ufoExperience: {
3
- readonly mounted: "component-mounted";
4
- };
5
- declare type ExperienceType = keyof typeof ufoExperience;
6
- declare type ExperienceName = typeof ufoExperience[ExperienceType];
7
- export declare const startUfoExperience: (experienceName: ExperienceName, id: string, metadata?: CustomData | undefined) => void;
8
- export declare const succeedUfoExperience: (experienceName: ExperienceName, id: string, metadata?: CustomData | undefined) => void;
9
- export declare const failUfoExperience: (experienceName: ExperienceName, id: string, metadata?: CustomData | undefined) => void;
10
- export declare const abortUfoExperience: (experienceName: ExperienceName, id: string, metadata?: CustomData | undefined) => void;
11
- export {};
@@ -1,2 +0,0 @@
1
- export { useLinkPickerAnalytics, withLinkPickerAnalyticsContext, } from './context';
2
- export { withInputFieldTracking } from './input-field-tracking';
@@ -1,17 +0,0 @@
1
- import React from 'react';
2
- import { LinkPickerAnalyticsContextType } from '../../analytics.codegen';
3
- declare type InputFields = 'link' | 'displayText';
4
- /**
5
- * Wraps an input field and connects it to the link picker analytics context to provide a baseline of analytics tracking
6
- * @param WrappedComponent The input field to be tracked
7
- * @param field The name of the field (ie matching actionSubjectId)
8
- * @param filterOnChangeEventAttrs Function to hook into and filter/customise the default attribute tracking logic
9
- * @returns HOC Input field with tracking
10
- */
11
- export declare const withInputFieldTracking: <P extends {
12
- onBlur?: ((e: React.FocusEvent<HTMLInputElement>) => void) | undefined;
13
- onChange?: ((e: React.ChangeEvent<HTMLInputElement>) => void) | undefined;
14
- onClear?: Function | undefined;
15
- onFocus?: ((e: React.FocusEvent<HTMLInputElement>) => void) | undefined;
16
- }, Field extends InputFields>(WrappedComponent: React.ComponentType<P>, field: Field, filterOnChangeEventAttrs?: <OnChangeAttributes extends Partial<LinkPickerAnalyticsContextType>>(event: React.ChangeEvent<HTMLInputElement>, attributes: OnChangeAttributes) => OnChangeAttributes) => React.ComponentType<P>;
17
- export {};
@@ -1,2 +0,0 @@
1
- export declare const ANALYTICS_CHANNEL = "media";
2
- export declare const COMPONENT_NAME = "linkPicker";
@@ -1,4 +0,0 @@
1
- /** @jsx jsx */
2
- import { jsx } from '@emotion/react';
3
- declare const GenericErrorSVG: (props: React.SVGProps<SVGSVGElement>) => jsx.JSX.Element;
4
- export default GenericErrorSVG;
@@ -1 +0,0 @@
1
- export declare const genericErrorStyles: import("@emotion/react").SerializedStyles;
@@ -1,5 +0,0 @@
1
- export declare const isSafeUrl: (url: string) => boolean;
2
- /**
3
- * Adds protocol to url if needed.
4
- */
5
- export declare function normalizeUrl(url?: string | null): string | null;
@@ -1,10 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- export declare type LinkPickerSessionId = string;
3
- export declare const INIT_CONTEXT = "SESSION_UNINITIALIZED";
4
- export declare const SessionContext: React.Context<string>;
5
- interface SessionProviderProps {
6
- children: ReactNode;
7
- }
8
- export declare const LinkPickerSessionProvider: ({ children, }: SessionProviderProps) => JSX.Element;
9
- export declare const useLinkPickerSessionId: () => string;
10
- export {};
@@ -1,8 +0,0 @@
1
- /// <reference types="react" />
2
- declare const useFixHeight: (shouldFixHeight: boolean) => {
3
- ref: import("react").RefObject<HTMLDivElement>;
4
- style: {
5
- minHeight: string | number;
6
- } | undefined;
7
- };
8
- export default useFixHeight;
@@ -1,3 +0,0 @@
1
- export { ComposedLinkPicker as LinkPicker } from './ui';
2
- export type { LinkPickerProps } from './ui/link-picker';
3
- export type { LinkInputType, LinkPickerPlugin, LinkPickerState, LinkSearchListItemData, LinkPickerPluginErrorFallback, } from './ui/types';
@@ -1,14 +0,0 @@
1
- import { LinkPickerPlugin, LinkPickerPluginErrorFallback, LinkPickerState, LinkSearchListItemData } from '../../ui/types';
2
- export interface LinkPickerPluginsService {
3
- items: LinkSearchListItemData[] | null;
4
- isLoading: boolean;
5
- isActivePlugin: boolean;
6
- activePlugin?: LinkPickerPlugin;
7
- tabs: {
8
- tabTitle: string;
9
- }[];
10
- error: unknown | null;
11
- retry: () => void;
12
- errorFallback?: LinkPickerPluginErrorFallback;
13
- }
14
- export declare function usePlugins(state: LinkPickerState | null, activeTab: number, plugins?: LinkPickerPlugin[]): LinkPickerPluginsService;
@@ -1,33 +0,0 @@
1
- /// <reference types="react" />
2
- import { LinkSearchListItemData } from '../../ui/types';
3
- export interface PluginState {
4
- items: LinkSearchListItemData[] | null;
5
- error: unknown | null;
6
- isLoading: boolean;
7
- }
8
- export declare const ACTION_CLEAR = "CLEAR";
9
- export declare const ACTION_LOADING = "LOADING";
10
- export declare const ACTION_SUCCESS = "SUCCESS";
11
- export declare const ACTION_ERRORED = "ERROR";
12
- interface ClearAction {
13
- type: typeof ACTION_CLEAR;
14
- }
15
- interface ResolveLoadingAction {
16
- type: typeof ACTION_LOADING;
17
- }
18
- interface ResolveSuccessAction {
19
- type: typeof ACTION_SUCCESS;
20
- payload: Pick<PluginState, 'items' | 'isLoading'>;
21
- }
22
- interface ResolveErrorAction {
23
- type: typeof ACTION_ERRORED;
24
- payload: PluginState['error'];
25
- }
26
- export declare type ReducerAction = ClearAction | ResolveLoadingAction | ResolveSuccessAction | ResolveErrorAction;
27
- export declare const INITIAL_STATE: PluginState;
28
- export declare function reducer(state: PluginState, action: ReducerAction): PluginState;
29
- export declare const usePluginReducer: () => [
30
- PluginState,
31
- import("react").Dispatch<ReducerAction>
32
- ];
33
- export {};
@@ -1,18 +0,0 @@
1
- import { LinkPickerPlugin, LinkPickerState, ResolveResult } from '../../ui/types';
2
- export declare class CancellationError extends Error {
3
- }
4
- export declare const cancellable: <T extends unknown>(promise: Promise<T>) => {
5
- promise: Promise<T>;
6
- cancel: () => void;
7
- };
8
- /**
9
- * Wraps the resolve with a cancellation wrapper and makes promise + generator plugin resolves more compatible
10
- * Calling cancel for generator plugin prevents it from yielding any further updates
11
- */
12
- export declare const resolvePluginUpdates: (plugin: LinkPickerPlugin, state: LinkPickerState) => {
13
- cancel: () => void;
14
- next: () => Promise<{
15
- done?: boolean;
16
- value: ResolveResult;
17
- }>;
18
- };
@@ -1,3 +0,0 @@
1
- import { LinkPickerState } from '../../ui/types';
2
- import { PickerState } from '../../ui/link-picker';
3
- export declare function useSearchQuery(state: PickerState): LinkPickerState | null;
@@ -1,18 +0,0 @@
1
- import React, { Component, ReactNode } from 'react';
2
- export declare type ErrorBoundaryErrorInfo = {
3
- componentStack: string;
4
- };
5
- declare type BaseErrorBoundaryState = {
6
- hasError: boolean;
7
- };
8
- interface BaseErrorBoundaryProps {
9
- children: ReactNode;
10
- ErrorComponent?: React.ComponentType;
11
- onError?: (error: Error, info?: ErrorBoundaryErrorInfo) => void;
12
- }
13
- export declare class BaseErrorBoundary extends Component<BaseErrorBoundaryProps, BaseErrorBoundaryState> {
14
- constructor(props: BaseErrorBoundaryProps);
15
- componentDidCatch(error: Error, info?: ErrorBoundaryErrorInfo): void;
16
- render(): React.ReactNode;
17
- }
18
- export {};
@@ -1,3 +0,0 @@
1
- /** @jsx jsx */
2
- import { jsx } from '@emotion/react';
3
- export declare const ErrorBoundaryFallback: () => jsx.JSX.Element;
@@ -1,7 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
3
- interface ErrorBoundaryProps extends WithAnalyticsEventsProps {
4
- children: ReactNode;
5
- }
6
- declare const _default: React.ForwardRefExoticComponent<Omit<ErrorBoundaryProps, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
7
- export default _default;
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import { PackageMetaDataType } from '../analytics.codegen';
3
- import { LinkPickerProps } from './link-picker';
4
- export declare const PACKAGE_DATA: PackageMetaDataType;
5
- export declare const ComposedLinkPicker: React.MemoExoticComponent<(props: LinkPickerProps) => JSX.Element>;
@@ -1,22 +0,0 @@
1
- import React, { AriaAttributes, Ref } from 'react';
2
- declare type AnnouncerProps = {
3
- ref?: Ref<HTMLDivElement>;
4
- /** Set 'false' for announcing only changed text
5
- * (not announce duplicate part of string after second render),
6
- * and 'true' for announcing all the string after each render */
7
- ariaAtomic?: AriaAttributes['aria-atomic'];
8
- /** Set politeness settings */
9
- ariaLive?: AriaAttributes['aria-live'];
10
- /** Used to describe what types of changes have occurred to an aria-live region */
11
- ariaRelevant?: AriaAttributes['aria-relevant'];
12
- /** Role used to set attribute role. See more details https://dequeuniversity.com/library/aria/liveregion-playground#configOptions */
13
- role?: 'status' | 'log' | 'alert' | 'timer' | 'marquee';
14
- /** Text message that will be announced */
15
- text: string;
16
- /** Debounce delay.
17
- * Set delay (ms) to prevent announce the same string multiple times.
18
- * It can be useful for cases when the parent component re-renders with the same announcer's text. */
19
- delay?: number;
20
- };
21
- declare const _default: React.NamedExoticComponent<AnnouncerProps>;
22
- export default _default;
@@ -1,15 +0,0 @@
1
- declare const result: {
2
- mac: boolean;
3
- ie: boolean;
4
- ie_version: number;
5
- gecko: boolean;
6
- chrome: boolean;
7
- chrome_version: number;
8
- android: boolean;
9
- ios: boolean;
10
- webkit: boolean;
11
- safari: boolean;
12
- supportsIntersectionObserver: boolean;
13
- supportsResizeObserver: boolean;
14
- };
15
- export { result as browser };
@@ -1,13 +0,0 @@
1
- /// <reference types="react" />
2
- /** @jsx jsx */
3
- import { jsx } from '@emotion/react';
4
- export declare const testIds: {
5
- readonly insertButton: "link-picker-insert-button";
6
- readonly cancelButton: "link-picker-cancel-button";
7
- };
8
- interface FormFooterProps extends React.HTMLAttributes<HTMLElement> {
9
- isEditing?: boolean;
10
- onCancel?: () => void;
11
- }
12
- declare const _default: import("react").MemoExoticComponent<({ isEditing, onCancel, ...restProps }: FormFooterProps) => jsx.JSX.Element>;
13
- export default _default;
@@ -1 +0,0 @@
1
- export declare const formFooterStyles: import("@emotion/react").SerializedStyles;
@@ -1,75 +0,0 @@
1
- /// <reference types="react" />
2
- import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
3
- import { LinkInputType, LinkPickerPlugin } from '../types';
4
- export declare const RECENT_SEARCH_LIST_SIZE = 5;
5
- export declare const testIds: {
6
- readonly tabList: "link-picker-tabs";
7
- readonly tabItem: "link-picker-tab";
8
- readonly urlError: string;
9
- readonly clearUrlButton: string;
10
- readonly resultListTitle: string;
11
- readonly searchResultItem: string;
12
- readonly searchResultList: string;
13
- readonly searchResultLoadingIndicator: string;
14
- readonly emptyResultPage: string;
15
- readonly searchError: string;
16
- readonly insertButton: "link-picker-insert-button";
17
- readonly cancelButton: "link-picker-cancel-button";
18
- readonly linkPickerRoot: "link-picker-root";
19
- readonly linkPicker: "link-picker";
20
- readonly urlInputField: "link-url";
21
- readonly textInputField: "link-text";
22
- readonly searchIcon: "link-picker-search-icon";
23
- };
24
- interface Meta {
25
- /** Indicates how the link was picked. */
26
- inputMethod: LinkInputType;
27
- }
28
- interface OnSubmitParameter {
29
- /** The `url` of the linked resource. */
30
- url: string;
31
- /** The desired text to be displayed alternatively to the title of the linked resource. */
32
- displayText: string | null;
33
- /** The resolved `title` of the resource at the time of link picking (if applicable, null if not known). */
34
- title: string | null;
35
- /** Meta data about the link picking submission. */
36
- meta: Meta;
37
- /**
38
- * The input value of the `url` field at time of submission if inserted "manually".
39
- * This can useful if the `url` was manually inserted with a value that is different from the normalised value returned as `url`.
40
- * @example
41
- * { url: 'https://google.com', rawUrl: 'google.com' }
42
- */
43
- rawUrl?: string;
44
- }
45
- export interface LinkPickerProps {
46
- /**
47
- * Callback to fire on form submission.
48
- */
49
- onSubmit: (arg: OnSubmitParameter, analytic?: UIAnalyticsEvent | null) => void;
50
- /** Callback to fire when the cancel button is clicked. */
51
- onCancel: () => void;
52
- /** Callback to fire when content is changed inside the link picker e.g. items, when loading, tabs */
53
- onContentResize?: () => void;
54
- /** The url of the linked resource for editing. */
55
- url?: string;
56
- /** The desired text to be displayed alternatively to the title of the linked resource for editing. */
57
- displayText?: string | null;
58
- /** Plugins that provide link suggestions / search capabilities. */
59
- plugins?: LinkPickerPlugin[];
60
- /** Customise the link picker root component */
61
- component?: React.ComponentType<Partial<LinkPickerProps> & {
62
- children: React.ReactElement;
63
- }>;
64
- featureFlags?: Record<string, unknown>;
65
- }
66
- export interface PickerState {
67
- selectedIndex: number;
68
- activeIndex: number;
69
- url: string;
70
- displayText: string;
71
- invalidUrl: boolean;
72
- activeTab: number;
73
- }
74
- declare const _default: import("react").ComponentType<LinkPickerProps>;
75
- export default _default;
@@ -1,20 +0,0 @@
1
- /** @jsx jsx */
2
- import { jsx } from '@emotion/react';
3
- export declare const CONTACT_SUPPORT_LINK = "https://support.atlassian.com/contact/";
4
- export declare const messages: {
5
- searchErrorHeader: {
6
- id: string;
7
- defaultMessage: string;
8
- description: string;
9
- };
10
- searchErrorDescription: {
11
- id: string;
12
- defaultMessage: string;
13
- description: string;
14
- };
15
- };
16
- export declare const testIds: {
17
- searchError: string;
18
- };
19
- declare const LinkSearchError: () => jsx.JSX.Element;
20
- export default LinkSearchError;
@@ -1,42 +0,0 @@
1
- /// <reference types="react" />
2
- import { LinkSearchListItemData } from '../../types';
3
- export declare const messages: {
4
- titleRecentlyViewed: {
5
- id: string;
6
- defaultMessage: string;
7
- description: string;
8
- };
9
- titleResults: {
10
- id: string;
11
- defaultMessage: string;
12
- description: string;
13
- };
14
- searchLinkResults: {
15
- id: string;
16
- defaultMessage: string;
17
- description: string;
18
- };
19
- };
20
- export declare const testIds: {
21
- resultListTitle: string;
22
- searchResultItem: string;
23
- searchResultList: string;
24
- searchResultLoadingIndicator: string;
25
- emptyResultPage: string;
26
- };
27
- export interface LinkSearchListProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect' | 'onMouseEnter' | 'onMouseLeave'> {
28
- items?: LinkSearchListItemData[] | null;
29
- isLoading: boolean;
30
- selectedIndex: number;
31
- activeIndex: number;
32
- onSelect: (objectId: string) => void;
33
- onMouseEnter: (objectId: string) => void;
34
- onMouseLeave: (objectId: string) => void;
35
- ariaControls?: string;
36
- ariaLabelledBy?: string;
37
- role?: string;
38
- id?: string;
39
- hasSearchTerm?: boolean;
40
- }
41
- declare const LinkSearchList: import("react").ForwardRefExoticComponent<LinkSearchListProps & import("react").RefAttributes<HTMLDivElement>>;
42
- export default LinkSearchList;
@@ -1,19 +0,0 @@
1
- /** @jsx jsx */
2
- import { jsx } from '@emotion/react';
3
- export declare const messages: {
4
- noResults: {
5
- id: string;
6
- defaultMessage: string;
7
- description: string;
8
- };
9
- noResultsDescription: {
10
- id: string;
11
- defaultMessage: string;
12
- description: string;
13
- };
14
- };
15
- export declare const testIds: {
16
- emptyResultPage: string;
17
- };
18
- declare const NoResults: () => jsx.JSX.Element;
19
- export default NoResults;
@@ -1,4 +0,0 @@
1
- /** @jsx jsx */
2
- import { jsx } from '@emotion/react';
3
- declare const NoResultsSVG: () => jsx.JSX.Element;
4
- export default NoResultsSVG;
@@ -1 +0,0 @@
1
- export declare const noResultsSVGStyles: import("@emotion/react").SerializedStyles;
@@ -1 +0,0 @@
1
- export declare const emptyStateWrapperStyles: import("@emotion/react").SerializedStyles;
@@ -1,4 +0,0 @@
1
- export declare const listContainerStyles: import("@emotion/react").SerializedStyles;
2
- export declare const spinnerContainerStyles: import("@emotion/react").SerializedStyles;
3
- export declare const listStyles: import("@emotion/react").SerializedStyles;
4
- export declare const listTitleStyles: import("@emotion/react").SerializedStyles;
@@ -1,2 +0,0 @@
1
- import { LinkSearchListItemData } from '../../../types';
2
- export declare const useTrackResultsShown: (isLoading: boolean, items?: LinkSearchListItemData[] | null | undefined, hasSearchTerm?: boolean | undefined) => void;
@@ -1,17 +0,0 @@
1
- /// <reference types="react" />
2
- import { WrappedComponentProps } from 'react-intl-next';
3
- import { LinkSearchListItemData } from '../../types';
4
- export interface Props {
5
- item: LinkSearchListItemData;
6
- selected: boolean;
7
- active: boolean;
8
- onSelect: (objectId: string) => void;
9
- onMouseEnter: (objectId: string) => void;
10
- onMouseLeave: (objectId: string) => void;
11
- id?: string;
12
- role?: string;
13
- }
14
- declare const _default: import("react").FC<import("react-intl-next").WithIntlProps<WrappedComponentProps<"intl"> & Props>> & {
15
- WrappedComponent: import("react").ComponentType<WrappedComponentProps<"intl"> & Props>;
16
- };
17
- export default _default;
@@ -1,9 +0,0 @@
1
- export declare const relativeFontSizeToBase16: (px: number | string) => string;
2
- export declare const composeListItemStyles: (active?: boolean, selected?: boolean) => import("@emotion/react").SerializedStyles;
3
- export declare const itemNameStyles: import("@emotion/react").SerializedStyles;
4
- export declare const listItemNameStyles: import("@emotion/react").SerializedStyles;
5
- export declare const listItemContextStyles: import("@emotion/react").SerializedStyles;
6
- export declare const listItemContainerStyles: import("@emotion/react").SerializedStyles;
7
- export declare const listItemContainerInnerStyles: import("@emotion/react").SerializedStyles;
8
- export declare const itemIconStyles: import("@emotion/react").SerializedStyles;
9
- export declare const imgStyles: import("@emotion/react").SerializedStyles;
@@ -1,85 +0,0 @@
1
- export declare const searchMessages: {
2
- linkLabel: {
3
- id: string;
4
- defaultMessage: string;
5
- description: string;
6
- };
7
- linkAriaLabel: {
8
- id: string;
9
- defaultMessage: string;
10
- description: string;
11
- };
12
- linkPlaceholder: {
13
- id: string;
14
- defaultMessage: string;
15
- description: string;
16
- };
17
- };
18
- export declare const linkMessages: {
19
- linkLabel: {
20
- id: string;
21
- defaultMessage: string;
22
- description: string;
23
- };
24
- linkAriaLabel: {
25
- id: string;
26
- defaultMessage: string;
27
- description: string;
28
- };
29
- linkPlaceholder: {
30
- id: string;
31
- defaultMessage: string;
32
- description: string;
33
- };
34
- };
35
- export declare const formMessages: {
36
- linkInvalid: {
37
- id: string;
38
- defaultMessage: string;
39
- description: string;
40
- };
41
- clearLink: {
42
- id: string;
43
- defaultMessage: string;
44
- description: string;
45
- };
46
- };
47
- export declare const linkTextMessages: {
48
- linkTextLabel: {
49
- id: string;
50
- defaultMessage: string;
51
- description: string;
52
- };
53
- linkTextAriaLabel: {
54
- id: string;
55
- defaultMessage: string;
56
- description: string;
57
- };
58
- linkTextPlaceholder: {
59
- id: string;
60
- defaultMessage: string;
61
- description: string;
62
- };
63
- clearLinkText: {
64
- id: string;
65
- defaultMessage: string;
66
- description: string;
67
- };
68
- };
69
- export declare const messages: {
70
- timeUpdated: {
71
- id: string;
72
- defaultMessage: string;
73
- description: string;
74
- };
75
- timeViewed: {
76
- id: string;
77
- defaultMessage: string;
78
- description: string;
79
- };
80
- timeAgo: {
81
- id: string;
82
- defaultMessage: string;
83
- description: string;
84
- };
85
- };
@@ -1,9 +0,0 @@
1
- /**
2
- * Half padding on the top as the form field has a `gridSize()` margin top that cannot be overridden
3
- */
4
- export declare const rootContainerStyles: import("@emotion/react").SerializedStyles;
5
- export declare const rootContainerStylesForLoader: import("@emotion/react").SerializedStyles;
6
- export declare const searchIconStyles: import("@emotion/react").SerializedStyles;
7
- export declare const tabsWrapperStyles: import("@emotion/react").SerializedStyles;
8
- export declare const flexColumnStyles: import("@emotion/react").SerializedStyles;
9
- export declare const formFooterMargin: import("@emotion/react").SerializedStyles;
@@ -1,18 +0,0 @@
1
- import { jsx } from '@emotion/react';
2
- import { TextFieldProps } from '@atlaskit/textfield';
3
- export declare type TextInputProps = Omit<TextFieldProps, 'name' | 'value'> & {
4
- name: string;
5
- value: string;
6
- label?: string;
7
- onUndo?: Function;
8
- onRedo?: Function;
9
- onClear?: (name: string) => void;
10
- clearLabel?: string;
11
- error?: string | null;
12
- };
13
- export declare const testIds: {
14
- urlError: string;
15
- clearUrlButton: string;
16
- };
17
- declare const TextInput: ({ name, label, autoFocus, onRedo, onUndo, onKeyDown, onClear, clearLabel, error, ...restProps }: TextInputProps) => jsx.JSX.Element;
18
- export default TextInput;
@@ -1,2 +0,0 @@
1
- export declare const clearTextButtonStyles: import("@emotion/react").SerializedStyles;
2
- export declare const fieldStyles: import("@emotion/react").SerializedStyles;
@@ -1,5 +0,0 @@
1
- /**
2
- * UFO + Analytics tracking for component mount (and unmount)
3
- */
4
- declare function TrackMount(): null;
5
- export default TrackMount;
@@ -1,4 +0,0 @@
1
- declare function TrackTabViewed({ activeTab }: {
2
- activeTab: number | null;
3
- }): null;
4
- export default TrackTabViewed;
@@ -1,3 +0,0 @@
1
- import { IntlShape } from 'react-intl-next';
2
- import { ListItemTimeStamp } from '../types';
3
- export declare const transformTimeStamp: (intl: IntlShape, lastViewedDate?: Date | undefined, lastUpdatedDate?: Date | undefined) => ListItemTimeStamp | undefined;
@@ -1,10 +0,0 @@
1
- import { KeyboardEvent } from 'react';
2
- import { IntlShape } from 'react-intl-next';
3
- import { LinkPickerPlugin, LinkSearchListItemData } from '../types';
4
- export declare const isUndoEvent: (e: KeyboardEvent<HTMLInputElement>) => boolean;
5
- export declare const isRedoEvent: (e: KeyboardEvent<HTMLInputElement>) => boolean;
6
- /**
7
- * Retrieve the data source for a link given the item and the plugin that resolved it
8
- */
9
- export declare const getDataSource: (item: LinkSearchListItemData, plugin?: LinkPickerPlugin | undefined) => string;
10
- export declare function getScreenReaderText(items: LinkSearchListItemData[], selectedIndex: number, intl: IntlShape): string | undefined;
@@ -1,3 +0,0 @@
1
- /** @jsx jsx */
2
- import { jsx } from '@emotion/react';
3
- export declare const LoaderFallback: jsx.JSX.Element;
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- import { jsx } from '@emotion/react';
3
- interface ScrollingTabListProps {
4
- children: JSX.Element;
5
- }
6
- export declare const ScrollingTabList: (props: ScrollingTabListProps) => jsx.JSX.Element;
7
- export default ScrollingTabList;
@@ -1,11 +0,0 @@
1
- import { RefObject } from 'react';
2
- export interface ConditionalButtons {
3
- back: boolean;
4
- forward: boolean;
5
- }
6
- export declare const scrollBack: (ref: RefObject<HTMLDivElement>) => void;
7
- export declare const scrollForward: (ref: RefObject<HTMLDivElement>) => void;
8
- export declare const calculateConditionalButtons: (container: HTMLElement | null | undefined, hideButtons: boolean) => ConditionalButtons;
9
- export declare const createGhost: () => HTMLDivElement;
10
- export declare const getTabList: (ref: RefObject<HTMLDivElement>) => Element | null | undefined;
11
- export declare const getContainer: (ref: RefObject<HTMLDivElement>) => HTMLElement | null | undefined;
@@ -1,6 +0,0 @@
1
- import { SerializedStyles } from '@emotion/react';
2
- export declare const scrollingContainerStyles: SerializedStyles;
3
- export declare const containerStyles: SerializedStyles;
4
- export declare const buttonContainerStyles: SerializedStyles;
5
- export declare const backButtonStyles: SerializedStyles;
6
- export declare const nextButtonStyles: SerializedStyles;
@@ -1,59 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { MessageDescriptor } from 'react-intl-next';
3
- export declare type LinkInputType = 'manual' | 'typeAhead';
4
- export interface LinkSearchListItemData {
5
- /** Unique identifiable attribute for the item */
6
- objectId: string;
7
- /** Name / title / display text of the link */
8
- name: string;
9
- /** URL of the resource being linked to */
10
- url: string;
11
- /** Icon to display in link result */
12
- icon: string | React.ComponentType<{
13
- alt: string;
14
- }>;
15
- /** Alt text describing the icon */
16
- iconAlt: string | MessageDescriptor;
17
- /** Context to display in link result */
18
- container?: string;
19
- /** Optional last view date to display in link result */
20
- lastViewedDate?: Date;
21
- /** Optional last updated date to display in link result */
22
- lastUpdatedDate?: Date;
23
- /** Whether the result is pre-fetched from activity provider */
24
- prefetch?: boolean;
25
- /** Metadata about the result */
26
- meta?: {
27
- /** The data source that provided the result */
28
- source?: string;
29
- };
30
- }
31
- export declare type ListItemTimeStamp = {
32
- pageAction: string;
33
- dateString: string;
34
- timeSince?: string | undefined;
35
- };
36
- export interface LinkPickerState {
37
- /** Current query string / URL input field value */
38
- query: string;
39
- }
40
- export interface ResolveResult {
41
- data: LinkSearchListItemData[];
42
- }
43
- export interface LinkPickerPlugin {
44
- resolve: (state: LinkPickerState) => Promise<ResolveResult> | AsyncGenerator<ResolveResult, ResolveResult>;
45
- /** Uniquely identify the tab */
46
- tabKey?: string;
47
- /** Human-readable label for the plugin */
48
- tabTitle?: string;
49
- /** Render function to customise the UI that is displayed when an error occurs resolving results */
50
- errorFallback?: LinkPickerPluginErrorFallback;
51
- /** Metadata about the plugin */
52
- meta?: {
53
- /** The data source that provides all results provided by the plugin */
54
- source?: string;
55
- };
56
- /** Callback for plugin activation */
57
- UNSAFE_onActivation?: () => void;
58
- }
59
- export declare type LinkPickerPluginErrorFallback = (error: unknown, retry: () => void) => ReactNode;