@atlaskit/editor-common 74.19.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 +6 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- 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/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/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/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/utils/datasource.d.ts +2 -0
- package/dist/types-ts4.5/utils/index.d.ts +1 -0
- package/package.json +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
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
|
+
|
|
3
9
|
## 74.19.0
|
|
4
10
|
|
|
5
11
|
### 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.
|
|
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.19.
|
|
27
|
+
var packageVersion = "74.19.1";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -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.19.
|
|
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.19.
|
|
11
|
+
const packageVersion = "74.19.1";
|
|
12
12
|
const halfFocusRing = 1;
|
|
13
13
|
const dropOffset = '0, 8';
|
|
14
14
|
class DropList extends Component {
|
|
@@ -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.19.
|
|
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.19.
|
|
21
|
+
var packageVersion = "74.19.1";
|
|
22
22
|
var halfFocusRing = 1;
|
|
23
23
|
var dropOffset = '0, 8';
|
|
24
24
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -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 = {
|
|
@@ -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 = {
|
|
@@ -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.19.
|
|
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,6 +89,7 @@
|
|
|
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/link-datasource": "^0.28.0",
|
|
92
93
|
"@atlaskit/media-card": "^76.1.0",
|
|
93
94
|
"@atlaskit/media-client": "^23.1.0",
|
|
94
95
|
"@atlaskit/media-picker": "^66.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
|
}
|