@atlaskit/editor-common 111.35.0 → 112.0.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 +31 -0
- package/dist/cjs/analytics/types/enums.js +2 -0
- package/dist/cjs/extensibility/ExtensionComponent.js +6 -5
- package/dist/cjs/extensions/UnknownMacroPlaceholder.compiled.css +28 -0
- package/dist/cjs/extensions/UnknownMacroPlaceholder.js +70 -0
- package/dist/cjs/extensions/extension-handlers.js +16 -0
- package/dist/cjs/extensions/messages.js +10 -0
- package/dist/cjs/hooks/index.js +1 -8
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ncs-step-metrics/index.js +1 -0
- package/dist/cjs/preset/core-plugin/index.js +4 -0
- package/dist/cjs/styles/shared/table.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/analytics/types/enums.js +2 -0
- package/dist/es2019/extensibility/ExtensionComponent.js +6 -5
- package/dist/es2019/extensions/UnknownMacroPlaceholder.compiled.css +28 -0
- package/dist/es2019/extensions/UnknownMacroPlaceholder.js +46 -0
- package/dist/es2019/extensions/extension-handlers.js +16 -0
- package/dist/es2019/extensions/messages.js +10 -0
- package/dist/es2019/hooks/index.js +1 -2
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ncs-step-metrics/index.js +1 -0
- package/dist/es2019/preset/core-plugin/index.js +4 -0
- package/dist/es2019/styles/shared/table.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/analytics/types/enums.js +2 -0
- package/dist/esm/extensibility/ExtensionComponent.js +6 -5
- package/dist/esm/extensions/UnknownMacroPlaceholder.compiled.css +28 -0
- package/dist/esm/extensions/UnknownMacroPlaceholder.js +61 -0
- package/dist/esm/extensions/extension-handlers.js +16 -0
- package/dist/esm/extensions/messages.js +10 -0
- package/dist/esm/hooks/index.js +1 -2
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ncs-step-metrics/index.js +1 -0
- package/dist/esm/preset/core-plugin/index.js +4 -0
- package/dist/esm/styles/shared/table.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/analytics/index.d.ts +1 -1
- package/dist/types/analytics/types/enums.d.ts +1 -0
- package/dist/types/analytics/types/events.d.ts +2 -2
- package/dist/types/analytics/types/paste-events.d.ts +6 -1
- package/dist/types/experiences/ExperienceCheckDomMutation.d.ts +2 -2
- package/dist/types/extensions/UnknownMacroPlaceholder.d.ts +7 -0
- package/dist/types/extensions/extension-handlers.d.ts +1 -0
- package/dist/types/extensions/messages.d.ts +10 -0
- package/dist/types/hooks/index.d.ts +0 -1
- package/dist/types-ts4.5/analytics/index.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/enums.d.ts +1 -0
- package/dist/types-ts4.5/analytics/types/events.d.ts +2 -2
- package/dist/types-ts4.5/analytics/types/paste-events.d.ts +6 -1
- package/dist/types-ts4.5/experiences/ExperienceCheckDomMutation.d.ts +2 -2
- package/dist/types-ts4.5/extensions/UnknownMacroPlaceholder.d.ts +7 -0
- package/dist/types-ts4.5/extensions/extension-handlers.d.ts +1 -0
- package/dist/types-ts4.5/extensions/messages.d.ts +10 -0
- package/dist/types-ts4.5/hooks/index.d.ts +0 -1
- package/package.json +7 -4
- package/dist/cjs/hooks/useSmartCardReloadAfterCache.js +0 -54
- package/dist/es2019/hooks/useSmartCardReloadAfterCache.js +0 -49
- package/dist/esm/hooks/useSmartCardReloadAfterCache.js +0 -49
- package/dist/types/hooks/useSmartCardReloadAfterCache.d.ts +0 -16
- package/dist/types-ts4.5/hooks/useSmartCardReloadAfterCache.d.ts +0 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 112.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`0fda7892b26bc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0fda7892b26bc) -
|
|
8
|
+
[ux] Remove useSmartCardReloadAfterCache hook
|
|
9
|
+
|
|
10
|
+
### Minor Changes
|
|
11
|
+
|
|
12
|
+
- [`71de71e52182e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/71de71e52182e) -
|
|
13
|
+
Remove @atlaskit/editor-plugin-ncs-metrics
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [`7091cae4a7f26`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7091cae4a7f26) -
|
|
18
|
+
EDITOR-5607 Add analytics for new editor paste menu
|
|
19
|
+
- [`71de71e52182e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/71de71e52182e) -
|
|
20
|
+
Add experiment platform_editor_remove_collab_step_metrics which removes step metrics writes to
|
|
21
|
+
local storage from collab edit plugin
|
|
22
|
+
- [`8240c1a7e1875`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8240c1a7e1875) -
|
|
23
|
+
In view mode allow replace document to override behaviour
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
|
|
26
|
+
## 111.35.1
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- [`db3c50fa8f5c3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/db3c50fa8f5c3) -
|
|
31
|
+
[ux] Display unknown macro body content when an extension fails to load in the editor, showing the
|
|
32
|
+
macro title, parameters, and body content instead of a generic error message.
|
|
33
|
+
|
|
3
34
|
## 111.35.0
|
|
4
35
|
|
|
5
36
|
### Minor Changes
|
|
@@ -182,6 +182,7 @@ var ACTION = exports.ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
182
182
|
ACTION["SELECT_ALL_ESCAPED"] = "selectAllEscaped";
|
|
183
183
|
ACTION["SORT_COLUMN"] = "sortedColumn";
|
|
184
184
|
ACTION["SORT_COLUMN_NOT_ALLOWED"] = "sortColumnNotAllowed";
|
|
185
|
+
// remove this enum when cleaning up platform_editor_remove_collab_step_metrics
|
|
185
186
|
ACTION["NCS_SESSION_STEP_METRICS"] = "ncsSessionStepMetrics";
|
|
186
187
|
ACTION["STEPS_TRACKED"] = "stepsTracked";
|
|
187
188
|
ACTION["ORGANIC_CHANGES_TRACKED"] = "organicChangesTracked";
|
|
@@ -366,6 +367,7 @@ var ACTION_SUBJECT = exports.ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJ
|
|
|
366
367
|
ACTION_SUBJECT["TOOLBAR_DROPDOWN_MENU_ITEM"] = "toolbarDropdownMenuItem";
|
|
367
368
|
ACTION_SUBJECT["BLOCK_MENU"] = "blockMenu";
|
|
368
369
|
ACTION_SUBJECT["BLOCK_MENU_ITEM"] = "blockMenuItem";
|
|
370
|
+
ACTION_SUBJECT["PASTE_ACTIONS_MENU"] = "pasteActionsMenu";
|
|
369
371
|
ACTION_SUBJECT["SYNCED_BLOCK"] = "syncedBlock";
|
|
370
372
|
return ACTION_SUBJECT;
|
|
371
373
|
}({});
|
|
@@ -20,6 +20,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
20
20
|
var _react = _interopRequireWildcard(require("react"));
|
|
21
21
|
var _memoizeOne = _interopRequireDefault(require("memoize-one"));
|
|
22
22
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
23
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
23
24
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
24
25
|
var _extensions = require("../extensions");
|
|
25
26
|
var _utils = require("../utils");
|
|
@@ -196,12 +197,12 @@ var ExtensionComponentInner = /*#__PURE__*/function (_Component) {
|
|
|
196
197
|
references: _this.props.references,
|
|
197
198
|
actions: actions
|
|
198
199
|
});
|
|
199
|
-
} else {
|
|
200
|
-
return /*#__PURE__*/_react.default.createElement(NodeRenderer, {
|
|
201
|
-
node: node,
|
|
202
|
-
references: _this.props.references
|
|
203
|
-
});
|
|
204
200
|
}
|
|
201
|
+
return /*#__PURE__*/_react.default.createElement(NodeRenderer, {
|
|
202
|
+
node: node,
|
|
203
|
+
references: _this.props.references,
|
|
204
|
+
showUnknownMacroPlaceholder: (0, _platformFeatureFlags.fg)('tinymce_display_unknown_macro_body_content')
|
|
205
|
+
});
|
|
205
206
|
}
|
|
206
207
|
}
|
|
207
208
|
return result;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
._11c81a4x{font:var(--ds-font-body-small,9pt)}
|
|
2
|
+
._11c8fhey{font:var(--ds-font-body,normal 400 14px/20px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
3
|
+
._19it7tl1{border:var(--_98ihdp)}
|
|
4
|
+
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
5
|
+
._2rko14xi{border-radius:var(--ds-radius-small,4px) var(--ds-radius-small,4px) 0 0}
|
|
6
|
+
._n7zl7tl1{border-bottom:var(--_98ihdp)}
|
|
7
|
+
._154i1n1a{top:-1px}
|
|
8
|
+
._18m915vq{overflow-y:hidden}
|
|
9
|
+
._18u0idpf{margin-left:0}
|
|
10
|
+
._19bvpxbi{padding-left:var(--ds-space-200,1pc)}
|
|
11
|
+
._19bvutpp{padding-left:var(--ds-space-150,9pt)}
|
|
12
|
+
._19pkidpf{margin-top:0}
|
|
13
|
+
._1nmz1hna{word-break:break-word}
|
|
14
|
+
._1reo15vq{overflow-x:hidden}
|
|
15
|
+
._2hwxidpf{margin-right:0}
|
|
16
|
+
._6z24egat{tab-size:4}
|
|
17
|
+
._bfhki8nm{background-color:var(--ds-background-neutral,#0515240f)}
|
|
18
|
+
._bfhkrnwa{background-color:var(--ds-surface-raised,#fffdf6)}
|
|
19
|
+
._bfhkvuon{background-color:var(--ds-surface,#fff)}
|
|
20
|
+
._ca0qu2gc{padding-top:var(--ds-space-100,8px)}
|
|
21
|
+
._ca0qutpp{padding-top:var(--ds-space-150,9pt)}
|
|
22
|
+
._kqswh2mm{position:relative}
|
|
23
|
+
._n3td1b66{padding-bottom:var(--ds-space-050,4px)}
|
|
24
|
+
._n3tdutpp{padding-bottom:var(--ds-space-150,9pt)}
|
|
25
|
+
._o5721jtm{white-space:pre-wrap}
|
|
26
|
+
._otyridpf{margin-bottom:0}
|
|
27
|
+
._u5f3pxbi{padding-right:var(--ds-space-200,1pc)}
|
|
28
|
+
._u5f3utpp{padding-right:var(--ds-space-150,9pt)}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/* UnknownMacroPlaceholder.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports.UnknownMacroPlaceholder = UnknownMacroPlaceholder;
|
|
10
|
+
require("./UnknownMacroPlaceholder.compiled.css");
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _runtime = require("@compiled/react/runtime");
|
|
13
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
14
|
+
var _reactIntlNext = require("react-intl-next");
|
|
15
|
+
var _messages = require("./messages");
|
|
16
|
+
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); }
|
|
17
|
+
// Unknown macro placeholder styling aligned with Legacy Content Macro (LCM) for consistent look
|
|
18
|
+
var neutralBorder = "var(--ds-background-neutral, #0515240F)";
|
|
19
|
+
var unknownMacroContainerStyles = null;
|
|
20
|
+
|
|
21
|
+
// Match LCM header exactly: lcmHeaderStyles from LegacyContentHeader/index.tsx
|
|
22
|
+
var unknownMacroHeaderStyles = null;
|
|
23
|
+
|
|
24
|
+
// Match LCM content area: white surface, text color inherits
|
|
25
|
+
var unknownMacroBodyStyles = null;
|
|
26
|
+
var unknownMacroPreStyles = null;
|
|
27
|
+
function UnknownMacroPlaceholder(_ref) {
|
|
28
|
+
var _extensionNode$parame, _extensionNode$parame2, _extensionNode$parame3, _extensionNode$parame4;
|
|
29
|
+
var extensionNode = _ref.extensionNode;
|
|
30
|
+
var intl = (0, _reactIntlNext.useIntl)();
|
|
31
|
+
var macroTitle = ((_extensionNode$parame = extensionNode.parameters) === null || _extensionNode$parame === void 0 || (_extensionNode$parame = _extensionNode$parame.macroMetadata) === null || _extensionNode$parame === void 0 ? void 0 : _extensionNode$parame.title) || extensionNode.extensionKey;
|
|
32
|
+
var bodyContent = (_extensionNode$parame2 = extensionNode.parameters) === null || _extensionNode$parame2 === void 0 || (_extensionNode$parame2 = _extensionNode$parame2.macroParams) === null || _extensionNode$parame2 === void 0 || (_extensionNode$parame2 = _extensionNode$parame2.__bodyContent) === null || _extensionNode$parame2 === void 0 ? void 0 : _extensionNode$parame2.value;
|
|
33
|
+
var macroParams = (_extensionNode$parame3 = (_extensionNode$parame4 = extensionNode.parameters) === null || _extensionNode$parame4 === void 0 ? void 0 : _extensionNode$parame4.macroParams) !== null && _extensionNode$parame3 !== void 0 ? _extensionNode$parame3 : {};
|
|
34
|
+
var formatParam = function formatParam(key, param) {
|
|
35
|
+
var _param$value;
|
|
36
|
+
var value = String((_param$value = param === null || param === void 0 ? void 0 : param.value) !== null && _param$value !== void 0 ? _param$value : '').trim();
|
|
37
|
+
return "".concat(key, " = ").concat(value);
|
|
38
|
+
};
|
|
39
|
+
var visibleParams = Object.entries(macroParams).filter(function (_ref2) {
|
|
40
|
+
var _ref3 = (0, _slicedToArray2.default)(_ref2, 1),
|
|
41
|
+
key = _ref3[0];
|
|
42
|
+
return !key.startsWith('_');
|
|
43
|
+
}).map(function (_ref4) {
|
|
44
|
+
var _ref5 = (0, _slicedToArray2.default)(_ref4, 2),
|
|
45
|
+
key = _ref5[0],
|
|
46
|
+
param = _ref5[1];
|
|
47
|
+
return formatParam(key, param);
|
|
48
|
+
}).join(' | ');
|
|
49
|
+
var headerText = visibleParams ? "".concat(intl.formatMessage(_messages.messages.unknownMacroHeader, {
|
|
50
|
+
macroTitle: macroTitle
|
|
51
|
+
}), " | ").concat(visibleParams) : intl.formatMessage(_messages.messages.unknownMacroHeader, {
|
|
52
|
+
macroTitle: macroTitle
|
|
53
|
+
});
|
|
54
|
+
return /*#__PURE__*/React.createElement("section", {
|
|
55
|
+
"aria-label": intl.formatMessage(_messages.messages.unknownMacroPlaceholderAriaLabel),
|
|
56
|
+
className: (0, _runtime.ax)(["_19it7tl1 _2rko12b0 _1reo15vq _18m915vq _bfhkrnwa"]),
|
|
57
|
+
style: {
|
|
58
|
+
"--_98ihdp": (0, _runtime.ix)("1px solid ".concat(neutralBorder))
|
|
59
|
+
}
|
|
60
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
61
|
+
className: (0, _runtime.ax)(["_2rko14xi _11c81a4x _n7zl7tl1 _bfhki8nm _ca0qu2gc _u5f3pxbi _n3td1b66 _19bvpxbi _kqswh2mm _154i1n1a"]),
|
|
62
|
+
style: {
|
|
63
|
+
"--_98ihdp": (0, _runtime.ix)("1px solid ".concat(neutralBorder))
|
|
64
|
+
}
|
|
65
|
+
}, headerText), /*#__PURE__*/React.createElement("div", {
|
|
66
|
+
className: (0, _runtime.ax)(["_19pkidpf _2hwxidpf _otyridpf _18u0idpf _bfhkvuon _ca0qutpp _u5f3utpp _n3tdutpp _19bvutpp"])
|
|
67
|
+
}, /*#__PURE__*/React.createElement("pre", {
|
|
68
|
+
className: (0, _runtime.ax)(["_19pkidpf _2hwxidpf _otyridpf _18u0idpf _11c8fhey _o5721jtm _1nmz1hna _6z24egat"])
|
|
69
|
+
}, bodyContent)));
|
|
70
|
+
}
|
|
@@ -15,8 +15,10 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
15
15
|
var _react = _interopRequireDefault(require("react"));
|
|
16
16
|
var _reactIntlNext = require("react-intl-next");
|
|
17
17
|
var _reactLoadable = _interopRequireDefault(require("react-loadable"));
|
|
18
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
19
|
var _manifestHelpers = require("./manifest-helpers");
|
|
19
20
|
var _messages = require("./messages");
|
|
21
|
+
var _UnknownMacroPlaceholder = require("./UnknownMacroPlaceholder");
|
|
20
22
|
function getNodeFromManifest(
|
|
21
23
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22
24
|
manifest, extKey, nodeKey, extensionType, extensionKey) {
|
|
@@ -111,11 +113,21 @@ function _getExtensionModuleNodePrivateProps() {
|
|
|
111
113
|
}));
|
|
112
114
|
return _getExtensionModuleNodePrivateProps.apply(this, arguments);
|
|
113
115
|
}
|
|
116
|
+
function isUnknownConfluenceMacroWithBody(extensionNode) {
|
|
117
|
+
var _extensionNode$parame;
|
|
118
|
+
return extensionNode !== null && extensionNode.type === 'extension' && extensionNode.extensionType === 'com.atlassian.confluence.macro.core' && !!((_extensionNode$parame = extensionNode.parameters) !== null && _extensionNode$parame !== void 0 && (_extensionNode$parame = _extensionNode$parame.macroParams) !== null && _extensionNode$parame !== void 0 && (_extensionNode$parame = _extensionNode$parame.__bodyContent) !== null && _extensionNode$parame !== void 0 && _extensionNode$parame.value);
|
|
119
|
+
}
|
|
114
120
|
function ExtensionLoading(props) {
|
|
115
121
|
var intl = (0, _reactIntlNext.useIntl)();
|
|
122
|
+
var extensionNode = props.node;
|
|
116
123
|
if (props.error || props.timedOut) {
|
|
117
124
|
// eslint-disable-next-line no-console
|
|
118
125
|
console.error('Error rendering extension', props.error);
|
|
126
|
+
if (props.error && props.showUnknownMacroPlaceholder && extensionNode && isUnknownConfluenceMacroWithBody(extensionNode) && (0, _platformFeatureFlags.fg)('tinymce_display_unknown_macro_body_content')) {
|
|
127
|
+
return /*#__PURE__*/_react.default.createElement(_UnknownMacroPlaceholder.UnknownMacroPlaceholder, {
|
|
128
|
+
extensionNode: extensionNode
|
|
129
|
+
});
|
|
130
|
+
}
|
|
119
131
|
return /*#__PURE__*/_react.default.createElement("div", null, intl.formatMessage(_messages.messages.extensionLoadingError));
|
|
120
132
|
} else {
|
|
121
133
|
return null;
|
|
@@ -139,6 +151,10 @@ function getNodeRenderer(extensionProvider, extensionType, extensionKey) {
|
|
|
139
151
|
(0, _manifestHelpers.resolveImportSync)(preloaded) : (0, _manifestHelpers.resolveImport)(maybePromise.render());
|
|
140
152
|
}
|
|
141
153
|
},
|
|
154
|
+
// react-loadable passes all props from <NodeRenderer> to the loading component at runtime,
|
|
155
|
+
// but its TypeScript types only expect LoadingComponentProps. We cast here because
|
|
156
|
+
// ExtensionLoading accepts additional props (node, showUnknownMacroPlaceholder) that
|
|
157
|
+
// react-loadable will pass through but doesn't know about in its type definitions.
|
|
142
158
|
loading: ExtensionLoading
|
|
143
159
|
});
|
|
144
160
|
}
|
|
@@ -50,6 +50,16 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
|
50
50
|
id: 'fabric.editor.extension.loading-error',
|
|
51
51
|
defaultMessage: 'Error loading the extension!',
|
|
52
52
|
description: 'Error message displayed when an extension fails to load in the editor. Indicates a problem occurred during the extension initialization or rendering process.'
|
|
53
|
+
},
|
|
54
|
+
unknownMacroPlaceholderAriaLabel: {
|
|
55
|
+
id: 'fabric.editor.extension.unknownMacroPlaceholderAriaLabel',
|
|
56
|
+
defaultMessage: 'Unknown macro placeholder',
|
|
57
|
+
description: 'Accessible label for the unknown macro fallback block shown when a Confluence macro cannot be resolved.'
|
|
58
|
+
},
|
|
59
|
+
unknownMacroHeader: {
|
|
60
|
+
id: 'fabric.editor.extension.unknownMacroHeader',
|
|
61
|
+
defaultMessage: "Unknown macro: ''{macroTitle}''",
|
|
62
|
+
description: 'Header text for an unresolved Confluence macro placeholder.'
|
|
53
63
|
}
|
|
54
64
|
});
|
|
55
65
|
var configPanelMessages = exports.configPanelMessages = (0, _reactIntlNext.defineMessages)({
|
package/dist/cjs/hooks/index.js
CHANGED
|
@@ -28,14 +28,7 @@ Object.defineProperty(exports, "useSharedPluginStateWithSelector", {
|
|
|
28
28
|
return _useSharedPluginStateWithSelector.useSharedPluginStateWithSelector;
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
|
-
Object.defineProperty(exports, "useSmartCardReloadAfterCache", {
|
|
32
|
-
enumerable: true,
|
|
33
|
-
get: function get() {
|
|
34
|
-
return _useSmartCardReloadAfterCache.default;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
31
|
var _usePreviousState = _interopRequireDefault(require("./usePreviousState"));
|
|
38
32
|
var _useConstructor = _interopRequireDefault(require("./useConstructor"));
|
|
39
33
|
var _useSharedPluginState = require("./useSharedPluginState");
|
|
40
|
-
var _useSharedPluginStateWithSelector = require("./useSharedPluginStateWithSelector");
|
|
41
|
-
var _useSmartCardReloadAfterCache = _interopRequireDefault(require("./useSmartCardReloadAfterCache"));
|
|
34
|
+
var _useSharedPluginStateWithSelector = require("./useSharedPluginStateWithSelector");
|
|
@@ -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 = "111.35.1";
|
|
23
23
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
24
24
|
// Remove URL as it has UGC
|
|
25
25
|
// Ignored via go/ees007
|
|
@@ -7,6 +7,7 @@ exports.NCS_STORAGE = void 0;
|
|
|
7
7
|
// Disable no-re-export rule for entry point files
|
|
8
8
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
9
9
|
var NCS_STORAGE = exports.NCS_STORAGE = /*#__PURE__*/function (NCS_STORAGE) {
|
|
10
|
+
// remove step metrics keys when cleaning up platform_editor_remove_collab_step_metrics
|
|
10
11
|
NCS_STORAGE["NCS_STORAGE_CLIENT_KEY"] = "ncs-session-step-metrics-storage";
|
|
11
12
|
NCS_STORAGE["NCS_SESSION_STEP_METRICS"] = "ncsSessionStepMetrics";
|
|
12
13
|
NCS_STORAGE["NCS_ACTIVE_SESSIONS"] = "ncsActiveSessions";
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.corePlugin = void 0;
|
|
7
7
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
8
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
8
9
|
var _nodeAnchorProvider = require("../../node-anchor/node-anchor-provider");
|
|
9
10
|
var _processRawValue = require("../../utils/processRawValue");
|
|
10
11
|
var _editorCommands = require("../editor-commands");
|
|
@@ -101,6 +102,9 @@ var corePlugin = exports.corePlugin = function corePlugin(_ref) {
|
|
|
101
102
|
if (content) {
|
|
102
103
|
var _options$scrollIntoVi2;
|
|
103
104
|
var tr = state.tr.replaceWith(0, state.doc.nodeSize - 2, content);
|
|
105
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_are_nodes_equal_ignore_mark_order', 'isEnabled', true)) {
|
|
106
|
+
tr.setMeta('replaceDocument', true);
|
|
107
|
+
}
|
|
104
108
|
if ((options === null || options === void 0 ? void 0 : options.addToHistory) === false) {
|
|
105
109
|
tr.setMeta('addToHistory', false);
|
|
106
110
|
}
|
|
@@ -64,7 +64,7 @@ var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
|
|
|
64
64
|
var tableSharedStyle = exports.tableSharedStyle = function tableSharedStyle() {
|
|
65
65
|
var browser = (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) ? (0, _browser.getBrowserInfo)() : _browser.browser;
|
|
66
66
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Appears safe to auto-fix, but leaving it up to the team to remediate as the readability only gets worse with autofixing
|
|
67
|
-
return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t\t", "\n\t\t.", " {\n\t\t\tposition: relative;\n\t\t\tmargin: 0 auto ", ";\n\t\t\tbox-sizing: border-box;\n\n\t\t\t/**\n * Fix block top alignment inside table cells.\n */\n\t\t\t.decisionItemView-content-wrap:first-of-type > div {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t\t.", ",\n\t\t\t\t.", " {\n\t\t\t\tdisplay: block;\n\t\t\t\twidth: 1px;\n\t\t\t\theight: calc(100% - ", ");\n\t\t\t\tbackground: ", ";\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: ", ";\n\t\t\t}\n\t\t\t.", " {\n\t\t\t\tright: 0;\n\t\t\t}\n\t\t\t.", " {\n\t\t\t\tleft: 0;\n\t\t\t}\n\t\t\t.", "[data-with-numbered-table='true'] {\n\t\t\t\tleft: ", "px;\n\t\t\t}\n\t\t}\n\t\t.", "[data-number-column='true'] {\n\t\t\tpadding-left: ", "px;\n\t\t\tclear: both;\n\t\t}\n\n\t\t.", " {\n\t\t\twill-change: width, margin-left;\n\t\t}\n\n\t\t.", " table {\n\t\t\twill-change: width;\n\t\t}\n\n\t\t.", " > table {\n\t\t\tmargin: ", " 0 0 0;\n\t\t}\n\n\t\t.", " > table,\n\t\t.", " > table {\n\t\t\tmargin: ", " ", " 0 0;\n\t\t}\n\n\t\t/* support panel nested in table */\n\t\t", "\n\
|
|
67
|
+
return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t\t", "\n\t\t.", " {\n\t\t\tposition: relative;\n\t\t\tmargin: 0 auto ", ";\n\t\t\tbox-sizing: border-box;\n\n\t\t\t/**\n * Fix block top alignment inside table cells.\n */\n\t\t\t.decisionItemView-content-wrap:first-of-type > div {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t\t.", ",\n\t\t\t\t.", " {\n\t\t\t\tdisplay: block;\n\t\t\t\twidth: 1px;\n\t\t\t\theight: calc(100% - ", ");\n\t\t\t\tbackground: ", ";\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: ", ";\n\t\t\t}\n\t\t\t.", " {\n\t\t\t\tright: 0;\n\t\t\t}\n\t\t\t.", " {\n\t\t\t\tleft: 0;\n\t\t\t}\n\t\t\t.", "[data-with-numbered-table='true'] {\n\t\t\t\tleft: ", "px;\n\t\t\t}\n\t\t}\n\t\t.", "[data-number-column='true'] {\n\t\t\tpadding-left: ", "px;\n\t\t\tclear: both;\n\t\t}\n\n\t\t.", " {\n\t\t\twill-change: width, margin-left;\n\t\t}\n\n\t\t.", " table {\n\t\t\twill-change: width;\n\t\t}\n\n\t\t.", " > table {\n\t\t\tmargin: ", " 0 0 0;\n\t\t}\n\n\t\t.", " > table,\n\t\t.", " > table {\n\t\t\tmargin: ", " ", " 0 0;\n\t\t}\n\n\t\t/* support panel nested in table */\n\t\t", "\n\n\t\t/* avoid applying styles to nested tables (possible via extensions) */\n\t.", " > table,\n\t.", " > table,\n\t.", " > table {\n\t\t\tborder-collapse: collapse;\n\t\t\tborder: ", "px solid\n\t\t\t\t", ";\n\t\t\tborder-left-color: transparent;\n\t\t\tborder-right-color: transparent;\n\t\t\ttable-layout: fixed;\n\t\t\tfont-size: 1em;\n\t\t\twidth: 100%;\n\n\t\t\t&[data-autosize='true'] {\n\t\t\t\ttable-layout: auto;\n\t\t\t}\n\n\t\t\t& {\n\t\t\t\t* {\n\t\t\t\t\tbox-sizing: border-box;\n\t\t\t\t}\n\t\t\t\thr {\n\t\t\t\t\tbox-sizing: content-box;\n\t\t\t\t}\n\n\t\t\t\ttbody {\n\t\t\t\t\tborder-bottom: none;\n\t\t\t\t}\n\t\t\t\tth td {\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t}\n\n\t\t\t\t> tbody > tr > th,\n\t\t\t\t> tbody > tr > td {\n\t\t\t\t\tmin-width: ", "px;\n\t\t\t\t\tfont-weight: ", ";\n\t\t\t\t\tvertical-align: top;\n\t\t\t\t\tborder: 1px solid ", ";\n\t\t\t\t\tborder-right-width: 0;\n\t\t\t\t\tborder-bottom-width: 0;\n\n\t\t\t\t\tpadding: ", ";\n\t\t\t\t\t/* https://stackoverflow.com/questions/7517127/borders-not-shown-in-firefox-with-border-collapse-on-table-position-relative-o */\n\t\t\t\t\t", "\n\n\t\t\t\t\t", "\n\n\t\t\t\tth p:not(:first-of-type),\n\t\t\t\ttd p:not(:first-of-type) {\n\t\t\t\t\t\tmargin-top: ", ";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* Ensures nested tables are compatible with parent table background color - uses specificity to ensure tables nested by extensions are not affected */\n\t\t\t\t> tbody > tr > td {\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t}\n\n\t\t\t\tth {\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\ttext-align: left;\n\n\t\t\t\t\t/* only apply this styling to codeblocks in default background headercells */\n\t\t\t\t\t/* TODO this needs to be overhauled as it relies on unsafe selectors */\n\t\t\t\t\t", " {\n\t\t\t\t\t\t.", ":not(.danger) {\n\t\t\t\t\t\t\tbackground-color: ", ";\n\n\t\t\t\t\t\t\t:not(.", ") {\n\t\t\t\t\t\t\t\tbox-shadow: 0px 0px 0px 1px ", ";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\t\tbackground-image: ", ";\n\n\t\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/* this is only relevant to the element taken care of by renderer */\n\t\t\t\t\t\t\t> [data-ds--code--code-block] {\n\t\t\t\t\t\t\t\tbackground-image: ", "!important;\n\n\t\t\t\t\t\t\t\tbackground-color: ", "!important;\n\n\t\t\t\t\t\t\t\t/* selector lives inside @atlaskit/code */\n\t\t\t\t\t\t\t\t--ds--code--line-number-bg-color: ", ";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t"])), (0, _tableCell.tableCellBackgroundStyleOverride)(), TableSharedCssClassName.TABLE_CONTAINER, "var(--ds-space-200, 16px)", TableSharedCssClassName.TABLE_RIGHT_BORDER, TableSharedCssClassName.TABLE_LEFT_BORDER, "var(--ds-space-300, 24px)", "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")"), "var(--ds-space-300, 24px)", TableSharedCssClassName.TABLE_RIGHT_BORDER, TableSharedCssClassName.TABLE_LEFT_BORDER, TableSharedCssClassName.TABLE_LEFT_BORDER, _editorSharedStyles.akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_CONTAINER, _editorSharedStyles.akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, "var(--ds-space-300, 24px)", TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", (0, _platformFeatureFlags.fg)('platform_editor_bordered_panel_nested_in_table') ? ".".concat(TableSharedCssClassName.TABLE_NODE_WRAPPER, " .ak-editor-panel {\n\t\t\tborder: ", "var(--ds-border-width, 1px)", " solid ", "var(--ds-border, #d9dbea)", ";\n\t\t}") : '', TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableCellBorderWidth, "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")"), "var(--ds-background-neutral-subtle, white)", tableCellMinWidth, "var(--ds-font-weight-regular, 400)", "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")"), "var(--ds-space-100, 8px)", browser.gecko || browser.ie || browser.mac && browser.chrome ? 'background-clip: padding-box;' : '', firstNodeWithNotMarginTop(), "var(--ds-space-150, 12px)", "var(--ds-surface, #FFFFFF)", "var(--ds-background-accent-gray-subtlest, ".concat(_editorSharedStyles.akEditorTableToolbar, ")"), (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? '&:not(.danger)' : '&:not([style]):not(.danger)', _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, "var(--ds-surface-raised, rgb(235, 237, 240))", _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-border, transparent)", _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, (0, _editorSharedStyles.overflowShadow)({
|
|
68
68
|
leftCoverWidth: "var(--ds-space-300, 24px)"
|
|
69
69
|
}), "var(--ds-background-neutral, rgb(235, 237, 240))", _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-neutral, rgb(226, 229, 233))", (0, _editorSharedStyles.overflowShadow)({
|
|
70
70
|
leftCoverWidth: "var(--ds-space-300, 24px)"
|
|
@@ -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 = "111.35.1";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -176,6 +176,7 @@ export let ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
176
176
|
ACTION["SELECT_ALL_ESCAPED"] = "selectAllEscaped";
|
|
177
177
|
ACTION["SORT_COLUMN"] = "sortedColumn";
|
|
178
178
|
ACTION["SORT_COLUMN_NOT_ALLOWED"] = "sortColumnNotAllowed";
|
|
179
|
+
// remove this enum when cleaning up platform_editor_remove_collab_step_metrics
|
|
179
180
|
ACTION["NCS_SESSION_STEP_METRICS"] = "ncsSessionStepMetrics";
|
|
180
181
|
ACTION["STEPS_TRACKED"] = "stepsTracked";
|
|
181
182
|
ACTION["ORGANIC_CHANGES_TRACKED"] = "organicChangesTracked";
|
|
@@ -360,6 +361,7 @@ export let ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJECT) {
|
|
|
360
361
|
ACTION_SUBJECT["TOOLBAR_DROPDOWN_MENU_ITEM"] = "toolbarDropdownMenuItem";
|
|
361
362
|
ACTION_SUBJECT["BLOCK_MENU"] = "blockMenu";
|
|
362
363
|
ACTION_SUBJECT["BLOCK_MENU_ITEM"] = "blockMenuItem";
|
|
364
|
+
ACTION_SUBJECT["PASTE_ACTIONS_MENU"] = "pasteActionsMenu";
|
|
363
365
|
ACTION_SUBJECT["SYNCED_BLOCK"] = "syncedBlock";
|
|
364
366
|
return ACTION_SUBJECT;
|
|
365
367
|
}({});
|
|
@@ -4,6 +4,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
4
4
|
import React, { Component, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
5
5
|
import memoizeOne from 'memoize-one';
|
|
6
6
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
8
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
9
|
import { getExtensionModuleNodePrivateProps, getNodeRenderer } from '../extensions';
|
|
9
10
|
import { getExtensionRenderer, nodeToJSON, toJSON } from '../utils';
|
|
@@ -152,12 +153,12 @@ class ExtensionComponentInner extends Component {
|
|
|
152
153
|
references: this.props.references,
|
|
153
154
|
actions: actions
|
|
154
155
|
});
|
|
155
|
-
} else {
|
|
156
|
-
return /*#__PURE__*/React.createElement(NodeRenderer, {
|
|
157
|
-
node: node,
|
|
158
|
-
references: this.props.references
|
|
159
|
-
});
|
|
160
156
|
}
|
|
157
|
+
return /*#__PURE__*/React.createElement(NodeRenderer, {
|
|
158
|
+
node: node,
|
|
159
|
+
references: this.props.references,
|
|
160
|
+
showUnknownMacroPlaceholder: fg('tinymce_display_unknown_macro_body_content')
|
|
161
|
+
});
|
|
161
162
|
}
|
|
162
163
|
}
|
|
163
164
|
return result;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
._11c81a4x{font:var(--ds-font-body-small,9pt)}
|
|
2
|
+
._11c8fhey{font:var(--ds-font-body,normal 400 14px/20px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
3
|
+
._19it1tra{border:1px solid var(--ds-background-neutral,#0515240f)}
|
|
4
|
+
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
5
|
+
._2rko14xi{border-radius:var(--ds-radius-small,4px) var(--ds-radius-small,4px) 0 0}
|
|
6
|
+
._n7zl1tra{border-bottom:1px solid var(--ds-background-neutral,#0515240f)}
|
|
7
|
+
._154i1n1a{top:-1px}
|
|
8
|
+
._18m915vq{overflow-y:hidden}
|
|
9
|
+
._18u0idpf{margin-left:0}
|
|
10
|
+
._19bvpxbi{padding-left:var(--ds-space-200,1pc)}
|
|
11
|
+
._19bvutpp{padding-left:var(--ds-space-150,9pt)}
|
|
12
|
+
._19pkidpf{margin-top:0}
|
|
13
|
+
._1nmz1hna{word-break:break-word}
|
|
14
|
+
._1reo15vq{overflow-x:hidden}
|
|
15
|
+
._2hwxidpf{margin-right:0}
|
|
16
|
+
._6z24egat{tab-size:4}
|
|
17
|
+
._bfhki8nm{background-color:var(--ds-background-neutral,#0515240f)}
|
|
18
|
+
._bfhkrnwa{background-color:var(--ds-surface-raised,#fffdf6)}
|
|
19
|
+
._bfhkvuon{background-color:var(--ds-surface,#fff)}
|
|
20
|
+
._ca0qu2gc{padding-top:var(--ds-space-100,8px)}
|
|
21
|
+
._ca0qutpp{padding-top:var(--ds-space-150,9pt)}
|
|
22
|
+
._kqswh2mm{position:relative}
|
|
23
|
+
._n3td1b66{padding-bottom:var(--ds-space-050,4px)}
|
|
24
|
+
._n3tdutpp{padding-bottom:var(--ds-space-150,9pt)}
|
|
25
|
+
._o5721jtm{white-space:pre-wrap}
|
|
26
|
+
._otyridpf{margin-bottom:0}
|
|
27
|
+
._u5f3pxbi{padding-right:var(--ds-space-200,1pc)}
|
|
28
|
+
._u5f3utpp{padding-right:var(--ds-space-150,9pt)}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* UnknownMacroPlaceholder.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
import "./UnknownMacroPlaceholder.compiled.css";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
+
import { useIntl } from 'react-intl-next';
|
|
6
|
+
import { messages } from './messages';
|
|
7
|
+
// Unknown macro placeholder styling aligned with Legacy Content Macro (LCM) for consistent look
|
|
8
|
+
const neutralBorder = "var(--ds-background-neutral, #0515240F)";
|
|
9
|
+
const unknownMacroContainerStyles = null;
|
|
10
|
+
|
|
11
|
+
// Match LCM header exactly: lcmHeaderStyles from LegacyContentHeader/index.tsx
|
|
12
|
+
const unknownMacroHeaderStyles = null;
|
|
13
|
+
|
|
14
|
+
// Match LCM content area: white surface, text color inherits
|
|
15
|
+
const unknownMacroBodyStyles = null;
|
|
16
|
+
const unknownMacroPreStyles = null;
|
|
17
|
+
export function UnknownMacroPlaceholder({
|
|
18
|
+
extensionNode
|
|
19
|
+
}) {
|
|
20
|
+
var _extensionNode$parame, _extensionNode$parame2, _extensionNode$parame3, _extensionNode$parame4, _extensionNode$parame5, _extensionNode$parame6, _extensionNode$parame7;
|
|
21
|
+
const intl = useIntl();
|
|
22
|
+
const macroTitle = ((_extensionNode$parame = extensionNode.parameters) === null || _extensionNode$parame === void 0 ? void 0 : (_extensionNode$parame2 = _extensionNode$parame.macroMetadata) === null || _extensionNode$parame2 === void 0 ? void 0 : _extensionNode$parame2.title) || extensionNode.extensionKey;
|
|
23
|
+
const bodyContent = (_extensionNode$parame3 = extensionNode.parameters) === null || _extensionNode$parame3 === void 0 ? void 0 : (_extensionNode$parame4 = _extensionNode$parame3.macroParams) === null || _extensionNode$parame4 === void 0 ? void 0 : (_extensionNode$parame5 = _extensionNode$parame4.__bodyContent) === null || _extensionNode$parame5 === void 0 ? void 0 : _extensionNode$parame5.value;
|
|
24
|
+
const macroParams = (_extensionNode$parame6 = (_extensionNode$parame7 = extensionNode.parameters) === null || _extensionNode$parame7 === void 0 ? void 0 : _extensionNode$parame7.macroParams) !== null && _extensionNode$parame6 !== void 0 ? _extensionNode$parame6 : {};
|
|
25
|
+
const formatParam = (key, param) => {
|
|
26
|
+
var _param$value;
|
|
27
|
+
const value = String((_param$value = param === null || param === void 0 ? void 0 : param.value) !== null && _param$value !== void 0 ? _param$value : '').trim();
|
|
28
|
+
return `${key} = ${value}`;
|
|
29
|
+
};
|
|
30
|
+
const visibleParams = Object.entries(macroParams).filter(([key]) => !key.startsWith('_')).map(([key, param]) => formatParam(key, param)).join(' | ');
|
|
31
|
+
const headerText = visibleParams ? `${intl.formatMessage(messages.unknownMacroHeader, {
|
|
32
|
+
macroTitle
|
|
33
|
+
})} | ${visibleParams}` : intl.formatMessage(messages.unknownMacroHeader, {
|
|
34
|
+
macroTitle
|
|
35
|
+
});
|
|
36
|
+
return /*#__PURE__*/React.createElement("section", {
|
|
37
|
+
"aria-label": intl.formatMessage(messages.unknownMacroPlaceholderAriaLabel),
|
|
38
|
+
className: ax(["_19it1tra _2rko12b0 _1reo15vq _18m915vq _bfhkrnwa"])
|
|
39
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
40
|
+
className: ax(["_2rko14xi _11c81a4x _n7zl1tra _bfhki8nm _ca0qu2gc _u5f3pxbi _n3td1b66 _19bvpxbi _kqswh2mm _154i1n1a"])
|
|
41
|
+
}, headerText), /*#__PURE__*/React.createElement("div", {
|
|
42
|
+
className: ax(["_19pkidpf _2hwxidpf _otyridpf _18u0idpf _bfhkvuon _ca0qutpp _u5f3utpp _n3tdutpp _19bvutpp"])
|
|
43
|
+
}, /*#__PURE__*/React.createElement("pre", {
|
|
44
|
+
className: ax(["_19pkidpf _2hwxidpf _otyridpf _18u0idpf _11c8fhey _o5721jtm _1nmz1hna _6z24egat"])
|
|
45
|
+
}, bodyContent)));
|
|
46
|
+
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import Loadable from 'react-loadable';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
5
|
import { getExtensionKeyAndNodeKey, resolveImport, resolveImportSync } from './manifest-helpers';
|
|
5
6
|
import { messages } from './messages';
|
|
7
|
+
import { UnknownMacroPlaceholder } from './UnknownMacroPlaceholder';
|
|
6
8
|
function getNodeFromManifest(
|
|
7
9
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8
10
|
manifest, extKey, nodeKey, extensionType, extensionKey) {
|
|
@@ -52,11 +54,21 @@ export async function getExtensionModuleNodePrivateProps(extensionProvider, exte
|
|
|
52
54
|
return acc;
|
|
53
55
|
}, {});
|
|
54
56
|
}
|
|
57
|
+
function isUnknownConfluenceMacroWithBody(extensionNode) {
|
|
58
|
+
var _extensionNode$parame, _extensionNode$parame2, _extensionNode$parame3;
|
|
59
|
+
return extensionNode !== null && extensionNode.type === 'extension' && extensionNode.extensionType === 'com.atlassian.confluence.macro.core' && !!((_extensionNode$parame = extensionNode.parameters) !== null && _extensionNode$parame !== void 0 && (_extensionNode$parame2 = _extensionNode$parame.macroParams) !== null && _extensionNode$parame2 !== void 0 && (_extensionNode$parame3 = _extensionNode$parame2.__bodyContent) !== null && _extensionNode$parame3 !== void 0 && _extensionNode$parame3.value);
|
|
60
|
+
}
|
|
55
61
|
function ExtensionLoading(props) {
|
|
56
62
|
const intl = useIntl();
|
|
63
|
+
const extensionNode = props.node;
|
|
57
64
|
if (props.error || props.timedOut) {
|
|
58
65
|
// eslint-disable-next-line no-console
|
|
59
66
|
console.error('Error rendering extension', props.error);
|
|
67
|
+
if (props.error && props.showUnknownMacroPlaceholder && extensionNode && isUnknownConfluenceMacroWithBody(extensionNode) && fg('tinymce_display_unknown_macro_body_content')) {
|
|
68
|
+
return /*#__PURE__*/React.createElement(UnknownMacroPlaceholder, {
|
|
69
|
+
extensionNode: extensionNode
|
|
70
|
+
});
|
|
71
|
+
}
|
|
60
72
|
return /*#__PURE__*/React.createElement("div", null, intl.formatMessage(messages.extensionLoadingError));
|
|
61
73
|
} else {
|
|
62
74
|
return null;
|
|
@@ -78,6 +90,10 @@ export function getNodeRenderer(extensionProvider, extensionType, extensionKey)
|
|
|
78
90
|
resolveImportSync(preloaded) : resolveImport(maybePromise.render());
|
|
79
91
|
}
|
|
80
92
|
},
|
|
93
|
+
// react-loadable passes all props from <NodeRenderer> to the loading component at runtime,
|
|
94
|
+
// but its TypeScript types only expect LoadingComponentProps. We cast here because
|
|
95
|
+
// ExtensionLoading accepts additional props (node, showUnknownMacroPlaceholder) that
|
|
96
|
+
// react-loadable will pass through but doesn't know about in its type definitions.
|
|
81
97
|
loading: ExtensionLoading
|
|
82
98
|
});
|
|
83
99
|
}
|
|
@@ -44,6 +44,16 @@ export const messages = defineMessages({
|
|
|
44
44
|
id: 'fabric.editor.extension.loading-error',
|
|
45
45
|
defaultMessage: 'Error loading the extension!',
|
|
46
46
|
description: 'Error message displayed when an extension fails to load in the editor. Indicates a problem occurred during the extension initialization or rendering process.'
|
|
47
|
+
},
|
|
48
|
+
unknownMacroPlaceholderAriaLabel: {
|
|
49
|
+
id: 'fabric.editor.extension.unknownMacroPlaceholderAriaLabel',
|
|
50
|
+
defaultMessage: 'Unknown macro placeholder',
|
|
51
|
+
description: 'Accessible label for the unknown macro fallback block shown when a Confluence macro cannot be resolved.'
|
|
52
|
+
},
|
|
53
|
+
unknownMacroHeader: {
|
|
54
|
+
id: 'fabric.editor.extension.unknownMacroHeader',
|
|
55
|
+
defaultMessage: "Unknown macro: ''{macroTitle}''",
|
|
56
|
+
description: 'Header text for an unresolved Confluence macro placeholder.'
|
|
47
57
|
}
|
|
48
58
|
});
|
|
49
59
|
export const configPanelMessages = defineMessages({
|
|
@@ -4,5 +4,4 @@
|
|
|
4
4
|
export { default as usePreviousState } from './usePreviousState';
|
|
5
5
|
export { default as useConstructor } from './useConstructor';
|
|
6
6
|
export { useSharedPluginState } from './useSharedPluginState';
|
|
7
|
-
export { useSharedPluginStateWithSelector } from './useSharedPluginStateWithSelector';
|
|
8
|
-
export { default as useSmartCardReloadAfterCache } from './useSmartCardReloadAfterCache';
|
|
7
|
+
export { useSharedPluginStateWithSelector } from './useSharedPluginStateWithSelector';
|
|
@@ -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 = "111.35.1";
|
|
8
8
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
9
9
|
// Remove URL as it has UGC
|
|
10
10
|
// Ignored via go/ees007
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
3
3
|
|
|
4
4
|
export let NCS_STORAGE = /*#__PURE__*/function (NCS_STORAGE) {
|
|
5
|
+
// remove step metrics keys when cleaning up platform_editor_remove_collab_step_metrics
|
|
5
6
|
NCS_STORAGE["NCS_STORAGE_CLIENT_KEY"] = "ncs-session-step-metrics-storage";
|
|
6
7
|
NCS_STORAGE["NCS_SESSION_STEP_METRICS"] = "ncsSessionStepMetrics";
|
|
7
8
|
NCS_STORAGE["NCS_ACTIVE_SESSIONS"] = "ncsActiveSessions";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Node } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
2
3
|
import { getNodeIdProvider } from '../../node-anchor/node-anchor-provider';
|
|
3
4
|
import { processRawFragmentValue, processRawValue, processRawValueWithoutValidation } from '../../utils/processRawValue';
|
|
4
5
|
import { editorCommandToPMCommand } from '../editor-commands';
|
|
@@ -103,6 +104,9 @@ export const corePlugin = ({
|
|
|
103
104
|
if (content) {
|
|
104
105
|
var _options$scrollIntoVi2;
|
|
105
106
|
const tr = state.tr.replaceWith(0, state.doc.nodeSize - 2, content);
|
|
107
|
+
if (expValEquals('platform_editor_are_nodes_equal_ignore_mark_order', 'isEnabled', true)) {
|
|
108
|
+
tr.setMeta('replaceDocument', true);
|
|
109
|
+
}
|
|
106
110
|
if ((options === null || options === void 0 ? void 0 : options.addToHistory) === false) {
|
|
107
111
|
tr.setMeta('addToHistory', false);
|
|
108
112
|
}
|
|
@@ -133,7 +133,7 @@ const tableSharedStyle = () => {
|
|
|
133
133
|
${fg('platform_editor_bordered_panel_nested_in_table') ? `.${TableSharedCssClassName.TABLE_NODE_WRAPPER} .ak-editor-panel {
|
|
134
134
|
border: ${"var(--ds-border-width, 1px)"} solid ${"var(--ds-border, #d9dbea)"};
|
|
135
135
|
}` : ''}
|
|
136
|
-
|
|
136
|
+
|
|
137
137
|
/* avoid applying styles to nested tables (possible via extensions) */
|
|
138
138
|
.${TableSharedCssClassName.TABLE_CONTAINER} > table,
|
|
139
139
|
.${TableSharedCssClassName.TABLE_NODE_WRAPPER} > table,
|
|
@@ -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 = "111.35.1";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -176,6 +176,7 @@ export var ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
176
176
|
ACTION["SELECT_ALL_ESCAPED"] = "selectAllEscaped";
|
|
177
177
|
ACTION["SORT_COLUMN"] = "sortedColumn";
|
|
178
178
|
ACTION["SORT_COLUMN_NOT_ALLOWED"] = "sortColumnNotAllowed";
|
|
179
|
+
// remove this enum when cleaning up platform_editor_remove_collab_step_metrics
|
|
179
180
|
ACTION["NCS_SESSION_STEP_METRICS"] = "ncsSessionStepMetrics";
|
|
180
181
|
ACTION["STEPS_TRACKED"] = "stepsTracked";
|
|
181
182
|
ACTION["ORGANIC_CHANGES_TRACKED"] = "organicChangesTracked";
|
|
@@ -360,6 +361,7 @@ export var ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJECT) {
|
|
|
360
361
|
ACTION_SUBJECT["TOOLBAR_DROPDOWN_MENU_ITEM"] = "toolbarDropdownMenuItem";
|
|
361
362
|
ACTION_SUBJECT["BLOCK_MENU"] = "blockMenu";
|
|
362
363
|
ACTION_SUBJECT["BLOCK_MENU_ITEM"] = "blockMenuItem";
|
|
364
|
+
ACTION_SUBJECT["PASTE_ACTIONS_MENU"] = "pasteActionsMenu";
|
|
363
365
|
ACTION_SUBJECT["SYNCED_BLOCK"] = "syncedBlock";
|
|
364
366
|
return ACTION_SUBJECT;
|
|
365
367
|
}({});
|