@atlaskit/link-create 1.4.0 → 1.5.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 (72) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/analytics.spec.yaml +14 -0
  3. package/dist/cjs/common/ui/Button/index.js +37 -0
  4. package/dist/cjs/common/ui/error-boundary-modal/index.js +30 -0
  5. package/dist/cjs/common/utils/analytics/analytics.codegen.js +1 -1
  6. package/dist/cjs/common/utils/analytics/components.js +20 -0
  7. package/dist/cjs/controllers/edit-post-create-context/index.js +43 -0
  8. package/dist/cjs/controllers/plugin-context/index.js +39 -0
  9. package/dist/cjs/ui/link-create/confirm-dismiss-dialog/main.js +18 -5
  10. package/dist/cjs/ui/link-create/edit-modal/index.js +25 -0
  11. package/dist/cjs/ui/link-create/error-boundary/error-boundary-base/index.js +4 -7
  12. package/dist/cjs/ui/link-create/error-boundary/index.js +4 -3
  13. package/dist/cjs/ui/link-create/main.js +17 -2
  14. package/dist/cjs/ui/main.js +12 -1
  15. package/dist/es2019/common/ui/Button/index.js +27 -0
  16. package/dist/es2019/common/ui/error-boundary-modal/index.js +22 -0
  17. package/dist/es2019/common/utils/analytics/analytics.codegen.js +1 -1
  18. package/dist/es2019/common/utils/analytics/components.js +15 -0
  19. package/dist/es2019/controllers/edit-post-create-context/index.js +28 -0
  20. package/dist/es2019/controllers/plugin-context/index.js +25 -0
  21. package/dist/es2019/ui/link-create/confirm-dismiss-dialog/main.js +17 -4
  22. package/dist/es2019/ui/link-create/edit-modal/index.js +17 -0
  23. package/dist/es2019/ui/link-create/error-boundary/error-boundary-base/index.js +4 -4
  24. package/dist/es2019/ui/link-create/error-boundary/index.js +4 -3
  25. package/dist/es2019/ui/link-create/main.js +17 -2
  26. package/dist/es2019/ui/main.js +12 -1
  27. package/dist/esm/common/ui/Button/index.js +27 -0
  28. package/dist/esm/common/ui/error-boundary-modal/index.js +21 -0
  29. package/dist/esm/common/utils/analytics/analytics.codegen.js +1 -1
  30. package/dist/esm/common/utils/analytics/components.js +13 -0
  31. package/dist/esm/controllers/edit-post-create-context/index.js +33 -0
  32. package/dist/esm/controllers/plugin-context/index.js +29 -0
  33. package/dist/esm/ui/link-create/confirm-dismiss-dialog/main.js +17 -4
  34. package/dist/esm/ui/link-create/edit-modal/index.js +15 -0
  35. package/dist/esm/ui/link-create/error-boundary/error-boundary-base/index.js +4 -4
  36. package/dist/esm/ui/link-create/error-boundary/index.js +4 -3
  37. package/dist/esm/ui/link-create/main.js +17 -2
  38. package/dist/esm/ui/main.js +12 -1
  39. package/dist/types/common/ui/Button/index.d.ts +5 -0
  40. package/dist/types/common/ui/error-boundary-modal/index.d.ts +11 -0
  41. package/dist/types/common/utils/analytics/analytics.codegen.d.ts +6 -2
  42. package/dist/types/common/utils/analytics/components.d.ts +8 -0
  43. package/dist/types/controllers/edit-post-create-context/index.d.ts +12 -0
  44. package/dist/types/controllers/plugin-context/index.d.ts +18 -0
  45. package/dist/types/ui/link-create/edit-modal/index.d.ts +4 -0
  46. package/dist/types/ui/link-create/error-boundary/error-boundary-base/index.d.ts +3 -3
  47. package/dist/types/ui/link-create/error-boundary/index.d.ts +5 -1
  48. package/dist/types-ts4.5/common/ui/Button/index.d.ts +5 -0
  49. package/dist/types-ts4.5/common/ui/error-boundary-modal/index.d.ts +11 -0
  50. package/dist/types-ts4.5/common/utils/analytics/analytics.codegen.d.ts +6 -2
  51. package/dist/types-ts4.5/common/utils/analytics/components.d.ts +8 -0
  52. package/dist/types-ts4.5/controllers/edit-post-create-context/index.d.ts +12 -0
  53. package/dist/types-ts4.5/controllers/plugin-context/index.d.ts +18 -0
  54. package/dist/types-ts4.5/ui/link-create/edit-modal/index.d.ts +4 -0
  55. package/dist/types-ts4.5/ui/link-create/error-boundary/error-boundary-base/index.d.ts +3 -3
  56. package/dist/types-ts4.5/ui/link-create/error-boundary/index.d.ts +5 -1
  57. package/package.json +6 -3
  58. /package/dist/cjs/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/error-svg/index.js +0 -0
  59. /package/dist/cjs/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/index.js +0 -0
  60. /package/dist/cjs/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/messages.js +0 -0
  61. /package/dist/es2019/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/error-svg/index.js +0 -0
  62. /package/dist/es2019/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/index.js +0 -0
  63. /package/dist/es2019/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/messages.js +0 -0
  64. /package/dist/esm/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/error-svg/index.js +0 -0
  65. /package/dist/esm/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/index.js +0 -0
  66. /package/dist/esm/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/messages.js +0 -0
  67. /package/dist/types/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/error-svg/index.d.ts +0 -0
  68. /package/dist/types/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/index.d.ts +0 -0
  69. /package/dist/types/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/messages.d.ts +0 -0
  70. /package/dist/types-ts4.5/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/error-svg/index.d.ts +0 -0
  71. /package/dist/types-ts4.5/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/index.d.ts +0 -0
  72. /package/dist/types-ts4.5/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/messages.d.ts +0 -0
