@atlaskit/link-picker 1.22.2 → 1.23.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 (55) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/common/utils/date.js +16 -0
  3. package/dist/cjs/common/utils/dateUtils.js +72 -0
  4. package/dist/cjs/i18n/languages.js +38 -0
  5. package/dist/cjs/ui/link-picker/index.js +4 -4
  6. package/dist/cjs/ui/link-picker/link-search-list/index.js +15 -2
  7. package/dist/cjs/ui/link-picker/link-search-list/link-search-no-results/styled.js +5 -3
  8. package/dist/cjs/ui/link-picker/list-item/index.js +1 -4
  9. package/dist/cjs/ui/link-picker/messages.js +11 -16
  10. package/dist/cjs/ui/link-picker/transformTimeStamp.js +27 -22
  11. package/dist/cjs/ui/link-picker/utils.js +1 -2
  12. package/dist/cjs/version.json +1 -1
  13. package/dist/es2019/common/utils/date.js +9 -0
  14. package/dist/es2019/common/utils/dateUtils.js +61 -0
  15. package/dist/es2019/i18n/languages.js +31 -0
  16. package/dist/es2019/ui/link-picker/index.js +4 -4
  17. package/dist/es2019/ui/link-picker/link-search-list/index.js +14 -1
  18. package/dist/es2019/ui/link-picker/link-search-list/link-search-no-results/styled.js +3 -0
  19. package/dist/es2019/ui/link-picker/list-item/index.js +1 -4
  20. package/dist/es2019/ui/link-picker/messages.js +9 -14
  21. package/dist/es2019/ui/link-picker/transformTimeStamp.js +29 -23
  22. package/dist/es2019/ui/link-picker/utils.js +1 -2
  23. package/dist/es2019/version.json +1 -1
  24. package/dist/esm/common/utils/date.js +9 -0
  25. package/dist/esm/common/utils/dateUtils.js +63 -0
  26. package/dist/esm/i18n/languages.js +31 -0
  27. package/dist/esm/ui/link-picker/index.js +4 -4
  28. package/dist/esm/ui/link-picker/link-search-list/index.js +15 -2
  29. package/dist/esm/ui/link-picker/link-search-list/link-search-no-results/styled.js +3 -2
  30. package/dist/esm/ui/link-picker/list-item/index.js +1 -4
  31. package/dist/esm/ui/link-picker/messages.js +9 -14
  32. package/dist/esm/ui/link-picker/transformTimeStamp.js +28 -23
  33. package/dist/esm/ui/link-picker/utils.js +1 -2
  34. package/dist/esm/version.json +1 -1
  35. package/dist/types/common/utils/date.d.ts +1 -0
  36. package/dist/types/common/utils/dateUtils.d.ts +8 -0
  37. package/dist/types/i18n/languages.d.ts +32 -0
  38. package/dist/types/index.d.ts +1 -1
  39. package/dist/types/ui/link-picker/link-search-list/index.d.ts +2 -1
  40. package/dist/types/ui/link-picker/link-search-list/link-search-no-results/styled.d.ts +1 -0
  41. package/dist/types/ui/link-picker/messages.d.ts +3 -8
  42. package/dist/types/ui/link-picker/transformTimeStamp.d.ts +1 -2
  43. package/dist/types/ui/types.d.ts +3 -5
  44. package/dist/types-ts4.5/common/utils/date.d.ts +1 -0
  45. package/dist/types-ts4.5/common/utils/dateUtils.d.ts +8 -0
  46. package/dist/types-ts4.5/i18n/languages.d.ts +32 -0
  47. package/dist/types-ts4.5/index.d.ts +1 -1
  48. package/dist/types-ts4.5/ui/link-picker/link-search-list/index.d.ts +2 -1
  49. package/dist/types-ts4.5/ui/link-picker/link-search-list/link-search-no-results/styled.d.ts +1 -0
  50. package/dist/types-ts4.5/ui/link-picker/messages.d.ts +3 -8
  51. package/dist/types-ts4.5/ui/link-picker/transformTimeStamp.d.ts +1 -2
  52. package/dist/types-ts4.5/ui/types.d.ts +3 -5
  53. package/package.json +13 -4
  54. package/report.api.md +4 -0
  55. package/tmp/api-report-tmp.d.ts +4 -0
@@ -28,11 +28,6 @@ export interface LinkSearchListItemData {
28
28
  source?: string;
29
29
  };
30
30
  }
