@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.akEditorGutterPadding * 2, "px"),
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 { akEditorGutterPadding } from '@atlaskit/editor-shared-styles';
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 + akEditorGutterPadding * 2}px`,
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 { akEditorGutterPadding } from '@atlaskit/editor-shared-styles';
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 + akEditorGutterPadding * 2, "px"),
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.45",
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.16.0",
40
- "@atlaskit/editor-common": "^81.0.0",
41
- "@atlaskit/editor-core": "^193.23.0",
42
- "@atlaskit/editor-shared-styles": "^2.11.0",
43
- "@atlaskit/renderer": "^109.29.0",
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
- documentId: string;
20
- objectId: string;
21
- containerId?: string;
22
- createdBy: User;
23
- language?: string;
24
- title?: string;
25
- body: string;
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
- createDocument(value: any): Promise<Document_2>;
31
- editDocument(): void;
32
- cancelEdit(): void;
33
- updateDocument(value: any): Promise<Document_2>;
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
- private renderChild;
38
- private stateMapper;
39
- private renderPropsMapper;
40
- render(): JSX.Element;
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
- 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;
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
- 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>;
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
- editorProps?: Partial<EditorProps>;
89
- rendererProps?: Partial<RendererProps>;
85
+ editorProps?: Partial<EditorProps>;
86
+ rendererProps?: Partial<RendererProps>;
90
87
  }
91
88
 
92
89
  declare interface Props_3 {
93
- render(actions: DocumentActions): React_2.ReactNode;
90
+ render(actions: DocumentActions): React_2.ReactNode;
94
91
  }
95
92
 
96
93
  export declare interface Provider {
97
- getDocument(
98
- documentId: string,
99
- language?: string,
100
- ): Promise<Document_2 | null>;
101
- getDocumentByObjectId(
102
- objectId: string,
103
- language?: string,
104
- ): Promise<Document_2 | null>;
105
- updateDocument(
106
- documentId: string,
107
- body: string,
108
- objectId: string,
109
- title?: string,
110
- language?: string,
111
- ): Promise<Document_2 | null>;
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
- provider?: Provider;
122
- url?: string;
112
+ provider?: Provider;
113
+ url?: string;
123
114
  }
124
115
 
125
116
  export declare class ServiceProvider implements Provider {
126
- private config;
127
- constructor(config: Config);
128
- getDocument(
129
- documentId: string,
130
- language?: string,
131
- ): Promise<Document_2 | null>;
132
- getDocumentByObjectId(
133
- objectId: string,
134
- language?: string,
135
- ): Promise<Document_2 | null>;
136
- updateDocument(
137
- documentId: string,
138
- body: string,
139
- objectId: string,
140
- title?: string,
141
- language?: string,
142
- ): Promise<Document_2 | null>;
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
- doc?: Document_2;
153
- isLoading?: boolean;
154
- hasError?: boolean;
155
- mode?: DocumentMode;
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
- private actionsMapper;
167
- render(): JSX.Element;
148
+ private actionsMapper;
149
+ render(): JSX.Element;
168
150
  }
169
151
 
170
152
  export {};