@atlaskit/editor-common 116.17.3 → 116.18.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 +35 -0
- package/compass.yml +38 -0
- package/dist/cjs/extensibility/MultiBodiedExtension/action-api.js +4 -2
- package/dist/cjs/extensibility/MultiBodiedExtension/utils.js +7 -3
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/quick-insert/boost-native-results-above-skills.js +24 -15
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/FloatingToolbar/Button.js +1 -4
- package/dist/cjs/utils/macro.js +1 -2
- package/dist/cjs/utils/processRawValue.js +15 -2
- package/dist/es2019/extensibility/MultiBodiedExtension/action-api.js +4 -2
- package/dist/es2019/extensibility/MultiBodiedExtension/utils.js +3 -2
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/quick-insert/boost-native-results-above-skills.js +24 -17
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/FloatingToolbar/Button.js +1 -4
- package/dist/es2019/utils/macro.js +1 -2
- package/dist/es2019/utils/processRawValue.js +16 -3
- package/dist/esm/extensibility/MultiBodiedExtension/action-api.js +4 -2
- package/dist/esm/extensibility/MultiBodiedExtension/utils.js +6 -3
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/quick-insert/boost-native-results-above-skills.js +24 -15
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/FloatingToolbar/Button.js +1 -4
- package/dist/esm/utils/macro.js +1 -2
- package/dist/esm/utils/processRawValue.js +16 -3
- package/dist/types/analytics/types/events.d.ts +1 -0
- package/dist/types/extensibility/MultiBodiedExtension/utils.d.ts +4 -1
- package/dist/types/extensions/types/extension-handler.d.ts +6 -1
- package/dist/types/quick-insert/boost-native-results-above-skills.d.ts +13 -8
- package/package.json +9 -6
- package/dist/cjs/ui/Pulse/Pulse.js +0 -37
- package/dist/es2019/ui/Pulse/Pulse.js +0 -29
- package/dist/esm/ui/Pulse/Pulse.js +0 -29
- package/dist/types/ui/Pulse/Pulse.d.ts +0 -19
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 116.18.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`ed550a5583074`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ed550a5583074) -
|
|
8
|
+
Improve panel container fallback handling.
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 116.17.5
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [`6e2538f8383a1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6e2538f8383a1) -
|
|
19
|
+
Clean up experiment `platform_editor_spotlight_migration`. The floating toolbar button is no
|
|
20
|
+
longer wrapped in the now-removed `SpotlightPulse` onboarding effect; the orphaned internal
|
|
21
|
+
`Pulse` component (the last `@atlaskit/onboarding` usage in editor-common) has been removed.
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
24
|
+
## 116.17.4
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- [`2e62212873ddd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2e62212873ddd) -
|
|
29
|
+
Clean up experiment `platform_editor_macro_placeholder_array_guard`
|
|
30
|
+
- [`d4d3ad611bb7b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d4d3ad611bb7b) -
|
|
31
|
+
Add multi-bodied extension action analytics for active child changes and parameter updates.
|
|
32
|
+
- [`3f159bc172788`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3f159bc172788) -
|
|
33
|
+
Fix quick insert reranker misclassifying high-priority native items (e.g. Link) as skills. The
|
|
34
|
+
reranker now identifies skills by their AI category instead of a priority threshold, preventing
|
|
35
|
+
experiment interactions where native items with elevated priority were incorrectly demoted.
|
|
36
|
+
- Updated dependencies
|
|
37
|
+
|
|
3
38
|
## 116.17.3
|
|
4
39
|
|
|
5
40
|
### Patch Changes
|
package/compass.yml
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
configVersion: 1
|
|
2
|
+
id: ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:component/c5751cc6-3513-4070-9deb-af31e86aed34/8aba7f6e-457b-4200-9b6f-00adf2350107
|
|
3
|
+
name: '@atlaskit/editor-common'
|
|
4
|
+
ownerId: ari:cloud:identity::team/og-da2205cb-ea5e-4059-9215-30c9b26c971f # Fabric - Editor
|
|
5
|
+
labels:
|
|
6
|
+
- platform-code
|
|
7
|
+
- platform-afm
|
|
8
|
+
typeId: OTHER
|
|
9
|
+
fields:
|
|
10
|
+
tier: 4
|
|
11
|
+
lifecycle: Active
|
|
12
|
+
isMonorepoProject: true
|
|
13
|
+
links:
|
|
14
|
+
- name: Root Repository
|
|
15
|
+
type: REPOSITORY
|
|
16
|
+
url: https://bitbucket.org/atlassian/atlassian-frontend-monorepo/src/master
|
|
17
|
+
- name: Slack Channel
|
|
18
|
+
type: CHAT_CHANNEL
|
|
19
|
+
url: https://atlassian.enterprise.slack.com/archives/CFG3PSQ9E # #help-editor
|
|
20
|
+
- name: Editor Common
|
|
21
|
+
type: REPOSITORY
|
|
22
|
+
url: https://bitbucket.org/atlassian/atlassian-frontend-monorepo/src/master/platform/packages/editor/editor-common
|
|
23
|
+
customFields:
|
|
24
|
+
- name: Department
|
|
25
|
+
type: text
|
|
26
|
+
value: Eng - Editor Frontend Platform
|
|
27
|
+
- name: Technical Owner
|
|
28
|
+
type: user
|
|
29
|
+
value: ari:cloud:identity::user/612646c53fe26c00694fbe6a # Chris Kimber
|
|
30
|
+
- name: Required Reviewers Opt In
|
|
31
|
+
type: boolean
|
|
32
|
+
value: true
|
|
33
|
+
- name: Reviewer Selection Mechanism
|
|
34
|
+
type: text
|
|
35
|
+
value: random(2)
|
|
36
|
+
- name: Required Reviewer Approvals
|
|
37
|
+
type: number
|
|
38
|
+
value: 1
|
|
@@ -164,7 +164,7 @@ var useMultiBodiedExtensionActions = exports.useMultiBodiedExtensionActions = fu
|
|
|
164
164
|
dispatch(tr);
|
|
165
165
|
return true;
|
|
166
166
|
},
|
|
167
|
-
updateParameters: function updateParameters(parameters) {
|
|
167
|
+
updateParameters: function updateParameters(parameters, analyticsChangedParam) {
|
|
168
168
|
var state = editorView.state,
|
|
169
169
|
dispatch = editorView.dispatch;
|
|
170
170
|
var pos = getPos();
|
|
@@ -182,7 +182,9 @@ var useMultiBodiedExtensionActions = exports.useMultiBodiedExtensionActions = fu
|
|
|
182
182
|
var tr = state.tr.setNodeMarkup(pos, null, updatedParameters);
|
|
183
183
|
dispatch(tr);
|
|
184
184
|
if (eventDispatcher) {
|
|
185
|
-
(0, _utils.sendMBEAnalyticsEvent)(_analytics.ACTION.UPDATE_PARAMETERS, node, eventDispatcher)
|
|
185
|
+
(0, _utils.sendMBEAnalyticsEvent)(_analytics.ACTION.UPDATE_PARAMETERS, node, eventDispatcher, analyticsChangedParam && (0, _platformFeatureFlags.fg)('confluence_frontend_native_tabs_extension') ? {
|
|
186
|
+
changedParams: analyticsChangedParam
|
|
187
|
+
} : undefined);
|
|
186
188
|
}
|
|
187
189
|
return true;
|
|
188
190
|
},
|
|
@@ -1,25 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.sendMBEAnalyticsEvent = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
7
9
|
var _analytics = require("../../analytics");
|
|
8
10
|
var _eventDispatcher = require("../../event-dispatcher");
|
|
9
11
|
var _utils = require("../../utils");
|
|
10
|
-
var
|
|
12
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
|
+
var sendMBEAnalyticsEvent = exports.sendMBEAnalyticsEvent = function sendMBEAnalyticsEvent(action, node, eventDispatcher, attributes) {
|
|
11
15
|
var analyticsDispatch = (0, _eventDispatcher.createDispatch)(eventDispatcher);
|
|
12
16
|
analyticsDispatch(_utils.analyticsEventKey, {
|
|
13
17
|
payload: {
|
|
14
18
|
action: action,
|
|
15
19
|
actionSubject: _analytics.ACTION_SUBJECT.MULTI_BODIED_EXTENSION,
|
|
16
20
|
eventType: _analytics.EVENT_TYPE.TRACK,
|
|
17
|
-
attributes: {
|
|
21
|
+
attributes: _objectSpread({
|
|
18
22
|
extensionType: node.attrs.extensionType,
|
|
19
23
|
extensionKey: node.attrs.extensionKey,
|
|
20
24
|
localId: node.attrs.localId,
|
|
21
25
|
currentFramesCount: node.content.childCount
|
|
22
|
-
}
|
|
26
|
+
}, attributes)
|
|
23
27
|
}
|
|
24
28
|
});
|
|
25
29
|
};
|
|
@@ -28,7 +28,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
28
28
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
29
29
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
30
30
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
31
|
-
var packageVersion = "116.17.
|
|
31
|
+
var packageVersion = "116.17.5";
|
|
32
32
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
33
33
|
// Remove URL as it has UGC
|
|
34
34
|
// Ignored via go/ees007
|
|
@@ -6,28 +6,37 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.boostNativeResultsAboveSkills = boostNativeResultsAboveSkills;
|
|
8
8
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
|
-
// Items with priority >= this threshold are treated as extension-provided
|
|
10
|
-
// items (e.g. Rovo skills) and demoted below native editor elements.
|
|
11
|
-
// Coupled with priority: 9000 set in
|
|
12
|
-
// platform/packages/ai-mate/rovo-skills/src/services/insert-menu-provider/extension-manifest.tsx
|
|
13
|
-
var SKILL_PRIORITY_THRESHOLD = 1000;
|
|
14
9
|
var SCORE_PROXIMITY_THRESHOLD = 0.2;
|
|
15
10
|
|
|
16
11
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
12
|
+
* The extension type for Rovo skills, used to identify skill items in the
|
|
13
|
+
* quick insert menu. Matches the value defined in
|
|
14
|
+
* @atlassian/conversation-assistant-content-transformer/utils/skills.
|
|
19
15
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
* Intentionally duplicated here to avoid adding a runtime dependency from
|
|
17
|
+
* editor-common to the conversation-assistant packages.
|
|
18
|
+
*/
|
|
19
|
+
var ROVO_SKILL_EXTENSION_TYPE = 'com.atlassian.rovo.skill';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Promotes native editor elements above Rovo skill items in search results
|
|
23
|
+
* when their Fuse scores are close.
|
|
24
|
+
*
|
|
25
|
+
* An item is classified as a Rovo skill when its `extensionType` property
|
|
26
|
+
* (set by `buildMenuItem` for all extension manifest items) matches the
|
|
27
|
+
* Rovo skill extension type. Native editor items (Link, Code snippet, Table,
|
|
28
|
+
* etc.) and other non-Rovo extensions are unaffected, regardless of their
|
|
29
|
+
* priority value.
|
|
30
|
+
*
|
|
31
|
+
* When a skill and a native item have similar scores (within the proximity
|
|
32
|
+
* threshold), the native item is promoted above the skill. But when a skill
|
|
33
|
+
* is a significantly better match (e.g. searching "research" and the skill is
|
|
34
|
+
* "Research Insights" while the native item is "Live search"), the skill keeps
|
|
35
|
+
* its higher rank.
|
|
26
36
|
*/
|
|
27
37
|
function boostNativeResultsAboveSkills(results) {
|
|
28
38
|
var isSkill = function isSkill(r) {
|
|
29
|
-
|
|
30
|
-
return ((_r$item$priority = r.item.priority) !== null && _r$item$priority !== void 0 ? _r$item$priority : 0) >= SKILL_PRIORITY_THRESHOLD;
|
|
39
|
+
return r.item.extensionType === ROVO_SKILL_EXTENSION_TYPE;
|
|
31
40
|
};
|
|
32
41
|
var reordered = results.slice(0);
|
|
33
42
|
for (var i = 1; i < reordered.length; i++) {
|
|
@@ -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 = "116.17.
|
|
27
|
+
var packageVersion = "116.17.5";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -15,7 +15,6 @@ var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react
|
|
|
15
15
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
16
16
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
17
17
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
18
|
-
var _Pulse = require("../Pulse/Pulse");
|
|
19
18
|
var _iconOnlySpacing = require("./iconOnlySpacing");
|
|
20
19
|
var _styles = require("./styles");
|
|
21
20
|
var _excluded = ["buttonStyles"];
|
|
@@ -89,8 +88,6 @@ var FloatingToolbarButton = function FloatingToolbarButton(_ref, forwardedRef) {
|
|
|
89
88
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
90
89
|
onMouseEnter: (0, _expValEquals.expValEquals)('editor_a11y__enghealth-46814_fy26', 'isEnabled', true) ? undefined : onMouseEnter,
|
|
91
90
|
onMouseLeave: (0, _expValEquals.expValEquals)('editor_a11y__enghealth-46814_fy26', 'isEnabled', true) ? undefined : onMouseLeave
|
|
92
|
-
}, /*#__PURE__*/_react.default.createElement(_Pulse.Pulse, {
|
|
93
|
-
pulse: !(0, _expValEquals.expValEquals)('platform_editor_spotlight_migration', 'isEnabled', true) && pulse
|
|
94
91
|
}, /*#__PURE__*/_react.default.createElement(_customThemeButton.default
|
|
95
92
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/design-system/no-unsafe-style-overrides -- Ignored via go/DSP-18766
|
|
96
93
|
, {
|
|
@@ -149,7 +146,7 @@ var FloatingToolbarButton = function FloatingToolbarButton(_ref, forwardedRef) {
|
|
|
149
146
|
// should be fixed here https://a11y-internal.atlassian.net/browse/DST-287
|
|
150
147
|
,
|
|
151
148
|
tabIndex: tabIndex
|
|
152
|
-
}, children))))
|
|
149
|
+
}, children))));
|
|
153
150
|
};
|
|
154
151
|
|
|
155
152
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
package/dist/cjs/utils/macro.js
CHANGED
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getExtensionLozengeData = void 0;
|
|
7
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
8
7
|
var getExtensionLozengeData = exports.getExtensionLozengeData = function getExtensionLozengeData(_ref) {
|
|
9
8
|
var node = _ref.node,
|
|
10
9
|
type = _ref.type;
|
|
@@ -13,7 +12,7 @@ var getExtensionLozengeData = exports.getExtensionLozengeData = function getExte
|
|
|
13
12
|
}
|
|
14
13
|
var macroMetadata = node.attrs.parameters.macroMetadata;
|
|
15
14
|
// EDITOR-4007: guard against non-array placeholder to prevent `TypeError: ... forEach is not a function`.
|
|
16
|
-
var hasValidPlaceholder =
|
|
15
|
+
var hasValidPlaceholder = macroMetadata && Array.isArray(macroMetadata.placeholder);
|
|
17
16
|
if (hasValidPlaceholder) {
|
|
18
17
|
var placeholderData;
|
|
19
18
|
// Ignored via go/ees005
|
|
@@ -13,6 +13,7 @@ exports.processRawValue = processRawValue;
|
|
|
13
13
|
exports.processRawValueWithoutValidation = processRawValueWithoutValidation;
|
|
14
14
|
var _transforms = require("@atlaskit/adf-utils/transforms");
|
|
15
15
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
16
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
17
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
17
18
|
var _analytics = require("../analytics");
|
|
18
19
|
var _isNestedTablesSupported = require("../nesting/isNestedTablesSupported");
|
|
@@ -82,14 +83,14 @@ var transformContainerNodesWithAnalytics = function transformContainerNodesWithA
|
|
|
82
83
|
}
|
|
83
84
|
} catch (e) {
|
|
84
85
|
// eslint-disable-next-line no-console
|
|
85
|
-
console.error('Failed to transform one or more
|
|
86
|
+
console.error('Failed to transform one or more panel container nodes');
|
|
86
87
|
if (dispatchAnalyticsEvent) {
|
|
87
88
|
dispatchAnalyticsEvent({
|
|
88
89
|
action: _analytics.ACTION.DOCUMENT_PROCESSING_ERROR,
|
|
89
90
|
actionSubject: _analytics.ACTION_SUBJECT.EDITOR,
|
|
90
91
|
eventType: _analytics.EVENT_TYPE.OPERATIONAL,
|
|
91
92
|
attributes: {
|
|
92
|
-
errorMessage: "".concat(e instanceof Error && e.name === 'NodeNestingTransformError' ? 'NodeNestingTransformError - Failed to transform panel
|
|
93
|
+
errorMessage: "".concat(e instanceof Error && e.name === 'NodeNestingTransformError' ? 'NodeNestingTransformError - Failed to transform panel container nodes' : undefined)
|
|
93
94
|
}
|
|
94
95
|
});
|
|
95
96
|
}
|
|
@@ -123,6 +124,12 @@ function processRawValueWithoutValidation(schema, value, dispatchAnalyticsEvent)
|
|
|
123
124
|
if (result.isTransformed && result.transformedAdf) {
|
|
124
125
|
transformedAdf = result.transformedAdf;
|
|
125
126
|
}
|
|
127
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_panel_c1_fallback_transform')) {
|
|
128
|
+
var panelC1Result = (0, _transforms.panelC1FallbackTransform)(schema, transformedAdf);
|
|
129
|
+
if (panelC1Result.isTransformed && panelC1Result.transformedAdf) {
|
|
130
|
+
transformedAdf = panelC1Result.transformedAdf;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
126
133
|
if ((0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true)) {
|
|
127
134
|
var _transformContainerNo2 = transformContainerNodesWithAnalytics(transformedAdf, schema, dispatchAnalyticsEvent);
|
|
128
135
|
transformedAdf = _transformContainerNo2.transformedAdf;
|
|
@@ -283,6 +290,12 @@ function processRawValue(schema, value, providerFactory, sanitizePrivateContent,
|
|
|
283
290
|
});
|
|
284
291
|
}
|
|
285
292
|
}
|
|
293
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_panel_c1_fallback_transform')) {
|
|
294
|
+
var panelC1Result = (0, _transforms.panelC1FallbackTransform)(schema, transformedAdf);
|
|
295
|
+
if (panelC1Result.isTransformed && panelC1Result.transformedAdf) {
|
|
296
|
+
transformedAdf = panelC1Result.transformedAdf;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
286
299
|
|
|
287
300
|
// Validate ADF first before converting nested-table extensions into nested tables
|
|
288
301
|
// This matches the renderer's behavior in render-document.ts
|
|
@@ -160,7 +160,7 @@ export const useMultiBodiedExtensionActions = ({
|
|
|
160
160
|
dispatch(tr);
|
|
161
161
|
return true;
|
|
162
162
|
},
|
|
163
|
-
updateParameters(parameters) {
|
|
163
|
+
updateParameters(parameters, analyticsChangedParam) {
|
|
164
164
|
const {
|
|
165
165
|
state,
|
|
166
166
|
dispatch
|
|
@@ -186,7 +186,9 @@ export const useMultiBodiedExtensionActions = ({
|
|
|
186
186
|
const tr = state.tr.setNodeMarkup(pos, null, updatedParameters);
|
|
187
187
|
dispatch(tr);
|
|
188
188
|
if (eventDispatcher) {
|
|
189
|
-
sendMBEAnalyticsEvent(ACTION.UPDATE_PARAMETERS, node, eventDispatcher)
|
|
189
|
+
sendMBEAnalyticsEvent(ACTION.UPDATE_PARAMETERS, node, eventDispatcher, analyticsChangedParam && fg('confluence_frontend_native_tabs_extension') ? {
|
|
190
|
+
changedParams: analyticsChangedParam
|
|
191
|
+
} : undefined);
|
|
190
192
|
}
|
|
191
193
|
return true;
|
|
192
194
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ACTION_SUBJECT, EVENT_TYPE } from '../../analytics';
|
|
2
2
|
import { createDispatch } from '../../event-dispatcher';
|
|
3
3
|
import { analyticsEventKey } from '../../utils';
|
|
4
|
-
export const sendMBEAnalyticsEvent = (action, node, eventDispatcher) => {
|
|
4
|
+
export const sendMBEAnalyticsEvent = (action, node, eventDispatcher, attributes) => {
|
|
5
5
|
const analyticsDispatch = createDispatch(eventDispatcher);
|
|
6
6
|
analyticsDispatch(analyticsEventKey, {
|
|
7
7
|
payload: {
|
|
@@ -12,7 +12,8 @@ export const sendMBEAnalyticsEvent = (action, node, eventDispatcher) => {
|
|
|
12
12
|
extensionType: node.attrs.extensionType,
|
|
13
13
|
extensionKey: node.attrs.extensionKey,
|
|
14
14
|
localId: node.attrs.localId,
|
|
15
|
-
currentFramesCount: node.content.childCount
|
|
15
|
+
currentFramesCount: node.content.childCount,
|
|
16
|
+
...attributes
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
});
|
|
@@ -14,7 +14,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
14
14
|
const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
15
15
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
16
16
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
17
|
-
const packageVersion = "116.17.
|
|
17
|
+
const packageVersion = "116.17.5";
|
|
18
18
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
19
19
|
// Remove URL as it has UGC
|
|
20
20
|
// Ignored via go/ees007
|
|
@@ -1,26 +1,33 @@
|
|
|
1
|
-
// Items with priority >= this threshold are treated as extension-provided
|
|
2
|
-
// items (e.g. Rovo skills) and demoted below native editor elements.
|
|
3
|
-
// Coupled with priority: 9000 set in
|
|
4
|
-
// platform/packages/ai-mate/rovo-skills/src/services/insert-menu-provider/extension-manifest.tsx
|
|
5
|
-
const SKILL_PRIORITY_THRESHOLD = 1000;
|
|
6
1
|
const SCORE_PROXIMITY_THRESHOLD = 0.2;
|
|
7
2
|
|
|
8
3
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
4
|
+
* The extension type for Rovo skills, used to identify skill items in the
|
|
5
|
+
* quick insert menu. Matches the value defined in
|
|
6
|
+
* @atlassian/conversation-assistant-content-transformer/utils/skills.
|
|
11
7
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
* Intentionally duplicated here to avoid adding a runtime dependency from
|
|
9
|
+
* editor-common to the conversation-assistant packages.
|
|
10
|
+
*/
|
|
11
|
+
const ROVO_SKILL_EXTENSION_TYPE = 'com.atlassian.rovo.skill';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Promotes native editor elements above Rovo skill items in search results
|
|
15
|
+
* when their Fuse scores are close.
|
|
16
|
+
*
|
|
17
|
+
* An item is classified as a Rovo skill when its `extensionType` property
|
|
18
|
+
* (set by `buildMenuItem` for all extension manifest items) matches the
|
|
19
|
+
* Rovo skill extension type. Native editor items (Link, Code snippet, Table,
|
|
20
|
+
* etc.) and other non-Rovo extensions are unaffected, regardless of their
|
|
21
|
+
* priority value.
|
|
22
|
+
*
|
|
23
|
+
* When a skill and a native item have similar scores (within the proximity
|
|
24
|
+
* threshold), the native item is promoted above the skill. But when a skill
|
|
25
|
+
* is a significantly better match (e.g. searching "research" and the skill is
|
|
26
|
+
* "Research Insights" while the native item is "Live search"), the skill keeps
|
|
27
|
+
* its higher rank.
|
|
18
28
|
*/
|
|
19
29
|
export function boostNativeResultsAboveSkills(results) {
|
|
20
|
-
const isSkill = r =>
|
|
21
|
-
var _r$item$priority;
|
|
22
|
-
return ((_r$item$priority = r.item.priority) !== null && _r$item$priority !== void 0 ? _r$item$priority : 0) >= SKILL_PRIORITY_THRESHOLD;
|
|
23
|
-
};
|
|
30
|
+
const isSkill = r => r.item.extensionType === ROVO_SKILL_EXTENSION_TYPE;
|
|
24
31
|
const reordered = results.slice(0);
|
|
25
32
|
for (let i = 1; i < reordered.length; i++) {
|
|
26
33
|
if (isSkill(reordered[i])) {
|
|
@@ -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 = "116.17.
|
|
17
|
+
const packageVersion = "116.17.5";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -4,7 +4,6 @@ import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
|
4
4
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
5
5
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
6
6
|
import Tooltip from '@atlaskit/tooltip';
|
|
7
|
-
import { Pulse } from '../Pulse/Pulse';
|
|
8
7
|
import { iconOnlySpacing } from './iconOnlySpacing';
|
|
9
8
|
import { getButtonStyles } from './styles';
|
|
10
9
|
const customSizeAndPadding = {
|
|
@@ -71,8 +70,6 @@ const FloatingToolbarButton = ({
|
|
|
71
70
|
}, /*#__PURE__*/React.createElement("div", {
|
|
72
71
|
onMouseEnter: expValEquals('editor_a11y__enghealth-46814_fy26', 'isEnabled', true) ? undefined : onMouseEnter,
|
|
73
72
|
onMouseLeave: expValEquals('editor_a11y__enghealth-46814_fy26', 'isEnabled', true) ? undefined : onMouseLeave
|
|
74
|
-
}, /*#__PURE__*/React.createElement(Pulse, {
|
|
75
|
-
pulse: !expValEquals('platform_editor_spotlight_migration', 'isEnabled', true) && pulse
|
|
76
73
|
}, /*#__PURE__*/React.createElement(Button
|
|
77
74
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/design-system/no-unsafe-style-overrides -- Ignored via go/DSP-18766
|
|
78
75
|
, {
|
|
@@ -138,7 +135,7 @@ const FloatingToolbarButton = ({
|
|
|
138
135
|
// should be fixed here https://a11y-internal.atlassian.net/browse/DST-287
|
|
139
136
|
,
|
|
140
137
|
tabIndex: tabIndex
|
|
141
|
-
}, children))))
|
|
138
|
+
}, children))));
|
|
142
139
|
};
|
|
143
140
|
|
|
144
141
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
2
1
|
export const getExtensionLozengeData = ({
|
|
3
2
|
node,
|
|
4
3
|
type
|
|
@@ -10,7 +9,7 @@ export const getExtensionLozengeData = ({
|
|
|
10
9
|
macroMetadata
|
|
11
10
|
} = node.attrs.parameters;
|
|
12
11
|
// EDITOR-4007: guard against non-array placeholder to prevent `TypeError: ... forEach is not a function`.
|
|
13
|
-
const hasValidPlaceholder =
|
|
12
|
+
const hasValidPlaceholder = macroMetadata && Array.isArray(macroMetadata.placeholder);
|
|
14
13
|
if (hasValidPlaceholder) {
|
|
15
14
|
let placeholderData;
|
|
16
15
|
// Ignored via go/ees005
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { syncBlockFallbackTransform, transformDedupeMarks, transformIndentationMarks, transformInvalidMediaContent, transformMediaLinkMarks, transformNestedTablesIncomingDocument, transformNodesMissingContent, transformTextLinkCodeMarks, transformMediaSingleWidth, transformContainerNodes } from '@atlaskit/adf-utils/transforms';
|
|
1
|
+
import { panelC1FallbackTransform, syncBlockFallbackTransform, transformDedupeMarks, transformIndentationMarks, transformInvalidMediaContent, transformMediaLinkMarks, transformNestedTablesIncomingDocument, transformNodesMissingContent, transformTextLinkCodeMarks, transformMediaSingleWidth, transformContainerNodes } from '@atlaskit/adf-utils/transforms';
|
|
2
2
|
import { Node } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
4
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
5
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
|
|
5
6
|
import { isNestedTablesSupported } from '../nesting/isNestedTablesSupported';
|
|
@@ -70,14 +71,14 @@ const transformContainerNodesWithAnalytics = (node, schema, dispatchAnalyticsEve
|
|
|
70
71
|
}
|
|
71
72
|
} catch (e) {
|
|
72
73
|
// eslint-disable-next-line no-console
|
|
73
|
-
console.error('Failed to transform one or more
|
|
74
|
+
console.error('Failed to transform one or more panel container nodes');
|
|
74
75
|
if (dispatchAnalyticsEvent) {
|
|
75
76
|
dispatchAnalyticsEvent({
|
|
76
77
|
action: ACTION.DOCUMENT_PROCESSING_ERROR,
|
|
77
78
|
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
78
79
|
eventType: EVENT_TYPE.OPERATIONAL,
|
|
79
80
|
attributes: {
|
|
80
|
-
errorMessage: `${e instanceof Error && e.name === 'NodeNestingTransformError' ? 'NodeNestingTransformError - Failed to transform panel
|
|
81
|
+
errorMessage: `${e instanceof Error && e.name === 'NodeNestingTransformError' ? 'NodeNestingTransformError - Failed to transform panel container nodes' : undefined}`
|
|
81
82
|
}
|
|
82
83
|
});
|
|
83
84
|
}
|
|
@@ -112,6 +113,12 @@ export function processRawValueWithoutValidation(schema, value, dispatchAnalytic
|
|
|
112
113
|
if (result.isTransformed && result.transformedAdf) {
|
|
113
114
|
transformedAdf = result.transformedAdf;
|
|
114
115
|
}
|
|
116
|
+
if (fg('platform_editor_panel_c1_fallback_transform')) {
|
|
117
|
+
const panelC1Result = panelC1FallbackTransform(schema, transformedAdf);
|
|
118
|
+
if (panelC1Result.isTransformed && panelC1Result.transformedAdf) {
|
|
119
|
+
transformedAdf = panelC1Result.transformedAdf;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
115
122
|
if (expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true)) {
|
|
116
123
|
({
|
|
117
124
|
transformedAdf
|
|
@@ -278,6 +285,12 @@ export function processRawValue(schema, value, providerFactory, sanitizePrivateC
|
|
|
278
285
|
});
|
|
279
286
|
}
|
|
280
287
|
}
|
|
288
|
+
if (fg('platform_editor_panel_c1_fallback_transform')) {
|
|
289
|
+
const panelC1Result = panelC1FallbackTransform(schema, transformedAdf);
|
|
290
|
+
if (panelC1Result.isTransformed && panelC1Result.transformedAdf) {
|
|
291
|
+
transformedAdf = panelC1Result.transformedAdf;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
281
294
|
|
|
282
295
|
// Validate ADF first before converting nested-table extensions into nested tables
|
|
283
296
|
// This matches the renderer's behavior in render-document.ts
|
|
@@ -157,7 +157,7 @@ export var useMultiBodiedExtensionActions = function useMultiBodiedExtensionActi
|
|
|
157
157
|
dispatch(tr);
|
|
158
158
|
return true;
|
|
159
159
|
},
|
|
160
|
-
updateParameters: function updateParameters(parameters) {
|
|
160
|
+
updateParameters: function updateParameters(parameters, analyticsChangedParam) {
|
|
161
161
|
var state = editorView.state,
|
|
162
162
|
dispatch = editorView.dispatch;
|
|
163
163
|
var pos = getPos();
|
|
@@ -175,7 +175,9 @@ export var useMultiBodiedExtensionActions = function useMultiBodiedExtensionActi
|
|
|
175
175
|
var tr = state.tr.setNodeMarkup(pos, null, updatedParameters);
|
|
176
176
|
dispatch(tr);
|
|
177
177
|
if (eventDispatcher) {
|
|
178
|
-
sendMBEAnalyticsEvent(ACTION.UPDATE_PARAMETERS, node, eventDispatcher)
|
|
178
|
+
sendMBEAnalyticsEvent(ACTION.UPDATE_PARAMETERS, node, eventDispatcher, analyticsChangedParam && fg('confluence_frontend_native_tabs_extension') ? {
|
|
179
|
+
changedParams: analyticsChangedParam
|
|
180
|
+
} : undefined);
|
|
179
181
|
}
|
|
180
182
|
return true;
|
|
181
183
|
},
|
|
@@ -1,19 +1,22 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1
4
|
import { ACTION_SUBJECT, EVENT_TYPE } from '../../analytics';
|
|
2
5
|
import { createDispatch } from '../../event-dispatcher';
|
|
3
6
|
import { analyticsEventKey } from '../../utils';
|
|
4
|
-
export var sendMBEAnalyticsEvent = function sendMBEAnalyticsEvent(action, node, eventDispatcher) {
|
|
7
|
+
export var sendMBEAnalyticsEvent = function sendMBEAnalyticsEvent(action, node, eventDispatcher, attributes) {
|
|
5
8
|
var analyticsDispatch = createDispatch(eventDispatcher);
|
|
6
9
|
analyticsDispatch(analyticsEventKey, {
|
|
7
10
|
payload: {
|
|
8
11
|
action: action,
|
|
9
12
|
actionSubject: ACTION_SUBJECT.MULTI_BODIED_EXTENSION,
|
|
10
13
|
eventType: EVENT_TYPE.TRACK,
|
|
11
|
-
attributes: {
|
|
14
|
+
attributes: _objectSpread({
|
|
12
15
|
extensionType: node.attrs.extensionType,
|
|
13
16
|
extensionKey: node.attrs.extensionKey,
|
|
14
17
|
localId: node.attrs.localId,
|
|
15
18
|
currentFramesCount: node.content.childCount
|
|
16
|
-
}
|
|
19
|
+
}, attributes)
|
|
17
20
|
}
|
|
18
21
|
});
|
|
19
22
|
};
|
|
@@ -20,7 +20,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
20
20
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
21
21
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
22
22
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
23
|
-
var packageVersion = "116.17.
|
|
23
|
+
var packageVersion = "116.17.5";
|
|
24
24
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
25
25
|
// Remove URL as it has UGC
|
|
26
26
|
// Ignored via go/ees007
|
|
@@ -1,26 +1,35 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
// Items with priority >= this threshold are treated as extension-provided
|
|
3
|
-
// items (e.g. Rovo skills) and demoted below native editor elements.
|
|
4
|
-
// Coupled with priority: 9000 set in
|
|
5
|
-
// platform/packages/ai-mate/rovo-skills/src/services/insert-menu-provider/extension-manifest.tsx
|
|
6
|
-
var SKILL_PRIORITY_THRESHOLD = 1000;
|
|
7
2
|
var SCORE_PROXIMITY_THRESHOLD = 0.2;
|
|
8
3
|
|
|
9
4
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
5
|
+
* The extension type for Rovo skills, used to identify skill items in the
|
|
6
|
+
* quick insert menu. Matches the value defined in
|
|
7
|
+
* @atlassian/conversation-assistant-content-transformer/utils/skills.
|
|
12
8
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
* Intentionally duplicated here to avoid adding a runtime dependency from
|
|
10
|
+
* editor-common to the conversation-assistant packages.
|
|
11
|
+
*/
|
|
12
|
+
var ROVO_SKILL_EXTENSION_TYPE = 'com.atlassian.rovo.skill';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Promotes native editor elements above Rovo skill items in search results
|
|
16
|
+
* when their Fuse scores are close.
|
|
17
|
+
*
|
|
18
|
+
* An item is classified as a Rovo skill when its `extensionType` property
|
|
19
|
+
* (set by `buildMenuItem` for all extension manifest items) matches the
|
|
20
|
+
* Rovo skill extension type. Native editor items (Link, Code snippet, Table,
|
|
21
|
+
* etc.) and other non-Rovo extensions are unaffected, regardless of their
|
|
22
|
+
* priority value.
|
|
23
|
+
*
|
|
24
|
+
* When a skill and a native item have similar scores (within the proximity
|
|
25
|
+
* threshold), the native item is promoted above the skill. But when a skill
|
|
26
|
+
* is a significantly better match (e.g. searching "research" and the skill is
|
|
27
|
+
* "Research Insights" while the native item is "Live search"), the skill keeps
|
|
28
|
+
* its higher rank.
|
|
19
29
|
*/
|
|
20
30
|
export function boostNativeResultsAboveSkills(results) {
|
|
21
31
|
var isSkill = function isSkill(r) {
|
|
22
|
-
|
|
23
|
-
return ((_r$item$priority = r.item.priority) !== null && _r$item$priority !== void 0 ? _r$item$priority : 0) >= SKILL_PRIORITY_THRESHOLD;
|
|
32
|
+
return r.item.extensionType === ROVO_SKILL_EXTENSION_TYPE;
|
|
24
33
|
};
|
|
25
34
|
var reordered = results.slice(0);
|
|
26
35
|
for (var i = 1; i < reordered.length; i++) {
|
|
@@ -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 = "116.17.
|
|
24
|
+
var packageVersion = "116.17.5";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -10,7 +10,6 @@ import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
|
10
10
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
11
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
12
12
|
import Tooltip from '@atlaskit/tooltip';
|
|
13
|
-
import { Pulse } from '../Pulse/Pulse';
|
|
14
13
|
import { iconOnlySpacing } from './iconOnlySpacing';
|
|
15
14
|
import { getButtonStyles } from './styles';
|
|
16
15
|
var customSizeAndPadding = {
|
|
@@ -80,8 +79,6 @@ var FloatingToolbarButton = function FloatingToolbarButton(_ref, forwardedRef) {
|
|
|
80
79
|
}, /*#__PURE__*/React.createElement("div", {
|
|
81
80
|
onMouseEnter: expValEquals('editor_a11y__enghealth-46814_fy26', 'isEnabled', true) ? undefined : onMouseEnter,
|
|
82
81
|
onMouseLeave: expValEquals('editor_a11y__enghealth-46814_fy26', 'isEnabled', true) ? undefined : onMouseLeave
|
|
83
|
-
}, /*#__PURE__*/React.createElement(Pulse, {
|
|
84
|
-
pulse: !expValEquals('platform_editor_spotlight_migration', 'isEnabled', true) && pulse
|
|
85
82
|
}, /*#__PURE__*/React.createElement(Button
|
|
86
83
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/design-system/no-unsafe-style-overrides -- Ignored via go/DSP-18766
|
|
87
84
|
, {
|
|
@@ -140,7 +137,7 @@ var FloatingToolbarButton = function FloatingToolbarButton(_ref, forwardedRef) {
|
|
|
140
137
|
// should be fixed here https://a11y-internal.atlassian.net/browse/DST-287
|
|
141
138
|
,
|
|
142
139
|
tabIndex: tabIndex
|
|
143
|
-
}, children))))
|
|
140
|
+
}, children))));
|
|
144
141
|
};
|
|
145
142
|
|
|
146
143
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
package/dist/esm/utils/macro.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
2
1
|
export var getExtensionLozengeData = function getExtensionLozengeData(_ref) {
|
|
3
2
|
var node = _ref.node,
|
|
4
3
|
type = _ref.type;
|
|
@@ -7,7 +6,7 @@ export var getExtensionLozengeData = function getExtensionLozengeData(_ref) {
|
|
|
7
6
|
}
|
|
8
7
|
var macroMetadata = node.attrs.parameters.macroMetadata;
|
|
9
8
|
// EDITOR-4007: guard against non-array placeholder to prevent `TypeError: ... forEach is not a function`.
|
|
10
|
-
var hasValidPlaceholder =
|
|
9
|
+
var hasValidPlaceholder = macroMetadata && Array.isArray(macroMetadata.placeholder);
|
|
11
10
|
if (hasValidPlaceholder) {
|
|
12
11
|
var placeholderData;
|
|
13
12
|
// Ignored via go/ees005
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { syncBlockFallbackTransform, transformDedupeMarks, transformIndentationMarks, transformInvalidMediaContent, transformMediaLinkMarks, transformNestedTablesIncomingDocument, transformNodesMissingContent, transformTextLinkCodeMarks, transformMediaSingleWidth, transformContainerNodes } from '@atlaskit/adf-utils/transforms';
|
|
1
|
+
import { panelC1FallbackTransform, syncBlockFallbackTransform, transformDedupeMarks, transformIndentationMarks, transformInvalidMediaContent, transformMediaLinkMarks, transformNestedTablesIncomingDocument, transformNodesMissingContent, transformTextLinkCodeMarks, transformMediaSingleWidth, transformContainerNodes } from '@atlaskit/adf-utils/transforms';
|
|
2
2
|
import { Node } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
4
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
5
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
|
|
5
6
|
import { isNestedTablesSupported } from '../nesting/isNestedTablesSupported';
|
|
@@ -68,14 +69,14 @@ var transformContainerNodesWithAnalytics = function transformContainerNodesWithA
|
|
|
68
69
|
}
|
|
69
70
|
} catch (e) {
|
|
70
71
|
// eslint-disable-next-line no-console
|
|
71
|
-
console.error('Failed to transform one or more
|
|
72
|
+
console.error('Failed to transform one or more panel container nodes');
|
|
72
73
|
if (dispatchAnalyticsEvent) {
|
|
73
74
|
dispatchAnalyticsEvent({
|
|
74
75
|
action: ACTION.DOCUMENT_PROCESSING_ERROR,
|
|
75
76
|
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
76
77
|
eventType: EVENT_TYPE.OPERATIONAL,
|
|
77
78
|
attributes: {
|
|
78
|
-
errorMessage: "".concat(e instanceof Error && e.name === 'NodeNestingTransformError' ? 'NodeNestingTransformError - Failed to transform panel
|
|
79
|
+
errorMessage: "".concat(e instanceof Error && e.name === 'NodeNestingTransformError' ? 'NodeNestingTransformError - Failed to transform panel container nodes' : undefined)
|
|
79
80
|
}
|
|
80
81
|
});
|
|
81
82
|
}
|
|
@@ -109,6 +110,12 @@ export function processRawValueWithoutValidation(schema, value, dispatchAnalytic
|
|
|
109
110
|
if (result.isTransformed && result.transformedAdf) {
|
|
110
111
|
transformedAdf = result.transformedAdf;
|
|
111
112
|
}
|
|
113
|
+
if (fg('platform_editor_panel_c1_fallback_transform')) {
|
|
114
|
+
var panelC1Result = panelC1FallbackTransform(schema, transformedAdf);
|
|
115
|
+
if (panelC1Result.isTransformed && panelC1Result.transformedAdf) {
|
|
116
|
+
transformedAdf = panelC1Result.transformedAdf;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
112
119
|
if (expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true)) {
|
|
113
120
|
var _transformContainerNo2 = transformContainerNodesWithAnalytics(transformedAdf, schema, dispatchAnalyticsEvent);
|
|
114
121
|
transformedAdf = _transformContainerNo2.transformedAdf;
|
|
@@ -269,6 +276,12 @@ export function processRawValue(schema, value, providerFactory, sanitizePrivateC
|
|
|
269
276
|
});
|
|
270
277
|
}
|
|
271
278
|
}
|
|
279
|
+
if (fg('platform_editor_panel_c1_fallback_transform')) {
|
|
280
|
+
var panelC1Result = panelC1FallbackTransform(schema, transformedAdf);
|
|
281
|
+
if (panelC1Result.isTransformed && panelC1Result.transformedAdf) {
|
|
282
|
+
transformedAdf = panelC1Result.transformedAdf;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
272
285
|
|
|
273
286
|
// Validate ADF first before converting nested-table extensions into nested tables
|
|
274
287
|
// This matches the renderer's behavior in render-document.ts
|
|
@@ -82,6 +82,7 @@ type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION
|
|
|
82
82
|
icon: string;
|
|
83
83
|
}, undefined>;
|
|
84
84
|
type MBEEventPayload = TrackAEP<ACTION.ADD_CHILD | ACTION.CHANGE_ACTIVE | ACTION.DELETED | ACTION.REMOVE_CHILD | ACTION.UPDATE_PARAMETERS | ACTION.GET_CHILDREN | ACTION.GET_CHILDREN_CONTAINER, ACTION_SUBJECT.MULTI_BODIED_EXTENSION, undefined, {
|
|
85
|
+
changedParams?: string;
|
|
85
86
|
currentFramesCount: number;
|
|
86
87
|
extensionKey: string;
|
|
87
88
|
extensionType: string;
|
|
@@ -2,5 +2,8 @@ import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
|
2
2
|
import type { ACTION } from '../../analytics';
|
|
3
3
|
import type { EventDispatcher } from '../../event-dispatcher';
|
|
4
4
|
type AnalyticsActionTypes = ACTION.ADD_CHILD | ACTION.CHANGE_ACTIVE | ACTION.DELETED | ACTION.REMOVE_CHILD | ACTION.UPDATE_PARAMETERS | ACTION.GET_CHILDREN | ACTION.GET_CHILDREN_CONTAINER;
|
|
5
|
-
|
|
5
|
+
type AnalyticsAttributes = {
|
|
6
|
+
changedParams?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const sendMBEAnalyticsEvent: (action: AnalyticsActionTypes, node: PmNode, eventDispatcher: EventDispatcher, attributes?: AnalyticsAttributes) => void;
|
|
6
9
|
export {};
|
|
@@ -55,7 +55,12 @@ export type MultiBodiedExtensionActions = {
|
|
|
55
55
|
getChildrenCount: () => number;
|
|
56
56
|
removeChild: (index: number) => boolean;
|
|
57
57
|
reorderChildren: (fromIndex: number, toIndex: number) => boolean;
|
|
58
|
-
|
|
58
|
+
/**
|
|
59
|
+
* `analyticsChangedParam` is the optional name/key of the parameter changed by the client.
|
|
60
|
+
* It is reported in analytics as `changedParams`.
|
|
61
|
+
* Example: `updateParameters({ tabs: updatedTabs }, '+tabColor,~tabTitle')`.
|
|
62
|
+
*/
|
|
63
|
+
updateParameters: (parameters: Parameters, analyticsChangedParam?: string) => boolean;
|
|
59
64
|
};
|
|
60
65
|
export type ParametersGetter<T extends Parameters = Parameters> = TransformBefore<T>;
|
|
61
66
|
export type AsyncParametersGetter<T extends Parameters = Parameters> = TransformAfter<T>;
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import type { QuickInsertItem } from '../provider-factory';
|
|
2
2
|
/**
|
|
3
|
-
* Promotes native editor elements above
|
|
4
|
-
*
|
|
3
|
+
* Promotes native editor elements above Rovo skill items in search results
|
|
4
|
+
* when their Fuse scores are close.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
6
|
+
* An item is classified as a Rovo skill when its `extensionType` property
|
|
7
|
+
* (set by `buildMenuItem` for all extension manifest items) matches the
|
|
8
|
+
* Rovo skill extension type. Native editor items (Link, Code snippet, Table,
|
|
9
|
+
* etc.) and other non-Rovo extensions are unaffected, regardless of their
|
|
10
|
+
* priority value.
|
|
11
|
+
*
|
|
12
|
+
* When a skill and a native item have similar scores (within the proximity
|
|
13
|
+
* threshold), the native item is promoted above the skill. But when a skill
|
|
14
|
+
* is a significantly better match (e.g. searching "research" and the skill is
|
|
15
|
+
* "Research Insights" while the native item is "Live search"), the skill keeps
|
|
16
|
+
* its higher rank.
|
|
12
17
|
*/
|
|
13
18
|
export declare function boostNativeResultsAboveSkills<T extends {
|
|
14
19
|
item: QuickInsertItem;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "116.
|
|
3
|
+
"version": "116.18.0",
|
|
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/"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@atlaskit/activity-provider": "^3.0.0",
|
|
32
32
|
"@atlaskit/adf-schema": "^56.0.0",
|
|
33
|
-
"@atlaskit/adf-utils": "^20.
|
|
33
|
+
"@atlaskit/adf-utils": "^20.1.0",
|
|
34
34
|
"@atlaskit/afm-i18n-platform-editor-editor-common": "2.168.0",
|
|
35
35
|
"@atlaskit/analytics-listeners": "^11.1.0",
|
|
36
36
|
"@atlaskit/analytics-namespaced-context": "^8.1.0",
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"@atlaskit/onboarding": "^15.1.0",
|
|
69
69
|
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
70
70
|
"@atlaskit/platform-feature-flags-react": "^1.1.0",
|
|
71
|
-
"@atlaskit/primitives": "^20.
|
|
72
|
-
"@atlaskit/profilecard": "^26.
|
|
71
|
+
"@atlaskit/primitives": "^20.3.0",
|
|
72
|
+
"@atlaskit/profilecard": "^26.5.0",
|
|
73
73
|
"@atlaskit/prosemirror-history": "^1.0.0",
|
|
74
74
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
75
75
|
"@atlaskit/react-ufo": "^7.3.0",
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
"@atlaskit/task-decision": "^21.4.0",
|
|
81
81
|
"@atlaskit/teams-app-config": "^2.1.0",
|
|
82
82
|
"@atlaskit/textfield": "^9.1.0",
|
|
83
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
84
|
-
"@atlaskit/tokens": "^15.
|
|
83
|
+
"@atlaskit/tmp-editor-statsig": "^117.0.0",
|
|
84
|
+
"@atlaskit/tokens": "^15.3.0",
|
|
85
85
|
"@atlaskit/tooltip": "^23.1.0",
|
|
86
86
|
"@atlaskit/width-detector": "^6.1.0",
|
|
87
87
|
"@babel/runtime": "^7.0.0",
|
|
@@ -262,6 +262,9 @@
|
|
|
262
262
|
},
|
|
263
263
|
"platform_editor_code_block_language_detection_flow": {
|
|
264
264
|
"type": "boolean"
|
|
265
|
+
},
|
|
266
|
+
"platform_editor_panel_c1_fallback_transform": {
|
|
267
|
+
"type": "boolean"
|
|
265
268
|
}
|
|
266
269
|
}
|
|
267
270
|
}
|
|
@@ -1,37 +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.Pulse = Pulse;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _onboarding = require("@atlaskit/onboarding");
|
|
10
|
-
// eslint-disable-next-line @atlaskit/design-system/use-spotlight-package
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Wraps children with {@link SpotlightPulse} component.
|
|
14
|
-
*
|
|
15
|
-
* It adds pulse effect to children if `pulse` is `true`.
|
|
16
|
-
*
|
|
17
|
-
* This custom component exists because the {@link SpotlightPulse} with `pulse={false}` renders extra `div` around `children`.
|
|
18
|
-
* We want to keep `children` as it is if there is no `pulse`.
|
|
19
|
-
*/
|
|
20
|
-
function Pulse(_ref) {
|
|
21
|
-
var pulse = _ref.pulse,
|
|
22
|
-
_ref$radius = _ref.radius,
|
|
23
|
-
radius = _ref$radius === void 0 ? 3 : _ref$radius,
|
|
24
|
-
children = _ref.children;
|
|
25
|
-
if (pulse) {
|
|
26
|
-
return (
|
|
27
|
-
/*#__PURE__*/
|
|
28
|
-
// SpotlightPulse shows pulse effect if `pulse` is `undefined`.
|
|
29
|
-
// That's why we need to cast `pulse` to `false` if it's `undefined`.
|
|
30
|
-
_react.default.createElement(_onboarding.SpotlightPulse, {
|
|
31
|
-
radius: radius,
|
|
32
|
-
pulse: pulse !== null && pulse !== void 0 ? pulse : false
|
|
33
|
-
}, children)
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children);
|
|
37
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
// eslint-disable-next-line @atlaskit/design-system/use-spotlight-package
|
|
3
|
-
import { SpotlightPulse } from '@atlaskit/onboarding';
|
|
4
|
-
/**
|
|
5
|
-
* Wraps children with {@link SpotlightPulse} component.
|
|
6
|
-
*
|
|
7
|
-
* It adds pulse effect to children if `pulse` is `true`.
|
|
8
|
-
*
|
|
9
|
-
* This custom component exists because the {@link SpotlightPulse} with `pulse={false}` renders extra `div` around `children`.
|
|
10
|
-
* We want to keep `children` as it is if there is no `pulse`.
|
|
11
|
-
*/
|
|
12
|
-
export function Pulse({
|
|
13
|
-
pulse,
|
|
14
|
-
radius = 3,
|
|
15
|
-
children
|
|
16
|
-
}) {
|
|
17
|
-
if (pulse) {
|
|
18
|
-
return (
|
|
19
|
-
/*#__PURE__*/
|
|
20
|
-
// SpotlightPulse shows pulse effect if `pulse` is `undefined`.
|
|
21
|
-
// That's why we need to cast `pulse` to `false` if it's `undefined`.
|
|
22
|
-
React.createElement(SpotlightPulse, {
|
|
23
|
-
radius: radius,
|
|
24
|
-
pulse: pulse !== null && pulse !== void 0 ? pulse : false
|
|
25
|
-
}, children)
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, children);
|
|
29
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
// eslint-disable-next-line @atlaskit/design-system/use-spotlight-package
|
|
3
|
-
import { SpotlightPulse } from '@atlaskit/onboarding';
|
|
4
|
-
/**
|
|
5
|
-
* Wraps children with {@link SpotlightPulse} component.
|
|
6
|
-
*
|
|
7
|
-
* It adds pulse effect to children if `pulse` is `true`.
|
|
8
|
-
*
|
|
9
|
-
* This custom component exists because the {@link SpotlightPulse} with `pulse={false}` renders extra `div` around `children`.
|
|
10
|
-
* We want to keep `children` as it is if there is no `pulse`.
|
|
11
|
-
*/
|
|
12
|
-
export function Pulse(_ref) {
|
|
13
|
-
var pulse = _ref.pulse,
|
|
14
|
-
_ref$radius = _ref.radius,
|
|
15
|
-
radius = _ref$radius === void 0 ? 3 : _ref$radius,
|
|
16
|
-
children = _ref.children;
|
|
17
|
-
if (pulse) {
|
|
18
|
-
return (
|
|
19
|
-
/*#__PURE__*/
|
|
20
|
-
// SpotlightPulse shows pulse effect if `pulse` is `undefined`.
|
|
21
|
-
// That's why we need to cast `pulse` to `false` if it's `undefined`.
|
|
22
|
-
React.createElement(SpotlightPulse, {
|
|
23
|
-
radius: radius,
|
|
24
|
-
pulse: pulse !== null && pulse !== void 0 ? pulse : false
|
|
25
|
-
}, children)
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, children);
|
|
29
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ReactNode } from 'react';
|
|
3
|
-
interface Props {
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
/** If true, the component will have pulse onboarding effect around it. */
|
|
6
|
-
pulse?: boolean;
|
|
7
|
-
/** The radius of the pulse effect. */
|
|
8
|
-
radius?: number;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Wraps children with {@link SpotlightPulse} component.
|
|
12
|
-
*
|
|
13
|
-
* It adds pulse effect to children if `pulse` is `true`.
|
|
14
|
-
*
|
|
15
|
-
* This custom component exists because the {@link SpotlightPulse} with `pulse={false}` renders extra `div` around `children`.
|
|
16
|
-
* We want to keep `children` as it is if there is no `pulse`.
|
|
17
|
-
*/
|
|
18
|
-
export declare function Pulse({ pulse, radius, children }: Props): React.JSX.Element;
|
|
19
|
-
export {};
|