@atlaskit/embedded-document 0.9.45 → 0.9.46
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.
|
@@ -30,7 +30,7 @@ var Content = _styledComponents.default.div({
|
|
|
30
30
|
lineHeight: '24px',
|
|
31
31
|
height: '100%',
|
|
32
32
|
width: '100%',
|
|
33
|
-
maxWidth: "".concat(akEditorFullPageMaxWidth + _editorSharedStyles.
|
|
33
|
+
maxWidth: "".concat(akEditorFullPageMaxWidth + (0, _editorSharedStyles.akEditorGutterPaddingDynamic)() * 2, "px"),
|
|
34
34
|
paddingTop: "var(--ds-space-600, 48px)",
|
|
35
35
|
margin: '0 auto',
|
|
36
36
|
display: 'flex',
|
|
@@ -4,14 +4,14 @@ import { Component } from 'react';
|
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
import { Context } from './context';
|
|
6
6
|
import { getProvider } from '../provider';
|
|
7
|
-
import {
|
|
7
|
+
import { akEditorGutterPaddingDynamic } from '@atlaskit/editor-shared-styles';
|
|
8
8
|
export const akEditorFullPageMaxWidth = 680;
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
10
10
|
const Content = styled.div({
|
|
11
11
|
lineHeight: '24px',
|
|
12
12
|
height: '100%',
|
|
13
13
|
width: '100%',
|
|
14
|
-
maxWidth: `${akEditorFullPageMaxWidth +
|
|
14
|
+
maxWidth: `${akEditorFullPageMaxWidth + akEditorGutterPaddingDynamic() * 2}px`,
|
|
15
15
|
paddingTop: "var(--ds-space-600, 48px)",
|
|
16
16
|
margin: '0 auto',
|
|
17
17
|
display: 'flex',
|
|
@@ -14,14 +14,14 @@ import { Component } from 'react';
|
|
|
14
14
|
import styled from 'styled-components';
|
|
15
15
|
import { Context } from './context';
|
|
16
16
|
import { getProvider } from '../provider';
|
|
17
|
-
import {
|
|
17
|
+
import { akEditorGutterPaddingDynamic } from '@atlaskit/editor-shared-styles';
|
|
18
18
|
export var akEditorFullPageMaxWidth = 680;
|
|
19
19
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
20
20
|
var Content = styled.div({
|
|
21
21
|
lineHeight: '24px',
|
|
22
22
|
height: '100%',
|
|
23
23
|
width: '100%',
|
|
24
|
-
maxWidth: "".concat(akEditorFullPageMaxWidth +
|
|
24
|
+
maxWidth: "".concat(akEditorFullPageMaxWidth + akEditorGutterPaddingDynamic() * 2, "px"),
|
|
25
25
|
paddingTop: "var(--ds-space-600, 48px)",
|
|
26
26
|
margin: '0 auto',
|
|
27
27
|
display: 'flex',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/embedded-document",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.46",
|
|
4
4
|
"description": "DEPRECATED Embedded Document component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"runReact18": false
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@atlaskit/button": "^17.
|
|
40
|
-
"@atlaskit/editor-common": "^
|
|
41
|
-
"@atlaskit/editor-core": "^193.
|
|
42
|
-
"@atlaskit/editor-shared-styles": "^2.
|
|
43
|
-
"@atlaskit/renderer": "^109.
|
|
39
|
+
"@atlaskit/button": "^17.17.0",
|
|
40
|
+
"@atlaskit/editor-common": "^82.0.0",
|
|
41
|
+
"@atlaskit/editor-core": "^193.24.0",
|
|
42
|
+
"@atlaskit/editor-shared-styles": "^2.12.0",
|
|
43
|
+
"@atlaskit/renderer": "^109.31.0",
|
|
44
44
|
"@atlaskit/tokens": "1.49.1",
|
|
45
45
|
"@atlaskit/util-service-support": "^6.2.0",
|
|
46
46
|
"@babel/runtime": "^7.0.0"
|
|
@@ -50,11 +50,9 @@
|
|
|
50
50
|
"styled-components": "^3.2.6"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
54
53
|
"enzyme": "^3.10.0",
|
|
55
54
|
"fetch-mock": "^8.0.0",
|
|
56
55
|
"react": "^16.8.0",
|
|
57
56
|
"typescript": "~5.4.2"
|
|
58
|
-
}
|
|
59
|
-
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
57
|
+
}
|
|
60
58
|
}
|
package/report.api.md
CHANGED
|
@@ -16,155 +16,137 @@ import { ServiceConfig } from '@atlaskit/util-service-support';
|
|
|
16
16
|
declare interface Config extends ServiceConfig {}
|
|
17
17
|
|
|
18
18
|
declare interface Document_2 {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
documentId: string;
|
|
20
|
+
objectId: string;
|
|
21
|
+
containerId?: string;
|
|
22
|
+
createdBy: User;
|
|
23
|
+
language?: string;
|
|
24
|
+
title?: string;
|
|
25
|
+
body: string;
|
|
26
26
|
}
|
|
27
27
|
export { Document_2 as Document };
|
|
28
28
|
|
|
29
29
|
declare interface DocumentActions {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
createDocument(value: any): Promise<Document_2>;
|
|
31
|
+
editDocument(): void;
|
|
32
|
+
cancelEdit(): void;
|
|
33
|
+
updateDocument(value: any): Promise<Document_2>;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
export declare class DocumentBody extends PureComponent<Props_2> {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
private renderChild;
|
|
38
|
+
private stateMapper;
|
|
39
|
+
private renderPropsMapper;
|
|
40
|
+
render(): JSX.Element;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
export declare type DocumentMode = 'view' | 'edit' | 'create';
|
|
44
44
|
|
|
45
45
|
export declare class EmbeddedDocument extends Component<Props, State> {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
46
|
+
private actions;
|
|
47
|
+
private provider;
|
|
48
|
+
constructor(props: Props);
|
|
49
|
+
componentDidMount(): Promise<void>;
|
|
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;
|
|
71
|
+
render(): JSX.Element;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
declare interface Props extends ProviderProps {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
mode: DocumentMode,
|
|
83
|
-
editorActions?: any,
|
|
84
|
-
) => ReactElement<any>;
|
|
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?: (mode: DocumentMode, editorActions?: any) => ReactElement<any>;
|
|
85
82
|
}
|
|
86
83
|
|
|
87
84
|
declare interface Props_2 {
|
|
88
|
-
|
|
89
|
-
|
|
85
|
+
editorProps?: Partial<EditorProps>;
|
|
86
|
+
rendererProps?: Partial<RendererProps>;
|
|
90
87
|
}
|
|
91
88
|
|
|
92
89
|
declare interface Props_3 {
|
|
93
|
-
|
|
90
|
+
render(actions: DocumentActions): React_2.ReactNode;
|
|
94
91
|
}
|
|
95
92
|
|
|
96
93
|
export declare interface Provider {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
createDocument(
|
|
113
|
-
body: string,
|
|
114
|
-
objectId: string,
|
|
115
|
-
title?: string,
|
|
116
|
-
language?: string,
|
|
117
|
-
): Promise<Document_2 | null>;
|
|
94
|
+
getDocument(documentId: string, language?: string): Promise<Document_2 | null>;
|
|
95
|
+
getDocumentByObjectId(objectId: string, language?: string): Promise<Document_2 | null>;
|
|
96
|
+
updateDocument(
|
|
97
|
+
documentId: string,
|
|
98
|
+
body: string,
|
|
99
|
+
objectId: string,
|
|
100
|
+
title?: string,
|
|
101
|
+
language?: string,
|
|
102
|
+
): Promise<Document_2 | null>;
|
|
103
|
+
createDocument(
|
|
104
|
+
body: string,
|
|
105
|
+
objectId: string,
|
|
106
|
+
title?: string,
|
|
107
|
+
language?: string,
|
|
108
|
+
): Promise<Document_2 | null>;
|
|
118
109
|
}
|
|
119
110
|
|
|
120
111
|
declare interface ProviderProps {
|
|
121
|
-
|
|
122
|
-
|
|
112
|
+
provider?: Provider;
|
|
113
|
+
url?: string;
|
|
123
114
|
}
|
|
124
115
|
|
|
125
116
|
export declare class ServiceProvider implements Provider {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
createDocument(
|
|
144
|
-
body: string,
|
|
145
|
-
objectId: string,
|
|
146
|
-
title?: string,
|
|
147
|
-
language?: string,
|
|
148
|
-
): Promise<Document_2 | null>;
|
|
117
|
+
private config;
|
|
118
|
+
constructor(config: Config);
|
|
119
|
+
getDocument(documentId: string, language?: string): Promise<Document_2 | null>;
|
|
120
|
+
getDocumentByObjectId(objectId: string, language?: string): Promise<Document_2 | null>;
|
|
121
|
+
updateDocument(
|
|
122
|
+
documentId: string,
|
|
123
|
+
body: string,
|
|
124
|
+
objectId: string,
|
|
125
|
+
title?: string,
|
|
126
|
+
language?: string,
|
|
127
|
+
): Promise<Document_2 | null>;
|
|
128
|
+
createDocument(
|
|
129
|
+
body: string,
|
|
130
|
+
objectId: string,
|
|
131
|
+
title?: string,
|
|
132
|
+
language?: string,
|
|
133
|
+
): Promise<Document_2 | null>;
|
|
149
134
|
}
|
|
150
135
|
|
|
151
136
|
declare interface State {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
137
|
+
doc?: Document_2;
|
|
138
|
+
isLoading?: boolean;
|
|
139
|
+
hasError?: boolean;
|
|
140
|
+
mode?: DocumentMode;
|
|
156
141
|
}
|
|
157
142
|
|
|
158
|
-
export declare const Toolbar: (props: {
|
|
159
|
-
mode: DocumentMode;
|
|
160
|
-
editorActions?: any;
|
|
161
|
-
}) => JSX.Element;
|
|
143
|
+
export declare const Toolbar: (props: { mode: DocumentMode; editorActions?: any }) => JSX.Element;
|
|
162
144
|
|
|
163
145
|
declare interface User {}
|
|
164
146
|
|
|
165
147
|
export declare class WithDocumentActions extends PureComponent<Props_3> {
|
|
166
|
-
|
|
167
|
-
|
|
148
|
+
private actionsMapper;
|
|
149
|
+
render(): JSX.Element;
|
|
168
150
|
}
|
|
169
151
|
|
|
170
152
|
export {};
|