@atlaskit/link-picker 1.20.0 → 1.20.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.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/analytics.codegen.d.ts +13 -13
- package/dist/types/common/analytics/context.d.ts +5 -3
- package/dist/types/common/analytics/experiences.d.ts +6 -6
- package/dist/types/common/analytics/input-field-tracking.d.ts +1 -1
- package/dist/types/controllers/session-provider/index.d.ts +1 -1
- package/dist/types/i18n/cs.d.ts +6 -6
- package/dist/types/i18n/da.d.ts +6 -6
- package/dist/types/i18n/de.d.ts +6 -6
- package/dist/types/i18n/en.d.ts +6 -6
- package/dist/types/i18n/en_GB.d.ts +6 -6
- package/dist/types/i18n/es.d.ts +6 -6
- package/dist/types/i18n/fi.d.ts +6 -6
- package/dist/types/i18n/fr.d.ts +6 -6
- package/dist/types/i18n/hu.d.ts +6 -6
- package/dist/types/i18n/it.d.ts +6 -6
- package/dist/types/i18n/ja.d.ts +6 -6
- package/dist/types/i18n/ko.d.ts +6 -6
- package/dist/types/i18n/nb.d.ts +6 -6
- package/dist/types/i18n/nl.d.ts +6 -6
- package/dist/types/i18n/pl.d.ts +6 -6
- package/dist/types/i18n/pt_BR.d.ts +6 -6
- package/dist/types/i18n/ru.d.ts +6 -6
- package/dist/types/i18n/sv.d.ts +6 -6
- package/dist/types/i18n/th.d.ts +6 -6
- package/dist/types/i18n/tr.d.ts +6 -6
- package/dist/types/i18n/uk.d.ts +6 -6
- package/dist/types/i18n/vi.d.ts +6 -6
- package/dist/types/i18n/zh.d.ts +6 -6
- package/dist/types/i18n/zh_TW.d.ts +6 -6
- package/dist/types/services/use-plugins/reducer.d.ts +1 -1
- package/dist/types/ui/error-boundary/error-boundary-base/index.d.ts +2 -2
- package/dist/types/ui/link-picker/announcer.d.ts +1 -1
- package/dist/types/ui/link-picker/link-search-list/index.d.ts +1 -1
- package/dist/types/ui/link-picker/link-search-list/use-track-results-shown/index.d.ts +1 -1
- package/dist/types/ui/link-picker/text-input/index.d.ts +1 -1
- package/dist/types/ui/link-picker/transformTimeStamp.d.ts +1 -1
- package/dist/types/ui/link-picker/utils.d.ts +1 -1
- package/dist/types/ui/types.d.ts +3 -3
- package/dist/{types-ts4.0 → types-ts4.5}/analytics.codegen.d.ts +13 -13
- package/dist/{types-ts4.0 → types-ts4.5}/common/analytics/context.d.ts +5 -3
- package/dist/{types-ts4.0 → types-ts4.5}/common/analytics/experiences.d.ts +6 -6
- package/dist/{types-ts4.0 → types-ts4.5}/common/analytics/input-field-tracking.d.ts +1 -1
- package/dist/{types-ts4.0 → types-ts4.5}/controllers/session-provider/index.d.ts +1 -1
- package/dist/{types-ts4.0 → types-ts4.5}/services/use-plugins/reducer.d.ts +1 -1
- package/dist/{types-ts4.0 → types-ts4.5}/ui/error-boundary/error-boundary-base/index.d.ts +2 -2
- package/dist/{types-ts4.0 → types-ts4.5}/ui/link-picker/announcer.d.ts +1 -1
- package/dist/{types-ts4.0 → types-ts4.5}/ui/link-picker/link-search-list/index.d.ts +1 -1
- package/dist/{types-ts4.0 → types-ts4.5}/ui/link-picker/link-search-list/use-track-results-shown/index.d.ts +1 -1
- package/dist/{types-ts4.0 → types-ts4.5}/ui/link-picker/text-input/index.d.ts +1 -1
- package/dist/{types-ts4.0 → types-ts4.5}/ui/link-picker/transformTimeStamp.d.ts +1 -1
- package/dist/{types-ts4.0 → types-ts4.5}/ui/link-picker/utils.d.ts +1 -1
- package/dist/{types-ts4.0 → types-ts4.5}/ui/types.d.ts +3 -3
- package/package.json +15 -7
- package/dist/{types-ts4.0 → types-ts4.5}/common/analytics/index.d.ts +0 -0
- package/dist/{types-ts4.0 → types-ts4.5}/common/constants.d.ts +0 -0
- package/dist/{types-ts4.0 → types-ts4.5}/common/generic-error-svg/index.d.ts +0 -0
- package/dist/{types-ts4.0 → types-ts4.5}/common/generic-error-svg/styled.d.ts +0 -0
- package/dist/{types-ts4.0 → types-ts4.5}/common/utils/errors.d.ts +0 -0
- package/dist/{types-ts4.0 → types-ts4.5}/controllers/use-fix-height/index.d.ts +0 -0
- package/dist/{types-ts4.0 → types-ts4.5}/i18n/cs.d.ts +6 -6
- package/dist/{types-ts4.0 → types-ts4.5}/i18n/da.d.ts +6 -6
- package/dist/{types-ts4.0 → types-ts4.5}/i18n/de.d.ts +6 -6
- package/dist/{types-ts4.0 → types-ts4.5}/i18n/en.d.ts +6 -6
- package/dist/{types-ts4.0 → types-ts4.5}/i18n/en_GB.d.ts +6 -6
- package/dist/{types-ts4.0 → types-ts4.5}/i18n/es.d.ts +6 -6
- package/dist/{types-ts4.0 → types-ts4.5}/i18n/fi.d.ts +6 -6
- package/dist/{types-ts4.0 → types-ts4.5}/i18n/fr.d.ts +6 -6
- package/dist/{types-ts4.0 → types-ts4.5}/i18n/hu.d.ts +6 -6
- package/dist/{types-ts4.0 → types-ts4.5}/i18n/it.d.ts +6 -6
- package/dist/{types-ts4.0 → types-ts4.5}/i18n/ja.d.ts +6 -6
- package/dist/{types-ts4.0 → types-ts4.5}/i18n/ko.d.ts +6 -6
- package/dist/{types-ts4.0 → types-ts4.5}/i18n/nb.d.ts +6 -6
- package/dist/{types-ts4.0 → types-ts4.5}/i18n/nl.d.ts +6 -6
- package/dist/{types-ts4.0 → types-ts4.5}/i18n/pl.d.ts +6 -6
- package/dist/{types-ts4.0 → types-ts4.5}/i18n/pt_BR.d.ts +6 -6
- package/dist/{types-ts4.0 → types-ts4.5}/i18n/ru.d.ts +6 -6
- package/dist/{types-ts4.0 → types-ts4.5}/i18n/sv.d.ts +6 -6
- package/dist/{types-ts4.0 → types-ts4.5}/i18n/th.d.ts +6 -6
- package/dist/{types-ts4.0 → types-ts4.5}/i18n/tr.d.ts +6 -6
- package/dist/{types-ts4.0 → types-ts4.5}/i18n/uk.d.ts +6 -6
- package/dist/{types-ts4.0 → types-ts4.5}/i18n/vi.d.ts +6 -6
- package/dist/{types-ts4.0 → types-ts4.5}/i18n/zh.d.ts +6 -6
- package/dist/{types-ts4.0 → types-ts4.5}/i18n/zh_TW.d.ts +6 -6
- /package/dist/{types-ts4.0 → types-ts4.5}/index.d.ts +0 -0
- /package/dist/{types-ts4.0 → types-ts4.5}/services/use-plugins/index.d.ts +0 -0
- /package/dist/{types-ts4.0 → types-ts4.5}/services/use-plugins/utils.d.ts +0 -0
- /package/dist/{types-ts4.0 → types-ts4.5}/services/use-search-query/index.d.ts +0 -0
- /package/dist/{types-ts4.0 → types-ts4.5}/ui/error-boundary/error-boundary-fallback/index.d.ts +0 -0
- /package/dist/{types-ts4.0 → types-ts4.5}/ui/error-boundary/index.d.ts +0 -0
- /package/dist/{types-ts4.0 → types-ts4.5}/ui/index.d.ts +0 -0
- /package/dist/{types-ts4.0 → types-ts4.5}/ui/link-picker/form-footer/index.d.ts +0 -0
- /package/dist/{types-ts4.0 → types-ts4.5}/ui/link-picker/form-footer/styled.d.ts +0 -0
- /package/dist/{types-ts4.0 → types-ts4.5}/ui/link-picker/form-footer/utils.d.ts +0 -0
- /package/dist/{types-ts4.0 → types-ts4.5}/ui/link-picker/index.d.ts +0 -0
- /package/dist/{types-ts4.0 → types-ts4.5}/ui/link-picker/link-search-error/index.d.ts +0 -0
- /package/dist/{types-ts4.0 → types-ts4.5}/ui/link-picker/link-search-list/link-search-no-results/index.d.ts +0 -0
- /package/dist/{types-ts4.0 → types-ts4.5}/ui/link-picker/link-search-list/link-search-no-results/no-results-svg/index.d.ts +0 -0
- /package/dist/{types-ts4.0 → types-ts4.5}/ui/link-picker/link-search-list/link-search-no-results/no-results-svg/styled.d.ts +0 -0
- /package/dist/{types-ts4.0 → types-ts4.5}/ui/link-picker/link-search-list/link-search-no-results/styled.d.ts +0 -0
- /package/dist/{types-ts4.0 → types-ts4.5}/ui/link-picker/link-search-list/styled.d.ts +0 -0
- /package/dist/{types-ts4.0 → types-ts4.5}/ui/link-picker/list-item/index.d.ts +0 -0
- /package/dist/{types-ts4.0 → types-ts4.5}/ui/link-picker/list-item/styled.d.ts +0 -0
- /package/dist/{types-ts4.0 → types-ts4.5}/ui/link-picker/messages.d.ts +0 -0
- /package/dist/{types-ts4.0 → types-ts4.5}/ui/link-picker/styled.d.ts +0 -0
- /package/dist/{types-ts4.0 → types-ts4.5}/ui/link-picker/text-input/styled.d.ts +0 -0
- /package/dist/{types-ts4.0 → types-ts4.5}/ui/link-picker/track-mount/index.d.ts +0 -0
- /package/dist/{types-ts4.0 → types-ts4.5}/ui/link-picker/track-tab-viewed/index.d.ts +0 -0
- /package/dist/{types-ts4.0 → types-ts4.5}/ui/loader-fallback/index.d.ts +0 -0
- /package/dist/{types-ts4.0 → types-ts4.5}/ui/scrolling-tabs/index.d.ts +0 -0
- /package/dist/{types-ts4.0 → types-ts4.5}/ui/scrolling-tabs/scrolling-tabs.d.ts +0 -0
- /package/dist/{types-ts4.0 → types-ts4.5}/ui/scrolling-tabs/styles.d.ts +0 -0
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NOTE:
|
|
3
|
+
*
|
|
4
|
+
* This file is automatically generated by Traduki 2.0.
|
|
5
|
+
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
|
+
*/
|
|
1
7
|
declare const _default: {
|
|
2
8
|
'fabric.linkPicker.button.cancel': string;
|
|
3
9
|
'fabric.linkPicker.button.insert': string;
|
|
@@ -24,10 +30,4 @@ declare const _default: {
|
|
|
24
30
|
'fabric.linkPicker.unhandledError.description': string;
|
|
25
31
|
'fabric.linkPicker.unhandledError.heading': string;
|
|
26
32
|
};
|
|
27
|
-
/**
|
|
28
|
-
* NOTE:
|
|
29
|
-
*
|
|
30
|
-
* This file is automatically generated by Traduki 2.0.
|
|
31
|
-
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
32
|
-
*/
|
|
33
33
|
export default _default;
|
|
@@ -23,7 +23,7 @@ interface ResolveErrorAction {
|
|
|
23
23
|
type: typeof ACTION_ERRORED;
|
|
24
24
|
payload: PluginState['error'];
|
|
25
25
|
}
|
|
26
|
-
export
|
|
26
|
+
export type ReducerAction = ClearAction | ResolveLoadingAction | ResolveSuccessAction | ResolveErrorAction;
|
|
27
27
|
export declare const INITIAL_STATE: PluginState;
|
|
28
28
|
export declare function reducer(state: PluginState, action: ReducerAction): PluginState;
|
|
29
29
|
export declare const usePluginReducer: () => [PluginState, import("react").Dispatch<ReducerAction>];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { Component, ReactNode } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type ErrorBoundaryErrorInfo = {
|
|
3
3
|
componentStack: string;
|
|
4
4
|
};
|
|
5
|
-
|
|
5
|
+
type BaseErrorBoundaryState = {
|
|
6
6
|
hasError: boolean;
|
|
7
7
|
};
|
|
8
8
|
interface BaseErrorBoundaryProps {
|
|
@@ -25,7 +25,7 @@ export declare const testIds: {
|
|
|
25
25
|
searchResultLoadingIndicator: string;
|
|
26
26
|
emptyResultPage: string;
|
|
27
27
|
};
|
|
28
|
-
|
|
28
|
+
type LinkSearchListElement = HTMLElement;
|
|
29
29
|
export interface LinkSearchListProps extends Omit<React.HTMLAttributes<LinkSearchListElement>, 'onSelect' | 'onChange'> {
|
|
30
30
|
items?: LinkSearchListItemData[] | null;
|
|
31
31
|
isLoading: boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { LinkSearchListItemData } from '../../../types';
|
|
2
|
-
export declare const useTrackResultsShown: (isLoading: boolean, items?: LinkSearchListItemData[] | null | undefined, hasSearchTerm?: boolean
|
|
2
|
+
export declare const useTrackResultsShown: (isLoading: boolean, items?: LinkSearchListItemData[] | null | undefined, hasSearchTerm?: boolean) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import { TextFieldProps } from '@atlaskit/textfield';
|
|
3
|
-
export
|
|
3
|
+
export type TextInputProps = Omit<TextFieldProps, 'name' | 'value'> & {
|
|
4
4
|
name: string;
|
|
5
5
|
value: string;
|
|
6
6
|
label?: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { IntlShape } from 'react-intl-next';
|
|
2
2
|
import { ListItemTimeStamp } from '../types';
|
|
3
|
-
export declare const transformTimeStamp: (intl: IntlShape, lastViewedDate?: Date
|
|
3
|
+
export declare const transformTimeStamp: (intl: IntlShape, lastViewedDate?: Date, lastUpdatedDate?: Date) => ListItemTimeStamp | undefined;
|
|
@@ -6,6 +6,6 @@ export declare const isRedoEvent: (e: KeyboardEvent<HTMLInputElement>) => boolea
|
|
|
6
6
|
/**
|
|
7
7
|
* Retrieve the data source for a link given the item and the plugin that resolved it
|
|
8
8
|
*/
|
|
9
|
-
export declare const getDataSource: (item: LinkSearchListItemData, plugin?: LinkPickerPlugin
|
|
9
|
+
export declare const getDataSource: (item: LinkSearchListItemData, plugin?: LinkPickerPlugin) => string;
|
|
10
10
|
export declare function getScreenReaderText(items: LinkSearchListItemData[], selectedIndex: number, intl: IntlShape): string | undefined;
|
|
11
11
|
export declare const handleNavKeyDown: (event: KeyboardEvent<HTMLElement>, itemsLength: number, activeIndex: number) => number;
|
package/dist/types/ui/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { MessageDescriptor } from 'react-intl-next';
|
|
3
|
-
export
|
|
3
|
+
export type LinkInputType = 'manual' | 'typeAhead';
|
|
4
4
|
export interface LinkSearchListItemData {
|
|
5
5
|
/** Unique identifiable attribute for the item */
|
|
6
6
|
objectId: string;
|
|
@@ -28,7 +28,7 @@ export interface LinkSearchListItemData {
|
|
|
28
28
|
source?: string;
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
export
|
|
31
|
+
export type ListItemTimeStamp = {
|
|
32
32
|
pageAction: string;
|
|
33
33
|
dateString: string;
|
|
34
34
|
timeSince?: string | undefined;
|
|
@@ -62,4 +62,4 @@ export interface LinkPickerPluginAction {
|
|
|
62
62
|
label: MessageDescriptor | string;
|
|
63
63
|
callback: () => void;
|
|
64
64
|
}
|
|
65
|
-
export
|
|
65
|
+
export type LinkPickerPluginErrorFallback = (error: unknown, retry: () => void) => ReactNode;
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
* @codegen <<SignedSource::254da005ee62004d45537995770eba56>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/link-picker run codegen-analytics
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export type PackageMetaDataType = {
|
|
10
10
|
packageName: '@atlaskit/link-picker';
|
|
11
11
|
packageVersion: string;
|
|
12
12
|
source: 'linkPicker';
|
|
13
13
|
componentName: 'linkPicker';
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export type LinkPickerAnalyticsContextType = {
|
|
16
16
|
linkState: 'editLink' | 'newLink';
|
|
17
17
|
linkFieldContent: 'url' | 'text_string' | null;
|
|
18
18
|
linkFieldContentInputMethod: 'manual' | 'paste' | 'searchResult' | null;
|
|
@@ -21,27 +21,27 @@ export declare type LinkPickerAnalyticsContextType = {
|
|
|
21
21
|
displayTextFieldContentInputMethod: 'manual' | 'paste' | null;
|
|
22
22
|
tab: string | null;
|
|
23
23
|
};
|
|
24
|
-
export
|
|
25
|
-
export
|
|
26
|
-
export
|
|
27
|
-
export
|
|
28
|
-
export
|
|
29
|
-
export
|
|
30
|
-
export
|
|
24
|
+
export type FormSubmittedLinkPickerAttributesType = {};
|
|
25
|
+
export type InlineDialogViewedLinkPickerAttributesType = {};
|
|
26
|
+
export type InlineDialogClosedLinkPickerAttributesType = {};
|
|
27
|
+
export type TextFieldUpdatedLinkFieldAttributesType = {};
|
|
28
|
+
export type TextFieldUpdatedDisplayTextFieldAttributesType = {};
|
|
29
|
+
export type TabViewedAttributesType = {};
|
|
30
|
+
export type LinkPickerUnhandledErrorCaughtAttributesType = {
|
|
31
31
|
browserInfo: string;
|
|
32
32
|
error: string;
|
|
33
33
|
componentStack: string | null;
|
|
34
34
|
};
|
|
35
|
-
export
|
|
35
|
+
export type SearchResultsShownPreQuerySearchResultsAttributesType = {
|
|
36
36
|
resultCount: number;
|
|
37
37
|
};
|
|
38
|
-
export
|
|
38
|
+
export type SearchResultsShownPostQuerySearchResultsAttributesType = {
|
|
39
39
|
resultCount: number;
|
|
40
40
|
};
|
|
41
|
-
export
|
|
41
|
+
export type ResultsResolveFailedAttributesType = {
|
|
42
42
|
error: string;
|
|
43
43
|
};
|
|
44
|
-
|
|
44
|
+
type AnalyticsEventAttributes = {
|
|
45
45
|
'ui.form.submitted.linkPicker': FormSubmittedLinkPickerAttributesType;
|
|
46
46
|
'ui.inlineDialog.viewed.linkPicker': InlineDialogViewedLinkPickerAttributesType;
|
|
47
47
|
'ui.inlineDialog.closed.linkPicker': InlineDialogClosedLinkPickerAttributesType;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { LinkPickerAnalyticsContextType } from '../../analytics.codegen';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import { LinkPickerProps } from '../../';
|
|
4
|
+
type AnalyticsContextAttributesType = LinkPickerAnalyticsContextType;
|
|
5
|
+
export type TrackAttribute = <K extends keyof LinkPickerAnalyticsContextType>(attribute: K, value: AnalyticsContextAttributesType[K]) => void;
|
|
5
6
|
interface AnalyticsContextType {
|
|
6
7
|
/**
|
|
7
8
|
* Update a single attribute in the analytics context
|
|
@@ -17,6 +18,7 @@ interface AnalyticsContextType {
|
|
|
17
18
|
*/
|
|
18
19
|
getAttributes: () => LinkPickerAnalyticsContextType;
|
|
19
20
|
}
|
|
21
|
+
type LinkPickerAnalyticsProps = Pick<LinkPickerProps, 'url' | 'displayText' | 'plugins'>;
|
|
20
22
|
/**
|
|
21
23
|
* Hook that exposes the context-level attribute getters and setters.
|
|
22
24
|
*/
|
|
@@ -25,5 +27,5 @@ export declare const useLinkPickerAnalytics: () => AnalyticsContextType;
|
|
|
25
27
|
* Wraps a component with the analytics context + listener to update events with contextual-level attributes.
|
|
26
28
|
* Should be implemented once at the root of the link picker.
|
|
27
29
|
*/
|
|
28
|
-
export declare function withLinkPickerAnalyticsContext<P>(WrappedComponent: React.ComponentType<P>): React.ComponentType<P>;
|
|
30
|
+
export declare function withLinkPickerAnalyticsContext<P extends LinkPickerAnalyticsProps>(WrappedComponent: React.ComponentType<P>): React.ComponentType<P>;
|
|
29
31
|
export {};
|
|
@@ -2,10 +2,10 @@ import { CustomData } from '@atlaskit/ufo';
|
|
|
2
2
|
export declare const ufoExperience: {
|
|
3
3
|
readonly mounted: "component-mounted";
|
|
4
4
|
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare const startUfoExperience: (experienceName: ExperienceName, id: string, metadata?: CustomData
|
|
8
|
-
export declare const succeedUfoExperience: (experienceName: ExperienceName, id: string, metadata?: CustomData
|
|
9
|
-
export declare const failUfoExperience: (experienceName: ExperienceName, id: string, metadata?: CustomData
|
|
10
|
-
export declare const abortUfoExperience: (experienceName: ExperienceName, id: string, metadata?: CustomData
|
|
5
|
+
type ExperienceType = keyof typeof ufoExperience;
|
|
6
|
+
type ExperienceName = (typeof ufoExperience)[ExperienceType];
|
|
7
|
+
export declare const startUfoExperience: (experienceName: ExperienceName, id: string, metadata?: CustomData) => void;
|
|
8
|
+
export declare const succeedUfoExperience: (experienceName: ExperienceName, id: string, metadata?: CustomData) => void;
|
|
9
|
+
export declare const failUfoExperience: (experienceName: ExperienceName, id: string, metadata?: CustomData) => void;
|
|
10
|
+
export declare const abortUfoExperience: (experienceName: ExperienceName, id: string, metadata?: CustomData) => void;
|
|
11
11
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { LinkPickerAnalyticsContextType } from '../../analytics.codegen';
|
|
3
|
-
|
|
3
|
+
type InputFields = 'link' | 'displayText';
|
|
4
4
|
/**
|
|
5
5
|
* Wraps an input field and connects it to the link picker analytics context to provide a baseline of analytics tracking
|
|
6
6
|
* @param WrappedComponent The input field to be tracked
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type LinkPickerSessionId = string;
|
|
3
3
|
export declare const INIT_CONTEXT = "SESSION_UNINITIALIZED";
|
|
4
4
|
export declare const SessionContext: React.Context<string>;
|
|
5
5
|
interface SessionProviderProps {
|
|
@@ -23,7 +23,7 @@ interface ResolveErrorAction {
|
|
|
23
23
|
type: typeof ACTION_ERRORED;
|
|
24
24
|
payload: PluginState['error'];
|
|
25
25
|
}
|
|
26
|
-
export
|
|
26
|
+
export type ReducerAction = ClearAction | ResolveLoadingAction | ResolveSuccessAction | ResolveErrorAction;
|
|
27
27
|
export declare const INITIAL_STATE: PluginState;
|
|
28
28
|
export declare function reducer(state: PluginState, action: ReducerAction): PluginState;
|
|
29
29
|
export declare const usePluginReducer: () => [
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { Component, ReactNode } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type ErrorBoundaryErrorInfo = {
|
|
3
3
|
componentStack: string;
|
|
4
4
|
};
|
|
5
|
-
|
|
5
|
+
type BaseErrorBoundaryState = {
|
|
6
6
|
hasError: boolean;
|
|
7
7
|
};
|
|
8
8
|
interface BaseErrorBoundaryProps {
|
|
@@ -25,7 +25,7 @@ export declare const testIds: {
|
|
|
25
25
|
searchResultLoadingIndicator: string;
|
|
26
26
|
emptyResultPage: string;
|
|
27
27
|
};
|
|
28
|
-
|
|
28
|
+
type LinkSearchListElement = HTMLElement;
|
|
29
29
|
export interface LinkSearchListProps extends Omit<React.HTMLAttributes<LinkSearchListElement>, 'onSelect' | 'onChange'> {
|
|
30
30
|
items?: LinkSearchListItemData[] | null;
|
|
31
31
|
isLoading: boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { LinkSearchListItemData } from '../../../types';
|
|
2
|
-
export declare const useTrackResultsShown: (isLoading: boolean, items?: LinkSearchListItemData[] | null | undefined, hasSearchTerm?: boolean
|
|
2
|
+
export declare const useTrackResultsShown: (isLoading: boolean, items?: LinkSearchListItemData[] | null | undefined, hasSearchTerm?: boolean) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import { TextFieldProps } from '@atlaskit/textfield';
|
|
3
|
-
export
|
|
3
|
+
export type TextInputProps = Omit<TextFieldProps, 'name' | 'value'> & {
|
|
4
4
|
name: string;
|
|
5
5
|
value: string;
|
|
6
6
|
label?: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { IntlShape } from 'react-intl-next';
|
|
2
2
|
import { ListItemTimeStamp } from '../types';
|
|
3
|
-
export declare const transformTimeStamp: (intl: IntlShape, lastViewedDate?: Date
|
|
3
|
+
export declare const transformTimeStamp: (intl: IntlShape, lastViewedDate?: Date, lastUpdatedDate?: Date) => ListItemTimeStamp | undefined;
|
|
@@ -6,6 +6,6 @@ export declare const isRedoEvent: (e: KeyboardEvent<HTMLInputElement>) => boolea
|
|
|
6
6
|
/**
|
|
7
7
|
* Retrieve the data source for a link given the item and the plugin that resolved it
|
|
8
8
|
*/
|
|
9
|
-
export declare const getDataSource: (item: LinkSearchListItemData, plugin?: LinkPickerPlugin
|
|
9
|
+
export declare const getDataSource: (item: LinkSearchListItemData, plugin?: LinkPickerPlugin) => string;
|
|
10
10
|
export declare function getScreenReaderText(items: LinkSearchListItemData[], selectedIndex: number, intl: IntlShape): string | undefined;
|
|
11
11
|
export declare const handleNavKeyDown: (event: KeyboardEvent<HTMLElement>, itemsLength: number, activeIndex: number) => number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { MessageDescriptor } from 'react-intl-next';
|
|
3
|
-
export
|
|
3
|
+
export type LinkInputType = 'manual' | 'typeAhead';
|
|
4
4
|
export interface LinkSearchListItemData {
|
|
5
5
|
/** Unique identifiable attribute for the item */
|
|
6
6
|
objectId: string;
|
|
@@ -28,7 +28,7 @@ export interface LinkSearchListItemData {
|
|
|
28
28
|
source?: string;
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
export
|
|
31
|
+
export type ListItemTimeStamp = {
|
|
32
32
|
pageAction: string;
|
|
33
33
|
dateString: string;
|
|
34
34
|
timeSince?: string | undefined;
|
|
@@ -62,4 +62,4 @@ export interface LinkPickerPluginAction {
|
|
|
62
62
|
label: MessageDescriptor | string;
|
|
63
63
|
callback: () => void;
|
|
64
64
|
}
|
|
65
|
-
export
|
|
65
|
+
export type LinkPickerPluginErrorFallback = (error: unknown, retry: () => void) => ReactNode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-picker",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.2",
|
|
4
4
|
"description": "Standalone link picker",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"publishConfig": {
|
|
@@ -20,6 +20,14 @@
|
|
|
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.5 <4.9": {
|
|
25
|
+
"*": [
|
|
26
|
+
"dist/types-ts4.5/*",
|
|
27
|
+
"dist/types-ts4.5/index.d.ts"
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
23
31
|
"sideEffects": false,
|
|
24
32
|
"atlaskit:src": "src/index.ts",
|
|
25
33
|
"af:exports": {
|
|
@@ -36,12 +44,12 @@
|
|
|
36
44
|
"@atlaskit/form": "^8.11.0",
|
|
37
45
|
"@atlaskit/frontend-utilities": "^2.6.0",
|
|
38
46
|
"@atlaskit/icon": "^21.12.0",
|
|
39
|
-
"@atlaskit/linking-common": "^2.
|
|
47
|
+
"@atlaskit/linking-common": "^2.10.0",
|
|
40
48
|
"@atlaskit/spinner": "^15.5.0",
|
|
41
49
|
"@atlaskit/tabs": "^13.4.0",
|
|
42
50
|
"@atlaskit/textfield": "^5.4.0",
|
|
43
51
|
"@atlaskit/theme": "^12.5.0",
|
|
44
|
-
"@atlaskit/tokens": "^1.
|
|
52
|
+
"@atlaskit/tokens": "^1.4.0",
|
|
45
53
|
"@atlaskit/tooltip": "^17.8.0",
|
|
46
54
|
"@atlaskit/ufo": "^0.2.0",
|
|
47
55
|
"@atlaskit/visually-hidden": "^1.2.0",
|
|
@@ -58,7 +66,7 @@
|
|
|
58
66
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
59
67
|
},
|
|
60
68
|
"devDependencies": {
|
|
61
|
-
"@af/analytics-codegen": "^0.0.
|
|
69
|
+
"@af/analytics-codegen": "^0.0.6",
|
|
62
70
|
"@atlaskit/activity-provider": "^2.4.0",
|
|
63
71
|
"@atlaskit/docs": "*",
|
|
64
72
|
"@atlaskit/link-analytics": "^8.0.0",
|
|
@@ -71,8 +79,8 @@
|
|
|
71
79
|
"@atlaskit/webdriver-runner": "*",
|
|
72
80
|
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
|
|
73
81
|
"@atlassian/codegen": "^0.1.0",
|
|
74
|
-
"@atlassian/link-picker-atlassian-plugin": "^30.
|
|
75
|
-
"@atlassian/link-picker-plugins": "^20.
|
|
82
|
+
"@atlassian/link-picker-atlassian-plugin": "^30.1.0",
|
|
83
|
+
"@atlassian/link-picker-plugins": "^20.1.0",
|
|
76
84
|
"@atlassian/recent-work-client": "^1.8.0",
|
|
77
85
|
"@atlassian/search-provider": "^2.4.0",
|
|
78
86
|
"@testing-library/dom": "^8.17.1",
|
|
@@ -88,7 +96,7 @@
|
|
|
88
96
|
"prettier": "^2.8.0",
|
|
89
97
|
"react-dom": "^16.8.0",
|
|
90
98
|
"sinon": "^2.2.0",
|
|
91
|
-
"typescript": "4.
|
|
99
|
+
"typescript": "~4.9.5"
|
|
92
100
|
},
|
|
93
101
|
"techstack": {
|
|
94
102
|
"@repo/internal": {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NOTE:
|
|
3
|
+
*
|
|
4
|
+
* This file is automatically generated by Traduki 2.0.
|
|
5
|
+
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
|
+
*/
|
|
1
7
|
declare const _default: {
|
|
2
8
|
'fabric.linkPicker.button.cancel': string;
|
|
3
9
|
'fabric.linkPicker.button.insert': string;
|
|
@@ -24,10 +30,4 @@ declare const _default: {
|
|
|
24
30
|
'fabric.linkPicker.unhandledError.description': string;
|
|
25
31
|
'fabric.linkPicker.unhandledError.heading': string;
|
|
26
32
|
};
|
|
27
|
-
/**
|
|
28
|
-
* NOTE:
|
|
29
|
-
*
|
|
30
|
-
* This file is automatically generated by Traduki 2.0.
|
|
31
|
-
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
32
|
-
*/
|
|
33
33
|
export default _default;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NOTE:
|
|
3
|
+
*
|
|
4
|
+
* This file is automatically generated by Traduki 2.0.
|
|
5
|
+
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
|
+
*/
|
|
1
7
|
declare const _default: {
|
|
2
8
|
'fabric.linkPicker.button.cancel': string;
|
|
3
9
|
'fabric.linkPicker.button.insert': string;
|
|
@@ -27,10 +33,4 @@ declare const _default: {
|
|
|
27
33
|
'fabric.linkPicker.unhandledError.description': string;
|
|
28
34
|
'fabric.linkPicker.unhandledError.heading': string;
|
|
29
35
|
};
|
|
30
|
-
/**
|
|
31
|
-
* NOTE:
|
|
32
|
-
*
|
|
33
|
-
* This file is automatically generated by Traduki 2.0.
|
|
34
|
-
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
35
|
-
*/
|
|
36
36
|
export default _default;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NOTE:
|
|
3
|
+
*
|
|
4
|
+
* This file is automatically generated by Traduki 2.0.
|
|
5
|
+
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
|
+
*/
|
|
1
7
|
declare const _default: {
|
|
2
8
|
'fabric.linkPicker.button.cancel': string;
|
|
3
9
|
'fabric.linkPicker.button.insert': string;
|
|
@@ -24,10 +30,4 @@ declare const _default: {
|
|
|
24
30
|
'fabric.linkPicker.unhandledError.description': string;
|
|
25
31
|
'fabric.linkPicker.unhandledError.heading': string;
|
|
26
32
|
};
|
|
27
|
-
/**
|
|
28
|
-
* NOTE:
|
|
29
|
-
*
|
|
30
|
-
* This file is automatically generated by Traduki 2.0.
|
|
31
|
-
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
32
|
-
*/
|
|
33
33
|
export default _default;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NOTE:
|
|
3
|
+
*
|
|
4
|
+
* This file is automatically generated by Traduki 2.0.
|
|
5
|
+
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
|
+
*/
|
|
1
7
|
declare const _default: {
|
|
2
8
|
'fabric.linkPicker.button.cancel': string;
|
|
3
9
|
'fabric.linkPicker.button.insert': string;
|
|
@@ -27,10 +33,4 @@ declare const _default: {
|
|
|
27
33
|
'fabric.linkPicker.unhandledError.description': string;
|
|
28
34
|
'fabric.linkPicker.unhandledError.heading': string;
|
|
29
35
|
};
|
|
30
|
-
/**
|
|
31
|
-
* NOTE:
|
|
32
|
-
*
|
|
33
|
-
* This file is automatically generated by Traduki 2.0.
|
|
34
|
-
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
35
|
-
*/
|
|
36
36
|
export default _default;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NOTE:
|
|
3
|
+
*
|
|
4
|
+
* This file is automatically generated by Traduki 2.0.
|
|
5
|
+
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
|
+
*/
|
|
1
7
|
declare const _default: {
|
|
2
8
|
'fabric.linkPicker.button.cancel': string;
|
|
3
9
|
'fabric.linkPicker.button.insert': string;
|
|
@@ -27,10 +33,4 @@ declare const _default: {
|
|
|
27
33
|
'fabric.linkPicker.unhandledError.description': string;
|
|
28
34
|
'fabric.linkPicker.unhandledError.heading': string;
|
|
29
35
|
};
|
|
30
|
-
/**
|
|
31
|
-
* NOTE:
|
|
32
|
-
*
|
|
33
|
-
* This file is automatically generated by Traduki 2.0.
|
|
34
|
-
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
35
|
-
*/
|
|
36
36
|
export default _default;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NOTE:
|
|
3
|
+
*
|
|
4
|
+
* This file is automatically generated by Traduki 2.0.
|
|
5
|
+
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
|
+
*/
|
|
1
7
|
declare const _default: {
|
|
2
8
|
'fabric.linkPicker.button.cancel': string;
|
|
3
9
|
'fabric.linkPicker.button.insert': string;
|
|
@@ -24,10 +30,4 @@ declare const _default: {
|
|
|
24
30
|
'fabric.linkPicker.unhandledError.description': string;
|
|
25
31
|
'fabric.linkPicker.unhandledError.heading': string;
|
|
26
32
|
};
|
|
27
|
-
/**
|
|
28
|
-
* NOTE:
|
|
29
|
-
*
|
|
30
|
-
* This file is automatically generated by Traduki 2.0.
|
|
31
|
-
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
32
|
-
*/
|
|
33
33
|
export default _default;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NOTE:
|
|
3
|
+
*
|
|
4
|
+
* This file is automatically generated by Traduki 2.0.
|
|
5
|
+
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
|
+
*/
|
|
1
7
|
declare const _default: {
|
|
2
8
|
'fabric.linkPicker.button.cancel': string;
|
|
3
9
|
'fabric.linkPicker.button.insert': string;
|
|
@@ -27,10 +33,4 @@ declare const _default: {
|
|
|
27
33
|
'fabric.linkPicker.unhandledError.description': string;
|
|
28
34
|
'fabric.linkPicker.unhandledError.heading': string;
|
|
29
35
|
};
|
|
30
|
-
/**
|
|
31
|
-
* NOTE:
|
|
32
|
-
*
|
|
33
|
-
* This file is automatically generated by Traduki 2.0.
|
|
34
|
-
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
35
|
-
*/
|
|
36
36
|
export default _default;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NOTE:
|
|
3
|
+
*
|
|
4
|
+
* This file is automatically generated by Traduki 2.0.
|
|
5
|
+
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
|
+
*/
|
|
1
7
|
declare const _default: {
|
|
2
8
|
'fabric.linkPicker.button.cancel': string;
|
|
3
9
|
'fabric.linkPicker.button.insert': string;
|
|
@@ -24,10 +30,4 @@ declare const _default: {
|
|
|
24
30
|
'fabric.linkPicker.unhandledError.description': string;
|
|
25
31
|
'fabric.linkPicker.unhandledError.heading': string;
|
|
26
32
|
};
|
|
27
|
-
/**
|
|
28
|
-
* NOTE:
|
|
29
|
-
*
|
|
30
|
-
* This file is automatically generated by Traduki 2.0.
|
|
31
|
-
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
32
|
-
*/
|
|
33
33
|
export default _default;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NOTE:
|
|
3
|
+
*
|
|
4
|
+
* This file is automatically generated by Traduki 2.0.
|
|
5
|
+
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
|
+
*/
|
|
1
7
|
declare const _default: {
|
|
2
8
|
'fabric.linkPicker.button.cancel': string;
|
|
3
9
|
'fabric.linkPicker.button.insert': string;
|
|
@@ -24,10 +30,4 @@ declare const _default: {
|
|
|
24
30
|
'fabric.linkPicker.unhandledError.description': string;
|
|
25
31
|
'fabric.linkPicker.unhandledError.heading': string;
|
|
26
32
|
};
|
|
27
|
-
/**
|
|
28
|
-
* NOTE:
|
|
29
|
-
*
|
|
30
|
-
* This file is automatically generated by Traduki 2.0.
|
|
31
|
-
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
32
|
-
*/
|
|
33
33
|
export default _default;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NOTE:
|
|
3
|
+
*
|
|
4
|
+
* This file is automatically generated by Traduki 2.0.
|
|
5
|
+
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
|
+
*/
|
|
1
7
|
declare const _default: {
|
|
2
8
|
'fabric.linkPicker.button.cancel': string;
|
|
3
9
|
'fabric.linkPicker.button.insert': string;
|
|
@@ -27,10 +33,4 @@ declare const _default: {
|
|
|
27
33
|
'fabric.linkPicker.unhandledError.description': string;
|
|
28
34
|
'fabric.linkPicker.unhandledError.heading': string;
|
|
29
35
|
};
|
|
30
|
-
/**
|
|
31
|
-
* NOTE:
|
|
32
|
-
*
|
|
33
|
-
* This file is automatically generated by Traduki 2.0.
|
|
34
|
-
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
35
|
-
*/
|
|
36
36
|
export default _default;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NOTE:
|
|
3
|
+
*
|
|
4
|
+
* This file is automatically generated by Traduki 2.0.
|
|
5
|
+
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
|
+
*/
|
|
1
7
|
declare const _default: {
|
|
2
8
|
'fabric.linkPicker.button.cancel': string;
|
|
3
9
|
'fabric.linkPicker.button.insert': string;
|
|
@@ -27,10 +33,4 @@ declare const _default: {
|
|
|
27
33
|
'fabric.linkPicker.unhandledError.description': string;
|
|
28
34
|
'fabric.linkPicker.unhandledError.heading': string;
|
|
29
35
|
};
|
|
30
|
-
/**
|
|
31
|
-
* NOTE:
|
|
32
|
-
*
|
|
33
|
-
* This file is automatically generated by Traduki 2.0.
|
|
34
|
-
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
35
|
-
*/
|
|
36
36
|
export default _default;
|