@atlaskit/link-picker 0.11.0 → 1.1.1

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 (71) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/example-helpers/mock-data.ts +0 -2
  3. package/package.json +7 -4
  4. package/report.api.md +65 -0
  5. package/dist/cjs/browser.js +0 -39
  6. package/dist/cjs/index.js +0 -13
  7. package/dist/cjs/messages.js +0 -102
  8. package/dist/cjs/transformTimeStamp.js +0 -55
  9. package/dist/cjs/types.js +0 -5
  10. package/dist/cjs/ui/announcer.js +0 -64
  11. package/dist/cjs/ui/link-picker.js +0 -604
  12. package/dist/cjs/ui/link-search-list/index.js +0 -102
  13. package/dist/cjs/ui/link-search-list/styled.js +0 -21
  14. package/dist/cjs/ui/list-item/index.js +0 -103
  15. package/dist/cjs/ui/list-item/styled.js +0 -59
  16. package/dist/cjs/ui/styled.js +0 -32
  17. package/dist/cjs/ui/text-input/index.js +0 -116
  18. package/dist/cjs/ui/text-input/styled.js +0 -25
  19. package/dist/cjs/url.js +0 -104
  20. package/dist/cjs/utils.js +0 -27
  21. package/dist/cjs/version.json +0 -5
  22. package/dist/es2019/browser.js +0 -34
  23. package/dist/es2019/index.js +0 -1
  24. package/dist/es2019/messages.js +0 -93
  25. package/dist/es2019/transformTimeStamp.js +0 -41
  26. package/dist/es2019/types.js +0 -1
  27. package/dist/es2019/ui/announcer.js +0 -38
  28. package/dist/es2019/ui/link-picker.js +0 -493
  29. package/dist/es2019/ui/link-search-list/index.js +0 -60
  30. package/dist/es2019/ui/link-search-list/styled.js +0 -13
  31. package/dist/es2019/ui/list-item/index.js +0 -88
  32. package/dist/es2019/ui/list-item/styled.js +0 -65
  33. package/dist/es2019/ui/styled.js +0 -28
  34. package/dist/es2019/ui/text-input/index.js +0 -99
  35. package/dist/es2019/ui/text-input/styled.js +0 -15
  36. package/dist/es2019/url.js +0 -88
  37. package/dist/es2019/utils.js +0 -13
  38. package/dist/es2019/version.json +0 -5
  39. package/dist/esm/browser.js +0 -34
  40. package/dist/esm/index.js +0 -1
  41. package/dist/esm/messages.js +0 -93
  42. package/dist/esm/transformTimeStamp.js +0 -41
  43. package/dist/esm/types.js +0 -1
  44. package/dist/esm/ui/announcer.js +0 -51
  45. package/dist/esm/ui/link-picker.js +0 -582
  46. package/dist/esm/ui/link-search-list/index.js +0 -88
  47. package/dist/esm/ui/link-search-list/styled.js +0 -8
  48. package/dist/esm/ui/list-item/index.js +0 -90
  49. package/dist/esm/ui/list-item/styled.js +0 -37
  50. package/dist/esm/ui/styled.js +0 -16
  51. package/dist/esm/ui/text-input/index.js +0 -99
  52. package/dist/esm/ui/text-input/styled.js +0 -10
  53. package/dist/esm/url.js +0 -90
  54. package/dist/esm/utils.js +0 -13
  55. package/dist/esm/version.json +0 -5
  56. package/dist/types/browser.d.ts +0 -15
  57. package/dist/types/index.d.ts +0 -3
  58. package/dist/types/messages.d.ts +0 -92
  59. package/dist/types/transformTimeStamp.d.ts +0 -3
  60. package/dist/types/types.d.ts +0 -40
  61. package/dist/types/ui/announcer.d.ts +0 -22
  62. package/dist/types/ui/link-picker.d.ts +0 -51
  63. package/dist/types/ui/link-search-list/index.d.ts +0 -20
  64. package/dist/types/ui/link-search-list/styled.d.ts +0 -3
  65. package/dist/types/ui/list-item/index.d.ts +0 -17
  66. package/dist/types/ui/list-item/styled.d.ts +0 -7
  67. package/dist/types/ui/styled.d.ts +0 -4
  68. package/dist/types/ui/text-input/index.d.ts +0 -17
  69. package/dist/types/ui/text-input/styled.d.ts +0 -2
  70. package/dist/types/url.d.ts +0 -5
  71. package/dist/types/utils.d.ts +0 -3
