@atlaskit/editor-plugin-card 4.5.0 → 4.5.1
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 +8 -0
- package/dist/cjs/nodeviews/blockCard.js +0 -4
- package/dist/cjs/nodeviews/datasource.js +14 -26
- package/dist/cjs/nodeviews/embedCard.js +4 -15
- package/dist/cjs/nodeviews/genericCard.js +17 -19
- package/dist/cjs/ui/DatasourceAppearanceButton.js +11 -13
- package/dist/cjs/ui/DatasourceModal/ModalWithState.js +16 -10
- package/dist/cjs/ui/EditToolbarButton/index.js +26 -28
- package/dist/cjs/ui/EditorLinkingPlatformAnalytics/index.js +5 -25
- package/dist/cjs/ui/LinkToolbarAppearance.js +5 -6
- package/dist/cjs/ui/ToolbarViewedEvent.js +7 -9
- package/dist/cjs/ui/WithCardContext.js +14 -0
- package/dist/es2019/nodeviews/blockCard.js +0 -4
- package/dist/es2019/nodeviews/datasource.js +14 -26
- package/dist/es2019/nodeviews/embedCard.js +4 -16
- package/dist/es2019/nodeviews/genericCard.js +5 -9
- package/dist/es2019/ui/DatasourceAppearanceButton.js +4 -5
- package/dist/es2019/ui/DatasourceModal/ModalWithState.js +14 -6
- package/dist/es2019/ui/EditToolbarButton/index.js +26 -29
- package/dist/es2019/ui/EditorLinkingPlatformAnalytics/index.js +4 -23
- package/dist/es2019/ui/LinkToolbarAppearance.js +3 -6
- package/dist/es2019/ui/ToolbarViewedEvent.js +4 -5
- package/dist/es2019/ui/WithCardContext.js +8 -0
- package/dist/esm/nodeviews/blockCard.js +0 -4
- package/dist/esm/nodeviews/datasource.js +14 -26
- package/dist/esm/nodeviews/embedCard.js +4 -15
- package/dist/esm/nodeviews/genericCard.js +17 -19
- package/dist/esm/ui/DatasourceAppearanceButton.js +11 -13
- package/dist/esm/ui/DatasourceModal/ModalWithState.js +16 -10
- package/dist/esm/ui/EditToolbarButton/index.js +26 -28
- package/dist/esm/ui/EditorLinkingPlatformAnalytics/index.js +5 -25
- package/dist/esm/ui/LinkToolbarAppearance.js +6 -6
- package/dist/esm/ui/ToolbarViewedEvent.js +7 -9
- package/dist/esm/ui/WithCardContext.js +7 -0
- package/dist/types/nodeviews/blockCard.d.ts +0 -4
- package/dist/types/nodeviews/datasource.d.ts +0 -5
- package/dist/types/nodeviews/embedCard.d.ts +0 -5
- package/dist/types/ui/DatasourceAppearanceButton.d.ts +1 -1
- package/dist/types/ui/DatasourceModal/ModalWithState.d.ts +4 -3
- package/dist/types/ui/EditorLinkingPlatformAnalytics/index.d.ts +1 -6
- package/dist/types/ui/LinkToolbarAppearance.d.ts +1 -6
- package/dist/types/ui/WithCardContext.d.ts +5 -0
- package/dist/types-ts4.5/nodeviews/blockCard.d.ts +0 -4
- package/dist/types-ts4.5/nodeviews/datasource.d.ts +0 -5
- package/dist/types-ts4.5/nodeviews/embedCard.d.ts +0 -5
- package/dist/types-ts4.5/ui/DatasourceAppearanceButton.d.ts +1 -1
- package/dist/types-ts4.5/ui/DatasourceModal/ModalWithState.d.ts +4 -3
- package/dist/types-ts4.5/ui/EditorLinkingPlatformAnalytics/index.d.ts +1 -6
- package/dist/types-ts4.5/ui/LinkToolbarAppearance.d.ts +1 -6
- package/dist/types-ts4.5/ui/WithCardContext.d.ts +5 -0
- package/package.json +1 -1
- package/dist/cjs/ui/CardContextProvider.js +0 -47
- package/dist/es2019/ui/CardContextProvider.js +0 -22
- package/dist/esm/ui/CardContextProvider.js +0 -40
- package/dist/types/ui/CardContextProvider.d.ts +0 -20
- package/dist/types-ts4.5/ui/CardContextProvider.d.ts +0 -20
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.CardContextProvider = void 0;
|
|
8
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
11
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
12
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
13
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
|
-
var _react = _interopRequireDefault(require("react"));
|
|
15
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
16
|
-
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
|
|
17
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
18
|
-
/**
|
|
19
|
-
* Provides the link provider context via the legacy context adapter
|
|
20
|
-
* and children render function
|
|
21
|
-
*/
|
|
22
|
-
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
23
|
-
var CardContextProvider = exports.CardContextProvider = /*#__PURE__*/function (_React$Component) {
|
|
24
|
-
(0, _inherits2.default)(CardContextProvider, _React$Component);
|
|
25
|
-
var _super = _createSuper(CardContextProvider);
|
|
26
|
-
function CardContextProvider() {
|
|
27
|
-
(0, _classCallCheck2.default)(this, CardContextProvider);
|
|
28
|
-
return _super.apply(this, arguments);
|
|
29
|
-
}
|
|
30
|
-
(0, _createClass2.default)(CardContextProvider, [{
|
|
31
|
-
key: "render",
|
|
32
|
-
value:
|
|
33
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
34
|
-
|
|
35
|
-
function render() {
|
|
36
|
-
var _this$context$context;
|
|
37
|
-
var cardContext = this.context.contextAdapter ? (_this$context$context = this.context.contextAdapter.card) === null || _this$context$context === void 0 ? void 0 : _this$context$context.value : undefined;
|
|
38
|
-
return this.props.children({
|
|
39
|
-
cardContext: cardContext
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
}]);
|
|
43
|
-
return CardContextProvider;
|
|
44
|
-
}(_react.default.Component);
|
|
45
|
-
(0, _defineProperty2.default)(CardContextProvider, "contextTypes", {
|
|
46
|
-
contextAdapter: _propTypes.default.object
|
|
47
|
-
});
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
/**
|
|
5
|
-
* Provides the link provider context via the legacy context adapter
|
|
6
|
-
* and children render function
|
|
7
|
-
*/
|
|
8
|
-
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
9
|
-
export class CardContextProvider extends React.Component {
|
|
10
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11
|
-
|
|
12
|
-
render() {
|
|
13
|
-
var _this$context$context;
|
|
14
|
-
const cardContext = this.context.contextAdapter ? (_this$context$context = this.context.contextAdapter.card) === null || _this$context$context === void 0 ? void 0 : _this$context$context.value : undefined;
|
|
15
|
-
return this.props.children({
|
|
16
|
-
cardContext
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
_defineProperty(CardContextProvider, "contextTypes", {
|
|
21
|
-
contextAdapter: PropTypes.object
|
|
22
|
-
});
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
|
-
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
8
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
|
-
/**
|
|
12
|
-
* Provides the link provider context via the legacy context adapter
|
|
13
|
-
* and children render function
|
|
14
|
-
*/
|
|
15
|
-
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
16
|
-
export var CardContextProvider = /*#__PURE__*/function (_React$Component) {
|
|
17
|
-
_inherits(CardContextProvider, _React$Component);
|
|
18
|
-
var _super = _createSuper(CardContextProvider);
|
|
19
|
-
function CardContextProvider() {
|
|
20
|
-
_classCallCheck(this, CardContextProvider);
|
|
21
|
-
return _super.apply(this, arguments);
|
|
22
|
-
}
|
|
23
|
-
_createClass(CardContextProvider, [{
|
|
24
|
-
key: "render",
|
|
25
|
-
value:
|
|
26
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27
|
-
|
|
28
|
-
function render() {
|
|
29
|
-
var _this$context$context;
|
|
30
|
-
var cardContext = this.context.contextAdapter ? (_this$context$context = this.context.contextAdapter.card) === null || _this$context$context === void 0 ? void 0 : _this$context$context.value : undefined;
|
|
31
|
-
return this.props.children({
|
|
32
|
-
cardContext: cardContext
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
}]);
|
|
36
|
-
return CardContextProvider;
|
|
37
|
-
}(React.Component);
|
|
38
|
-
_defineProperty(CardContextProvider, "contextTypes", {
|
|
39
|
-
contextAdapter: PropTypes.object
|
|
40
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import type { CardContext } from '@atlaskit/link-provider';
|
|
4
|
-
type CardContextProviderProps = {
|
|
5
|
-
children: ({ cardContext }: {
|
|
6
|
-
cardContext?: CardContext;
|
|
7
|
-
}) => React.ReactNode;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Provides the link provider context via the legacy context adapter
|
|
11
|
-
* and children render function
|
|
12
|
-
*/
|
|
13
|
-
export declare class CardContextProvider extends React.Component<CardContextProviderProps, {}> {
|
|
14
|
-
static contextTypes: {
|
|
15
|
-
contextAdapter: PropTypes.Requireable<object>;
|
|
16
|
-
};
|
|
17
|
-
context: any;
|
|
18
|
-
render(): React.ReactNode;
|
|
19
|
-
}
|
|
20
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import type { CardContext } from '@atlaskit/link-provider';
|
|
4
|
-
type CardContextProviderProps = {
|
|
5
|
-
children: ({ cardContext }: {
|
|
6
|
-
cardContext?: CardContext;
|
|
7
|
-
}) => React.ReactNode;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Provides the link provider context via the legacy context adapter
|
|
11
|
-
* and children render function
|
|
12
|
-
*/
|
|
13
|
-
export declare class CardContextProvider extends React.Component<CardContextProviderProps, {}> {
|
|
14
|
-
static contextTypes: {
|
|
15
|
-
contextAdapter: PropTypes.Requireable<object>;
|
|
16
|
-
};
|
|
17
|
-
context: any;
|
|
18
|
-
render(): React.ReactNode;
|
|
19
|
-
}
|
|
20
|
-
export {};
|