@atlaskit/embedded-document 6.0.0 → 6.0.2

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,21 @@
1
1
  # @atlaskit/embedded-document
2
2
 
3
+ ## 6.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`5979ce2baa3ea`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5979ce2baa3ea) -
8
+ Mechanical type-import autofix for rendering and provider packages.
9
+ - Updated dependencies
10
+
11
+ ## 6.0.1
12
+
13
+ ### Patch Changes
14
+
15
+ - [`0f4a08b633f6e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0f4a08b633f6e) -
16
+ Internal changes to remove unnecessary token fallbacks and imports from `@atlaskit/theme`
17
+ - Updated dependencies
18
+
3
19
  ## 6.0.0
4
20
 
5
21
  ### Patch Changes
@@ -37,6 +37,7 @@ var Document = exports.default = /*#__PURE__*/function (_Component) {
37
37
  mode = _this$props.mode,
38
38
  renderToolbar = _this$props.renderToolbar;
39
39
  if (renderToolbar) {
40
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
40
41
  return /*#__PURE__*/_react.default.createElement(_editorCore.WithEditorActions, {
41
42
  render: function render(actions) {
42
43
  return renderToolbar(mode, actions);
@@ -28,13 +28,17 @@ var Toolbar = _styledComponents.default.div({
28
28
  var _default = exports.default = function _default(props) {
29
29
  var mode = props.mode,
30
30
  editorActions = props.editorActions;
31
- return /*#__PURE__*/_react.default.createElement(_withDocumentActions.default, {
31
+ return /*#__PURE__*/_react.default.createElement(_withDocumentActions.default
32
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
33
+ , {
32
34
  render: function render(actions) {
33
35
  switch (mode) {
34
36
  case 'edit':
35
37
  case 'create':
36
38
  return /*#__PURE__*/_react.default.createElement(_buttonGroup.default, null, /*#__PURE__*/_react.default.createElement(_button.default, {
37
- appearance: "primary",
39
+ appearance: "primary"
40
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
41
+ ,
38
42
  onClick: /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
39
43
  var value;
40
44
  return _regenerator.default.wrap(function _callee$(_context) {
@@ -312,6 +312,7 @@ var EmbeddedDocument = exports.default = /*#__PURE__*/function (_Component) {
312
312
  renderTitle = _this$props3.renderTitle,
313
313
  renderToolbar = _this$props3.renderToolbar;
314
314
  return /*#__PURE__*/_react.default.createElement(_context7.Context.Provider, {
315
+ // eslint-disable-next-line @atlassian/perf-linting/no-inline-context-value, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
315
316
  value: {
316
317
  value: this.state,
317
318
  actions: this.actions,
@@ -14,6 +14,7 @@ export default class Document extends Component {
14
14
  renderToolbar
15
15
  } = this.props;
16
16
  if (renderToolbar) {
17
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
17
18
  return /*#__PURE__*/React.createElement(WithEditorActions, {
18
19
  render: actions => renderToolbar(mode, actions)
19
20
  });
@@ -20,19 +20,24 @@ export default (props => {
20
20
  mode,
21
21
  editorActions
22
22
  } = props;
23
- return /*#__PURE__*/React.createElement(WithDocumentActions, {
23
+ return /*#__PURE__*/React.createElement(WithDocumentActions
24
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
25
+ , {
24
26
  render: actions => {
25
27
  switch (mode) {
26
28
  case 'edit':
27
29
  case 'create':
28
30
  return /*#__PURE__*/React.createElement(ButtonGroup, null, /*#__PURE__*/React.createElement(Button, {
29
- appearance: "primary",
31
+ appearance: "primary"
32
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
33
+ ,
30
34
  onClick: async () => {
31
35
  // Ignored via go/ees005
32
36
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
33
37
  const value = await editorActions.getValue();
34
38
  try {
35
39
  await (mode === 'create' ? actions.createDocument(value) : actions.updateDocument(value));
40
+ // eslint-disable-next-line no-unused-vars
36
41
  } catch (err) {}
37
42
  }
38
43
  // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-jsx
@@ -190,6 +190,7 @@ export default class EmbeddedDocument extends Component {
190
190
  renderToolbar
191
191
  } = this.props;
192
192
  return /*#__PURE__*/React.createElement(Context.Provider, {
193
+ // eslint-disable-next-line @atlassian/perf-linting/no-inline-context-value, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
193
194
  value: {
194
195
  value: this.state,
195
196
  actions: this.actions,
@@ -28,6 +28,7 @@ var Document = /*#__PURE__*/function (_Component) {
28
28
  mode = _this$props.mode,
29
29
  renderToolbar = _this$props.renderToolbar;
30
30
  if (renderToolbar) {
31
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
31
32
  return /*#__PURE__*/React.createElement(WithEditorActions, {
32
33
  render: function render(actions) {
33
34
  return renderToolbar(mode, actions);
@@ -20,13 +20,17 @@ var Toolbar = styled.div({
20
20
  export default (function (props) {
21
21
  var mode = props.mode,
22
22
  editorActions = props.editorActions;
23
- return /*#__PURE__*/React.createElement(WithDocumentActions, {
23
+ return /*#__PURE__*/React.createElement(WithDocumentActions
24
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
25
+ , {
24
26
  render: function render(actions) {
25
27
  switch (mode) {
26
28
  case 'edit':
27
29
  case 'create':
28
30
  return /*#__PURE__*/React.createElement(ButtonGroup, null, /*#__PURE__*/React.createElement(Button, {
29
- appearance: "primary",
31
+ appearance: "primary"
32
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
33
+ ,
30
34
  onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
31
35
  var value;
32
36
  return _regeneratorRuntime.wrap(function _callee$(_context) {
@@ -304,6 +304,7 @@ var EmbeddedDocument = /*#__PURE__*/function (_Component) {
304
304
  renderTitle = _this$props3.renderTitle,
305
305
  renderToolbar = _this$props3.renderToolbar;
306
306
  return /*#__PURE__*/React.createElement(Context.Provider, {
307
+ // eslint-disable-next-line @atlassian/perf-linting/no-inline-context-value, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
307
308
  value: {
308
309
  value: this.state,
309
310
  actions: this.actions,
@@ -1,9 +1,9 @@
1
1
  import React, { Component } from 'react';
2
- import { type EditorProps } from '@atlaskit/editor-core';
3
- import { type RendererProps } from '@atlaskit/renderer';
4
- import { type Props as BaseProps } from '../context/embedded-document';
5
- import { type Mode } from '../context/context';
6
- import { type Document as DocumentModel } from '../model';
2
+ import type { EditorProps } from '@atlaskit/editor-core';
3
+ import type { RendererProps } from '@atlaskit/renderer';
4
+ import type { Props as BaseProps } from '../context/embedded-document';
5
+ import type { Mode } from '../context/context';
6
+ import type { Document as DocumentModel } from '../model';
7
7
  export interface Props extends BaseProps {
8
8
  doc?: DocumentModel;
9
9
  editorProps?: Partial<EditorProps>;
@@ -1,5 +1,5 @@
1
1
  import React, { PureComponent } from 'react';
2
- import { type Actions, type State } from '../context/context';
2
+ import type { Actions, State } from '../context/context';
3
3
  export interface Props<PropsFromState extends Object, PropsFromActions extends Object, RenderProps extends Object> {
4
4
  actionsMapper?: (actions: Actions) => PropsFromActions;
5
5
  children: (props: PropsFromState & PropsFromActions & RenderProps) => React.ReactNode;
@@ -1,6 +1,6 @@
1
1
  import React, { PureComponent } from 'react';
2
- import { type EditorProps } from '@atlaskit/editor-core';
3
- import { type RendererProps } from '@atlaskit/renderer';
2
+ import type { EditorProps } from '@atlaskit/editor-core';
3
+ import type { RendererProps } from '@atlaskit/renderer';
4
4
  export interface Props {
5
5
  editorProps?: Partial<EditorProps>;
6
6
  rendererProps?: Partial<RendererProps>;
@@ -1,5 +1,5 @@
1
1
  import React, { PureComponent } from 'react';
2
- import { type Document as DocumentModel } from '../model';
2
+ import type { Document as DocumentModel } from '../model';
3
3
  export interface Props {
4
4
  render: (actions: DocumentActions) => React.ReactNode;
5
5
  }
@@ -1,4 +1,4 @@
1
- import { type Document } from '../model';
1
+ import type { Document } from '../model';
2
2
  export interface ContextType {
3
3
  actions: Actions;
4
4
  renderProps: any;
@@ -1,4 +1,4 @@
1
- import { type Provider } from './provider';
1
+ import type { Provider } from './provider';
2
2
  export interface ProviderProps {
3
3
  provider?: Provider;
4
4
  url?: string;
@@ -1,4 +1,4 @@
1
- import { type Document } from '../model';
1
+ import type { Document } from '../model';
2
2
  export interface Provider {
3
3
  createDocument: (body: string, objectId: string, title?: string, language?: string) => Promise<Document | null>;
4
4
  getDocument: (documentId: string, language?: string) => Promise<Document | null>;
@@ -1,6 +1,6 @@
1
- import { type ServiceConfig } from '@atlaskit/util-service-support';
2
- import { type Provider } from './provider';
3
- import { type Document } from '../model';
1
+ import type { ServiceConfig } from '@atlaskit/util-service-support';
2
+ import type { Provider } from './provider';
3
+ import type { Document } from '../model';
4
4
  export type Config = ServiceConfig;
5
5
  export default class ServiceProvider implements Provider {
6
6
  private config;
@@ -1,9 +1,9 @@
1
1
  import React, { Component } from 'react';
2
- import { type EditorProps } from '@atlaskit/editor-core';
3
- import { type RendererProps } from '@atlaskit/renderer';
4
- import { type Props as BaseProps } from '../context/embedded-document';
5
- import { type Mode } from '../context/context';
6
- import { type Document as DocumentModel } from '../model';
2
+ import type { EditorProps } from '@atlaskit/editor-core';
3
+ import type { RendererProps } from '@atlaskit/renderer';
4
+ import type { Props as BaseProps } from '../context/embedded-document';
5
+ import type { Mode } from '../context/context';
6
+ import type { Document as DocumentModel } from '../model';
7
7
  export interface Props extends BaseProps {
8
8
  doc?: DocumentModel;
9
9
  editorProps?: Partial<EditorProps>;
@@ -1,5 +1,5 @@
1
1
  import React, { PureComponent } from 'react';
2
- import { type Actions, type State } from '../context/context';
2
+ import type { Actions, State } from '../context/context';
3
3
  export interface Props<PropsFromState extends Object, PropsFromActions extends Object, RenderProps extends Object> {
4
4
  actionsMapper?: (actions: Actions) => PropsFromActions;
5
5
  children: (props: PropsFromState & PropsFromActions & RenderProps) => React.ReactNode;
@@ -1,6 +1,6 @@
1
1
  import React, { PureComponent } from 'react';
2
- import { type EditorProps } from '@atlaskit/editor-core';
3
- import { type RendererProps } from '@atlaskit/renderer';
2
+ import type { EditorProps } from '@atlaskit/editor-core';
3
+ import type { RendererProps } from '@atlaskit/renderer';
4
4
  export interface Props {
5
5
  editorProps?: Partial<EditorProps>;
6
6
  rendererProps?: Partial<RendererProps>;
@@ -1,5 +1,5 @@
1
1
  import React, { PureComponent } from 'react';
2
- import { type Document as DocumentModel } from '../model';
2
+ import type { Document as DocumentModel } from '../model';
3
3
  export interface Props {
4
4
  render: (actions: DocumentActions) => React.ReactNode;
5
5
  }
@@ -1,4 +1,4 @@
1
- import { type Document } from '../model';
1
+ import type { Document } from '../model';
2
2
  export interface ContextType {
3
3
  actions: Actions;
4
4
  renderProps: any;
@@ -1,4 +1,4 @@
1
- import { type Provider } from './provider';
1
+ import type { Provider } from './provider';
2
2
  export interface ProviderProps {
3
3
  provider?: Provider;
4
4
  url?: string;
@@ -1,4 +1,4 @@
1
- import { type Document } from '../model';
1
+ import type { Document } from '../model';
2
2
  export interface Provider {
3
3
  createDocument: (body: string, objectId: string, title?: string, language?: string) => Promise<Document | null>;
4
4
  getDocument: (documentId: string, language?: string) => Promise<Document | null>;
@@ -1,6 +1,6 @@
1
- import { type ServiceConfig } from '@atlaskit/util-service-support';
2
- import { type Provider } from './provider';
3
- import { type Document } from '../model';
1
+ import type { ServiceConfig } from '@atlaskit/util-service-support';
2
+ import type { Provider } from './provider';
3
+ import type { Document } from '../model';
4
4
  export type Config = ServiceConfig;
5
5
  export default class ServiceProvider implements Provider {
6
6
  private config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/embedded-document",
3
- "version": "6.0.0",
3
+ "version": "6.0.2",
4
4
  "description": "DEPRECATED Embedded Document component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -31,15 +31,15 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@atlaskit/button": "^23.10.0",
34
- "@atlaskit/editor-core": "^217.0.0",
34
+ "@atlaskit/editor-core": "^217.6.0",
35
35
  "@atlaskit/editor-shared-styles": "^3.10.0",
36
- "@atlaskit/renderer": "^128.0.0",
37
- "@atlaskit/tokens": "^11.1.0",
36
+ "@atlaskit/renderer": "^128.3.0",
37
+ "@atlaskit/tokens": "^11.2.0",
38
38
  "@atlaskit/util-service-support": "^6.3.0",
39
39
  "@babel/runtime": "^7.0.0"
40
40
  },
41
41
  "peerDependencies": {
42
- "@atlaskit/editor-common": "^112.0.0",
42
+ "@atlaskit/editor-common": "^112.10.0",
43
43
  "react": "^18.2.0",
44
44
  "styled-components": "^3.2.6"
45
45
  },