@atlaskit/link-picker 1.19.0 → 1.20.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 (48) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/ui/link-picker/form-footer/index.js +1 -1
  3. package/dist/cjs/version.json +1 -1
  4. package/dist/es2019/ui/link-picker/form-footer/index.js +1 -1
  5. package/dist/es2019/version.json +1 -1
  6. package/dist/esm/ui/link-picker/form-footer/index.js +1 -1
  7. package/dist/esm/version.json +1 -1
  8. package/dist/types/analytics.codegen.d.ts +13 -13
  9. package/dist/types/common/analytics/context.d.ts +5 -3
  10. package/dist/types/common/analytics/experiences.d.ts +6 -6
  11. package/dist/types/common/analytics/input-field-tracking.d.ts +1 -1
  12. package/dist/types/controllers/session-provider/index.d.ts +1 -1
  13. package/dist/types/i18n/cs.d.ts +6 -6
  14. package/dist/types/i18n/da.d.ts +6 -6
  15. package/dist/types/i18n/de.d.ts +6 -6
  16. package/dist/types/i18n/en.d.ts +6 -6
  17. package/dist/types/i18n/en_GB.d.ts +6 -6
  18. package/dist/types/i18n/es.d.ts +6 -6
  19. package/dist/types/i18n/fi.d.ts +6 -6
  20. package/dist/types/i18n/fr.d.ts +6 -6
  21. package/dist/types/i18n/hu.d.ts +6 -6
  22. package/dist/types/i18n/it.d.ts +6 -6
  23. package/dist/types/i18n/ja.d.ts +6 -6
  24. package/dist/types/i18n/ko.d.ts +6 -6
  25. package/dist/types/i18n/nb.d.ts +6 -6
  26. package/dist/types/i18n/nl.d.ts +6 -6
  27. package/dist/types/i18n/pl.d.ts +6 -6
  28. package/dist/types/i18n/pt_BR.d.ts +6 -6
  29. package/dist/types/i18n/ru.d.ts +6 -6
  30. package/dist/types/i18n/sv.d.ts +6 -6
  31. package/dist/types/i18n/th.d.ts +6 -6
  32. package/dist/types/i18n/tr.d.ts +6 -6
  33. package/dist/types/i18n/uk.d.ts +6 -6
  34. package/dist/types/i18n/vi.d.ts +6 -6
  35. package/dist/types/i18n/zh.d.ts +6 -6
  36. package/dist/types/i18n/zh_TW.d.ts +6 -6
  37. package/dist/types/services/use-plugins/reducer.d.ts +1 -1
  38. package/dist/types/ui/error-boundary/error-boundary-base/index.d.ts +2 -2
  39. package/dist/types/ui/link-picker/announcer.d.ts +1 -1
  40. package/dist/types/ui/link-picker/link-search-list/index.d.ts +1 -1
  41. package/dist/types/ui/link-picker/link-search-list/use-track-results-shown/index.d.ts +1 -1
  42. package/dist/types/ui/link-picker/text-input/index.d.ts +1 -1
  43. package/dist/types/ui/link-picker/transformTimeStamp.d.ts +1 -1
  44. package/dist/types/ui/link-picker/utils.d.ts +1 -1
  45. package/dist/types/ui/types.d.ts +4 -4
  46. package/package.json +15 -7
  47. package/report.api.md +1 -1
  48. package/tmp/api-report-tmp.d.ts +117 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/link-picker
2
2
 
3
+ ## 1.20.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
8
+
9
+ ## 1.20.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`4bf861f02cc`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4bf861f02cc) - Callback label now supports a string
14
+
3
15
  ## 1.19.0
4
16
 
5
17
  ### Minor Changes
@@ -70,7 +70,7 @@ var FormFooter = function FormFooter(_ref) {
70
70
  label: "",
71
71
  size: "medium"
72
72
  })
