@atlaskit/embedded-document 0.7.49 → 0.8.0

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @atlaskit/embedded-document
2
2
 
3
+ ## 0.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`3e0d1d605e6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3e0d1d605e6) - Marking @atlaskit/embedded-document as deprecated as it is no longer being used.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+
3
13
  ## 0.7.49
4
14
 
5
15
  ### Patch Changes
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/embedded-document",
3
- "version": "0.7.49",
3
+ "version": "0.8.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/embedded-document",
3
- "version": "0.7.49",
3
+ "version": "0.8.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/embedded-document",
3
- "version": "0.7.49",
3
+ "version": "0.8.0",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@atlaskit/embedded-document",
3
- "version": "0.7.49",
4
- "description": "Embedded Document component",
3
+ "version": "0.8.0",
4
+ "description": "DEPRECATED Embedded Document component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
7
7
  },
@@ -18,14 +18,18 @@
18
18
  "team": "Editor Services",
19
19
  "deprecatedAutoEntryPoints": true,
20
20
  "inPublicMirror": true,
21
- "releaseModel": "scheduled"
21
+ "releaseModel": "scheduled",
22
+ "website": {
23
+ "name": "embedded-document",
24
+ "deprecated": "This package is no longer being used and will not be actively maintained"
25
+ }
22
26
  },
23
27
  "dependencies": {
24
28
  "@atlaskit/button": "^16.3.0",
25
- "@atlaskit/editor-common": "^68.0.0",
26
- "@atlaskit/editor-core": "^169.0.0",
29
+ "@atlaskit/editor-common": "^69.0.0",
30
+ "@atlaskit/editor-core": "^169.1.0",
27
31
  "@atlaskit/editor-shared-styles": "^2.1.0",
28
- "@atlaskit/renderer": "^98.0.0",
32
+ "@atlaskit/renderer": "^98.1.0",
29
33
  "@atlaskit/util-service-support": "^6.1.0",
30
34
  "@babel/runtime": "^7.0.0"
31
35
  },
package/report.api.md CHANGED
@@ -13,63 +13,95 @@ import { ReactElement } from 'react';
13
13
  import { RendererProps } from '@atlaskit/renderer';
14
14
  import { ServiceConfig } from '@atlaskit/util-service-support';
15
15
 