31
- export type ListItemTimeStamp = {
32
- pageAction: string;
33
- dateString: string;
34
- timeSince?: string | undefined;
35
- };
36
31
  export interface LinkPickerState {
37
32
  /** Current query string / URL input field value */
38
33
  query: string;
@@ -48,6 +43,8 @@ export interface LinkPickerPlugin {
48
43
  tabTitle?: string;
49
44
  /** Render function to customise the UI that is displayed when an error occurs resolving results */
50
45
  errorFallback?: LinkPickerPluginErrorFallback;
46
+ /** Render function to customise the UI that is displayed when there are no results, but an empty form (no search term) */
47
+ emptyStateNoResults?: LinkPickerPluginEmptyStateNoResults;
51
48
  /** Metadata about the plugin */
52
49
  meta?: {
53
50
  /** The data source that provides all results provided by the plugin */
@@ -63,3 +60,4 @@ export interface LinkPickerPluginAction {
63
60
  callback: () => void;
64
61
  }
65
62
  export type LinkPickerPluginErrorFallback = (error: unknown, retry: () => void) => ReactNode;
63
+ export type LinkPickerPluginEmptyStateNoResults = () => ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "1.22.2",
3
+ "version": "1.23.1",
4
4
  "description": "Standalone link picker",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "publishConfig": {
@@ -33,6 +33,11 @@
33
33
  "af:exports": {
34
34
  ".": "./src/index.ts"
35
35
  },
36
+ "platform-feature-flags": {
37
+ "platform.linking-platform.link-picker.enable-empty-state": {
38
+ "type": "boolean"
39
+ }
40
+ },
36
41
  "scripts": {
37
42
  "ak-postbuild": "ls -d dist/* | grep -v dist/types | xargs -n 1 copyfiles -u 1 -V src/**/*.svg",
38
43
  "codegen-analytics": "yarn run ts-analytics-codegen --command='yarn workspace @atlaskit/link-picker run codegen-analytics'"
@@ -44,8 +49,9 @@
44
49
  "@atlaskit/form": "^8.11.0",
45
50
  "@atlaskit/frontend-utilities": "^2.6.0",
46
51
  "@atlaskit/icon": "^21.12.0",
47
- "@atlaskit/linking-common": "^2.13.0",
52
+ "@atlaskit/linking-common": "^2.15.0",
48
53
  "@atlaskit/onboarding": "^10.8.2",
54
+ "@atlaskit/platform-feature-flags": "^0.2.1",
49
55
  "@atlaskit/spinner": "^15.5.0",
50
56
  "@atlaskit/tabs": "^13.4.0",
51
57
  "@atlaskit/textfield": "^5.5.0",
@@ -69,16 +75,19 @@
69
75
  "devDependencies": {
70
76
  "@af/analytics-codegen": "^0.1.0",
71
77
  "@atlaskit/docs": "*",
78
+ "@atlaskit/dropdown-menu": "^11.9.0",
72
79
  "@atlaskit/link-analytics": "^8.0.0",
73
80
  "@atlaskit/link-provider": "^1.6.0",
74
81
  "@atlaskit/link-test-helpers": "^4.0.0",
82
+ "@atlaskit/linking-common": "^2.15.0",
75
83
  "@atlaskit/popup": "^1.6.0",
76
84
  "@atlaskit/toggle": "^12.6.0",
77
85
  "@atlaskit/visual-regression": "*",
78
86
  "@atlaskit/webdriver-runner": "*",
79
87
  "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
80
- "@atlassian/link-picker-atlassian-plugin": "^32.1.0",
81
- "@atlassian/link-picker-plugins": "^22.1.0",
88
+ "@atlassian/feature-flags-test-utils": "*",
89
+ "@atlassian/link-picker-atlassian-plugin": "^33.2.0",
90
+ "@atlassian/link-picker-plugins": "^22.2.0",
82
91
  "@atlassian/recent-work-client": "^1.8.0",
83
92
  "@testing-library/dom": "^8.17.1",
84
93
  "@testing-library/jest-dom": "^5.16.5",
package/report.api.md CHANGED
@@ -33,6 +33,7 @@ export const LinkPicker: React_2.MemoExoticComponent<
33
33
  // @public (undocumented)
34
34
  export interface LinkPickerPlugin {
35
35
  action?: LinkPickerPluginAction;
36
+ emptyStateNoResults?: LinkPickerPluginEmptyStateNoResults;
36
37
  errorFallback?: LinkPickerPluginErrorFallback;
37
38
  meta?: {
38
39
  source?: string;
@@ -54,6 +55,9 @@ export interface LinkPickerPluginAction {
54
55
  label: MessageDescriptor | string;
55
56
  }
56
57
 
58
+ // @public (undocumented)
59
+ export type LinkPickerPluginEmptyStateNoResults = () => ReactNode;
60
+
57
61
  // @public (undocumented)
58
62
  export type LinkPickerPluginErrorFallback = (
59
63
  error: unknown,
@@ -20,6 +20,7 @@ export const LinkPicker: React_2.MemoExoticComponent<(props: LinkPickerProps) =>
20
20
  // @public (undocumented)
21
21
  export interface LinkPickerPlugin {
22
22
  action?: LinkPickerPluginAction;
23
+ emptyStateNoResults?: LinkPickerPluginEmptyStateNoResults;
23
24
  errorFallback?: LinkPickerPluginErrorFallback;
24
25
  meta?: {
25
26
  source?: string;
@@ -39,6 +40,9 @@ export interface LinkPickerPluginAction {
39
40
  label: MessageDescriptor | string;
40
41
  }
41
42
 
43
+ // @public (undocumented)
44
+ export type LinkPickerPluginEmptyStateNoResults = () => ReactNode;
45
+
42
46
  // @public (undocumented)
43
47
  export type LinkPickerPluginErrorFallback = (error: unknown, retry: () => void) => ReactNode;
44
48