@@ -0,0 +1,8 @@
1
+ import { AnalyticsEventAttributes } from './analytics.codegen';
2
+ type ScreenViewedEventProps = {
3
+ screen: keyof {
4
+ [Key in keyof AnalyticsEventAttributes as Key extends `screen.${infer ScreenName}.viewed` ? ScreenName : never]: any;
5
+ };
6
+ };
7
+ export declare const ScreenViewedEvent: ({ screen }: ScreenViewedEventProps) => null;
8
+ export {};
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { CreatePayload } from '../../common/types';
3
+ type EditPostCreateModalContextValue = {
4
+ editViewPayload?: CreatePayload | undefined;
5
+ setEditViewPayload: (payload?: CreatePayload) => void;
6
+ };
7
+ export declare const EditPostCreateModalProvider: ({ active, children, }: {
8
+ active: boolean;
9
+ children: React.ReactNode;
10
+ }) => JSX.Element;
11
+ export declare const useEditPostCreateModal: () => EditPostCreateModalContextValue;
12
+ export {};
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { LinkCreatePlugin } from '../../common/types';
3
+ type LinkCreatePluginsProviderProps = {
4
+ /**
5
+ * The list of plugins provided as a prop to Link Create component
6
+ */
7
+ plugins: LinkCreatePlugin[];
8
+ /**
9
+ * The entity key as provided as prop to link create which controls the initially active plugin
10
+ */
11
+ entityKey: string;
12
+ children: React.ReactNode;
13
+ };
14
+ export declare const LinkCreatePluginsProvider: ({ plugins, entityKey: propEntityKey, children, }: LinkCreatePluginsProviderProps) => JSX.Element;
15
+ export declare const useLinkCreatePlugins: () => {
16
+ activePlugin: LinkCreatePlugin | null;
17
+ };
18
+ export {};
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const EditModal: ({ onClose }: {
3
+ onClose?: (() => void) | undefined;
4
+ }) => JSX.Element;
@@ -1,4 +1,4 @@
1
- import React, { Component, ReactNode } from 'react';
1
+ import { Component, ReactNode } from 'react';
2
2
  export type ErrorBoundaryErrorInfo = {
3
3
  componentStack: string;
4
4
  };
@@ -7,12 +7,12 @@ type BaseErrorBoundaryState = {
7
7
  };
8
8
  interface BaseErrorBoundaryProps {
9
9
  children: ReactNode;
10
- ErrorComponent?: React.ComponentType;
10
+ errorComponent?: JSX.Element;
11
11
  onError?: (error: Error, info?: ErrorBoundaryErrorInfo) => void;
12
12
  }
13
13
  export declare class BaseErrorBoundary extends Component<BaseErrorBoundaryProps, BaseErrorBoundaryState> {
14
14
  constructor(props: BaseErrorBoundaryProps);
15
15
  componentDidCatch(error: Error, info?: ErrorBoundaryErrorInfo): void;
16
- render(): React.ReactNode;
16
+ render(): ReactNode;
17
17
  }
18
18
  export {};
@@ -1,2 +1,6 @@
1
1
  import React from 'react';
2
- export declare const ErrorBoundary: React.FC<{}>;
2
+ type ErrorBoundaryProps = {
3
+ errorComponent?: JSX.Element;
4
+ };
5
+ export declare const ErrorBoundary: React.FC<ErrorBoundaryProps>;
6
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-create",
3
- "version": "1.4.0",
3
+ "version": "1.5.1",
4
4
  "description": "The driver component of meta creation flow",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -35,14 +35,14 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@atlaskit/analytics-next": "^9.1.0",
38
- "@atlaskit/button": "^16.12.0",
38
+ "@atlaskit/button": "^16.13.0",
39
39
  "@atlaskit/empty-state": "^7.6.0",
40
40
  "@atlaskit/form": "^8.11.0",
41
41
  "@atlaskit/icon": "^21.12.0",
42
42
  "@atlaskit/intl-messages-provider": "^1.0.0",
43
43
  "@atlaskit/modal-dialog": "^12.8.0",
44
44
  "@atlaskit/platform-feature-flags": "^0.2.1",
45
- "@atlaskit/primitives": "^1.6.0",
45
+ "@atlaskit/primitives": "^1.9.0",
46
46
  "@atlaskit/select": "^16.7.0",
47
47
  "@atlaskit/spinner": "^15.6.0",
48
48
  "@atlaskit/textfield": "^5.6.0",
@@ -117,6 +117,9 @@
117
117
  },
118
118
  "platform.linking-platform.link-create.confirm-dismiss-dialog": {
119
119
  "type": "boolean"
120
+ },
121
+ "platform.linking-platform.link-create.outer-error-boundary": {
122
+ "type": "boolean"
120
123
  }
121
124
  }
122
125
  }