@atlaskit/editor-common 74.18.0 → 74.19.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 +16 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/MediaSingle/index.js +8 -1
- package/dist/cjs/ui/index.js +6 -0
- package/dist/cjs/utils/datasource.js +30 -0
- package/dist/cjs/utils/index.js +7 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/MediaSingle/index.js +6 -0
- package/dist/es2019/ui/index.js +1 -1
- package/dist/es2019/utils/datasource.js +22 -0
- package/dist/es2019/utils/index.js +2 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/MediaSingle/index.js +6 -0
- package/dist/esm/ui/index.js +1 -1
- package/dist/esm/utils/datasource.js +23 -0
- package/dist/esm/utils/index.js +2 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/provider-factory/quick-insert-provider.d.ts +7 -1
- package/dist/types/ui/MediaSingle/index.d.ts +1 -0
- package/dist/types/ui/index.d.ts +1 -1
- package/dist/types/utils/datasource.d.ts +2 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types-ts4.5/provider-factory/quick-insert-provider.d.ts +7 -1
- package/dist/types-ts4.5/ui/MediaSingle/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/index.d.ts +1 -1
- package/dist/types-ts4.5/utils/datasource.d.ts +2 -0
- package/dist/types-ts4.5/utils/index.d.ts +1 -0
- package/package.json +6 -2
- package/tmp/api-report-tmp.d.ts +9 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 74.19.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`202f8c2ee69`](https://bitbucket.org/atlassian/atlassian-frontend/commits/202f8c2ee69) - The changes here adds support for datasource feature flag for rollout.
|
|
8
|
+
|
|
9
|
+
## 74.19.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`f486dbd535c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f486dbd535c) - MEX-2481 Fix minor gap between image and border
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 74.18.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
|
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
17
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
18
18
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
19
|
-
var packageVersion = "74.
|
|
19
|
+
var packageVersion = "74.19.1";
|
|
20
20
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
21
21
|
// Remove URL as it has UGC
|
|
22
22
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -24,7 +24,7 @@ var _templateObject, _templateObject2, _templateObject3;
|
|
|
24
24
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
25
25
|
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; } } /** @jsx jsx */
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "74.
|
|
27
|
+
var packageVersion = "74.19.1";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.DEFAULT_IMAGE_WIDTH = exports.DEFAULT_IMAGE_HEIGHT = void 0;
|
|
7
|
+
exports.IMAGE_AND_BORDER_ADJUSTMENT = exports.DEFAULT_IMAGE_WIDTH = exports.DEFAULT_IMAGE_HEIGHT = void 0;
|
|
8
8
|
exports.default = MediaSingle;
|
|
9
9
|
exports.shouldAddDefaultWrappedWidth = void 0;
|
|
10
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
@@ -19,7 +19,14 @@ var _styled = require("./styled");
|
|
|
19
19
|
var DEFAULT_IMAGE_WIDTH = 250;
|
|
20
20
|
exports.DEFAULT_IMAGE_WIDTH = DEFAULT_IMAGE_WIDTH;
|
|
21
21
|
var DEFAULT_IMAGE_HEIGHT = 200;
|
|
22
|
+
|
|
23
|
+
/*
|
|
24
|
+
This constant is used to proportionally adjust the image and its border to avoid any gaps. i.e. The value will simultaneously expand the width and height of the image by 2 pixels; and similarly contract the border by 2 pixels.
|
|
25
|
+
Read more: https://product-fabric.atlassian.net/browse/MEX-2481
|
|
26
|
+
*/
|
|
22
27
|
exports.DEFAULT_IMAGE_HEIGHT = DEFAULT_IMAGE_HEIGHT;
|
|
28
|
+
var IMAGE_AND_BORDER_ADJUSTMENT = 2;
|
|
29
|
+
exports.IMAGE_AND_BORDER_ADJUSTMENT = IMAGE_AND_BORDER_ADJUSTMENT;
|
|
23
30
|
var shouldAddDefaultWrappedWidth = function shouldAddDefaultWrappedWidth(layout, width, lineLength) {
|
|
24
31
|
return _grid.wrappedLayouts.indexOf(layout) > -1 && lineLength && width && width > 0.5 * lineLength;
|
|
25
32
|
};
|
package/dist/cjs/ui/index.js
CHANGED
|
@@ -83,6 +83,12 @@ Object.defineProperty(exports, "HelperMessage", {
|
|
|
83
83
|
return _Messages.HelperMessage;
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
|
+
Object.defineProperty(exports, "IMAGE_AND_BORDER_ADJUSTMENT", {
|
|
87
|
+
enumerable: true,
|
|
88
|
+
get: function get() {
|
|
89
|
+
return _MediaSingle.IMAGE_AND_BORDER_ADJUSTMENT;
|
|
90
|
+
}
|
|
91
|
+
});
|
|
86
92
|
Object.defineProperty(exports, "IntlErrorBoundary", {
|
|
87
93
|
enumerable: true,
|
|
88
94
|
get: function get() {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.canRenderDatasource = void 0;
|
|
7
|
+
var _linkDatasource = require("@atlaskit/link-datasource");
|
|
8
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
9
|
+
var getDatasourceType = function getDatasourceType(datasource) {
|
|
10
|
+
switch (datasource.id) {
|
|
11
|
+
case _linkDatasource.JIRA_LIST_OF_LINKS_DATASOURCE_ID:
|
|
12
|
+
return 'jira';
|
|
13
|
+
default:
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var canRenderDatasource = function canRenderDatasource(datasource) {
|
|
18
|
+
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
19
|
+
var datasourceType = getDatasourceType(datasource);
|
|
20
|
+
switch (datasourceType) {
|
|
21
|
+
case 'jira':
|
|
22
|
+
if ((0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.datasource-jira_issues')) {
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
return false;
|
|
26
|
+
default:
|
|
27
|
+
return defaultValue;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
exports.canRenderDatasource = canRenderDatasource;
|
package/dist/cjs/utils/index.js
CHANGED
|
@@ -166,6 +166,12 @@ Object.defineProperty(exports, "canApplyAnnotationOnRange", {
|
|
|
166
166
|
return _annotation.canApplyAnnotationOnRange;
|
|
167
167
|
}
|
|
168
168
|
});
|
|
169
|
+
Object.defineProperty(exports, "canRenderDatasource", {
|
|
170
|
+
enumerable: true,
|
|
171
|
+
get: function get() {
|
|
172
|
+
return _datasource.canRenderDatasource;
|
|
173
|
+
}
|
|
174
|
+
});
|
|
169
175
|
Object.defineProperty(exports, "clearMeasure", {
|
|
170
176
|
enumerable: true,
|
|
171
177
|
get: function get() {
|
|
@@ -863,6 +869,7 @@ var _grid = require("./grid");
|
|
|
863
869
|
var _document = require("./document");
|
|
864
870
|
var _richMediaUtils = require("./rich-media-utils");
|
|
865
871
|
var _privacyFilter = require("./filter/privacy-filter");
|
|
872
|
+
var _datasource = require("./datasource");
|
|
866
873
|
// prosemirror-history does not export its plugin key
|
|
867
874
|
var pmHistoryPluginKey = 'history$';
|
|
868
875
|
exports.pmHistoryPluginKey = pmHistoryPluginKey;
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
2
2
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
3
|
-
const packageVersion = "74.
|
|
3
|
+
const packageVersion = "74.19.1";
|
|
4
4
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
5
5
|
// Remove URL as it has UGC
|
|
6
6
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -8,7 +8,7 @@ import { themed } from '@atlaskit/theme/components';
|
|
|
8
8
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
9
9
|
import Layer from '../Layer';
|
|
10
10
|
const packageName = "@atlaskit/editor-common";
|
|
11
|
-
const packageVersion = "74.
|
|
11
|
+
const packageVersion = "74.19.1";
|
|
12
12
|
const halfFocusRing = 1;
|
|
13
13
|
const dropOffset = '0, 8';
|
|
14
14
|
class DropList extends Component {
|
|
@@ -7,6 +7,12 @@ import { calcPxFromPct, wrappedLayouts } from './grid';
|
|
|
7
7
|
import { MediaSingleDimensionHelper, MediaWrapper } from './styled';
|
|
8
8
|
export const DEFAULT_IMAGE_WIDTH = 250;
|
|
9
9
|
export const DEFAULT_IMAGE_HEIGHT = 200;
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
This constant is used to proportionally adjust the image and its border to avoid any gaps. i.e. The value will simultaneously expand the width and height of the image by 2 pixels; and similarly contract the border by 2 pixels.
|
|
13
|
+
Read more: https://product-fabric.atlassian.net/browse/MEX-2481
|
|
14
|
+
*/
|
|
15
|
+
export const IMAGE_AND_BORDER_ADJUSTMENT = 2;
|
|
10
16
|
export const shouldAddDefaultWrappedWidth = (layout, width, lineLength) => {
|
|
11
17
|
return wrappedLayouts.indexOf(layout) > -1 && lineLength && width && width > 0.5 * lineLength;
|
|
12
18
|
};
|
package/dist/es2019/ui/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as Caption } from './Caption';
|
|
2
|
-
export { default as MediaSingle, DEFAULT_IMAGE_WIDTH, DEFAULT_IMAGE_HEIGHT, shouldAddDefaultWrappedWidth } from './MediaSingle';
|
|
2
|
+
export { default as MediaSingle, DEFAULT_IMAGE_WIDTH, DEFAULT_IMAGE_HEIGHT, IMAGE_AND_BORDER_ADJUSTMENT, shouldAddDefaultWrappedWidth } from './MediaSingle';
|
|
3
3
|
export { MediaSingleDimensionHelper } from './MediaSingle/styled';
|
|
4
4
|
export { layoutSupportsWidth, calcPxFromColumns, calcPctFromPx, calcPxFromPct, calcColumnsFromPx, snapToGrid, calcMediaPxWidth, wrappedLayouts } from './MediaSingle/grid';
|
|
5
5
|
export { mediaLinkStyle } from './MediaSingle/link';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { JIRA_LIST_OF_LINKS_DATASOURCE_ID } from '@atlaskit/link-datasource';
|
|
2
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
3
|
+
const getDatasourceType = datasource => {
|
|
4
|
+
switch (datasource.id) {
|
|
5
|
+
case JIRA_LIST_OF_LINKS_DATASOURCE_ID:
|
|
6
|
+
return 'jira';
|
|
7
|
+
default:
|
|
8
|
+
return undefined;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
export const canRenderDatasource = (datasource, defaultValue = true) => {
|
|
12
|
+
const datasourceType = getDatasourceType(datasource);
|
|
13
|
+
switch (datasourceType) {
|
|
14
|
+
case 'jira':
|
|
15
|
+
if (getBooleanFF('platform.linking-platform.datasource-jira_issues')) {
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
return false;
|
|
19
|
+
default:
|
|
20
|
+
return defaultValue;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
@@ -42,4 +42,5 @@ export const pmHistoryPluginKey = 'history$';
|
|
|
42
42
|
export { gridTypeForLayout } from './grid';
|
|
43
43
|
export { nodesBetweenChanged, getStepRange, isEmptyDocument, processRawValue, hasDocAsParent, bracketTyped } from './document';
|
|
44
44
|
export { floatingLayouts, isRichMediaInsideOfBlockNode, calculateSnapPoints, alignAttributes } from './rich-media-utils';
|
|
45
|
-
export { sanitizeNodeForPrivacy } from './filter/privacy-filter';
|
|
45
|
+
export { sanitizeNodeForPrivacy } from './filter/privacy-filter';
|
|
46
|
+
export { canRenderDatasource } from './datasource';
|
package/dist/es2019/version.json
CHANGED
|
@@ -6,7 +6,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
6
6
|
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; }
|
|
7
7
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
8
8
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
9
|
-
var packageVersion = "74.
|
|
9
|
+
var packageVersion = "74.19.1";
|
|
10
10
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
11
11
|
// Remove URL as it has UGC
|
|
12
12
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -18,7 +18,7 @@ import { themed } from '@atlaskit/theme/components';
|
|
|
18
18
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
19
19
|
import Layer from '../Layer';
|
|
20
20
|
var packageName = "@atlaskit/editor-common";
|
|
21
|
-
var packageVersion = "74.
|
|
21
|
+
var packageVersion = "74.19.1";
|
|
22
22
|
var halfFocusRing = 1;
|
|
23
23
|
var dropOffset = '0, 8';
|
|
24
24
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -8,6 +8,12 @@ import { calcPxFromPct, wrappedLayouts } from './grid';
|
|
|
8
8
|
import { MediaSingleDimensionHelper, MediaWrapper } from './styled';
|
|
9
9
|
export var DEFAULT_IMAGE_WIDTH = 250;
|
|
10
10
|
export var DEFAULT_IMAGE_HEIGHT = 200;
|
|
11
|
+
|
|
12
|
+
/*
|
|
13
|
+
This constant is used to proportionally adjust the image and its border to avoid any gaps. i.e. The value will simultaneously expand the width and height of the image by 2 pixels; and similarly contract the border by 2 pixels.
|
|
14
|
+
Read more: https://product-fabric.atlassian.net/browse/MEX-2481
|
|
15
|
+
*/
|
|
16
|
+
export var IMAGE_AND_BORDER_ADJUSTMENT = 2;
|
|
11
17
|
export var shouldAddDefaultWrappedWidth = function shouldAddDefaultWrappedWidth(layout, width, lineLength) {
|
|
12
18
|
return wrappedLayouts.indexOf(layout) > -1 && lineLength && width && width > 0.5 * lineLength;
|
|
13
19
|
};
|
package/dist/esm/ui/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as Caption } from './Caption';
|
|
2
|
-
export { default as MediaSingle, DEFAULT_IMAGE_WIDTH, DEFAULT_IMAGE_HEIGHT, shouldAddDefaultWrappedWidth } from './MediaSingle';
|
|
2
|
+
export { default as MediaSingle, DEFAULT_IMAGE_WIDTH, DEFAULT_IMAGE_HEIGHT, IMAGE_AND_BORDER_ADJUSTMENT, shouldAddDefaultWrappedWidth } from './MediaSingle';
|
|
3
3
|
export { MediaSingleDimensionHelper } from './MediaSingle/styled';
|
|
4
4
|
export { layoutSupportsWidth, calcPxFromColumns, calcPctFromPx, calcPxFromPct, calcColumnsFromPx, snapToGrid, calcMediaPxWidth, wrappedLayouts } from './MediaSingle/grid';
|
|
5
5
|
export { mediaLinkStyle } from './MediaSingle/link';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { JIRA_LIST_OF_LINKS_DATASOURCE_ID } from '@atlaskit/link-datasource';
|
|
2
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
3
|
+
var getDatasourceType = function getDatasourceType(datasource) {
|
|
4
|
+
switch (datasource.id) {
|
|
5
|
+
case JIRA_LIST_OF_LINKS_DATASOURCE_ID:
|
|
6
|
+
return 'jira';
|
|
7
|
+
default:
|
|
8
|
+
return undefined;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
export var canRenderDatasource = function canRenderDatasource(datasource) {
|
|
12
|
+
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
13
|
+
var datasourceType = getDatasourceType(datasource);
|
|
14
|
+
switch (datasourceType) {
|
|
15
|
+
case 'jira':
|
|
16
|
+
if (getBooleanFF('platform.linking-platform.datasource-jira_issues')) {
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
return false;
|
|
20
|
+
default:
|
|
21
|
+
return defaultValue;
|
|
22
|
+
}
|
|
23
|
+
};
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -42,4 +42,5 @@ export var pmHistoryPluginKey = 'history$';
|
|
|
42
42
|
export { gridTypeForLayout } from './grid';
|
|
43
43
|
export { nodesBetweenChanged, getStepRange, isEmptyDocument, processRawValue, hasDocAsParent, bracketTyped } from './document';
|
|
44
44
|
export { floatingLayouts, isRichMediaInsideOfBlockNode, calculateSnapPoints, alignAttributes } from './rich-media-utils';
|
|
45
|
-
export { sanitizeNodeForPrivacy } from './filter/privacy-filter';
|
|
45
|
+
export { sanitizeNodeForPrivacy } from './filter/privacy-filter';
|
|
46
|
+
export { canRenderDatasource } from './datasource';
|
package/dist/esm/version.json
CHANGED
|
@@ -16,7 +16,13 @@ export type QuickInsertItem = TypeAheadItem & {
|
|
|
16
16
|
id?: QuickInsertItemId;
|
|
17
17
|
/** indicates if the item will be highlighted where approppriated (plus menu for now) */
|
|
18
18
|
featured?: boolean;
|
|
19
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* What to do on insert
|
|
21
|
+
*
|
|
22
|
+
* @note This logic is only called if the item is accessed without a search
|
|
23
|
+
* If a search occurs -- then a seperate insert action is called
|
|
24
|
+
* @see packages/editor/editor-core/src/plugins/insert-block/ui/ToolbarInsertBlock/index.tsx for details
|
|
25
|
+
*/
|
|
20
26
|
action: (insert: QuickInsertActionInsert, state: EditorState) => Transaction | false;
|
|
21
27
|
};
|
|
22
28
|
export type QuickInsertProvider = {
|
|
@@ -4,6 +4,7 @@ import { jsx } from '@emotion/react';
|
|
|
4
4
|
import { RichMediaLayout as MediaSingleLayout, RichMediaLayout } from '@atlaskit/adf-schema';
|
|
5
5
|
export declare const DEFAULT_IMAGE_WIDTH = 250;
|
|
6
6
|
export declare const DEFAULT_IMAGE_HEIGHT = 200;
|
|
7
|
+
export declare const IMAGE_AND_BORDER_ADJUSTMENT = 2;
|
|
7
8
|
export interface Props {
|
|
8
9
|
children: React.ReactNode;
|
|
9
10
|
layout: MediaSingleLayout;
|
package/dist/types/ui/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as Caption } from './Caption';
|
|
2
|
-
export { default as MediaSingle, DEFAULT_IMAGE_WIDTH, DEFAULT_IMAGE_HEIGHT, shouldAddDefaultWrappedWidth, } from './MediaSingle';
|
|
2
|
+
export { default as MediaSingle, DEFAULT_IMAGE_WIDTH, DEFAULT_IMAGE_HEIGHT, IMAGE_AND_BORDER_ADJUSTMENT, shouldAddDefaultWrappedWidth, } from './MediaSingle';
|
|
3
3
|
export type { Props as MediaSingleProps } from './MediaSingle';
|
|
4
4
|
export { MediaSingleDimensionHelper } from './MediaSingle/styled';
|
|
5
5
|
export type { MediaSingleWrapperProps as MediaSingleDimensionHelperProps } from './MediaSingle/styled';
|
|
@@ -53,3 +53,4 @@ export { gridTypeForLayout } from './grid';
|
|
|
53
53
|
export { nodesBetweenChanged, getStepRange, isEmptyDocument, processRawValue, hasDocAsParent, bracketTyped, } from './document';
|
|
54
54
|
export { floatingLayouts, isRichMediaInsideOfBlockNode, calculateSnapPoints, alignAttributes, } from './rich-media-utils';
|
|
55
55
|
export { sanitizeNodeForPrivacy } from './filter/privacy-filter';
|
|
56
|
+
export { canRenderDatasource } from './datasource';
|
|
@@ -16,7 +16,13 @@ export type QuickInsertItem = TypeAheadItem & {
|
|
|
16
16
|
id?: QuickInsertItemId;
|
|
17
17
|
/** indicates if the item will be highlighted where approppriated (plus menu for now) */
|
|
18
18
|
featured?: boolean;
|
|
19
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* What to do on insert
|
|
21
|
+
*
|
|
22
|
+
* @note This logic is only called if the item is accessed without a search
|
|
23
|
+
* If a search occurs -- then a seperate insert action is called
|
|
24
|
+
* @see packages/editor/editor-core/src/plugins/insert-block/ui/ToolbarInsertBlock/index.tsx for details
|
|
25
|
+
*/
|
|
20
26
|
action: (insert: QuickInsertActionInsert, state: EditorState) => Transaction | false;
|
|
21
27
|
};
|
|
22
28
|
export type QuickInsertProvider = {
|
|
@@ -4,6 +4,7 @@ import { jsx } from '@emotion/react';
|
|
|
4
4
|
import { RichMediaLayout as MediaSingleLayout, RichMediaLayout } from '@atlaskit/adf-schema';
|
|
5
5
|
export declare const DEFAULT_IMAGE_WIDTH = 250;
|
|
6
6
|
export declare const DEFAULT_IMAGE_HEIGHT = 200;
|
|
7
|
+
export declare const IMAGE_AND_BORDER_ADJUSTMENT = 2;
|
|
7
8
|
export interface Props {
|
|
8
9
|
children: React.ReactNode;
|
|
9
10
|
layout: MediaSingleLayout;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as Caption } from './Caption';
|
|
2
|
-
export { default as MediaSingle, DEFAULT_IMAGE_WIDTH, DEFAULT_IMAGE_HEIGHT, shouldAddDefaultWrappedWidth, } from './MediaSingle';
|
|
2
|
+
export { default as MediaSingle, DEFAULT_IMAGE_WIDTH, DEFAULT_IMAGE_HEIGHT, IMAGE_AND_BORDER_ADJUSTMENT, shouldAddDefaultWrappedWidth, } from './MediaSingle';
|
|
3
3
|
export type { Props as MediaSingleProps } from './MediaSingle';
|
|
4
4
|
export { MediaSingleDimensionHelper } from './MediaSingle/styled';
|
|
5
5
|
export type { MediaSingleWrapperProps as MediaSingleDimensionHelperProps } from './MediaSingle/styled';
|
|
@@ -53,3 +53,4 @@ export { gridTypeForLayout } from './grid';
|
|
|
53
53
|
export { nodesBetweenChanged, getStepRange, isEmptyDocument, processRawValue, hasDocAsParent, bracketTyped, } from './document';
|
|
54
54
|
export { floatingLayouts, isRichMediaInsideOfBlockNode, calculateSnapPoints, alignAttributes, } from './rich-media-utils';
|
|
55
55
|
export { sanitizeNodeForPrivacy } from './filter/privacy-filter';
|
|
56
|
+
export { canRenderDatasource } from './datasource';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "74.
|
|
3
|
+
"version": "74.19.1",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -89,7 +89,8 @@
|
|
|
89
89
|
"@atlaskit/emoji": "^67.4.0",
|
|
90
90
|
"@atlaskit/icon": "^21.12.0",
|
|
91
91
|
"@atlaskit/in-product-testing": "^0.2.0",
|
|
92
|
-
"@atlaskit/
|
|
92
|
+
"@atlaskit/link-datasource": "^0.28.0",
|
|
93
|
+
"@atlaskit/media-card": "^76.1.0",
|
|
93
94
|
"@atlaskit/media-client": "^23.1.0",
|
|
94
95
|
"@atlaskit/media-picker": "^66.1.0",
|
|
95
96
|
"@atlaskit/mention": "^22.1.0",
|
|
@@ -182,6 +183,9 @@
|
|
|
182
183
|
},
|
|
183
184
|
"platform.design-system-team.focus-trap-upgrade_p2cei": {
|
|
184
185
|
"type": "boolean"
|
|
186
|
+
},
|
|
187
|
+
"platform.linking-platform.datasource-jira_issues": {
|
|
188
|
+
"type": "boolean"
|
|
185
189
|
}
|
|
186
190
|
}
|
|
187
191
|
}
|