@@ -1,51 +0,0 @@
1
- /** @jsx jsx */
2
- import React from 'react';
3
- import { WrappedComponentProps } from 'react-intl-next';
4
- import { LinkSearchListItemData, LinkInputType, LinkPickerPlugin } from '../types';
5
- export declare const RECENT_SEARCH_LIST_SIZE = 5;
6
- interface Meta {
7
- /** Indicates how the link was picked. */
8
- inputMethod: LinkInputType;
9
- }
10
- interface OnSubmitParameter {
11
- /** The `url` of the linked resource. */
12
- url: string;
13
- /** The desired text to be displayed alternatively to the title of the linked resource. */
14
- displayText: string | null;
15
- /** The resolved `title` of the resource at the time of link picking (if applicable, null if not known). */
16
- title: string | null;
17
- /** Meta data about the link picking submission. */
18
- meta: Meta;
19
- /**
20
- * The input value of the `url` field at time of submission if inserted "manually".
21
- * This can useful if the `url` was manually inserted with a value that is different from the normalised value returned as `url`.
22
- * @example
23
- * { url: 'https://google.com', rawUrl: 'google.com' }
24
- */
25
- rawUrl?: string;
26
- }
27
- export interface LinkPickerProps {
28
- /** Callback to fire on form submission. */
29
- onSubmit: (arg: OnSubmitParameter) => void;
30
- /** Callback to fire when the cancel button is clicked. */
31
- onCancel: () => void;
32
- /** The url of the linked resource for editing. */
33
- url?: string;
34
- /** The desired text to be displayed alternatively to the title of the linked resource for editing. */
35
- displayText?: string | null;
36
- /** Plugins that provide link suggestions / search capabilities. */
37
- plugins?: LinkPickerPlugin[];
38
- }
39
- export interface State {
40
- items: LinkSearchListItemData[];
41
- selectedIndex: number;
42
- activeIndex: number;
43
- url: string;
44
- isLoading: boolean;
45
- displayText: string;
46
- invalidUrl: string | null;
47
- }
48
- export declare const LinkPickerWithIntl: React.FC<import("react-intl-next").WithIntlProps<WrappedComponentProps<"intl"> & LinkPickerProps>> & {
49
- WrappedComponent: React.ComponentType<WrappedComponentProps<"intl"> & LinkPickerProps>;
50
- };
51
- export {};
@@ -1,20 +0,0 @@
1
- /** @jsx jsx */
2
- import { PureComponent } from 'react';
3
- import { jsx } from '@emotion/react';
4
- import { LinkSearchListItemData } from '../../types';
5
- export interface Props {
6
- items?: LinkSearchListItemData[];
7
- isLoading: boolean;
8
- selectedIndex: number;
9
- activeIndex: number;
10
- onSelect: (objectId: string) => void;
11
- onMouseEnter: (objectId: string) => void;
12
- onMouseLeave: (objectId: string) => void;
13
- ariaControls?: string;
14
- ariaLabelledBy?: string;
15
- role?: string;
16
- id?: string;
17
- }
18
- export default class LinkSearchList extends PureComponent<Props, {}> {
19
- render(): jsx.JSX.Element;
20
- }
@@ -1,3 +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;
@@ -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,7 +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 itemIconStyles: import("@emotion/react").SerializedStyles;
7
- export declare const imgStyles: import("@emotion/react").SerializedStyles;
@@ -1,4 +0,0 @@
1
- export declare const recentListStyles: import("@emotion/react").SerializedStyles;
2
- export declare const containerStyles: import("@emotion/react").SerializedStyles;
3
- export declare const searchIconStyles: import("@emotion/react").SerializedStyles;
4
- export declare const listTitleStyles: import("@emotion/react").SerializedStyles;
@@ -1,17 +0,0 @@
1
- import { jsx } from '@emotion/react';
2
- import { TextFieldProps } from '@atlaskit/textfield';
3
- export interface Props extends Omit<TextFieldProps, 'value' | 'onChange' | 'autoFocus' | 'onSubmit'> {
4
- name: string;
5
- label?: string;
6
- autoFocus?: boolean;
7
- value: string;
8
- onChange: (value: string) => void;
9
- onSubmit?: (value: string) => void;
10
- onUndo?: Function;
11
- onRedo?: Function;
12
- onClear?: () => void;
13
- clearLabel?: string;
14
- error?: string | null;
15
- }
16
- declare const PanelTextInput: (props: Props) => jsx.JSX.Element;
17
- export default PanelTextInput;
@@ -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
- 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,3 +0,0 @@
1
- import { KeyboardEvent } from 'react';
2
- export declare const isUndoEvent: (e: KeyboardEvent<HTMLInputElement>) => boolean;
3
- export declare const isRedoEvent: (e: KeyboardEvent<HTMLInputElement>) => boolean;