@atlaskit/embedded-document 1.0.1 → 1.1.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,22 @@
1
1
  # @atlaskit/embedded-document
2
2
 
3
+ ## 1.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`72f94befc61f2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/72f94befc61f2) -
8
+ replace method-style signatures with function-style signatures
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
14
+ ## 1.0.2
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies
19
+
3
20
  ## 1.0.1
4
21
 
5
22
  ### Patch Changes
@@ -1,13 +1,13 @@
1
1
  import React, { PureComponent } from 'react';
2
2
  import { type Document as DocumentModel } from '../model';
3
3
  export interface Props {
4
- render(actions: DocumentActions): React.ReactNode;
4
+ render: (actions: DocumentActions) => React.ReactNode;
5
5
  }
6
6
  export interface DocumentActions {
7
- createDocument(value: any): Promise<DocumentModel>;
8
- editDocument(): void;
9
- cancelEdit(): void;
10
- updateDocument(value: any): Promise<DocumentModel>;
7
+ createDocument: (value: any) => Promise<DocumentModel>;
8
+ editDocument: () => void;
9
+ cancelEdit: () => void;
10
+ updateDocument: (value: any) => Promise<DocumentModel>;
11
11
  }
12
12
  export default class WithDocumentActions extends PureComponent<Props> {
13
13
  private actionsMapper;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type Document } from '../model';
3
2
  export interface ContextType {
4
3
  value: State;
@@ -13,10 +12,10 @@ export interface State {
13
12
  }
14
13
  export type Mode = 'view' | 'edit' | 'create';
15
14
  export interface Actions {
16
- getDocument(documentId: string, language?: string): void;
17
- getDocumentByObjectId(objectId: string, language?: string): void;
18
- setDocumentMode(mode: Mode): void;
19
- updateDocument(body: string, title?: string, language?: string): Promise<Document>;
20
- createDocument(body: string, title?: string, language?: string): Promise<Document>;
15
+ getDocument: (documentId: string, language?: string) => void;
16
+ getDocumentByObjectId: (objectId: string, language?: string) => void;
17
+ setDocumentMode: (mode: Mode) => void;
18
+ updateDocument: (body: string, title?: string, language?: string) => Promise<Document>;
19
+ createDocument: (body: string, title?: string, language?: string) => Promise<Document>;
21
20
  }
22
21
  export declare const Context: import("react").Context<ContextType>;
@@ -1,7 +1,7 @@
1
1
  import { type Document } from '../model';
2
2
  export interface Provider {
3
- getDocument(documentId: string, language?: string): Promise<Document | null>;
4
- getDocumentByObjectId(objectId: string, language?: string): Promise<Document | null>;
5
- updateDocument(documentId: string, body: string, objectId: string, title?: string, language?: string): Promise<Document | null>;
6
- createDocument(body: string, objectId: string, title?: string, language?: string): Promise<Document | null>;
3
+ getDocument: (documentId: string, language?: string) => Promise<Document | null>;
4
+ getDocumentByObjectId: (objectId: string, language?: string) => Promise<Document | null>;
5
+ updateDocument: (documentId: string, body: string, objectId: string, title?: string, language?: string) => Promise<Document | null>;
6
+ createDocument: (body: string, objectId: string, title?: string, language?: string) => Promise<Document | null>;
7
7
  }
@@ -1,13 +1,13 @@
1
1
  import React, { PureComponent } from 'react';
2
2
  import { type Document as DocumentModel } from '../model';
3
3
  export interface Props {
4
- render(actions: DocumentActions): React.ReactNode;
4
+ render: (actions: DocumentActions) => React.ReactNode;
5
5
  }
6
6
  export interface DocumentActions {
7
- createDocument(value: any): Promise<DocumentModel>;
8
- editDocument(): void;
9
- cancelEdit(): void;
10
- updateDocument(value: any): Promise<DocumentModel>;
7
+ createDocument: (value: any) => Promise<DocumentModel>;
8
+ editDocument: () => void;
9
+ cancelEdit: () => void;
10
+ updateDocument: (value: any) => Promise<DocumentModel>;
11
11
  }
12
12
  export default class WithDocumentActions extends PureComponent<Props> {
13
13
  private actionsMapper;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type Document } from '../model';
3
2
  export interface ContextType {
4
3
  value: State;
@@ -13,10 +12,10 @@ export interface State {
13
12
  }
14
13
  export type Mode = 'view' | 'edit' | 'create';
15
14
  export interface Actions {
16
- getDocument(documentId: string, language?: string): void;
17
- getDocumentByObjectId(objectId: string, language?: string): void;
18
- setDocumentMode(mode: Mode): void;
19
- updateDocument(body: string, title?: string, language?: string): Promise<Document>;
20
- createDocument(body: string, title?: string, language?: string): Promise<Document>;
15
+ getDocument: (documentId: string, language?: string) => void;
16
+ getDocumentByObjectId: (objectId: string, language?: string) => void;
17
+ setDocumentMode: (mode: Mode) => void;
18
+ updateDocument: (body: string, title?: string, language?: string) => Promise<Document>;
19
+ createDocument: (body: string, title?: string, language?: string) => Promise<Document>;
21
20
  }
22
21
  export declare const Context: import("react").Context<ContextType>;
@@ -1,7 +1,7 @@
1
1
  import { type Document } from '../model';
2
2
  export interface Provider {
3
- getDocument(documentId: string, language?: string): Promise<Document | null>;
4
- getDocumentByObjectId(objectId: string, language?: string): Promise<Document | null>;
5
- updateDocument(documentId: string, body: string, objectId: string, title?: string, language?: string): Promise<Document | null>;
6
- createDocument(body: string, objectId: string, title?: string, language?: string): Promise<Document | null>;
3
+ getDocument: (documentId: string, language?: string) => Promise<Document | null>;
4
+ getDocumentByObjectId: (objectId: string, language?: string) => Promise<Document | null>;
5
+ updateDocument: (documentId: string, body: string, objectId: string, title?: string, language?: string) => Promise<Document | null>;
6
+ createDocument: (body: string, objectId: string, title?: string, language?: string) => Promise<Document | null>;
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/embedded-document",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "DEPRECATED Embedded Document component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -33,23 +33,22 @@
33
33
  }
34
34
  },
35
35
  "dependencies": {
36
- "@atlaskit/button": "^23.3.0",
37
- "@atlaskit/editor-core": "^209.5.0",
38
- "@atlaskit/editor-shared-styles": "^3.5.0",
39
- "@atlaskit/renderer": "^120.3.0",
36
+ "@atlaskit/button": "^23.4.0",
37
+ "@atlaskit/editor-core": "^210.1.0",
38
+ "@atlaskit/editor-shared-styles": "^3.6.0",
39
+ "@atlaskit/renderer": "^120.4.0",
40
40
  "@atlaskit/tokens": "^6.0.0",
41
41
  "@atlaskit/util-service-support": "^6.3.0",
42
42
  "@babel/runtime": "^7.0.0"
43
43
  },
44
44
  "peerDependencies": {
45
- "@atlaskit/editor-common": "^107.16.0",
45
+ "@atlaskit/editor-common": "^107.26.0",
46
46
  "react": "^18.2.0",
47
47
  "styled-components": "^3.2.6"
48
48
  },
49
49
  "devDependencies": {
50
50
  "enzyme": "^3.10.0",
51
51
  "fetch-mock": "^8.0.0",
52
- "react": "^18.2.0",
53
- "typescript": "~5.4.2"
52
+ "react": "^18.2.0"
54
53
  }
55
54
  }