@atlaskit/editor-common 107.23.2 → 107.24.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 +16 -0
- package/UNSAFE_do_not_use_editor_context/package.json +1 -1
- package/ai-messages/package.json +1 -1
- package/analytics/package.json +1 -1
- package/annotation/package.json +1 -1
- package/browser/package.json +1 -1
- package/card/package.json +1 -1
- package/clipboard/package.json +1 -1
- package/code-block/package.json +1 -1
- package/collab/package.json +1 -1
- package/commands/package.json +1 -1
- package/constants/package.json +1 -1
- package/copy-button/package.json +1 -1
- package/core-utils/package.json +1 -1
- package/count-nodes/package.json +1 -1
- package/dist/cjs/messages/annotation.js +7 -0
- package/dist/cjs/messages/card.js +5 -0
- package/dist/cjs/messages/media-insert.js +0 -5
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/styles/shared/smartCard.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/HoverLinkOverlay/index.js +21 -7
- package/dist/es2019/messages/annotation.js +7 -0
- package/dist/es2019/messages/card.js +5 -0
- package/dist/es2019/messages/media-insert.js +0 -5
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/styles/shared/smartCard.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/HoverLinkOverlay/index.js +22 -7
- package/dist/esm/messages/annotation.js +7 -0
- package/dist/esm/messages/card.js +5 -0
- package/dist/esm/messages/media-insert.js +0 -5
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/styles/shared/smartCard.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/HoverLinkOverlay/index.js +21 -7
- package/dist/types/messages/annotation.d.ts +5 -0
- package/dist/types/messages/card.d.ts +5 -0
- package/dist/types/messages/media-insert.d.ts +0 -5
- package/dist/types/ui/HoverLinkOverlay/index.d.ts +1 -1
- package/dist/types/ui/HoverLinkOverlay/types.d.ts +1 -0
- package/dist/types-ts4.5/messages/annotation.d.ts +5 -0
- package/dist/types-ts4.5/messages/card.d.ts +5 -0
- package/dist/types-ts4.5/messages/media-insert.d.ts +0 -5
- package/dist/types-ts4.5/ui/HoverLinkOverlay/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/HoverLinkOverlay/types.d.ts +1 -0
- package/doc-utils/package.json +1 -1
- package/editor-analytics/package.json +1 -1
- package/element-browser/package.json +1 -1
- package/emoji/package.json +1 -1
- package/error-boundary/package.json +1 -1
- package/error-reporter/package.json +1 -1
- package/event-dispatcher/package.json +1 -1
- package/expand/package.json +1 -1
- package/extensibility/package.json +1 -1
- package/extensions/package.json +1 -1
- package/floating-toolbar/package.json +1 -1
- package/get-dom-ref-from-selection/package.json +1 -1
- package/guideline/package.json +1 -1
- package/hooks/package.json +1 -1
- package/i18n/package.json +1 -1
- package/icons/package.json +1 -1
- package/indentation/package.json +1 -1
- package/insert/package.json +1 -1
- package/intl-error-boundary/package.json +1 -1
- package/is-performance-api-available/package.json +1 -1
- package/keymaps/package.json +1 -1
- package/lazy-node-view/package.json +1 -1
- package/legacy-rank-plugins/package.json +1 -1
- package/link/package.json +1 -1
- package/lists/package.json +1 -1
- package/mark/package.json +1 -1
- package/media/package.json +1 -1
- package/media-inline/package.json +1 -1
- package/media-single/package.json +1 -1
- package/median/package.json +1 -1
- package/mention/package.json +1 -1
- package/messages/package.json +1 -1
- package/monitoring/package.json +1 -1
- package/ncs-step-metrics/package.json +1 -1
- package/nesting/package.json +1 -1
- package/node-visibility/package.json +1 -1
- package/node-width/package.json +1 -1
- package/normalize-feature-flags/package.json +1 -1
- package/package.json +7 -4
- package/panel/package.json +1 -1
- package/paste/package.json +1 -1
- package/performance/measure-render/package.json +1 -1
- package/performance/measure-tti/package.json +1 -1
- package/performance/navigation/package.json +1 -1
- package/performance-measures/package.json +1 -1
- package/portal/package.json +1 -1
- package/preset/package.json +1 -1
- package/process-raw-value/package.json +1 -1
- package/prosemirror-dom-metadata/package.json +1 -1
- package/provider-factory/package.json +1 -1
- package/provider-helpers/package.json +1 -1
- package/quick-insert/package.json +1 -1
- package/react-node-view/package.json +1 -1
- package/resizer/package.json +1 -1
- package/safe-plugin/package.json +1 -1
- package/selection/package.json +1 -1
- package/selection-based-node-view/package.json +1 -1
- package/styles/package.json +1 -1
- package/table/package.json +1 -1
- package/toolbar/package.json +1 -1
- package/toolbar-flag-check/package.json +1 -1
- package/transforms/package.json +1 -1
- package/type-ahead/package.json +1 -1
- package/types/package.json +1 -1
- package/ugc-tokens/package.json +1 -1
- package/ui/package.json +1 -1
- package/ui-color/package.json +1 -1
- package/ui-menu/package.json +1 -1
- package/ui-react/package.json +1 -1
- package/use-component-render-tracking/package.json +1 -1
- package/use-plugin-state-effect/package.json +1 -1
- package/use-shared-plugin-state-selector/package.json +1 -1
- package/user-preferences/package.json +1 -1
- package/utils/analytics/package.json +1 -1
- package/utils/document/package.json +1 -1
- package/utils/package.json +1 -1
- package/validator/package.json +1 -1
- package/whitespace/package.json +1 -1
- package/with-plugin-state/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 107.24.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`5b6e41650fd59`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5b6e41650fd59) -
|
|
8
|
+
[ux] Introduce messages to be used in conjuction with the changes made in
|
|
9
|
+
@atlaskit/editor-plugin-annotation 3.3.2
|
|
10
|
+
|
|
11
|
+
## 107.23.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`598cea2432fa9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/598cea2432fa9) -
|
|
16
|
+
[ux] UI and behaviour updates of the HoverLinkOverlay for the Preview Panels.
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 107.23.2
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/ai-messages/package.json
CHANGED
package/analytics/package.json
CHANGED
package/annotation/package.json
CHANGED
package/browser/package.json
CHANGED
package/card/package.json
CHANGED
package/clipboard/package.json
CHANGED
package/code-block/package.json
CHANGED
package/collab/package.json
CHANGED
package/commands/package.json
CHANGED
package/constants/package.json
CHANGED
package/copy-button/package.json
CHANGED
package/core-utils/package.json
CHANGED
package/count-nodes/package.json
CHANGED
|
@@ -24,6 +24,13 @@ var annotationMessages = exports.annotationMessages = (0, _reactIntlNext.defineM
|
|
|
24
24
|
defaultMessage: 'You can only comment on text, headings, emojis, dates, mentions, links, and statuses.',
|
|
25
25
|
description: 'Error message to communicate to the user they can only do the current action in certain contexts'
|
|
26
26
|
},
|
|
27
|
+
// Duplicated by Confluence's
|
|
28
|
+
// highlight-actions.inline-comments.comment.no.permission
|
|
29
|
+
noPermissionToAddComment: {
|
|
30
|
+
id: 'fabric.editor.noPermissionToAddComment',
|
|
31
|
+
defaultMessage: '{contentType, select, blogpost {You do not have permission to add comments to this blogpost} page {You do not have permission to add comments to this page} other {You do not have permission to add comments to this page}}',
|
|
32
|
+
description: 'Tooltip for when the user does not have permission to add inline comments'
|
|
33
|
+
},
|
|
27
34
|
toolbar: {
|
|
28
35
|
id: 'fabric.editor.annotationToolbar',
|
|
29
36
|
defaultMessage: 'Annotation toolbar',
|
|
@@ -71,6 +71,11 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
|
71
71
|
defaultMessage: 'Panel',
|
|
72
72
|
description: 'Title for a button that opens side panel when clicked.'
|
|
73
73
|
},
|
|
74
|
+
previewButtonTitle: {
|
|
75
|
+
id: 'fabric.editor.previewButtonTitle',
|
|
76
|
+
defaultMessage: 'Preview',
|
|
77
|
+
description: 'Title for a button that when clicked opens a preview modal or a preview panel.'
|
|
78
|
+
},
|
|
74
79
|
embedTitle: {
|
|
75
80
|
id: 'fabric.editor.embedTitle',
|
|
76
81
|
defaultMessage: 'Embed',
|
|
@@ -21,11 +21,6 @@ var mediaInsertMessages = exports.mediaInsertMessages = (0, _reactIntlNext.defin
|
|
|
21
21
|
defaultMessage: 'Paste link to upload',
|
|
22
22
|
description: 'Placeholder text for the input field where a user can paste (as in copy-paste) a URL to upload a media file'
|
|
23
23
|
},
|
|
24
|
-
insertSmartValueHelperMessage: {
|
|
25
|
-
id: 'fabric.editor.media.insert.insertSmartValueHelperMessage',
|
|
26
|
-
defaultMessage: 'Tip: Enter a smart value or replace a URL path with a smart value to make content dynamic.',
|
|
27
|
-
description: 'Helper text for the input field where a user can paste (as in copy-paste) a URL or insert smart value in the url to upload a media file'
|
|
28
|
-
},
|
|
29
24
|
cancel: {
|
|
30
25
|
id: 'fabric.editor.media.insert.cancel',
|
|
31
26
|
defaultMessage: 'Cancel',
|
|
@@ -16,7 +16,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
16
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
17
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
18
18
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
19
|
-
var packageVersion = "107.23.
|
|
19
|
+
var packageVersion = "107.23.3";
|
|
20
20
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
21
21
|
// Remove URL as it has UGC
|
|
22
22
|
// Ignored via go/ees007
|
|
@@ -18,5 +18,5 @@ var FLOATING_TOOLBAR_LINKPICKER_CLASSNAME = exports.FLOATING_TOOLBAR_LINKPICKER_
|
|
|
18
18
|
|
|
19
19
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
20
20
|
var smartCardStyles = exports.smartCardStyles = function smartCardStyles() {
|
|
21
|
-
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.", " {\n\t\tmax-width: calc(100% - 20px);\n\t\tvertical-align: top;\n\t\tword-break: break-all;\n\t\t", "\n\t\t.card {\n\t\t\tpadding-left: ", ";\n\t\t\tpadding-right: ", ";\n\t\t\tpadding-top: 0.5em;\n\t\t\tpadding-bottom: 0.5em;\n\t\t\tmargin-bottom: -0.5em;\n\n\t\t\t.", " > a:focus {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t", "\n\n\t\t", "\n\t\t.", " > a {\n\t\t\t/* EDM-1717: box-shadow Safari fix start */\n\t\t\tz-index: 1;\n\t\t\tposition: relative;\n\t\t\t/* EDM-1717: box-shadow Safari fix end */\n\t\t}\n\n\t\t&.danger {\n\t\t\t.", " > a {\n\t\t\t\tbox-shadow: 0 0 0 1px ", ";\n\t\t\t\t/* EDM-1717: box-shadow Safari fix start */\n\t\t\t\tz-index: 2;\n\t\t\t\t/* EDM-1717: box-shadow Safari fix end */\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\t.", " > div {\n\t\t\tcursor: pointer;\n\n\t\t\ta {\n\t\t\t\tcursor: auto;\n\t\t\t}\n\t\t}\n\n\t\t&.", " .", " > div {\n\t\t\t", "\n\t\t\tborder-radius: ", ";\n\t\t}\n\n\t\t&.danger {\n\t\t\t.", " > div {\n\t\t\t\tbox-shadow: 0 0 0 1px ", " !important;\n\t\t\t}\n\t\t}\n\t}\n\n\t.", ".", " {\n\t\tmax-width: 100%;\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\n\t\t.", " {\n\t\t\tcursor: pointer;\n\t\t\tbackground-color: ", ";\n\t\t\tborder-radius: ", ";\n\t\t\tborder: 1px solid ", ";\n\t\t\toverflow: hidden;\n\t\t}\n\n\t\t&.", " {\n\t\t\t.", " {\n\t\t\t\t", "\n\n\t\t\t\tinput::selection {\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t}\n\t\t\t\tinput::-moz-selection {\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&.danger {\n\t\t\t.", " {\n\t\t\t\tbox-shadow: 0 0 0 1px ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\t.", " > div {\n\t\t\tcursor: pointer;\n\t\t\ta {\n\t\t\t\tcursor: auto;\n\t\t\t}\n\t\t\t&::after {\n\t\t\t\ttransition: box-shadow 0s;\n\t\t\t}\n\t\t}\n\n\t\t", "\n\n\t\t&.danger {\n\t\t\t.media-card-frame::after {\n\t\t\t\tbox-shadow: 0 0 0 1px ", " !important;\n\t\t\t\tbackground: ", " !important;\n\t\t\t}\n\t\t\t.richMedia-resize-handle-right::after,\n\t\t\t.richMedia-resize-handle-left::after {\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\tpadding: 0;\n\t}\n"])), _smartCard.SmartCardSharedCssClassName.INLINE_CARD_CONTAINER, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') ? ".card-with-comment {\n background: ".concat("var(--ds-background-accent-yellow-subtler, #F8E6A0)", ";\n border-bottom: 2px solid ", "var(--ds-border-accent-yellow, #B38600)", ";\n box-shadow: ", "var(--ds-shadow-overlay, 0px 8px 12px #091E4226, 0px 0px 1px #091E424f)", ";\n }") : '', "var(--ds-space-025, 2px)", "var(--ds-space-025, 2px)", _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? "[data-inlinecard-button-overlay='icon-wrapper-line-height'] span {\n\t\t\t\tline-height: 0;\n\t\t\t}" : '', (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_find_and_replace_improvements', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_editor_find_and_replace_improvements_1') ? "\n\t\t\t\t&.".concat(_editorSharedStyles.akEditorSelectedNodeClassName, ":not(.search-match-block) .").concat(_smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, " > a {\n\t\t\t\t").concat((0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), "\n\t\t\t}") : "\n\t\t\t\t&.".concat(_editorSharedStyles.akEditorSelectedNodeClassName, " .").concat(_smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, " > a {\n\t\t\t\t").concat((0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), "\n\t\t\t}"), _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _smartCard.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, _editorSharedStyles.akEditorSelectedNodeClassName, _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), "var(--ds-border-radius-200, 8px)", _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _smartCard.SmartCardSharedCssClassName.DATASOURCE_CONTAINER, _smartCard.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, DATASOURCE_INNER_CONTAINER_CLASSNAME, "var(--ds-background-neutral-subtle, #00000000)", "var(--ds-border-radius-200, 8px)", "var(--ds-border, #091E4224)", _editorSharedStyles.akEditorSelectedNodeClassName, DATASOURCE_INNER_CONTAINER_CLASSNAME, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), "var(--ds-background-selected-hovered, #CCE0FF)", "var(--ds-background-selected-hovered, #CCE0FF)", DATASOURCE_INNER_CONTAINER_CLASSNAME, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _smartCard.SmartCardSharedCssClassName.EMBED_CARD_CONTAINER, _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_find_and_replace_improvements', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_editor_find_and_replace_improvements_1') ? "\n\t\t\t\t&.".concat(_editorSharedStyles.akEditorSelectedNodeClassName, ":not(.search-match-block) .").concat(_smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, " > div::after {\n\t\t\t\t\t").concat((0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), "\n\t\t\t\t}\n\t\t\t") : "\n\t\t\t\t&.".concat(_editorSharedStyles.akEditorSelectedNodeClassName, " .").concat(_smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, " > div::after {\n\t\t\t\t\t").concat((0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), "\n\t\t\t\t}\n\t\t\t"), "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), FLOATING_TOOLBAR_LINKPICKER_CLASSNAME);
|
|
21
|
+
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.", " {\n\t\tmax-width: calc(100% - 20px);\n\t\tvertical-align: top;\n\t\tword-break: break-all;\n\t\t", "\n\t\t.card {\n\t\t\tpadding-left: ", ";\n\t\t\tpadding-right: ", ";\n\t\t\tpadding-top: 0.5em;\n\t\t\tpadding-bottom: 0.5em;\n\t\t\tmargin-bottom: -0.5em;\n\n\t\t\t.", " > a:focus {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t", "\n\n\t\t", "\n\t\t.", " > a {\n\t\t\t/* EDM-1717: box-shadow Safari fix start */\n\t\t\tz-index: 1;\n\t\t\tposition: relative;\n\t\t\t/* EDM-1717: box-shadow Safari fix end */\n\t\t}\n\n\t\t&.danger {\n\t\t\t.", " > a {\n\t\t\t\tbox-shadow: 0 0 0 1px ", ";\n\t\t\t\t/* EDM-1717: box-shadow Safari fix start */\n\t\t\t\tz-index: 2;\n\t\t\t\t/* EDM-1717: box-shadow Safari fix end */\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\t.", " > div {\n\t\t\tcursor: pointer;\n\n\t\t\ta {\n\t\t\t\tcursor: auto;\n\t\t\t}\n\t\t}\n\n\t\t&.", " .", " > div {\n\t\t\t", "\n\t\t\tborder-radius: ", ";\n\t\t}\n\n\t\t&.danger {\n\t\t\t.", " > div {\n\t\t\t\tbox-shadow: 0 0 0 1px ", " !important;\n\t\t\t}\n\t\t}\n\t}\n\n\t.", ".", " {\n\t\tmax-width: 100%;\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\n\t\t.", " {\n\t\t\tcursor: pointer;\n\t\t\tbackground-color: ", ";\n\t\t\tborder-radius: ", ";\n\t\t\tborder: 1px solid ", ";\n\t\t\toverflow: hidden;\n\t\t}\n\n\t\t&.", " {\n\t\t\t.", " {\n\t\t\t\t", "\n\n\t\t\t\tinput::selection {\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t}\n\t\t\t\tinput::-moz-selection {\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&.danger {\n\t\t\t.", " {\n\t\t\t\tbox-shadow: 0 0 0 1px ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\t.", " > div {\n\t\t\tcursor: pointer;\n\t\t\ta {\n\t\t\t\tcursor: auto;\n\t\t\t}\n\t\t\t&::after {\n\t\t\t\ttransition: box-shadow 0s;\n\t\t\t}\n\t\t}\n\n\t\t", "\n\n\t\t&.danger {\n\t\t\t.media-card-frame::after {\n\t\t\t\tbox-shadow: 0 0 0 1px ", " !important;\n\t\t\t\tbackground: ", " !important;\n\t\t\t}\n\t\t\t.richMedia-resize-handle-right::after,\n\t\t\t.richMedia-resize-handle-left::after {\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\tpadding: 0;\n\t}\n"])), _smartCard.SmartCardSharedCssClassName.INLINE_CARD_CONTAINER, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') ? ".card-with-comment {\n background: ".concat("var(--ds-background-accent-yellow-subtler, #F8E6A0)", ";\n border-bottom: 2px solid ", "var(--ds-border-accent-yellow, #B38600)", ";\n box-shadow: ", "var(--ds-shadow-overlay, 0px 8px 12px #091E4226, 0px 0px 1px #091E424f)", ";\n }") : '', "var(--ds-space-025, 2px)", "var(--ds-space-025, 2px)", _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') || (0, _platformFeatureFlags.fg)('platform_editor_preview_panel_linking') ? "[data-inlinecard-button-overlay='icon-wrapper-line-height'] span {\n\t\t\t\tline-height: 0;\n\t\t\t}" : '', (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_find_and_replace_improvements', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_editor_find_and_replace_improvements_1') ? "\n\t\t\t\t&.".concat(_editorSharedStyles.akEditorSelectedNodeClassName, ":not(.search-match-block) .").concat(_smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, " > a {\n\t\t\t\t").concat((0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), "\n\t\t\t}") : "\n\t\t\t\t&.".concat(_editorSharedStyles.akEditorSelectedNodeClassName, " .").concat(_smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, " > a {\n\t\t\t\t").concat((0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), "\n\t\t\t}"), _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _smartCard.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, _editorSharedStyles.akEditorSelectedNodeClassName, _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), "var(--ds-border-radius-200, 8px)", _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _smartCard.SmartCardSharedCssClassName.DATASOURCE_CONTAINER, _smartCard.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, DATASOURCE_INNER_CONTAINER_CLASSNAME, "var(--ds-background-neutral-subtle, #00000000)", "var(--ds-border-radius-200, 8px)", "var(--ds-border, #091E4224)", _editorSharedStyles.akEditorSelectedNodeClassName, DATASOURCE_INNER_CONTAINER_CLASSNAME, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), "var(--ds-background-selected-hovered, #CCE0FF)", "var(--ds-background-selected-hovered, #CCE0FF)", DATASOURCE_INNER_CONTAINER_CLASSNAME, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _smartCard.SmartCardSharedCssClassName.EMBED_CARD_CONTAINER, _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_find_and_replace_improvements', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_editor_find_and_replace_improvements_1') ? "\n\t\t\t\t&.".concat(_editorSharedStyles.akEditorSelectedNodeClassName, ":not(.search-match-block) .").concat(_smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, " > div::after {\n\t\t\t\t\t").concat((0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), "\n\t\t\t\t}\n\t\t\t") : "\n\t\t\t\t&.".concat(_editorSharedStyles.akEditorSelectedNodeClassName, " .").concat(_smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, " > div::after {\n\t\t\t\t\t").concat((0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), "\n\t\t\t\t}\n\t\t\t"), "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), FLOATING_TOOLBAR_LINKPICKER_CLASSNAME);
|
|
22
22
|
};
|
|
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
23
23
|
* @jsx jsx
|
|
24
24
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
25
25
|
var packageName = "@atlaskit/editor-common";
|
|
26
|
-
var packageVersion = "107.23.
|
|
26
|
+
var packageVersion = "107.23.3";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
// Ignored via go/ees005
|
|
@@ -11,8 +11,10 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
var _react2 = require("@emotion/react");
|
|
12
12
|
var _reactIntlNext = require("react-intl-next");
|
|
13
13
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
14
|
+
var _growDiagonal = _interopRequireDefault(require("@atlaskit/icon/core/grow-diagonal"));
|
|
14
15
|
var _linkExternal = _interopRequireDefault(require("@atlaskit/icon/core/link-external"));
|
|
15
16
|
var _panelRight = _interopRequireDefault(require("@atlaskit/icon/core/panel-right"));
|
|
17
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
18
|
var _primitives = require("@atlaskit/primitives");
|
|
17
19
|
var _analytics = require("../../analytics");
|
|
18
20
|
var _messages = require("../../messages");
|
|
@@ -98,10 +100,10 @@ var HoverLinkOverlay = function HoverLinkOverlay(_ref) {
|
|
|
98
100
|
view = _ref.view,
|
|
99
101
|
onClick = _ref.onClick,
|
|
100
102
|
_ref$showPanelButton = _ref.showPanelButton,
|
|
101
|
-
showPanelButton = _ref$showPanelButton === void 0 ? false : _ref$showPanelButton
|
|
103
|
+
showPanelButton = _ref$showPanelButton === void 0 ? false : _ref$showPanelButton,
|
|
104
|
+
showPanelButtonIcon = _ref.showPanelButtonIcon;
|
|
102
105
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
103
106
|
formatMessage = _useIntl.formatMessage;
|
|
104
|
-
var label = showPanelButton ? formatMessage(_messages.cardMessages.panelButtonTitle) : formatMessage(_messages.cardMessages.openButtonTitle);
|
|
105
107
|
var containerRef = (0, _react.useRef)(null);
|
|
106
108
|
var hoverLinkButtonRef = (0, _react.useRef)(null);
|
|
107
109
|
var hiddenTextRef = (0, _react.useRef)(null);
|
|
@@ -169,6 +171,22 @@ var HoverLinkOverlay = function HoverLinkOverlay(_ref) {
|
|
|
169
171
|
sendVisitLinkAnalytics(_analytics.INPUT_METHOD.BUTTON);
|
|
170
172
|
}
|
|
171
173
|
};
|
|
174
|
+
var isPreivewButton = showPanelButton && (0, _platformFeatureFlags.fg)('platform_editor_preview_panel_linking');
|
|
175
|
+
var label = isPreivewButton ? formatMessage(_messages.cardMessages.previewButtonTitle) : formatMessage(_messages.cardMessages.openButtonTitle);
|
|
176
|
+
var icon = null;
|
|
177
|
+
if (isPreivewButton && showPanelButtonIcon === 'panel') {
|
|
178
|
+
icon = (0, _react2.jsx)(_panelRight.default, {
|
|
179
|
+
label: ""
|
|
180
|
+
});
|
|
181
|
+
} else if (isPreivewButton && showPanelButtonIcon === 'modal') {
|
|
182
|
+
icon = (0, _react2.jsx)(_growDiagonal.default, {
|
|
183
|
+
label: ""
|
|
184
|
+
});
|
|
185
|
+
} else {
|
|
186
|
+
icon = (0, _react2.jsx)(_linkExternal.default, {
|
|
187
|
+
label: ""
|
|
188
|
+
});
|
|
189
|
+
}
|
|
172
190
|
return (
|
|
173
191
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
174
192
|
(0, _react2.jsx)("span", {
|
|
@@ -200,11 +218,7 @@ var HoverLinkOverlay = function HoverLinkOverlay(_ref) {
|
|
|
200
218
|
}, (0, _react2.jsx)(_primitives.Box, {
|
|
201
219
|
xcss: iconWrapperStyles,
|
|
202
220
|
"data-inlinecard-button-overlay": "icon-wrapper-line-height"
|
|
203
|
-
},
|
|
204
|
-
label: ""
|
|
205
|
-
}) : (0, _react2.jsx)(_linkExternal.default, {
|
|
206
|
-
label: ""
|
|
207
|
-
})), showLabel && (0, _react2.jsx)(_primitives.Text, {
|
|
221
|
+
}, icon), showLabel && (0, _react2.jsx)(_primitives.Text, {
|
|
208
222
|
size: "small",
|
|
209
223
|
color: "color.text.subtle",
|
|
210
224
|
maxLines: 1
|
|
@@ -18,6 +18,13 @@ export const annotationMessages = defineMessages({
|
|
|
18
18
|
defaultMessage: 'You can only comment on text, headings, emojis, dates, mentions, links, and statuses.',
|
|
19
19
|
description: 'Error message to communicate to the user they can only do the current action in certain contexts'
|
|
20
20
|
},
|
|
21
|
+
// Duplicated by Confluence's
|
|
22
|
+
// highlight-actions.inline-comments.comment.no.permission
|
|
23
|
+
noPermissionToAddComment: {
|
|
24
|
+
id: 'fabric.editor.noPermissionToAddComment',
|
|
25
|
+
defaultMessage: '{contentType, select, blogpost {You do not have permission to add comments to this blogpost} page {You do not have permission to add comments to this page} other {You do not have permission to add comments to this page}}',
|
|
26
|
+
description: 'Tooltip for when the user does not have permission to add inline comments'
|
|
27
|
+
},
|
|
21
28
|
toolbar: {
|
|
22
29
|
id: 'fabric.editor.annotationToolbar',
|
|
23
30
|
defaultMessage: 'Annotation toolbar',
|
|
@@ -65,6 +65,11 @@ export const messages = defineMessages({
|
|
|
65
65
|
defaultMessage: 'Panel',
|
|
66
66
|
description: 'Title for a button that opens side panel when clicked.'
|
|
67
67
|
},
|
|
68
|
+
previewButtonTitle: {
|
|
69
|
+
id: 'fabric.editor.previewButtonTitle',
|
|
70
|
+
defaultMessage: 'Preview',
|
|
71
|
+
description: 'Title for a button that when clicked opens a preview modal or a preview panel.'
|
|
72
|
+
},
|
|
68
73
|
embedTitle: {
|
|
69
74
|
id: 'fabric.editor.embedTitle',
|
|
70
75
|
defaultMessage: 'Embed',
|
|
@@ -15,11 +15,6 @@ export const mediaInsertMessages = defineMessages({
|
|
|
15
15
|
defaultMessage: 'Paste link to upload',
|
|
16
16
|
description: 'Placeholder text for the input field where a user can paste (as in copy-paste) a URL to upload a media file'
|
|
17
17
|
},
|
|
18
|
-
insertSmartValueHelperMessage: {
|
|
19
|
-
id: 'fabric.editor.media.insert.insertSmartValueHelperMessage',
|
|
20
|
-
defaultMessage: 'Tip: Enter a smart value or replace a URL path with a smart value to make content dynamic.',
|
|
21
|
-
description: 'Helper text for the input field where a user can paste (as in copy-paste) a URL or insert smart value in the url to upload a media file'
|
|
22
|
-
},
|
|
23
18
|
cancel: {
|
|
24
19
|
id: 'fabric.editor.media.insert.cancel',
|
|
25
20
|
defaultMessage: 'Cancel',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isFedRamp } from './environment';
|
|
2
2
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
3
3
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
4
|
-
const packageVersion = "107.23.
|
|
4
|
+
const packageVersion = "107.23.3";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// Ignored via go/ees007
|
|
@@ -31,7 +31,7 @@ export const smartCardStyles = () => css`
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
${editorExperiment('platform_editor_controls', 'variant1') ? `[data-inlinecard-button-overlay='icon-wrapper-line-height'] span {
|
|
34
|
+
${editorExperiment('platform_editor_controls', 'variant1') || fg('platform_editor_preview_panel_linking') ? `[data-inlinecard-button-overlay='icon-wrapper-line-height'] span {
|
|
35
35
|
line-height: 0;
|
|
36
36
|
}` : ''}
|
|
37
37
|
|
|
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
13
13
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
14
14
|
import Layer from '../Layer';
|
|
15
15
|
const packageName = "@atlaskit/editor-common";
|
|
16
|
-
const packageVersion = "107.23.
|
|
16
|
+
const packageVersion = "107.23.3";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -9,8 +9,10 @@ import { css, jsx } from '@emotion/react'; // eslint-disable-line @atlaskit/ui-s
|
|
|
9
9
|
import { useIntl } from 'react-intl-next';
|
|
10
10
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
11
11
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
12
|
+
import GrowDiagonalIcon from '@atlaskit/icon/core/grow-diagonal';
|
|
12
13
|
import LinkExternalIcon from '@atlaskit/icon/core/link-external';
|
|
13
14
|
import PanelRightIcon from '@atlaskit/icon/core/panel-right';
|
|
15
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
16
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
15
17
|
import { Anchor, Box, Text, xcss } from '@atlaskit/primitives';
|
|
16
18
|
import { buildVisitedNonHyperLinkPayload, INPUT_METHOD } from '../../analytics';
|
|
@@ -77,17 +79,18 @@ const visitCardLinkAnalytics = (editorAnalyticsApi, inputMethod) => (state, disp
|
|
|
77
79
|
const HoverLinkOverlay = ({
|
|
78
80
|
children,
|
|
79
81
|
isVisible = false,
|
|
82
|
+
// used only to measure available space to difine if we should show icon only or icon + title
|
|
80
83
|
url,
|
|
81
84
|
compactPadding = false,
|
|
82
85
|
editorAnalyticsApi,
|
|
83
86
|
view,
|
|
84
87
|
onClick,
|
|
85
|
-
showPanelButton = false
|
|
88
|
+
showPanelButton = false,
|
|
89
|
+
showPanelButtonIcon
|
|
86
90
|
}) => {
|
|
87
91
|
const {
|
|
88
92
|
formatMessage
|
|
89
93
|
} = useIntl();
|
|
90
|
-
const label = showPanelButton ? formatMessage(cardMessages.panelButtonTitle) : formatMessage(cardMessages.openButtonTitle);
|
|
91
94
|
const containerRef = useRef(null);
|
|
92
95
|
const hoverLinkButtonRef = useRef(null);
|
|
93
96
|
const hiddenTextRef = useRef(null);
|
|
@@ -149,6 +152,22 @@ const HoverLinkOverlay = ({
|
|
|
149
152
|
sendVisitLinkAnalytics(INPUT_METHOD.BUTTON);
|
|
150
153
|
}
|
|
151
154
|
};
|
|
155
|
+
const isPreivewButton = showPanelButton && fg('platform_editor_preview_panel_linking');
|
|
156
|
+
const label = isPreivewButton ? formatMessage(cardMessages.previewButtonTitle) : formatMessage(cardMessages.openButtonTitle);
|
|
157
|
+
let icon = null;
|
|
158
|
+
if (isPreivewButton && showPanelButtonIcon === 'panel') {
|
|
159
|
+
icon = jsx(PanelRightIcon, {
|
|
160
|
+
label: ""
|
|
161
|
+
});
|
|
162
|
+
} else if (isPreivewButton && showPanelButtonIcon === 'modal') {
|
|
163
|
+
icon = jsx(GrowDiagonalIcon, {
|
|
164
|
+
label: ""
|
|
165
|
+
});
|
|
166
|
+
} else {
|
|
167
|
+
icon = jsx(LinkExternalIcon, {
|
|
168
|
+
label: ""
|
|
169
|
+
});
|
|
170
|
+
}
|
|
152
171
|
return (
|
|
153
172
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
154
173
|
jsx("span", {
|
|
@@ -176,11 +195,7 @@ const HoverLinkOverlay = ({
|
|
|
176
195
|
}, jsx(Box, {
|
|
177
196
|
xcss: iconWrapperStyles,
|
|
178
197
|
"data-inlinecard-button-overlay": "icon-wrapper-line-height"
|
|
179
|
-
},
|
|
180
|
-
label: ""
|
|
181
|
-
}) : jsx(LinkExternalIcon, {
|
|
182
|
-
label: ""
|
|
183
|
-
})), showLabel && jsx(Text, {
|
|
198
|
+
}, icon), showLabel && jsx(Text, {
|
|
184
199
|
size: "small",
|
|
185
200
|
color: "color.text.subtle",
|
|
186
201
|
maxLines: 1
|
|
@@ -18,6 +18,13 @@ export var annotationMessages = defineMessages({
|
|
|
18
18
|
defaultMessage: 'You can only comment on text, headings, emojis, dates, mentions, links, and statuses.',
|
|
19
19
|
description: 'Error message to communicate to the user they can only do the current action in certain contexts'
|
|
20
20
|
},
|
|
21
|
+
// Duplicated by Confluence's
|
|
22
|
+
// highlight-actions.inline-comments.comment.no.permission
|
|
23
|
+
noPermissionToAddComment: {
|
|
24
|
+
id: 'fabric.editor.noPermissionToAddComment',
|
|
25
|
+
defaultMessage: '{contentType, select, blogpost {You do not have permission to add comments to this blogpost} page {You do not have permission to add comments to this page} other {You do not have permission to add comments to this page}}',
|
|
26
|
+
description: 'Tooltip for when the user does not have permission to add inline comments'
|
|
27
|
+
},
|
|
21
28
|
toolbar: {
|
|
22
29
|
id: 'fabric.editor.annotationToolbar',
|
|
23
30
|
defaultMessage: 'Annotation toolbar',
|
|
@@ -65,6 +65,11 @@ export var messages = defineMessages({
|
|
|
65
65
|
defaultMessage: 'Panel',
|
|
66
66
|
description: 'Title for a button that opens side panel when clicked.'
|
|
67
67
|
},
|
|
68
|
+
previewButtonTitle: {
|
|
69
|
+
id: 'fabric.editor.previewButtonTitle',
|
|
70
|
+
defaultMessage: 'Preview',
|
|
71
|
+
description: 'Title for a button that when clicked opens a preview modal or a preview panel.'
|
|
72
|
+
},
|
|
68
73
|
embedTitle: {
|
|
69
74
|
id: 'fabric.editor.embedTitle',
|
|
70
75
|
defaultMessage: 'Embed',
|
|
@@ -15,11 +15,6 @@ export var mediaInsertMessages = defineMessages({
|
|
|
15
15
|
defaultMessage: 'Paste link to upload',
|
|
16
16
|
description: 'Placeholder text for the input field where a user can paste (as in copy-paste) a URL to upload a media file'
|
|
17
17
|
},
|
|
18
|
-
insertSmartValueHelperMessage: {
|
|
19
|
-
id: 'fabric.editor.media.insert.insertSmartValueHelperMessage',
|
|
20
|
-
defaultMessage: 'Tip: Enter a smart value or replace a URL path with a smart value to make content dynamic.',
|
|
21
|
-
description: 'Helper text for the input field where a user can paste (as in copy-paste) a URL or insert smart value in the url to upload a media file'
|
|
22
|
-
},
|
|
23
18
|
cancel: {
|
|
24
19
|
id: 'fabric.editor.media.insert.cancel',
|
|
25
20
|
defaultMessage: 'Cancel',
|
|
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import { isFedRamp } from './environment';
|
|
8
8
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
9
9
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
10
|
-
var packageVersion = "107.23.
|
|
10
|
+
var packageVersion = "107.23.3";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// Ignored via go/ees007
|
|
@@ -12,5 +12,5 @@ export var FLOATING_TOOLBAR_LINKPICKER_CLASSNAME = 'card-floating-toolbar--link-
|
|
|
12
12
|
|
|
13
13
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
14
14
|
export var smartCardStyles = function smartCardStyles() {
|
|
15
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t.", " {\n\t\tmax-width: calc(100% - 20px);\n\t\tvertical-align: top;\n\t\tword-break: break-all;\n\t\t", "\n\t\t.card {\n\t\t\tpadding-left: ", ";\n\t\t\tpadding-right: ", ";\n\t\t\tpadding-top: 0.5em;\n\t\t\tpadding-bottom: 0.5em;\n\t\t\tmargin-bottom: -0.5em;\n\n\t\t\t.", " > a:focus {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t", "\n\n\t\t", "\n\t\t.", " > a {\n\t\t\t/* EDM-1717: box-shadow Safari fix start */\n\t\t\tz-index: 1;\n\t\t\tposition: relative;\n\t\t\t/* EDM-1717: box-shadow Safari fix end */\n\t\t}\n\n\t\t&.danger {\n\t\t\t.", " > a {\n\t\t\t\tbox-shadow: 0 0 0 1px ", ";\n\t\t\t\t/* EDM-1717: box-shadow Safari fix start */\n\t\t\t\tz-index: 2;\n\t\t\t\t/* EDM-1717: box-shadow Safari fix end */\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\t.", " > div {\n\t\t\tcursor: pointer;\n\n\t\t\ta {\n\t\t\t\tcursor: auto;\n\t\t\t}\n\t\t}\n\n\t\t&.", " .", " > div {\n\t\t\t", "\n\t\t\tborder-radius: ", ";\n\t\t}\n\n\t\t&.danger {\n\t\t\t.", " > div {\n\t\t\t\tbox-shadow: 0 0 0 1px ", " !important;\n\t\t\t}\n\t\t}\n\t}\n\n\t.", ".", " {\n\t\tmax-width: 100%;\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\n\t\t.", " {\n\t\t\tcursor: pointer;\n\t\t\tbackground-color: ", ";\n\t\t\tborder-radius: ", ";\n\t\t\tborder: 1px solid ", ";\n\t\t\toverflow: hidden;\n\t\t}\n\n\t\t&.", " {\n\t\t\t.", " {\n\t\t\t\t", "\n\n\t\t\t\tinput::selection {\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t}\n\t\t\t\tinput::-moz-selection {\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&.danger {\n\t\t\t.", " {\n\t\t\t\tbox-shadow: 0 0 0 1px ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\t.", " > div {\n\t\t\tcursor: pointer;\n\t\t\ta {\n\t\t\t\tcursor: auto;\n\t\t\t}\n\t\t\t&::after {\n\t\t\t\ttransition: box-shadow 0s;\n\t\t\t}\n\t\t}\n\n\t\t", "\n\n\t\t&.danger {\n\t\t\t.media-card-frame::after {\n\t\t\t\tbox-shadow: 0 0 0 1px ", " !important;\n\t\t\t\tbackground: ", " !important;\n\t\t\t}\n\t\t\t.richMedia-resize-handle-right::after,\n\t\t\t.richMedia-resize-handle-left::after {\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\tpadding: 0;\n\t}\n"])), SmartCardSharedCssClassName.INLINE_CARD_CONTAINER, fg('editor_inline_comments_on_inline_nodes') ? ".card-with-comment {\n background: ".concat("var(--ds-background-accent-yellow-subtler, #F8E6A0)", ";\n border-bottom: 2px solid ", "var(--ds-border-accent-yellow, #B38600)", ";\n box-shadow: ", "var(--ds-shadow-overlay, 0px 8px 12px #091E4226, 0px 0px 1px #091E424f)", ";\n }") : '', "var(--ds-space-025, 2px)", "var(--ds-space-025, 2px)", SmartCardSharedCssClassName.LOADER_WRAPPER, getSelectionStyles([SelectionStyle.BoxShadow]), editorExperiment('platform_editor_controls', 'variant1') ? "[data-inlinecard-button-overlay='icon-wrapper-line-height'] span {\n\t\t\t\tline-height: 0;\n\t\t\t}" : '', expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) && fg('platform_editor_find_and_replace_improvements_1') ? "\n\t\t\t\t&.".concat(akEditorSelectedNodeClassName, ":not(.search-match-block) .").concat(SmartCardSharedCssClassName.LOADER_WRAPPER, " > a {\n\t\t\t\t").concat(getSelectionStyles([SelectionStyle.BoxShadow]), "\n\t\t\t}") : "\n\t\t\t\t&.".concat(akEditorSelectedNodeClassName, " .").concat(SmartCardSharedCssClassName.LOADER_WRAPPER, " > a {\n\t\t\t\t").concat(getSelectionStyles([SelectionStyle.BoxShadow]), "\n\t\t\t}"), SmartCardSharedCssClassName.LOADER_WRAPPER, SmartCardSharedCssClassName.LOADER_WRAPPER, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, SmartCardSharedCssClassName.LOADER_WRAPPER, akEditorSelectedNodeClassName, SmartCardSharedCssClassName.LOADER_WRAPPER, getSelectionStyles([SelectionStyle.BoxShadow]), "var(--ds-border-radius-200, 8px)", SmartCardSharedCssClassName.LOADER_WRAPPER, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), SmartCardSharedCssClassName.DATASOURCE_CONTAINER, SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, DATASOURCE_INNER_CONTAINER_CLASSNAME, "var(--ds-background-neutral-subtle, #00000000)", "var(--ds-border-radius-200, 8px)", "var(--ds-border, #091E4224)", akEditorSelectedNodeClassName, DATASOURCE_INNER_CONTAINER_CLASSNAME, getSelectionStyles([SelectionStyle.BoxShadow]), "var(--ds-background-selected-hovered, #CCE0FF)", "var(--ds-background-selected-hovered, #CCE0FF)", DATASOURCE_INNER_CONTAINER_CLASSNAME, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), SmartCardSharedCssClassName.EMBED_CARD_CONTAINER, SmartCardSharedCssClassName.LOADER_WRAPPER, expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) && fg('platform_editor_find_and_replace_improvements_1') ? "\n\t\t\t\t&.".concat(akEditorSelectedNodeClassName, ":not(.search-match-block) .").concat(SmartCardSharedCssClassName.LOADER_WRAPPER, " > div::after {\n\t\t\t\t\t").concat(getSelectionStyles([SelectionStyle.BoxShadow]), "\n\t\t\t\t}\n\t\t\t") : "\n\t\t\t\t&.".concat(akEditorSelectedNodeClassName, " .").concat(SmartCardSharedCssClassName.LOADER_WRAPPER, " > div::after {\n\t\t\t\t\t").concat(getSelectionStyles([SelectionStyle.BoxShadow]), "\n\t\t\t\t}\n\t\t\t"), "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), FLOATING_TOOLBAR_LINKPICKER_CLASSNAME);
|
|
15
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t.", " {\n\t\tmax-width: calc(100% - 20px);\n\t\tvertical-align: top;\n\t\tword-break: break-all;\n\t\t", "\n\t\t.card {\n\t\t\tpadding-left: ", ";\n\t\t\tpadding-right: ", ";\n\t\t\tpadding-top: 0.5em;\n\t\t\tpadding-bottom: 0.5em;\n\t\t\tmargin-bottom: -0.5em;\n\n\t\t\t.", " > a:focus {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t", "\n\n\t\t", "\n\t\t.", " > a {\n\t\t\t/* EDM-1717: box-shadow Safari fix start */\n\t\t\tz-index: 1;\n\t\t\tposition: relative;\n\t\t\t/* EDM-1717: box-shadow Safari fix end */\n\t\t}\n\n\t\t&.danger {\n\t\t\t.", " > a {\n\t\t\t\tbox-shadow: 0 0 0 1px ", ";\n\t\t\t\t/* EDM-1717: box-shadow Safari fix start */\n\t\t\t\tz-index: 2;\n\t\t\t\t/* EDM-1717: box-shadow Safari fix end */\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\t.", " > div {\n\t\t\tcursor: pointer;\n\n\t\t\ta {\n\t\t\t\tcursor: auto;\n\t\t\t}\n\t\t}\n\n\t\t&.", " .", " > div {\n\t\t\t", "\n\t\t\tborder-radius: ", ";\n\t\t}\n\n\t\t&.danger {\n\t\t\t.", " > div {\n\t\t\t\tbox-shadow: 0 0 0 1px ", " !important;\n\t\t\t}\n\t\t}\n\t}\n\n\t.", ".", " {\n\t\tmax-width: 100%;\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\n\t\t.", " {\n\t\t\tcursor: pointer;\n\t\t\tbackground-color: ", ";\n\t\t\tborder-radius: ", ";\n\t\t\tborder: 1px solid ", ";\n\t\t\toverflow: hidden;\n\t\t}\n\n\t\t&.", " {\n\t\t\t.", " {\n\t\t\t\t", "\n\n\t\t\t\tinput::selection {\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t}\n\t\t\t\tinput::-moz-selection {\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&.danger {\n\t\t\t.", " {\n\t\t\t\tbox-shadow: 0 0 0 1px ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\t.", " > div {\n\t\t\tcursor: pointer;\n\t\t\ta {\n\t\t\t\tcursor: auto;\n\t\t\t}\n\t\t\t&::after {\n\t\t\t\ttransition: box-shadow 0s;\n\t\t\t}\n\t\t}\n\n\t\t", "\n\n\t\t&.danger {\n\t\t\t.media-card-frame::after {\n\t\t\t\tbox-shadow: 0 0 0 1px ", " !important;\n\t\t\t\tbackground: ", " !important;\n\t\t\t}\n\t\t\t.richMedia-resize-handle-right::after,\n\t\t\t.richMedia-resize-handle-left::after {\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\tpadding: 0;\n\t}\n"])), SmartCardSharedCssClassName.INLINE_CARD_CONTAINER, fg('editor_inline_comments_on_inline_nodes') ? ".card-with-comment {\n background: ".concat("var(--ds-background-accent-yellow-subtler, #F8E6A0)", ";\n border-bottom: 2px solid ", "var(--ds-border-accent-yellow, #B38600)", ";\n box-shadow: ", "var(--ds-shadow-overlay, 0px 8px 12px #091E4226, 0px 0px 1px #091E424f)", ";\n }") : '', "var(--ds-space-025, 2px)", "var(--ds-space-025, 2px)", SmartCardSharedCssClassName.LOADER_WRAPPER, getSelectionStyles([SelectionStyle.BoxShadow]), editorExperiment('platform_editor_controls', 'variant1') || fg('platform_editor_preview_panel_linking') ? "[data-inlinecard-button-overlay='icon-wrapper-line-height'] span {\n\t\t\t\tline-height: 0;\n\t\t\t}" : '', expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) && fg('platform_editor_find_and_replace_improvements_1') ? "\n\t\t\t\t&.".concat(akEditorSelectedNodeClassName, ":not(.search-match-block) .").concat(SmartCardSharedCssClassName.LOADER_WRAPPER, " > a {\n\t\t\t\t").concat(getSelectionStyles([SelectionStyle.BoxShadow]), "\n\t\t\t}") : "\n\t\t\t\t&.".concat(akEditorSelectedNodeClassName, " .").concat(SmartCardSharedCssClassName.LOADER_WRAPPER, " > a {\n\t\t\t\t").concat(getSelectionStyles([SelectionStyle.BoxShadow]), "\n\t\t\t}"), SmartCardSharedCssClassName.LOADER_WRAPPER, SmartCardSharedCssClassName.LOADER_WRAPPER, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, SmartCardSharedCssClassName.LOADER_WRAPPER, akEditorSelectedNodeClassName, SmartCardSharedCssClassName.LOADER_WRAPPER, getSelectionStyles([SelectionStyle.BoxShadow]), "var(--ds-border-radius-200, 8px)", SmartCardSharedCssClassName.LOADER_WRAPPER, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), SmartCardSharedCssClassName.DATASOURCE_CONTAINER, SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, DATASOURCE_INNER_CONTAINER_CLASSNAME, "var(--ds-background-neutral-subtle, #00000000)", "var(--ds-border-radius-200, 8px)", "var(--ds-border, #091E4224)", akEditorSelectedNodeClassName, DATASOURCE_INNER_CONTAINER_CLASSNAME, getSelectionStyles([SelectionStyle.BoxShadow]), "var(--ds-background-selected-hovered, #CCE0FF)", "var(--ds-background-selected-hovered, #CCE0FF)", DATASOURCE_INNER_CONTAINER_CLASSNAME, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), SmartCardSharedCssClassName.EMBED_CARD_CONTAINER, SmartCardSharedCssClassName.LOADER_WRAPPER, expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) && fg('platform_editor_find_and_replace_improvements_1') ? "\n\t\t\t\t&.".concat(akEditorSelectedNodeClassName, ":not(.search-match-block) .").concat(SmartCardSharedCssClassName.LOADER_WRAPPER, " > div::after {\n\t\t\t\t\t").concat(getSelectionStyles([SelectionStyle.BoxShadow]), "\n\t\t\t\t}\n\t\t\t") : "\n\t\t\t\t&.".concat(akEditorSelectedNodeClassName, " .").concat(SmartCardSharedCssClassName.LOADER_WRAPPER, " > div::after {\n\t\t\t\t\t").concat(getSelectionStyles([SelectionStyle.BoxShadow]), "\n\t\t\t\t}\n\t\t\t"), "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), FLOATING_TOOLBAR_LINKPICKER_CLASSNAME);
|
|
16
16
|
};
|
|
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
20
20
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
21
21
|
import Layer from '../Layer';
|
|
22
22
|
var packageName = "@atlaskit/editor-common";
|
|
23
|
-
var packageVersion = "107.23.
|
|
23
|
+
var packageVersion = "107.23.3";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
|
@@ -10,8 +10,10 @@ import { css, jsx } from '@emotion/react'; // eslint-disable-line @atlaskit/ui-s
|
|
|
10
10
|
import { useIntl } from 'react-intl-next';
|
|
11
11
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
12
12
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
13
|
+
import GrowDiagonalIcon from '@atlaskit/icon/core/grow-diagonal';
|
|
13
14
|
import LinkExternalIcon from '@atlaskit/icon/core/link-external';
|
|
14
15
|
import PanelRightIcon from '@atlaskit/icon/core/panel-right';
|
|
16
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
17
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
16
18
|
import { Anchor, Box, Text, xcss } from '@atlaskit/primitives';
|
|
17
19
|
import { buildVisitedNonHyperLinkPayload, INPUT_METHOD } from '../../analytics';
|
|
@@ -84,10 +86,10 @@ var HoverLinkOverlay = function HoverLinkOverlay(_ref) {
|
|
|
84
86
|
view = _ref.view,
|
|
85
87
|
onClick = _ref.onClick,
|
|
86
88
|
_ref$showPanelButton = _ref.showPanelButton,
|
|
87
|
-
showPanelButton = _ref$showPanelButton === void 0 ? false : _ref$showPanelButton
|
|
89
|
+
showPanelButton = _ref$showPanelButton === void 0 ? false : _ref$showPanelButton,
|
|
90
|
+
showPanelButtonIcon = _ref.showPanelButtonIcon;
|
|
88
91
|
var _useIntl = useIntl(),
|
|
89
92
|
formatMessage = _useIntl.formatMessage;
|
|
90
|
-
var label = showPanelButton ? formatMessage(cardMessages.panelButtonTitle) : formatMessage(cardMessages.openButtonTitle);
|
|
91
93
|
var containerRef = useRef(null);
|
|
92
94
|
var hoverLinkButtonRef = useRef(null);
|
|
93
95
|
var hiddenTextRef = useRef(null);
|
|
@@ -155,6 +157,22 @@ var HoverLinkOverlay = function HoverLinkOverlay(_ref) {
|
|
|
155
157
|
sendVisitLinkAnalytics(INPUT_METHOD.BUTTON);
|
|
156
158
|
}
|
|
157
159
|
};
|
|
160
|
+
var isPreivewButton = showPanelButton && fg('platform_editor_preview_panel_linking');
|
|
161
|
+
var label = isPreivewButton ? formatMessage(cardMessages.previewButtonTitle) : formatMessage(cardMessages.openButtonTitle);
|
|
162
|
+
var icon = null;
|
|
163
|
+
if (isPreivewButton && showPanelButtonIcon === 'panel') {
|
|
164
|
+
icon = jsx(PanelRightIcon, {
|
|
165
|
+
label: ""
|
|
166
|
+
});
|
|
167
|
+
} else if (isPreivewButton && showPanelButtonIcon === 'modal') {
|
|
168
|
+
icon = jsx(GrowDiagonalIcon, {
|
|
169
|
+
label: ""
|
|
170
|
+
});
|
|
171
|
+
} else {
|
|
172
|
+
icon = jsx(LinkExternalIcon, {
|
|
173
|
+
label: ""
|
|
174
|
+
});
|
|
175
|
+
}
|
|
158
176
|
return (
|
|
159
177
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
160
178
|
jsx("span", {
|
|
@@ -186,11 +204,7 @@ var HoverLinkOverlay = function HoverLinkOverlay(_ref) {
|
|
|
186
204
|
}, jsx(Box, {
|
|
187
205
|
xcss: iconWrapperStyles,
|
|
188
206
|
"data-inlinecard-button-overlay": "icon-wrapper-line-height"
|
|
189
|
-
},
|
|
190
|
-
label: ""
|
|
191
|
-
}) : jsx(LinkExternalIcon, {
|
|
192
|
-
label: ""
|
|
193
|
-
})), showLabel && jsx(Text, {
|
|
207
|
+
}, icon), showLabel && jsx(Text, {
|
|
194
208
|
size: "small",
|
|
195
209
|
color: "color.text.subtle",
|
|
196
210
|
maxLines: 1
|