@atlaskit/link-picker 1.10.2 → 1.10.4
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/CHANGELOG.md +12 -0
- package/dist/cjs/common/analytics/experiences.js +62 -0
- package/dist/cjs/controllers/session-provider/index.js +61 -0
- package/dist/cjs/ui/error-boundary/error-boundary-base/index.js +76 -0
- package/dist/cjs/ui/{error-boundary-fallback → error-boundary/error-boundary-fallback}/index.js +2 -2
- package/dist/cjs/ui/error-boundary/index.js +33 -81
- package/dist/cjs/ui/index.js +6 -9
- package/dist/cjs/ui/link-picker/index.js +15 -7
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/common/analytics/experiences.js +39 -0
- package/dist/es2019/controllers/session-provider/index.js +32 -0
- package/dist/es2019/ui/error-boundary/error-boundary-base/index.js +37 -0
- package/dist/es2019/ui/{error-boundary-fallback → error-boundary/error-boundary-fallback}/index.js +2 -2
- package/dist/es2019/ui/error-boundary/index.js +30 -59
- package/dist/es2019/ui/index.js +5 -8
- package/dist/es2019/ui/link-picker/index.js +13 -7
- package/dist/es2019/version.json +1 -1
- package/dist/esm/common/analytics/experiences.js +40 -0
- package/dist/esm/controllers/session-provider/index.js +38 -0
- package/dist/esm/ui/error-boundary/error-boundary-base/index.js +56 -0
- package/dist/esm/ui/{error-boundary-fallback → error-boundary/error-boundary-fallback}/index.js +2 -2
- package/dist/esm/ui/error-boundary/index.js +30 -79
- package/dist/esm/ui/index.js +5 -8
- package/dist/esm/ui/link-picker/index.js +13 -7
- package/dist/esm/version.json +1 -1
- package/dist/types/common/analytics/experiences.d.ts +11 -0
- package/dist/types/controllers/session-provider/index.d.ts +10 -0
- package/dist/types/ui/error-boundary/error-boundary-base/index.d.ts +18 -0
- package/dist/types/ui/error-boundary/error-boundary-fallback/index.d.ts +3 -0
- package/dist/types/ui/error-boundary/index.d.ts +4 -24
- package/dist/types-ts4.0/analytics.codegen.d.ts +52 -0
- package/dist/types-ts4.0/common/analytics/context.d.ts +28 -0
- package/dist/types-ts4.0/common/analytics/experiences.d.ts +11 -0
- package/dist/types-ts4.0/common/analytics/index.d.ts +2 -0
- package/dist/types-ts4.0/common/analytics/input-field-tracking.d.ts +17 -0
- package/dist/types-ts4.0/common/constants.d.ts +2 -0
- package/dist/types-ts4.0/common/generic-error-svg/index.d.ts +4 -0
- package/dist/types-ts4.0/common/generic-error-svg/styled.d.ts +1 -0
- package/dist/types-ts4.0/common/utils/url.d.ts +5 -0
- package/dist/types-ts4.0/controllers/session-provider/index.d.ts +10 -0
- package/dist/types-ts4.0/controllers/use-fix-height/index.d.ts +8 -0
- package/dist/types-ts4.0/index.d.ts +3 -0
- package/dist/types-ts4.0/services/use-plugins/index.d.ts +14 -0
- package/dist/types-ts4.0/services/use-plugins/reducer.d.ts +33 -0
- package/dist/types-ts4.0/services/use-plugins/utils.d.ts +18 -0
- package/dist/types-ts4.0/services/use-search-query/index.d.ts +3 -0
- package/dist/types-ts4.0/ui/error-boundary/error-boundary-base/index.d.ts +18 -0
- package/dist/{types/ui → types-ts4.0/ui/error-boundary}/error-boundary-fallback/index.d.ts +0 -0
- package/dist/types-ts4.0/ui/error-boundary/index.d.ts +7 -0
- package/dist/types-ts4.0/ui/index.d.ts +5 -0
- package/dist/types-ts4.0/ui/link-picker/announcer.d.ts +22 -0
- package/dist/types-ts4.0/ui/link-picker/browser.d.ts +15 -0
- package/dist/types-ts4.0/ui/link-picker/form-footer/index.d.ts +13 -0
- package/dist/types-ts4.0/ui/link-picker/form-footer/styled.d.ts +1 -0
- package/dist/types-ts4.0/ui/link-picker/index.d.ts +69 -0
- package/dist/types-ts4.0/ui/link-picker/link-search-error/index.d.ts +20 -0
- package/dist/types-ts4.0/ui/link-picker/link-search-list/index.d.ts +43 -0
- package/dist/types-ts4.0/ui/link-picker/link-search-list/link-search-no-results/index.d.ts +19 -0
- package/dist/types-ts4.0/ui/link-picker/link-search-list/link-search-no-results/no-results-svg/index.d.ts +4 -0
- package/dist/types-ts4.0/ui/link-picker/link-search-list/link-search-no-results/no-results-svg/styled.d.ts +1 -0
- package/dist/types-ts4.0/ui/link-picker/link-search-list/link-search-no-results/styled.d.ts +1 -0
- package/dist/types-ts4.0/ui/link-picker/link-search-list/styled.d.ts +4 -0
- package/dist/types-ts4.0/ui/link-picker/list-item/index.d.ts +17 -0
- package/dist/types-ts4.0/ui/link-picker/list-item/styled.d.ts +9 -0
- package/dist/types-ts4.0/ui/link-picker/messages.d.ts +85 -0
- package/dist/types-ts4.0/ui/link-picker/styled.d.ts +9 -0
- package/dist/types-ts4.0/ui/link-picker/text-input/index.d.ts +14 -0
- package/dist/types-ts4.0/ui/link-picker/text-input/styled.d.ts +2 -0
- package/dist/types-ts4.0/ui/link-picker/transformTimeStamp.d.ts +3 -0
- package/dist/types-ts4.0/ui/link-picker/utils.d.ts +10 -0
- package/dist/types-ts4.0/ui/loader-fallback/index.d.ts +3 -0
- package/dist/types-ts4.0/ui/types.d.ts +57 -0
- package/package.json +15 -5
- package/report.api.md +45 -65
|
@@ -0,0 +1,52 @@
|
|
|
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::05d8b1c9e46066efd0d11fa9d19c32a9>>
|
|
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
|
+
};
|
|
23
|
+
export declare type FormSubmittedLinkPickerAttributesType = {};
|
|
24
|
+
export declare type InlineDialogViewedLinkPickerAttributesType = {};
|
|
25
|
+
export declare type InlineDialogClosedLinkPickerAttributesType = {};
|
|
26
|
+
export declare type TextFieldUpdatedLinkFieldAttributesType = {};
|
|
27
|
+
export declare type TextFieldUpdatedDisplayTextFieldAttributesType = {};
|
|
28
|
+
export declare type LinkPickerUnhandledErrorCaughtAttributesType = {
|
|
29
|
+
browserInfo: string;
|
|
30
|
+
error: string;
|
|
31
|
+
componentStack: string | null;
|
|
32
|
+
};
|
|
33
|
+
export declare type ResultsResolveFailedAttributesType = {
|
|
34
|
+
error: string;
|
|
35
|
+
};
|
|
36
|
+
declare type AnalyticsEventAttributes = {
|
|
37
|
+
'ui.form.submitted.linkPicker': FormSubmittedLinkPickerAttributesType;
|
|
38
|
+
'ui.inlineDialog.viewed.linkPicker': InlineDialogViewedLinkPickerAttributesType;
|
|
39
|
+
'ui.inlineDialog.closed.linkPicker': InlineDialogClosedLinkPickerAttributesType;
|
|
40
|
+
'ui.textField.updated.linkField': TextFieldUpdatedLinkFieldAttributesType;
|
|
41
|
+
'ui.textField.updated.displayTextField': TextFieldUpdatedDisplayTextFieldAttributesType;
|
|
42
|
+
'ui.linkPicker.unhandledErrorCaught': LinkPickerUnhandledErrorCaughtAttributesType;
|
|
43
|
+
'operational.resultsResolve.failed': ResultsResolveFailedAttributesType;
|
|
44
|
+
};
|
|
45
|
+
declare function createEventPayload<K extends keyof AnalyticsEventAttributes>(eventKey: K, attributes: AnalyticsEventAttributes[K]): {
|
|
46
|
+
eventType: string;
|
|
47
|
+
actionSubject: string;
|
|
48
|
+
action: string;
|
|
49
|
+
actionSubjectId: string;
|
|
50
|
+
attributes: AnalyticsEventAttributes[K];
|
|
51
|
+
};
|
|
52
|
+
export default createEventPayload;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { LinkPickerAnalyticsContextType } from '../../analytics.codegen';
|
|
3
|
+
export declare type TrackAttribute = <K extends keyof LinkPickerAnalyticsContextType>(attribute: K, value: LinkPickerAnalyticsContextType[K]) => void;
|
|
4
|
+
interface AnalyticsContextType {
|
|
5
|
+
/**
|
|
6
|
+
* Update a single attribute in the analytics context
|
|
7
|
+
*/
|
|
8
|
+
trackAttribute: TrackAttribute;
|
|
9
|
+
/**
|
|
10
|
+
* Update a set of attributes in the analytics context
|
|
11
|
+
*/
|
|
12
|
+
trackAttributes: (attributes: Partial<LinkPickerAnalyticsContextType>) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Retrieve the current set of attributes
|
|
15
|
+
* Can be used by components to derive/compute new attributes for specific events
|
|
16
|
+
*/
|
|
17
|
+
getAttributes: () => LinkPickerAnalyticsContextType;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Hook that exposes the context-level attribute getters and setters.
|
|
21
|
+
*/
|
|
22
|
+
export declare const useLinkPickerAnalytics: () => AnalyticsContextType;
|
|
23
|
+
/**
|
|
24
|
+
* Wraps a component with the analytics context + listener to update events with contextual-level attributes.
|
|
25
|
+
* Should be implemented once at the root of the link picker.
|
|
26
|
+
*/
|
|
27
|
+
export declare function withLinkPickerAnalyticsContext<P>(WrappedComponent: React.ComponentType<P>): React.ComponentType<P>;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,17 @@
|
|
|
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 {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const genericErrorStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1,10 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,14 @@
|
|
|
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;
|
|
@@ -0,0 +1,33 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
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 {};
|
|
File without changes
|
|
@@ -0,0 +1,7 @@
|
|
|
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;
|
|
@@ -0,0 +1,5 @@
|
|
|
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>;
|
|
@@ -0,0 +1,22 @@
|
|
|
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;
|
|
@@ -0,0 +1,15 @@
|
|
|
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 };
|
|
@@ -0,0 +1,13 @@
|
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const formFooterStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1,69 @@
|
|
|
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 clearUrlButton: "clear-text";
|
|
7
|
+
readonly urlError: "link-error";
|
|
8
|
+
readonly tabList: "link-picker-tabs";
|
|
9
|
+
readonly tabItem: "link-picker-tab";
|
|
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 linkPicker: "link-picker";
|
|
19
|
+
readonly urlInputField: "link-url";
|
|
20
|
+
readonly textInputField: "link-text";
|
|
21
|
+
readonly searchIcon: "link-picker-search-icon";
|
|
22
|
+
};
|
|
23
|
+
interface Meta {
|
|
24
|
+
/** Indicates how the link was picked. */
|
|
25
|
+
inputMethod: LinkInputType;
|
|
26
|
+
}
|
|
27
|
+
interface OnSubmitParameter {
|
|
28
|
+
/** The `url` of the linked resource. */
|
|
29
|
+
url: string;
|
|
30
|
+
/** The desired text to be displayed alternatively to the title of the linked resource. */
|
|
31
|
+
displayText: string | null;
|
|
32
|
+
/** The resolved `title` of the resource at the time of link picking (if applicable, null if not known). */
|
|
33
|
+
title: string | null;
|
|
34
|
+
/** Meta data about the link picking submission. */
|
|
35
|
+
meta: Meta;
|
|
36
|
+
/**
|
|
37
|
+
* The input value of the `url` field at time of submission if inserted "manually".
|
|
38
|
+
* This can useful if the `url` was manually inserted with a value that is different from the normalised value returned as `url`.
|
|
39
|
+
* @example
|
|
40
|
+
* { url: 'https://google.com', rawUrl: 'google.com' }
|
|
41
|
+
*/
|
|
42
|
+
rawUrl?: string;
|
|
43
|
+
}
|
|
44
|
+
export interface LinkPickerProps {
|
|
45
|
+
/**
|
|
46
|
+
* Callback to fire on form submission.
|
|
47
|
+
*/
|
|
48
|
+
onSubmit: (arg: OnSubmitParameter, analytic?: UIAnalyticsEvent | null) => void;
|
|
49
|
+
/** Callback to fire when the cancel button is clicked. */
|
|
50
|
+
onCancel: () => void;
|
|
51
|
+
/** Callback to fire when content is changed inside the link picker e.g. items, when loading, tabs */
|
|
52
|
+
onContentResize?: () => void;
|
|
53
|
+
/** The url of the linked resource for editing. */
|
|
54
|
+
url?: string;
|
|
55
|
+
/** The desired text to be displayed alternatively to the title of the linked resource for editing. */
|
|
56
|
+
displayText?: string | null;
|
|
57
|
+
/** Plugins that provide link suggestions / search capabilities. */
|
|
58
|
+
plugins?: LinkPickerPlugin[];
|
|
59
|
+
}
|
|
60
|
+
export interface PickerState {
|
|
61
|
+
selectedIndex: number;
|
|
62
|
+
activeIndex: number;
|
|
63
|
+
url: string;
|
|
64
|
+
displayText: string;
|
|
65
|
+
invalidUrl: boolean;
|
|
66
|
+
activeTab: number;
|
|
67
|
+
}
|
|
68
|
+
declare const _default: import("react").ComponentType<LinkPickerProps>;
|
|
69
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
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;
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
error?: unknown;
|
|
40
|
+
hasSearchTerm?: boolean;
|
|
41
|
+
}
|
|
42
|
+
declare const LinkSearchList: import("react").ForwardRefExoticComponent<LinkSearchListProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
43
|
+
export default LinkSearchList;
|
|
@@ -0,0 +1,19 @@
|
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const noResultsSVGStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const emptyStateWrapperStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1,4 @@
|
|
|
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;
|
|
@@ -0,0 +1,17 @@
|
|
|
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;
|
|
@@ -0,0 +1,9 @@
|
|
|
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;
|
|
@@ -0,0 +1,85 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
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;
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
declare const TextInput: ({ name, label, autoFocus, onRedo, onUndo, onKeyDown, onClear, clearLabel, error, ...restProps }: TextInputProps) => jsx.JSX.Element;
|
|
14
|
+
export default TextInput;
|