16
- // @public (undocumented)
17
- interface Document_2 {
18
- // (undocumented)
19
- body: string;
20
- // (undocumented)
16
+ declare interface Config extends ServiceConfig {}
17
+
18
+ declare interface Document_2 {
19
+ documentId: string;
20
+ objectId: string;
21
21
  containerId?: string;
22
- // (undocumented)
23
22
  createdBy: User;
24
- // (undocumented)
25
- documentId: string;
26
- // (undocumented)
27
23
  language?: string;
28
- // (undocumented)
29
- objectId: string;
30
- // (undocumented)
31
24
  title?: string;
25
+ body: string;
32
26
  }
33
27
  export { Document_2 as Document };
34
28
 
35
- // @public (undocumented)
36
- export class DocumentBody extends PureComponent<Props_2> {
37
- // (undocumented)
29
+ declare interface DocumentActions {
30
+ createDocument(value: any): Promise<Document_2>;
31
+ editDocument(): void;
32
+ cancelEdit(): void;
33
+ updateDocument(value: any): Promise<Document_2>;
34
+ }
35
+
36
+ export declare class DocumentBody extends PureComponent<Props_2> {
37
+ private renderChild;
38
+ private stateMapper;
39
+ private renderPropsMapper;
38
40
  render(): JSX.Element;
39
41
  }
40
42
 
41
- // @public (undocumented)
42
- export type DocumentMode = 'view' | 'edit' | 'create';
43
+ export declare type DocumentMode = 'view' | 'edit' | 'create';
43
44
 
44
- // @public (undocumented)
45
- export class EmbeddedDocument extends Component<Props, State> {
45
+ export declare class EmbeddedDocument extends Component<Props, State> {
46
+ private actions;
47
+ private provider;
46
48
  constructor(props: Props);
47
- // (undocumented)
48
49
  componentDidMount(): Promise<void>;
49
- // (undocumented)
50
+ private getDocumentByObjectId;
51
+ private getDocument;
52
+ private setDocumentMode;
53
+ private updateDocument;
54
+ private createDocument;
55
+ private setDocumentState;
56
+ /**
57
+ * Toolbar will only be rendered here if we're in "view"-mode.
58
+ *
59
+ * In all other modes, the toolbar rendering will be triggered
60
+ * by the Document-component.
61
+ */
62
+ private renderToolbar;
63
+ /**
64
+ * Title will only be rendered here if we're in "view"-mode.
65
+ *
66
+ * In all other modes, the title rendering will be triggered
67
+ * by the Document-component.
68
+ */
69
+ private renderTitle;
70
+ private renderContent;
50
71
  render(): JSX.Element;
51
72
  }
52
73
 
53
- // @public (undocumented)
54
- export interface Provider {
55
- // (undocumented)
56
- createDocument(
57
- body: string,
58
- objectId: string,
59
- title?: string,
60
- language?: string,
61
- ): Promise<Document_2 | null>;
62
- // (undocumented)
74
+ declare interface Props extends ProviderProps {
75
+ objectId: string;
76
+ documentId?: string;
77
+ containerId?: string;
78
+ language?: string;
79
+ mode?: DocumentMode;
80
+ renderTitle?: (mode: DocumentMode, doc?: any) => ReactElement<any>;
81
+ renderToolbar?: (
82
+ mode: DocumentMode,
83
+ editorActions?: any,
84
+ ) => ReactElement<any>;
85
+ }
86
+
87
+ declare interface Props_2 {
88
+ editorProps?: Partial<EditorProps>;
89
+ rendererProps?: Partial<RendererProps>;
90
+ }
91
+
92
+ declare interface Props_3 {
93
+ render(actions: DocumentActions): React_2.ReactNode;
94
+ }
95
+
96
+ export declare interface Provider {
63
97
  getDocument(
64
98
  documentId: string,
65
99
  language?: string,
66
100
  ): Promise<Document_2 | null>;
67
- // (undocumented)
68
101
  getDocumentByObjectId(
69
102
  objectId: string,
70
103
  language?: string,
71
104
  ): Promise<Document_2 | null>;
72
- // (undocumented)
73
105
  updateDocument(
74
106
  documentId: string,
75
107
  body: string,
@@ -77,29 +109,30 @@ export interface Provider {
77
109
  title?: string,
78
110
  language?: string,
79
111
  ): Promise<Document_2 | null>;
80
- }
81
-
82
- // @public (undocumented)
83
- export class ServiceProvider implements Provider {
84
- constructor(config: Config);
85
- // (undocumented)
86
112
  createDocument(
87
113
  body: string,
88
114
  objectId: string,
89
115
  title?: string,
90
116
  language?: string,
91
117
  ): Promise<Document_2 | null>;
92
- // (undocumented)
118
+ }
119
+
120
+ declare interface ProviderProps {
121
+ provider?: Provider;
122
+ url?: string;
123
+ }
124
+
125
+ export declare class ServiceProvider implements Provider {
126
+ private config;
127
+ constructor(config: Config);
93
128
  getDocument(
94
129
  documentId: string,
95
130
  language?: string,
96
131
  ): Promise<Document_2 | null>;
97
- // (undocumented)
98
132
  getDocumentByObjectId(
99
133
  objectId: string,
100
134
  language?: string,
101
135
  ): Promise<Document_2 | null>;
102
- // (undocumented)
103
136
  updateDocument(
104
137
  documentId: string,
105
138
  body: string,
@@ -107,19 +140,32 @@ export class ServiceProvider implements Provider {
107
140
  title?: string,
108
141
  language?: string,
109
142
  ): Promise<Document_2 | null>;
143
+ createDocument(
144
+ body: string,
145
+ objectId: string,
146
+ title?: string,
147
+ language?: string,
148
+ ): Promise<Document_2 | null>;
110
149
  }
111
150
 
112
- // @public (undocumented)
113
- export const Toolbar: (props: {
151
+ declare interface State {
152
+ doc?: Document_2;
153
+ isLoading?: boolean;
154
+ hasError?: boolean;
155
+ mode?: DocumentMode;
156
+ }
157
+
158
+ export declare const Toolbar: (props: {
114
159
  mode: DocumentMode;
115
160
  editorActions?: any;
116
161
  }) => JSX.Element;
117
162
 
118
- // @public (undocumented)
119
- export class WithDocumentActions extends PureComponent<Props_3> {
120
- // (undocumented)
163
+ declare interface User {}
164
+
165
+ export declare class WithDocumentActions extends PureComponent<Props_3> {
166
+ private actionsMapper;
121
167
  render(): JSX.Element;
122
168
  }
123
169
 
124
- // (No @packageDocumentation comment for this package)
170
+ export {};
125
171
  ```