@atlaskit/editor-common 112.18.3 → 112.18.5
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 +20 -0
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -6
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/node-anchor/node-anchor-provider.js +6 -12
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +3 -6
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/node-anchor/node-anchor-provider.js +6 -12
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +3 -7
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/node-anchor/node-anchor-provider.js +6 -12
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/analytics/types/ai-autocomplete-events.d.ts +1 -1
- package/dist/types/analytics/types/general-events.d.ts +8 -2
- package/dist/types-ts4.5/analytics/types/ai-autocomplete-events.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/general-events.d.ts +8 -2
- package/package.json +3 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 112.18.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`868f927c1b8d3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/868f927c1b8d3) -
|
|
8
|
+
add missing analytics attributes
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 112.18.4
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`d1a0ee6dbcefd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d1a0ee6dbcefd) -
|
|
16
|
+
Clean up feature gate platform_editor_native_anchor_patch_2
|
|
17
|
+
- [`8ebeaa8fb64ac`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8ebeaa8fb64ac) -
|
|
18
|
+
Remove stale feature flag platform_editor_link_picker_width_fix (final value: true)
|
|
19
|
+
- [`fb317c7b6ef38`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fb317c7b6ef38) -
|
|
20
|
+
Add Autocomplete Conclusion user flow
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
3
23
|
## 112.18.3
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -26,7 +26,6 @@ var _adfSchema = require("@atlaskit/adf-schema");
|
|
|
26
26
|
var _withAnalyticsEvents = _interopRequireDefault(require("@atlaskit/analytics-next/withAnalyticsEvents"));
|
|
27
27
|
var _ = _interopRequireDefault(require("@atlaskit/icon-object/glyph/page/16"));
|
|
28
28
|
var _crossCircle = _interopRequireDefault(require("@atlaskit/icon/core/cross-circle"));
|
|
29
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
30
29
|
var _primitives = require("@atlaskit/primitives");
|
|
31
30
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
32
31
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
@@ -876,9 +875,7 @@ var HyperlinkLinkAddToolbar = exports.HyperlinkLinkAddToolbar = /*#__PURE__*/fun
|
|
|
876
875
|
selectedIndex = _this$state1.selectedIndex,
|
|
877
876
|
displayUrl = _this$state1.displayUrl,
|
|
878
877
|
displayText = _this$state1.displayText;
|
|
879
|
-
var
|
|
880
|
-
formatMessage = _this$props6.intl.formatMessage,
|
|
881
|
-
activityProvider = _this$props6.activityProvider;
|
|
878
|
+
var formatMessage = this.props.intl.formatMessage;
|
|
882
879
|
var formatClearLinkText = formatMessage(messages.clearLink);
|
|
883
880
|
var screenReaderDescriptionId = 'search-recent-links-field-description';
|
|
884
881
|
var linkSearchListId = 'hyperlink-search-list';
|
|
@@ -890,7 +887,6 @@ var HyperlinkLinkAddToolbar = exports.HyperlinkLinkAddToolbar = /*#__PURE__*/fun
|
|
|
890
887
|
// as the Aria design pattern for combobox does not work in this case
|
|
891
888
|
// for details: https://a11y-internal.atlassian.net/browse/AK-740
|
|
892
889
|
var screenReaderText = browser.safari && this.getScreenReaderText();
|
|
893
|
-
var containerWidth = (0, _platformFeatureFlags.fg)('platform_editor_link_picker_width_fix') ? _ToolbarComponents.narrowContainerWidth : !!activityProvider && _ToolbarComponents.containerWithProvider;
|
|
894
890
|
var hyperlinkElement = (0, _react2.jsx)("div", {
|
|
895
891
|
"aria-label": formatMessage(messages.hyperlinkAriaLabel)
|
|
896
892
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
@@ -899,7 +895,7 @@ var HyperlinkLinkAddToolbar = exports.HyperlinkLinkAddToolbar = /*#__PURE__*/fun
|
|
|
899
895
|
"data-testid": "hyperlink-add-toolbar"
|
|
900
896
|
}, (0, _react2.jsx)("div", {
|
|
901
897
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
902
|
-
css: [_ToolbarComponents.container,
|
|
898
|
+
css: [_ToolbarComponents.container, _ToolbarComponents.narrowContainerWidth, containerPadding],
|
|
903
899
|
ref: this.wrapperRef
|
|
904
900
|
}, (0, _react2.jsx)("label", {
|
|
905
901
|
htmlFor: linkSearchInputId,
|
|
@@ -19,7 +19,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
19
19
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
20
20
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
21
21
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
22
|
-
var packageVersion = "
|
|
22
|
+
var packageVersion = "0.0.0-development";
|
|
23
23
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
24
24
|
// Remove URL as it has UGC
|
|
25
25
|
// Ignored via go/ees007
|
|
@@ -8,7 +8,6 @@ exports.getNodeIdProvider = exports.NodeAnchorProvider = void 0;
|
|
|
8
8
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
11
|
var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
|
|
13
12
|
var _utils = require("../utils");
|
|
14
13
|
var _dynamicBitArray = require("./dynamic-bit-array");
|
|
@@ -199,16 +198,11 @@ var isLimitedModeEnabled = function isLimitedModeEnabled(editorView) {
|
|
|
199
198
|
// This allows access to the node ids anywhere.
|
|
200
199
|
var getNodeIdProvider = exports.getNodeIdProvider = function getNodeIdProvider(editorView) {
|
|
201
200
|
if (!nodeIdProviderMap.has(editorView)) {
|
|
202
|
-
if
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
var _provider = new NodeAnchorProvider(limitedMode, isEmptyDoc);
|
|
208
|
-
nodeIdProviderMap.set(editorView, _provider);
|
|
209
|
-
return _provider;
|
|
210
|
-
}
|
|
211
|
-
var provider = new NodeAnchorProvider();
|
|
201
|
+
// if the limited mode flag is on, enable limited mode based on the threshold
|
|
202
|
+
// only for the first time
|
|
203
|
+
var limitedMode = isLimitedModeEnabled(editorView);
|
|
204
|
+
var isEmptyDoc = (0, _utils.isEmptyDocument)(editorView.state.doc);
|
|
205
|
+
var provider = new NodeAnchorProvider(limitedMode, isEmptyDoc);
|
|
212
206
|
nodeIdProviderMap.set(editorView, provider);
|
|
213
207
|
return provider;
|
|
214
208
|
}
|
|
@@ -217,7 +211,7 @@ var getNodeIdProvider = exports.getNodeIdProvider = function getNodeIdProvider(e
|
|
|
217
211
|
// in some cases we need to re-check limited mode state
|
|
218
212
|
// Confluence editor can start with an empty doc and then load content later
|
|
219
213
|
// so we need to check first time from an empty doc to a non-empty doc
|
|
220
|
-
if (nodeIdProvider.isEmptyDoc() && !(0, _utils.isEmptyDocument)(editorView.state.doc)
|
|
214
|
+
if (nodeIdProvider.isEmptyDoc() && !(0, _utils.isEmptyDocument)(editorView.state.doc)) {
|
|
221
215
|
// set empty doc to false regardless of limited mode state
|
|
222
216
|
nodeIdProvider.setEmptyDoc(false);
|
|
223
217
|
if (!nodeIdProvider.isLimitedMode() && isLimitedModeEnabled(editorView)) {
|
|
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
24
24
|
* @jsx jsx
|
|
25
25
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "
|
|
27
|
+
var packageVersion = "0.0.0-development";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -17,7 +17,6 @@ import { isSafeUrl } from '@atlaskit/adf-schema';
|
|
|
17
17
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
18
18
|
import Page16Icon from '@atlaskit/icon-object/glyph/page/16';
|
|
19
19
|
import CrossCircleIcon from '@atlaskit/icon/core/cross-circle';
|
|
20
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
21
20
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
22
21
|
import { Pressable, xcss } from '@atlaskit/primitives';
|
|
23
22
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -27,7 +26,7 @@ import { Announcer, PanelTextInput } from '../../../ui';
|
|
|
27
26
|
import { normalizeUrl } from '../../../utils';
|
|
28
27
|
import { browser as browserLegacy, getBrowserInfo } from '../../../utils/browser';
|
|
29
28
|
import LinkSearchList from '../../LinkSearch/LinkSearchList';
|
|
30
|
-
import { container,
|
|
29
|
+
import { container, narrowContainerWidth, inputWrapper } from '../../LinkSearch/ToolbarComponents';
|
|
31
30
|
import { transformTimeStamp } from '../../LinkSearch/transformTimeStamp';
|
|
32
31
|
import { filterUniqueItems, mapContentTypeToIcon, sha1, wordCount } from './utils';
|
|
33
32
|
|
|
@@ -729,8 +728,7 @@ export class HyperlinkLinkAddToolbar extends PureComponent {
|
|
|
729
728
|
const {
|
|
730
729
|
intl: {
|
|
731
730
|
formatMessage
|
|
732
|
-
}
|
|
733
|
-
activityProvider
|
|
731
|
+
}
|
|
734
732
|
} = this.props;
|
|
735
733
|
const formatClearLinkText = formatMessage(messages.clearLink);
|
|
736
734
|
const screenReaderDescriptionId = 'search-recent-links-field-description';
|
|
@@ -743,7 +741,6 @@ export class HyperlinkLinkAddToolbar extends PureComponent {
|
|
|
743
741
|
// as the Aria design pattern for combobox does not work in this case
|
|
744
742
|
// for details: https://a11y-internal.atlassian.net/browse/AK-740
|
|
745
743
|
const screenReaderText = browser.safari && this.getScreenReaderText();
|
|
746
|
-
const containerWidth = fg('platform_editor_link_picker_width_fix') ? narrowContainerWidth : !!activityProvider && containerWithProvider;
|
|
747
744
|
const hyperlinkElement = jsx("div", {
|
|
748
745
|
"aria-label": formatMessage(messages.hyperlinkAriaLabel)
|
|
749
746
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
@@ -752,7 +749,7 @@ export class HyperlinkLinkAddToolbar extends PureComponent {
|
|
|
752
749
|
"data-testid": "hyperlink-add-toolbar"
|
|
753
750
|
}, jsx("div", {
|
|
754
751
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
755
|
-
css: [container,
|
|
752
|
+
css: [container, narrowContainerWidth, containerPadding],
|
|
756
753
|
ref: this.wrapperRef
|
|
757
754
|
}, jsx("label", {
|
|
758
755
|
htmlFor: linkSearchInputId,
|
|
@@ -4,7 +4,7 @@ import { isFedRamp } from './environment';
|
|
|
4
4
|
import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
|
|
5
5
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
6
6
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
7
|
-
const packageVersion = "
|
|
7
|
+
const packageVersion = "0.0.0-development";
|
|
8
8
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
9
9
|
// Remove URL as it has UGC
|
|
10
10
|
// Ignored via go/ees007
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
2
|
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
4
3
|
import { isEmptyDocument } from '../utils';
|
|
5
4
|
import { DynamicBitArray } from './dynamic-bit-array';
|
|
@@ -173,16 +172,11 @@ const isLimitedModeEnabled = editorView => {
|
|
|
173
172
|
// This allows access to the node ids anywhere.
|
|
174
173
|
export const getNodeIdProvider = editorView => {
|
|
175
174
|
if (!nodeIdProviderMap.has(editorView)) {
|
|
176
|
-
if
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
const provider = new NodeAnchorProvider(limitedMode, isEmptyDoc);
|
|
182
|
-
nodeIdProviderMap.set(editorView, provider);
|
|
183
|
-
return provider;
|
|
184
|
-
}
|
|
185
|
-
const provider = new NodeAnchorProvider();
|
|
175
|
+
// if the limited mode flag is on, enable limited mode based on the threshold
|
|
176
|
+
// only for the first time
|
|
177
|
+
const limitedMode = isLimitedModeEnabled(editorView);
|
|
178
|
+
const isEmptyDoc = isEmptyDocument(editorView.state.doc);
|
|
179
|
+
const provider = new NodeAnchorProvider(limitedMode, isEmptyDoc);
|
|
186
180
|
nodeIdProviderMap.set(editorView, provider);
|
|
187
181
|
return provider;
|
|
188
182
|
}
|
|
@@ -191,7 +185,7 @@ export const getNodeIdProvider = editorView => {
|
|
|
191
185
|
// in some cases we need to re-check limited mode state
|
|
192
186
|
// Confluence editor can start with an empty doc and then load content later
|
|
193
187
|
// so we need to check first time from an empty doc to a non-empty doc
|
|
194
|
-
if (nodeIdProvider.isEmptyDoc() && !isEmptyDocument(editorView.state.doc)
|
|
188
|
+
if (nodeIdProvider.isEmptyDoc() && !isEmptyDocument(editorView.state.doc)) {
|
|
195
189
|
// set empty doc to false regardless of limited mode state
|
|
196
190
|
nodeIdProvider.setEmptyDoc(false);
|
|
197
191
|
if (!nodeIdProvider.isLimitedMode() && isLimitedModeEnabled(editorView)) {
|
|
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
15
|
import Layer from '../Layer';
|
|
16
16
|
const packageName = "@atlaskit/editor-common";
|
|
17
|
-
const packageVersion = "
|
|
17
|
+
const packageVersion = "0.0.0-development";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -28,7 +28,6 @@ import { isSafeUrl } from '@atlaskit/adf-schema';
|
|
|
28
28
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
29
29
|
import Page16Icon from '@atlaskit/icon-object/glyph/page/16';
|
|
30
30
|
import CrossCircleIcon from '@atlaskit/icon/core/cross-circle';
|
|
31
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
32
31
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
33
32
|
import { Pressable, xcss } from '@atlaskit/primitives';
|
|
34
33
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -38,7 +37,7 @@ import { Announcer, PanelTextInput } from '../../../ui';
|
|
|
38
37
|
import { normalizeUrl } from '../../../utils';
|
|
39
38
|
import { browser as browserLegacy, getBrowserInfo } from '../../../utils/browser';
|
|
40
39
|
import LinkSearchList from '../../LinkSearch/LinkSearchList';
|
|
41
|
-
import { container,
|
|
40
|
+
import { container, narrowContainerWidth, inputWrapper } from '../../LinkSearch/ToolbarComponents';
|
|
42
41
|
import { transformTimeStamp } from '../../LinkSearch/transformTimeStamp';
|
|
43
42
|
import { filterUniqueItems, mapContentTypeToIcon, sha1, wordCount } from './utils';
|
|
44
43
|
|
|
@@ -873,9 +872,7 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
|
|
|
873
872
|
selectedIndex = _this$state1.selectedIndex,
|
|
874
873
|
displayUrl = _this$state1.displayUrl,
|
|
875
874
|
displayText = _this$state1.displayText;
|
|
876
|
-
var
|
|
877
|
-
formatMessage = _this$props6.intl.formatMessage,
|
|
878
|
-
activityProvider = _this$props6.activityProvider;
|
|
875
|
+
var formatMessage = this.props.intl.formatMessage;
|
|
879
876
|
var formatClearLinkText = formatMessage(messages.clearLink);
|
|
880
877
|
var screenReaderDescriptionId = 'search-recent-links-field-description';
|
|
881
878
|
var linkSearchListId = 'hyperlink-search-list';
|
|
@@ -887,7 +884,6 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
|
|
|
887
884
|
// as the Aria design pattern for combobox does not work in this case
|
|
888
885
|
// for details: https://a11y-internal.atlassian.net/browse/AK-740
|
|
889
886
|
var screenReaderText = browser.safari && this.getScreenReaderText();
|
|
890
|
-
var containerWidth = fg('platform_editor_link_picker_width_fix') ? narrowContainerWidth : !!activityProvider && containerWithProvider;
|
|
891
887
|
var hyperlinkElement = jsx("div", {
|
|
892
888
|
"aria-label": formatMessage(messages.hyperlinkAriaLabel)
|
|
893
889
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
@@ -896,7 +892,7 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
|
|
|
896
892
|
"data-testid": "hyperlink-add-toolbar"
|
|
897
893
|
}, jsx("div", {
|
|
898
894
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
899
|
-
css: [container,
|
|
895
|
+
css: [container, narrowContainerWidth, containerPadding],
|
|
900
896
|
ref: this.wrapperRef
|
|
901
897
|
}, jsx("label", {
|
|
902
898
|
htmlFor: linkSearchInputId,
|
|
@@ -10,7 +10,7 @@ import { isFedRamp } from './environment';
|
|
|
10
10
|
import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
|
|
11
11
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
12
12
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
13
|
-
var packageVersion = "
|
|
13
|
+
var packageVersion = "0.0.0-development";
|
|
14
14
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
15
15
|
// Remove URL as it has UGC
|
|
16
16
|
// Ignored via go/ees007
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
6
5
|
import { isEmptyDocument } from '../utils';
|
|
7
6
|
import { DynamicBitArray } from './dynamic-bit-array';
|
|
@@ -193,16 +192,11 @@ var isLimitedModeEnabled = function isLimitedModeEnabled(editorView) {
|
|
|
193
192
|
// This allows access to the node ids anywhere.
|
|
194
193
|
export var getNodeIdProvider = function getNodeIdProvider(editorView) {
|
|
195
194
|
if (!nodeIdProviderMap.has(editorView)) {
|
|
196
|
-
if
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
var _provider = new NodeAnchorProvider(limitedMode, isEmptyDoc);
|
|
202
|
-
nodeIdProviderMap.set(editorView, _provider);
|
|
203
|
-
return _provider;
|
|
204
|
-
}
|
|
205
|
-
var provider = new NodeAnchorProvider();
|
|
195
|
+
// if the limited mode flag is on, enable limited mode based on the threshold
|
|
196
|
+
// only for the first time
|
|
197
|
+
var limitedMode = isLimitedModeEnabled(editorView);
|
|
198
|
+
var isEmptyDoc = isEmptyDocument(editorView.state.doc);
|
|
199
|
+
var provider = new NodeAnchorProvider(limitedMode, isEmptyDoc);
|
|
206
200
|
nodeIdProviderMap.set(editorView, provider);
|
|
207
201
|
return provider;
|
|
208
202
|
}
|
|
@@ -211,7 +205,7 @@ export var getNodeIdProvider = function getNodeIdProvider(editorView) {
|
|
|
211
205
|
// in some cases we need to re-check limited mode state
|
|
212
206
|
// Confluence editor can start with an empty doc and then load content later
|
|
213
207
|
// so we need to check first time from an empty doc to a non-empty doc
|
|
214
|
-
if (nodeIdProvider.isEmptyDoc() && !isEmptyDocument(editorView.state.doc)
|
|
208
|
+
if (nodeIdProvider.isEmptyDoc() && !isEmptyDocument(editorView.state.doc)) {
|
|
215
209
|
// set empty doc to false regardless of limited mode state
|
|
216
210
|
nodeIdProvider.setEmptyDoc(false);
|
|
217
211
|
if (!nodeIdProvider.isLimitedMode() && isLimitedModeEnabled(editorView)) {
|
|
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "
|
|
24
|
+
var packageVersion = "0.0.0-development";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -6,6 +6,6 @@ type AiAutocompleteInvokedAEP = TrackAEP<ACTION.INVOKED, ACTION_SUBJECT.AI_AUTOC
|
|
|
6
6
|
type AiAutocompleteViewedAEP = TrackAEP<ACTION.SUGGESTION_VIEWED, ACTION_SUBJECT.AI_AUTOCOMPLETE, undefined, undefined, undefined>;
|
|
7
7
|
type AiAutocompleteAcceptedAEP = TrackAEP<ACTION.SUGGESTION_INSERTED, ACTION_SUBJECT.AI_AUTOCOMPLETE, undefined, undefined, undefined>;
|
|
8
8
|
type AiAutocompleteRejectedAEP = TrackAEP<ACTION.SUGGESTION_DISMISSED, ACTION_SUBJECT.AI_AUTOCOMPLETE, undefined, undefined, undefined>;
|
|
9
|
-
export type TriggerType = 'summary-heading' | 'summary-first-lines' | 'summary-panel' | 'cmd+shift+space';
|
|
9
|
+
export type TriggerType = 'summary-heading' | 'summary-first-lines' | 'summary-panel' | 'conclusion-heading' | 'conclusion-last-lines' | 'cmd+shift+space';
|
|
10
10
|
export type AiAutocompleteEventPayload = AiAutocompleteInvokedAEP | AiAutocompleteViewedAEP | AiAutocompleteAcceptedAEP | AiAutocompleteRejectedAEP;
|
|
11
11
|
export {};
|
|
@@ -211,8 +211,14 @@ type RovoMoreOptionsClickedAEP = ButtonAEP<ACTION_SUBJECT_ID.AI_MORE_ROVO_OPTION
|
|
|
211
211
|
type AskRovoButtonClickedAEP = ButtonAEP<ACTION_SUBJECT_ID.AI_ASK_ROVO_BUTTON, {
|
|
212
212
|
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB;
|
|
213
213
|
}>;
|
|
214
|
-
type SmartLinkRovoButtonClickedAEP = ButtonAEP<ACTION_SUBJECT_ID.SMART_LINK_ROVO_BUTTON,
|
|
215
|
-
|
|
214
|
+
type SmartLinkRovoButtonClickedAEP = ButtonAEP<ACTION_SUBJECT_ID.SMART_LINK_ROVO_BUTTON, {
|
|
215
|
+
has3pSources?: boolean;
|
|
216
|
+
sourceProducts?: string | null;
|
|
217
|
+
}>;
|
|
218
|
+
type SmartLinkSummarizeButtonClickedAEP = ButtonAEP<ACTION_SUBJECT_ID.SMART_LINK_SUMMARIZE_BUTTON, {
|
|
219
|
+
has3pSources?: boolean;
|
|
220
|
+
sourceProducts?: string | null;
|
|
221
|
+
}>;
|
|
216
222
|
type ChangeToneMenuItemClickedAEP = UIAEP<ACTION.CLICKED, ACTION_SUBJECT.TOOLBAR_DROPDOWN_MENU_ITEM, ACTION_SUBJECT_ID.AI_CHANGE_TONE, {
|
|
217
223
|
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB;
|
|
218
224
|
}>;
|
|
@@ -6,6 +6,6 @@ type AiAutocompleteInvokedAEP = TrackAEP<ACTION.INVOKED, ACTION_SUBJECT.AI_AUTOC
|
|
|
6
6
|
type AiAutocompleteViewedAEP = TrackAEP<ACTION.SUGGESTION_VIEWED, ACTION_SUBJECT.AI_AUTOCOMPLETE, undefined, undefined, undefined>;
|
|
7
7
|
type AiAutocompleteAcceptedAEP = TrackAEP<ACTION.SUGGESTION_INSERTED, ACTION_SUBJECT.AI_AUTOCOMPLETE, undefined, undefined, undefined>;
|
|
8
8
|
type AiAutocompleteRejectedAEP = TrackAEP<ACTION.SUGGESTION_DISMISSED, ACTION_SUBJECT.AI_AUTOCOMPLETE, undefined, undefined, undefined>;
|
|
9
|
-
export type TriggerType = 'summary-heading' | 'summary-first-lines' | 'summary-panel' | 'cmd+shift+space';
|
|
9
|
+
export type TriggerType = 'summary-heading' | 'summary-first-lines' | 'summary-panel' | 'conclusion-heading' | 'conclusion-last-lines' | 'cmd+shift+space';
|
|
10
10
|
export type AiAutocompleteEventPayload = AiAutocompleteInvokedAEP | AiAutocompleteViewedAEP | AiAutocompleteAcceptedAEP | AiAutocompleteRejectedAEP;
|
|
11
11
|
export {};
|
|
@@ -211,8 +211,14 @@ type RovoMoreOptionsClickedAEP = ButtonAEP<ACTION_SUBJECT_ID.AI_MORE_ROVO_OPTION
|
|
|
211
211
|
type AskRovoButtonClickedAEP = ButtonAEP<ACTION_SUBJECT_ID.AI_ASK_ROVO_BUTTON, {
|
|
212
212
|
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB;
|
|
213
213
|
}>;
|
|
214
|
-
type SmartLinkRovoButtonClickedAEP = ButtonAEP<ACTION_SUBJECT_ID.SMART_LINK_ROVO_BUTTON,
|
|
215
|
-
|
|
214
|
+
type SmartLinkRovoButtonClickedAEP = ButtonAEP<ACTION_SUBJECT_ID.SMART_LINK_ROVO_BUTTON, {
|
|
215
|
+
has3pSources?: boolean;
|
|
216
|
+
sourceProducts?: string | null;
|
|
217
|
+
}>;
|
|
218
|
+
type SmartLinkSummarizeButtonClickedAEP = ButtonAEP<ACTION_SUBJECT_ID.SMART_LINK_SUMMARIZE_BUTTON, {
|
|
219
|
+
has3pSources?: boolean;
|
|
220
|
+
sourceProducts?: string | null;
|
|
221
|
+
}>;
|
|
216
222
|
type ChangeToneMenuItemClickedAEP = UIAEP<ACTION.CLICKED, ACTION_SUBJECT.TOOLBAR_DROPDOWN_MENU_ITEM, ACTION_SUBJECT_ID.AI_CHANGE_TONE, {
|
|
217
223
|
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB;
|
|
218
224
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "112.18.
|
|
3
|
+
"version": "112.18.5",
|
|
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/"
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
71
71
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
72
72
|
"@atlaskit/primitives": "^18.1.0",
|
|
73
|
-
"@atlaskit/profilecard": "^24.
|
|
73
|
+
"@atlaskit/profilecard": "^24.49.0",
|
|
74
74
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
75
|
-
"@atlaskit/react-ufo": "^5.
|
|
75
|
+
"@atlaskit/react-ufo": "^5.12.0",
|
|
76
76
|
"@atlaskit/section-message": "^8.12.0",
|
|
77
77
|
"@atlaskit/smart-card": "^43.31.0",
|
|
78
78
|
"@atlaskit/smart-user-picker": "^9.2.0",
|
|
@@ -214,9 +214,6 @@
|
|
|
214
214
|
"p2m-drop-down-motion": {
|
|
215
215
|
"type": "boolean"
|
|
216
216
|
},
|
|
217
|
-
"platform_editor_link_picker_width_fix": {
|
|
218
|
-
"type": "boolean"
|
|
219
|
-
},
|
|
220
217
|
"platform_editor_content_mode_button_mvp": {
|
|
221
218
|
"type": "boolean"
|
|
222
219
|
},
|
|
@@ -253,9 +250,6 @@
|
|
|
253
250
|
"platform_editor_ally_remove_role_tabpanel": {
|
|
254
251
|
"type": "boolean"
|
|
255
252
|
},
|
|
256
|
-
"platform_editor_native_anchor_patch_2": {
|
|
257
|
-
"type": "boolean"
|
|
258
|
-
},
|
|
259
253
|
"platform_forge_ui_support_images_in_adfrenderer": {
|
|
260
254
|
"type": "boolean"
|
|
261
255
|
},
|