73
- }, intl.formatMessage(action.label))), (0, _react.jsx)(_button.ButtonGroup, null, (0, _react.jsx)(_button.default, {
73
+ }, typeof action.label === 'string' ? action.label : intl.formatMessage(action.label))), (0, _react.jsx)(_button.ButtonGroup, null, (0, _react.jsx)(_button.default, {
74
74
  appearance: "subtle",
75
75
  onClick: onCancel,
76
76
  testId: testIds.cancelButton
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "1.19.0",
3
+ "version": "1.20.1",
4
4
  "sideEffects": false
5
5
  }
@@ -58,7 +58,7 @@ const FormFooter = ({
58
58
  label: "",
59
59
  size: "medium"
60
60
  })
61
- }, intl.formatMessage(action.label))), jsx(ButtonGroup, null, jsx(Button, {
61
+ }, typeof action.label === 'string' ? action.label : intl.formatMessage(action.label))), jsx(ButtonGroup, null, jsx(Button, {
62
62
  appearance: "subtle",
63
63
  onClick: onCancel,
64
64
  testId: testIds.cancelButton
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "1.19.0",
3
+ "version": "1.20.1",
4
4
  "sideEffects": false
5
5
  }
@@ -59,7 +59,7 @@ var FormFooter = function FormFooter(_ref) {
59
59
  label: "",
60
60
  size: "medium"
61
61
  })
62
- }, intl.formatMessage(action.label))), jsx(ButtonGroup, null, jsx(Button, {
62
+ }, typeof action.label === 'string' ? action.label : intl.formatMessage(action.label))), jsx(ButtonGroup, null, jsx(Button, {
63
63
  appearance: "subtle",
64
64
  onClick: onCancel,
65
65
  testId: testIds.cancelButton
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "1.19.0",
3
+ "version": "1.20.1",
4
4
  "sideEffects": false
5
5
  }
@@ -6,13 +6,13 @@
6
6
  * @codegen <<SignedSource::254da005ee62004d45537995770eba56>>
7
7
  * @codegenCommand yarn workspace @atlaskit/link-picker run codegen-analytics
8
8
  */
9
- export declare type PackageMetaDataType = {
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 declare type LinkPickerAnalyticsContextType = {
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 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 = {
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 declare type SearchResultsShownPreQuerySearchResultsAttributesType = {
35
+ export type SearchResultsShownPreQuerySearchResultsAttributesType = {
36
36
  resultCount: number;
37
37
  };
38
- export declare type SearchResultsShownPostQuerySearchResultsAttributesType = {
38
+ export type SearchResultsShownPostQuerySearchResultsAttributesType = {
39
39
  resultCount: number;
40
40
  };
41
- export declare type ResultsResolveFailedAttributesType = {
41
+ export type ResultsResolveFailedAttributesType = {
42
42
  error: string;
43
43
  };
44
- declare type AnalyticsEventAttributes = {
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
- declare type AnalyticsContextAttributesType = LinkPickerAnalyticsContextType;
4
- export declare type TrackAttribute = <K extends keyof LinkPickerAnalyticsContextType>(attribute: K, value: AnalyticsContextAttributesType[K]) => void;
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
- 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;
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
- declare type InputFields = 'link' | 'displayText';
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 declare type LinkPickerSessionId = string;
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 {
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -23,7 +23,7 @@ interface ResolveErrorAction {
23
23
  type: typeof ACTION_ERRORED;
24
24
  payload: PluginState['error'];
25
25
  }
26
- export declare type ReducerAction = ClearAction | ResolveLoadingAction | ResolveSuccessAction | ResolveErrorAction;
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 declare type ErrorBoundaryErrorInfo = {
2
+ export type ErrorBoundaryErrorInfo = {
3
3
  componentStack: string;
4
4
  };
5
- declare type BaseErrorBoundaryState = {
5
+ type BaseErrorBoundaryState = {
6
6
  hasError: boolean;
7
7
  };
8
8
  interface BaseErrorBoundaryProps {
@@ -1,5 +1,5 @@
1
1
  import React, { AriaAttributes, Ref } from 'react';
2
- declare type AnnouncerProps = {
2
+ type AnnouncerProps = {
3
3
  ref?: Ref<HTMLDivElement>;
4
4
  /** Set 'false' for announcing only changed text
5
5
  * (not announce duplicate part of string after second render),
@@ -25,7 +25,7 @@ export declare const testIds: {
25
25
  searchResultLoadingIndicator: string;
26
26
  emptyResultPage: string;
27
27
  };
28
- declare type LinkSearchListElement = HTMLElement;
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 | undefined) => void;
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 declare type TextInputProps = Omit<TextFieldProps, 'name' | 'value'> & {
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 | undefined, lastUpdatedDate?: Date | undefined) => ListItemTimeStamp | undefined;
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 | undefined) => string;
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 declare type LinkInputType = 'manual' | 'typeAhead';
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 declare type ListItemTimeStamp = {
31
+ export type ListItemTimeStamp = {
32
32
  pageAction: string;
33
33
  dateString: string;
34
34
  timeSince?: string | undefined;
@@ -59,7 +59,7 @@ export interface LinkPickerPlugin {
59
59
  action?: LinkPickerPluginAction;
60
60
  }
61
61
  export interface LinkPickerPluginAction {
62
- label: MessageDescriptor;
62
+ label: MessageDescriptor | string;
63
63
  callback: () => void;
64
64
  }
65
- export declare type LinkPickerPluginErrorFallback = (error: unknown, retry: () => void) => ReactNode;
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.19.0",
3
+ "version": "1.20.1",
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.8.0",
47
+ "@atlaskit/linking-common": "^2.9.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.3.0",
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.5",
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": "^29.0.0",
75
- "@atlassian/link-picker-plugins": "^19.0.0",
82
+ "@atlassian/link-picker-atlassian-plugin": "^30.0.0",
83
+ "@atlassian/link-picker-plugins": "^20.0.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.5.5"
99
+ "typescript": "~4.9.5"
92
100
  },
93
101
  "techstack": {
94
102
  "@repo/internal": {
package/report.api.md CHANGED
@@ -51,7 +51,7 @@ export interface LinkPickerPluginAction {
51
51
  // (undocumented)
52
52
  callback: () => void;
53
53
  // (undocumented)
54
- label: MessageDescriptor;
54
+ label: MessageDescriptor | string;
55
55
  }
56
56
 
57
57
  // @public (undocumented)
@@ -0,0 +1,117 @@
1
+ ## API Report File for "@atlaskit/link-picker"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ /// <reference types="react" />
8
+
9
+ import { MessageDescriptor } from 'react-intl-next';
10
+ import { default as React_2 } from 'react';
11
+ import { ReactNode } from 'react';
12
+ import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
13
+
14
+ // @public (undocumented)
15
+ export type LinkInputType = 'manual' | 'typeAhead';
16
+
17
+ // @public (undocumented)
18
+ export const LinkPicker: React_2.MemoExoticComponent<(props: LinkPickerProps) => JSX.Element>;
19
+
20
+ // @public (undocumented)
21
+ export interface LinkPickerPlugin {
22
+ action?: LinkPickerPluginAction;
23
+ errorFallback?: LinkPickerPluginErrorFallback;
24
+ meta?: {
25
+ source?: string;
26
+ };
27
+ // (undocumented)
28
+ resolve: (state: LinkPickerState) => AsyncGenerator<ResolveResult, ResolveResult> | Promise<ResolveResult>;
29
+ tabKey?: string;
30
+ tabTitle?: string;
31
+ UNSAFE_onActivation?: () => void;
32
+ }
33
+
34
+ // @public (undocumented)
35
+ export interface LinkPickerPluginAction {
36
+ // (undocumented)
37
+ callback: () => void;
38
+ // (undocumented)
39
+ label: MessageDescriptor | string;
40
+ }
41
+
42
+ // @public (undocumented)
43
+ export type LinkPickerPluginErrorFallback = (error: unknown, retry: () => void) => ReactNode;
44
+
45
+ // @public (undocumented)
46
+ export interface LinkPickerProps {
47
+ component?: React.ComponentType<Partial<LinkPickerProps> & {
48
+ children: React.ReactElement;
49
+ }>;
50
+ displayText?: null | string;
51
+ // (undocumented)
52
+ featureFlags?: Record<string, unknown>;
53
+ hideDisplayText?: boolean;
54
+ onCancel: () => void;
55
+ onContentResize?: () => void;
56
+ onSubmit: (arg: OnSubmitParameter, analytic?: UIAnalyticsEvent | null) => void;
57
+ plugins?: LinkPickerPlugin[];
58
+ url?: string;
59
+ }
60
+
61
+ // @public (undocumented)
62
+ export interface LinkPickerState {
63
+ query: string;
64
+ }
65
+
66
+ // @public (undocumented)
67
+ export interface LinkSearchListItemData {
68
+ container?: string;
69
+ icon: React.ComponentType<{
70
+ alt: string;
71
+ }> | string;
72
+ iconAlt: MessageDescriptor | string;
73
+ lastUpdatedDate?: Date;
74
+ lastViewedDate?: Date;
75
+ meta?: {
76
+ source?: string;
77
+ };
78
+ name: string;
79
+ objectId: string;
80
+ prefetch?: boolean;
81
+ url: string;
82
+ }
83
+
84
+ // @public (undocumented)
85
+ interface Meta {
86
+ inputMethod: LinkInputType;
87
+ }
88
+
89
+ // @public (undocumented)
90
+ interface OnSubmitParameter {
91
+ displayText: null | string;
92
+ meta: Meta;
93
+ rawUrl?: string;
94
+ title: null | string;
95
+ url: string;
96
+ }
97
+
98
+ // @public (undocumented)
99
+ interface ResolveResult {
100
+ // (undocumented)
101
+ data: LinkSearchListItemData[];
102
+ }
103
+
104
+ // @public (undocumented)
105
+ export class UnauthenticatedError extends Error {
106
+ constructor(iconUrl: string, authUrl: string, description: string);
107
+ // (undocumented)
108
+ authUrl: string;
109
+ // (undocumented)
110
+ description: string;
111
+ // (undocumented)
112
+ iconUrl: string;
113
+ }
114
+
115
+ // (No @packageDocumentation comment for this package)
116
+
117
+ ```