@atlaskit/embedded-document 0.7.47 → 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,27 @@
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
+
13
+ ## 0.7.49
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+
19
+ ## 0.7.48
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies
24
+
3
25
  ## 0.7.47
4
26
 
5
27
  ### Patch Changes
@@ -7,10 +7,10 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.default = void 0;
9
9
 
10
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
-
12
10
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
13
11
 
12
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
13
+
14
14
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
15
15
 
16
16
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/embedded-document",
3
- "version": "0.7.47",
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.47",
3
+ "version": "0.8.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,9 +1,9 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
4
3
 
5
4
  var _templateObject;
6
5
 
6
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
7
7
  import React from 'react';
8
8
  import ButtonGroup from '@atlaskit/button/button-group';
9
9
  import Button from '@atlaskit/button/custom-theme-button';
@@ -1,4 +1,3 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
3
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -7,6 +6,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
7
6
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
8
7
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
10
10
 
11
11
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
12
12
 
@@ -1,5 +1,5 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
3
3
  import { createContext } from 'react';
4
4
 
5
5
  var noop = function noop() {};
@@ -1,4 +1,3 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
3
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -11,6 +10,8 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
11
10
 
12
11
  var _templateObject;
13
12
 
13
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
14
+
14
15
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
15
16
 
16
17
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
@@ -1,5 +1,4 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import _regeneratorRuntime from "@babel/runtime/regenerator";
3
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
4
3
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
5
4
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -8,6 +7,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
8
7
 
9
8
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
10
9
 
10
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
11
11
  import { utils } from '@atlaskit/util-service-support';
12
12
 
13
13
  function queryBuilder(data) {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/embedded-document",
3
- "version": "0.7.47",
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.47",
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": "^167.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": "^96.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 ADDED
@@ -0,0 +1,171 @@
1
+ ## API Report File for "@atlaskit/embedded-document"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+ /// <reference types="react" />
7
+
8
+ import { Component } from 'react';
9
+ import { EditorProps } from '@atlaskit/editor-core';
10
+ import { PureComponent } from 'react';
11
+ import { default as React_2 } from 'react';
12
+ import { ReactElement } from 'react';
13
+ import { RendererProps } from '@atlaskit/renderer';
14
+ import { ServiceConfig } from '@atlaskit/util-service-support';
15
+
16
+ declare interface Config extends ServiceConfig {}
17
+
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;
26
+ }
27
+ export { Document_2 as Document };
28
+
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;
40
+ render(): JSX.Element;
41
+ }
42
+
43
+ export declare type DocumentMode = 'view' | 'edit' | 'create';
44
+
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;
72
+ }
73
+
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 {
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>;
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);
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>;
149
+ }
150
+
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: {
159
+ mode: DocumentMode;
160
+ editorActions?: any;
161
+ }) => JSX.Element;
162
+
163
+ declare interface User {}
164
+
165
+ export declare class WithDocumentActions extends PureComponent<Props_3> {
166
+ private actionsMapper;
167
+ render(): JSX.Element;
168
+ }
169
+
170
+ export {};
171
+ ```