@atlaskit/link-picker 1.8.1 → 1.8.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.
Files changed (36) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/analytics.codegen.js +1 -1
  3. package/dist/cjs/{ui/link-picker → common/utils}/url.js +0 -0
  4. package/dist/cjs/services/use-plugins/index.js +48 -90
  5. package/dist/cjs/services/use-plugins/reducer.js +64 -0
  6. package/dist/cjs/services/use-plugins/utils.js +134 -0
  7. package/dist/cjs/services/use-search-query/index.js +1 -1
  8. package/dist/cjs/services/with-link-picker-analytics/index.js +33 -0
  9. package/dist/cjs/ui/link-picker/index.js +5 -2
  10. package/dist/cjs/version.json +1 -1
  11. package/dist/es2019/analytics.codegen.js +1 -1
  12. package/dist/es2019/{ui/link-picker → common/utils}/url.js +0 -0
  13. package/dist/es2019/services/use-plugins/index.js +35 -57
  14. package/dist/es2019/services/use-plugins/reducer.js +37 -0
  15. package/dist/es2019/services/use-plugins/utils.js +59 -0
  16. package/dist/es2019/services/use-search-query/index.js +1 -1
  17. package/dist/es2019/services/with-link-picker-analytics/index.js +15 -0
  18. package/dist/es2019/ui/link-picker/index.js +4 -3
  19. package/dist/es2019/version.json +1 -1
  20. package/dist/esm/analytics.codegen.js +1 -1
  21. package/dist/esm/{ui/link-picker → common/utils}/url.js +0 -0
  22. package/dist/esm/services/use-plugins/index.js +49 -94
  23. package/dist/esm/services/use-plugins/reducer.js +43 -0
  24. package/dist/esm/services/use-plugins/utils.js +111 -0
  25. package/dist/esm/services/use-search-query/index.js +1 -1
  26. package/dist/esm/services/with-link-picker-analytics/index.js +17 -0
  27. package/dist/esm/ui/link-picker/index.js +4 -3
  28. package/dist/esm/version.json +1 -1
  29. package/dist/types/analytics.codegen.d.ts +7 -4
  30. package/dist/types/{ui/link-picker → common/utils}/url.d.ts +0 -0
  31. package/dist/types/services/use-plugins/reducer.d.ts +30 -0
  32. package/dist/types/services/use-plugins/utils.d.ts +18 -0
  33. package/dist/types/services/with-link-picker-analytics/index.d.ts +4 -0
  34. package/dist/types/ui/link-picker/index.d.ts +3 -3
  35. package/package.json +9 -9
  36. package/report.api.md +2 -0
@@ -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,4 @@
1
+ import React from 'react';
2
+ export declare function withLinkPickerAnalyticsContext<P extends {
3
+ url?: string;
4
+ }>(WrappedComponent: React.ComponentType<P>): React.ComponentType<P>;
@@ -1,4 +1,4 @@
1
- import { jsx } from '@emotion/react';
1
+ /// <reference types="react" />
2
2
  import { LinkInputType, LinkPickerPlugin } from '../types';
3
3
  export declare const RECENT_SEARCH_LIST_SIZE = 5;
4
4
  export declare const CONTACT_SUPPORT_LINK = "https://support.atlassian.com/contact/";
@@ -63,5 +63,5 @@ export interface PickerState {
63
63
  invalidUrl: boolean;
64
64
  activeTab: number;
65
65
  }
66
- declare function LinkPicker({ onSubmit, onCancel, onContentResize, plugins, url: initUrl, displayText: initDisplayText, }: LinkPickerProps): jsx.JSX.Element;
67
- export default LinkPicker;
66
+ declare const _default: import("react").ComponentType<LinkPickerProps>;
67
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "1.8.1",
3
+ "version": "1.8.4",
4
4
  "description": "Standalone link picker",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "publishConfig": {
@@ -32,16 +32,16 @@
32
32
  "dependencies": {
33
33
  "@atlaskit/analytics-next": "^8.3.1",
34
34
  "@atlaskit/button": "^16.2.0",
35
- "@atlaskit/empty-state": "^7.3.0",
35
+ "@atlaskit/empty-state": "^7.4.0",
36
36
  "@atlaskit/form": "^8.5.1",
37
37
  "@atlaskit/icon": "^21.10.0",
38
38
  "@atlaskit/spinner": "^15.1.0",
39
- "@atlaskit/tabs": "^13.2.11",
40
- "@atlaskit/textfield": "^5.1.7",
41
- "@atlaskit/theme": "^12.1.0",
39
+ "@atlaskit/tabs": "^13.3.0",
40
+ "@atlaskit/textfield": "^5.2.0",
41
+ "@atlaskit/theme": "^12.2.0",
42
42
  "@atlaskit/tokens": "^0.10.0",
43
43
  "@atlaskit/tooltip": "^17.5.0",
44
- "@atlaskit/visually-hidden": "^1.0.0",
44
+ "@atlaskit/visually-hidden": "^1.1.0",
45
45
  "@babel/runtime": "^7.0.0",
46
46
  "@emotion/react": "^11.7.1",
47
47
  "date-fns": "^2.17.0",
@@ -59,13 +59,13 @@
59
59
  "@atlaskit/link-test-helpers": "^1.4.0",
60
60
  "@atlaskit/popup": "^1.4.0",
61
61
  "@atlaskit/ssr": "*",
62
- "@atlaskit/toggle": "^12.4.0",
62
+ "@atlaskit/toggle": "^12.5.0",
63
63
  "@atlaskit/visual-regression": "*",
64
64
  "@atlaskit/webdriver-runner": "*",
65
65
  "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
66
66
  "@atlassian/link-picker-atlassian-plugin": "^18.0.0",
67
67
  "@atlassian/link-picker-plugins": "^5.1.0",
68
- "@atlassian/recent-work-client": "^1.5.0",
68
+ "@atlassian/recent-work-client": "^1.6.0",
69
69
  "@atlassian/search-provider": "^2.3.0",
70
70
  "@testing-library/dom": "^7.7.3",
71
71
  "@testing-library/jest-dom": "^4.1.0",
@@ -81,7 +81,7 @@
81
81
  "prettier": "^2.1.1",
82
82
  "react-dom": "^16.8.0",
83
83
  "sinon": "^2.2.0",
84
- "typescript": "4.2.4"
84
+ "typescript": "4.3.5"
85
85
  },
86
86
  "techstack": {
87
87
  "@repo/internal": {
package/report.api.md CHANGED
@@ -5,6 +5,8 @@
5
5
  [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
6
6
 
7
7
  ```ts
8
+ /// <reference types="react" />
9
+
8
10
  import { MessageDescriptor } from 'react-intl-next';
9
11
  import { default as React_2 } from 'react';
10
12
  import { ReactNode } from 'react';