@atlaskit/renderer 149.0.4 → 149.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -1
- package/dist/cjs/actions/get-renderer-range-inline-node-names.js +3 -3
- package/dist/cjs/actions/index.js +10 -10
- package/dist/cjs/analytics/unsupported-content.js +9 -8
- package/dist/cjs/entry-points/experimental-sync-custom-nodes/cards.js +1 -1
- package/dist/cjs/entry-points/experimental-sync-custom-nodes/media.js +1 -1
- package/dist/cjs/entry-points/experimental-sync-custom-nodes/small-nodes.js +1 -1
- package/dist/cjs/entry-points/react.js +2 -2
- package/dist/cjs/entry-points/renderer.js +7 -7
- package/dist/cjs/index.js +7 -7
- package/dist/cjs/react/index.js +9 -8
- package/dist/cjs/react/marks/backgroundColor.js +2 -2
- package/dist/cjs/react/marks/breakout.js +5 -5
- package/dist/cjs/react/marks/code.js +2 -2
- package/dist/cjs/react/marks/link-compiled.js +2 -2
- package/dist/cjs/react/marks/link-emotion.js +2 -2
- package/dist/cjs/react/marks/link.js +4 -4
- package/dist/cjs/react/marks/textColor.js +3 -3
- package/dist/cjs/react/nodes/blockCard.js +14 -11
- package/dist/cjs/react/nodes/bodiedExtension.js +4 -4
- package/dist/cjs/react/nodes/bodiedSyncBlock.js +1 -1
- package/dist/cjs/react/nodes/caption.js +2 -2
- package/dist/cjs/react/nodes/codeBlock/codeBlock.js +2 -2
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockContainer.js +3 -3
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockCopyButton.js +3 -3
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockDownloadButton.js +2 -2
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockWrapButton.js +2 -2
- package/dist/cjs/react/nodes/codeBlock/components/lightWeightCodeBlock.js +22 -21
- package/dist/cjs/react/nodes/codeBlock/windowedCodeBlock.js +2 -2
- package/dist/cjs/react/nodes/date.js +5 -5
- package/dist/cjs/react/nodes/embedCard.js +19 -16
- package/dist/cjs/react/nodes/emoji.js +6 -5
- package/dist/cjs/react/nodes/extension.js +7 -7
- package/dist/cjs/react/nodes/heading.js +8 -8
- package/dist/cjs/react/nodes/index.js +7 -5
- package/dist/cjs/react/nodes/inlineCard.js +15 -13
- package/dist/cjs/react/nodes/layoutColumn-compiled.js +2 -2
- package/dist/cjs/react/nodes/layoutColumn-emotion.js +2 -2
- package/dist/cjs/react/nodes/media/index.js +24 -21
- package/dist/cjs/react/nodes/mediaGroup.js +2 -2
- package/dist/cjs/react/nodes/mediaInline.js +8 -8
- package/dist/cjs/react/nodes/mediaSingle/index.js +13 -12
- package/dist/cjs/react/nodes/mention.js +4 -3
- package/dist/cjs/react/nodes/multiBodiedExtension/actions.js +4 -4
- package/dist/cjs/react/nodes/multiBodiedExtension/context.js +7 -7
- package/dist/cjs/react/nodes/nodes.js +4 -3
- package/dist/cjs/react/nodes/orderedList.js +6 -5
- package/dist/cjs/react/nodes/panel-compiled.js +2 -2
- package/dist/cjs/react/nodes/panel-emotion.js +2 -2
- package/dist/cjs/react/nodes/panel.js +11 -7
- package/dist/cjs/react/nodes/table/colgroup.js +24 -24
- package/dist/cjs/react/nodes/table/sticky.js +2 -2
- package/dist/cjs/react/nodes/table/table.js +6 -6
- package/dist/cjs/react/nodes/table.js +19 -16
- package/dist/cjs/react/nodes/tableCell.js +11 -11
- package/dist/cjs/react/nodes/taskItem.js +4 -3
- package/dist/cjs/react/utils/EditorMediaClientProvider.js +3 -3
- package/dist/cjs/react/utils/use-select-all-trap.js +7 -7
- package/dist/cjs/render-document.js +32 -28
- package/dist/cjs/text/nodes/date.js +3 -3
- package/dist/cjs/text/nodes/orderedList.js +2 -2
- package/dist/cjs/ui/Expand.js +17 -16
- package/dist/cjs/ui/ExtensionRenderer.js +6 -6
- package/dist/cjs/ui/MediaCard.js +9 -9
- package/dist/cjs/ui/Renderer/ErrorBoundary.js +7 -7
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +271 -262
- package/dist/cjs/ui/Renderer/analytics-utils.js +13 -11
- package/dist/cjs/ui/Renderer/breakout-ssr.js +3 -3
- package/dist/cjs/ui/Renderer/count-nodes.js +2 -2
- package/dist/cjs/ui/Renderer/get-base-font-size.js +3 -3
- package/dist/cjs/ui/Renderer/index.js +30 -23
- package/dist/cjs/ui/RendererActionsContext/index.js +2 -2
- package/dist/cjs/ui/annotations/contexts/AnnotationManagerContext.js +15 -15
- package/dist/cjs/ui/annotations/element/index.js +2 -2
- package/dist/cjs/ui/annotations/hooks/use-events.js +20 -20
- package/dist/cjs/ui/annotations/hooks/use-load-annotations.js +2 -2
- package/dist/cjs/ui/annotations/hover/mounter.js +21 -21
- package/dist/cjs/ui/annotations/selection/mounter.js +21 -21
- package/dist/cjs/ui/hooks/useScrollToBlock.js +6 -4
- package/dist/es2019/actions/get-renderer-range-inline-node-names.js +1 -1
- package/dist/es2019/actions/index.js +2 -2
- package/dist/es2019/analytics/unsupported-content.js +3 -2
- package/dist/es2019/custom-nodes.js +1 -1
- package/dist/es2019/entry-points/custom-nodes-loosely-lazy.js +1 -1
- package/dist/es2019/entry-points/experimental-sync-custom-nodes/cards.js +1 -1
- package/dist/es2019/entry-points/experimental-sync-custom-nodes/media.js +1 -1
- package/dist/es2019/entry-points/experimental-sync-custom-nodes/small-nodes.js +1 -1
- package/dist/es2019/entry-points/loosely-lazy.js +1 -1
- package/dist/es2019/entry-points/nodes.js +2 -2
- package/dist/es2019/entry-points/react.js +2 -2
- package/dist/es2019/entry-points/renderer.js +7 -7
- package/dist/es2019/entry-points/text-serializer-text.js +1 -1
- package/dist/es2019/entry-points/text.js +1 -1
- package/dist/es2019/index.js +7 -7
- package/dist/es2019/react/index.js +3 -2
- package/dist/es2019/react/marks/backgroundColor.js +1 -1
- package/dist/es2019/react/marks/breakout.js +1 -1
- package/dist/es2019/react/marks/code.js +1 -1
- package/dist/es2019/react/marks/link-compiled.js +1 -1
- package/dist/es2019/react/marks/link-emotion.js +1 -1
- package/dist/es2019/react/marks/link.js +1 -1
- package/dist/es2019/react/marks/textColor.js +1 -1
- package/dist/es2019/react/nodes/blockCard.js +6 -3
- package/dist/es2019/react/nodes/bodiedExtension.js +1 -1
- package/dist/es2019/react/nodes/bodiedSyncBlock.js +1 -1
- package/dist/es2019/react/nodes/caption.js +1 -1
- package/dist/es2019/react/nodes/codeBlock/codeBlock.js +1 -1
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockContainer.js +1 -1
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockCopyButton.js +1 -1
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockDownloadButton.js +1 -1
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockWrapButton.js +1 -1
- package/dist/es2019/react/nodes/codeBlock/components/lightWeightCodeBlock.js +3 -2
- package/dist/es2019/react/nodes/codeBlock/windowedCodeBlock.js +1 -1
- package/dist/es2019/react/nodes/date.js +2 -2
- package/dist/es2019/react/nodes/embedCard.js +6 -3
- package/dist/es2019/react/nodes/emoji.js +3 -2
- package/dist/es2019/react/nodes/extension.js +2 -2
- package/dist/es2019/react/nodes/heading.js +1 -1
- package/dist/es2019/react/nodes/index.js +5 -3
- package/dist/es2019/react/nodes/inlineCard.js +7 -5
- package/dist/es2019/react/nodes/layoutColumn-compiled.js +1 -1
- package/dist/es2019/react/nodes/layoutColumn-emotion.js +1 -1
- package/dist/es2019/react/nodes/media/index.js +9 -6
- package/dist/es2019/react/nodes/mediaGroup.js +1 -1
- package/dist/es2019/react/nodes/mediaInline.js +3 -3
- package/dist/es2019/react/nodes/mediaSingle/index.js +4 -3
- package/dist/es2019/react/nodes/mention.js +1 -1
- package/dist/es2019/react/nodes/multiBodiedExtension/actions.js +1 -1
- package/dist/es2019/react/nodes/multiBodiedExtension/context.js +3 -3
- package/dist/es2019/react/nodes/nodes.js +2 -1
- package/dist/es2019/react/nodes/orderedList.js +3 -2
- package/dist/es2019/react/nodes/panel-compiled.js +1 -1
- package/dist/es2019/react/nodes/panel-emotion.js +1 -1
- package/dist/es2019/react/nodes/panel.js +6 -2
- package/dist/es2019/react/nodes/table/colgroup.js +3 -3
- package/dist/es2019/react/nodes/table/sticky.js +1 -1
- package/dist/es2019/react/nodes/table/table.js +2 -2
- package/dist/es2019/react/nodes/table.js +8 -5
- package/dist/es2019/react/nodes/tableCell.js +3 -3
- package/dist/es2019/react/nodes/taskItem.js +2 -1
- package/dist/es2019/react/utils/EditorMediaClientProvider.js +1 -1
- package/dist/es2019/react/utils/use-select-all-trap.js +1 -1
- package/dist/es2019/render-document.js +7 -3
- package/dist/es2019/text/nodes/date.js +1 -1
- package/dist/es2019/text/nodes/orderedList.js +1 -1
- package/dist/es2019/ui/Expand.js +4 -3
- package/dist/es2019/ui/ExtensionRenderer.js +3 -3
- package/dist/es2019/ui/MediaCard.js +3 -3
- package/dist/es2019/ui/Renderer/ErrorBoundary.js +2 -2
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +18 -9
- package/dist/es2019/ui/Renderer/analytics-utils.js +3 -1
- package/dist/es2019/ui/Renderer/breakout-ssr.js +1 -1
- package/dist/es2019/ui/Renderer/count-nodes.js +1 -1
- package/dist/es2019/ui/Renderer/get-base-font-size.js +1 -1
- package/dist/es2019/ui/Renderer/index.js +12 -5
- package/dist/es2019/ui/RendererActionsContext/index.js +1 -1
- package/dist/es2019/ui/annotations/contexts/AnnotationManagerContext.js +1 -1
- package/dist/es2019/ui/annotations/element/index.js +1 -1
- package/dist/es2019/ui/annotations/hooks/use-events.js +2 -2
- package/dist/es2019/ui/annotations/hooks/use-load-annotations.js +1 -1
- package/dist/es2019/ui/annotations/hover/mounter.js +1 -1
- package/dist/es2019/ui/annotations/selection/mounter.js +1 -1
- package/dist/es2019/ui/hooks/useScrollToBlock.js +3 -1
- package/dist/esm/actions/get-renderer-range-inline-node-names.js +1 -1
- package/dist/esm/actions/index.js +2 -2
- package/dist/esm/analytics/unsupported-content.js +3 -2
- package/dist/esm/custom-nodes.js +1 -1
- package/dist/esm/entry-points/custom-nodes-loosely-lazy.js +1 -1
- package/dist/esm/entry-points/experimental-sync-custom-nodes/cards.js +1 -1
- package/dist/esm/entry-points/experimental-sync-custom-nodes/media.js +1 -1
- package/dist/esm/entry-points/experimental-sync-custom-nodes/small-nodes.js +1 -1
- package/dist/esm/entry-points/loosely-lazy.js +1 -1
- package/dist/esm/entry-points/nodes.js +2 -2
- package/dist/esm/entry-points/react.js +2 -2
- package/dist/esm/entry-points/renderer.js +7 -7
- package/dist/esm/entry-points/text-serializer-text.js +1 -1
- package/dist/esm/entry-points/text.js +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/react/index.js +3 -2
- package/dist/esm/react/marks/backgroundColor.js +1 -1
- package/dist/esm/react/marks/breakout.js +1 -1
- package/dist/esm/react/marks/code.js +1 -1
- package/dist/esm/react/marks/link-compiled.js +1 -1
- package/dist/esm/react/marks/link-emotion.js +1 -1
- package/dist/esm/react/marks/link.js +1 -1
- package/dist/esm/react/marks/textColor.js +1 -1
- package/dist/esm/react/nodes/blockCard.js +6 -3
- package/dist/esm/react/nodes/bodiedExtension.js +1 -1
- package/dist/esm/react/nodes/bodiedSyncBlock.js +1 -1
- package/dist/esm/react/nodes/caption.js +1 -1
- package/dist/esm/react/nodes/codeBlock/codeBlock.js +1 -1
- package/dist/esm/react/nodes/codeBlock/components/codeBlockContainer.js +1 -1
- package/dist/esm/react/nodes/codeBlock/components/codeBlockCopyButton.js +1 -1
- package/dist/esm/react/nodes/codeBlock/components/codeBlockDownloadButton.js +1 -1
- package/dist/esm/react/nodes/codeBlock/components/codeBlockWrapButton.js +1 -1
- package/dist/esm/react/nodes/codeBlock/components/lightWeightCodeBlock.js +3 -2
- package/dist/esm/react/nodes/codeBlock/windowedCodeBlock.js +1 -1
- package/dist/esm/react/nodes/date.js +2 -2
- package/dist/esm/react/nodes/embedCard.js +6 -3
- package/dist/esm/react/nodes/emoji.js +3 -2
- package/dist/esm/react/nodes/extension.js +2 -2
- package/dist/esm/react/nodes/heading.js +1 -1
- package/dist/esm/react/nodes/index.js +5 -3
- package/dist/esm/react/nodes/inlineCard.js +7 -5
- package/dist/esm/react/nodes/layoutColumn-compiled.js +1 -1
- package/dist/esm/react/nodes/layoutColumn-emotion.js +1 -1
- package/dist/esm/react/nodes/media/index.js +9 -6
- package/dist/esm/react/nodes/mediaGroup.js +1 -1
- package/dist/esm/react/nodes/mediaInline.js +3 -3
- package/dist/esm/react/nodes/mediaSingle/index.js +4 -3
- package/dist/esm/react/nodes/mention.js +1 -1
- package/dist/esm/react/nodes/multiBodiedExtension/actions.js +1 -1
- package/dist/esm/react/nodes/multiBodiedExtension/context.js +3 -3
- package/dist/esm/react/nodes/nodes.js +2 -1
- package/dist/esm/react/nodes/orderedList.js +3 -2
- package/dist/esm/react/nodes/panel-compiled.js +1 -1
- package/dist/esm/react/nodes/panel-emotion.js +1 -1
- package/dist/esm/react/nodes/panel.js +6 -2
- package/dist/esm/react/nodes/table/colgroup.js +3 -3
- package/dist/esm/react/nodes/table/sticky.js +1 -1
- package/dist/esm/react/nodes/table/table.js +2 -2
- package/dist/esm/react/nodes/table.js +8 -5
- package/dist/esm/react/nodes/tableCell.js +3 -3
- package/dist/esm/react/nodes/taskItem.js +2 -1
- package/dist/esm/react/utils/EditorMediaClientProvider.js +1 -1
- package/dist/esm/react/utils/use-select-all-trap.js +1 -1
- package/dist/esm/render-document.js +7 -3
- package/dist/esm/text/nodes/date.js +1 -1
- package/dist/esm/text/nodes/orderedList.js +1 -1
- package/dist/esm/ui/Expand.js +4 -3
- package/dist/esm/ui/ExtensionRenderer.js +3 -3
- package/dist/esm/ui/MediaCard.js +3 -3
- package/dist/esm/ui/Renderer/ErrorBoundary.js +2 -2
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +18 -9
- package/dist/esm/ui/Renderer/analytics-utils.js +3 -1
- package/dist/esm/ui/Renderer/breakout-ssr.js +1 -1
- package/dist/esm/ui/Renderer/count-nodes.js +1 -1
- package/dist/esm/ui/Renderer/get-base-font-size.js +1 -1
- package/dist/esm/ui/Renderer/index.js +12 -5
- package/dist/esm/ui/RendererActionsContext/index.js +1 -1
- package/dist/esm/ui/annotations/contexts/AnnotationManagerContext.js +1 -1
- package/dist/esm/ui/annotations/element/index.js +1 -1
- package/dist/esm/ui/annotations/hooks/use-events.js +2 -2
- package/dist/esm/ui/annotations/hooks/use-load-annotations.js +1 -1
- package/dist/esm/ui/annotations/hover/mounter.js +1 -1
- package/dist/esm/ui/annotations/selection/mounter.js +1 -1
- package/dist/esm/ui/hooks/useScrollToBlock.js +3 -1
- package/dist/types/actions/index.d.ts +2 -1
- package/dist/types/actions/selection.d.ts +1 -1
- package/dist/types/analytics/events.d.ts +9 -2
- package/dist/types/analytics/unsupported-content.d.ts +1 -1
- package/dist/types/custom-nodes.d.ts +1 -1
- package/dist/types/entry-points/custom-nodes-loosely-lazy.d.ts +1 -1
- package/dist/types/entry-points/experimental-sync-custom-nodes/cards.d.ts +1 -1
- package/dist/types/entry-points/experimental-sync-custom-nodes/media.d.ts +1 -1
- package/dist/types/entry-points/experimental-sync-custom-nodes/small-nodes.d.ts +1 -1
- package/dist/types/entry-points/loosely-lazy.d.ts +1 -1
- package/dist/types/entry-points/nodes.d.ts +2 -2
- package/dist/types/entry-points/react.d.ts +2 -2
- package/dist/types/entry-points/renderer.d.ts +7 -7
- package/dist/types/entry-points/serializer.d.ts +1 -1
- package/dist/types/entry-points/text-serializer-text.d.ts +1 -1
- package/dist/types/entry-points/text.d.ts +1 -1
- package/dist/types/index.d.ts +7 -7
- package/dist/types/react/index.d.ts +5 -4
- package/dist/types/react/marks/link-compiled.d.ts +1 -1
- package/dist/types/react/marks/link-emotion.d.ts +1 -1
- package/dist/types/react/nodes/blockCard.d.ts +1 -1
- package/dist/types/react/nodes/bodiedExtension.d.ts +3 -2
- package/dist/types/react/nodes/embedCard.d.ts +1 -1
- package/dist/types/react/nodes/emoji.d.ts +1 -1
- package/dist/types/react/nodes/extension.d.ts +4 -3
- package/dist/types/react/nodes/extensionFrame.d.ts +2 -2
- package/dist/types/react/nodes/index.d.ts +5 -5
- package/dist/types/react/nodes/inlineCard.d.ts +2 -2
- package/dist/types/react/nodes/inlineExtension.d.ts +2 -2
- package/dist/types/react/nodes/media/index.d.ts +3 -3
- package/dist/types/react/nodes/mediaGroup.d.ts +3 -3
- package/dist/types/react/nodes/mediaInline.d.ts +4 -4
- package/dist/types/react/nodes/mediaSingle/index.d.ts +4 -3
- package/dist/types/react/nodes/mention.d.ts +3 -3
- package/dist/types/react/nodes/multiBodiedExtension/actions.d.ts +1 -1
- package/dist/types/react/nodes/multiBodiedExtension/context.d.ts +1 -1
- package/dist/types/react/nodes/multiBodiedExtension.d.ts +2 -2
- package/dist/types/react/nodes/panel.d.ts +1 -1
- package/dist/types/react/nodes/table/sticky.d.ts +1 -1
- package/dist/types/react/nodes/table.d.ts +2 -2
- package/dist/types/react/nodes/task-item-with-providers.d.ts +1 -1
- package/dist/types/react/nodes/taskItem.d.ts +1 -1
- package/dist/types/react/types.d.ts +3 -3
- package/dist/types/react/utils/getCardClickHandler.d.ts +2 -2
- package/dist/types/react/utils/markBlockAsInline.d.ts +2 -1
- package/dist/types/render-document.d.ts +2 -2
- package/dist/types/renderer-context.d.ts +1 -1
- package/dist/types/types/mediaOptions.d.ts +3 -2
- package/dist/types/types/smartLinksOptions.d.ts +1 -1
- package/dist/types/ui/ExtensionRenderer.d.ts +3 -2
- package/dist/types/ui/MediaCard.d.ts +8 -5
- package/dist/types/ui/SmartCardStorage.d.ts +1 -1
- package/dist/types/ui/annotations/context.d.ts +1 -1
- package/dist/types/ui/annotations/contexts/AnnotationManagerContext.d.ts +1 -1
- package/dist/types/ui/annotations/element/mark.d.ts +1 -1
- package/dist/types/ui/annotations/hooks/use-events.d.ts +2 -1
- package/dist/types/ui/annotations/hooks/use-inline-comment-subscriber.d.ts +1 -1
- package/dist/types/ui/annotations/hover/mounter.d.ts +1 -1
- package/dist/types/ui/annotations/hover/range-validator.d.ts +1 -1
- package/dist/types/ui/annotations/selection/mounter.d.ts +1 -1
- package/dist/types/ui/annotations/selection/range-validator.d.ts +1 -1
- package/dist/types/ui/annotations/types.d.ts +1 -1
- package/dist/types/ui/renderer-props.d.ts +8 -7
- package/dist/types/utils.d.ts +3 -3
- package/package.json +2 -2
|
@@ -6,8 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.getWidthInfoPayload = exports.getHeightInfoPayload = void 0;
|
|
8
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
|
-
var
|
|
10
|
-
var
|
|
9
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
10
|
+
var _generalEvents = require("@atlaskit/editor-common/analytics/types/general-events");
|
|
11
|
+
var _tableEvents = require("@atlaskit/editor-common/analytics/types/table-events");
|
|
12
|
+
var _analytics = require("@atlaskit/editor-common/utils/analytics");
|
|
11
13
|
var getWidthInfoPayload = exports.getWidthInfoPayload = function getWidthInfoPayload(renderer) {
|
|
12
14
|
var tablesInfo = [];
|
|
13
15
|
var tableWrappers = renderer.querySelectorAll('.pm-table-wrapper');
|
|
@@ -32,20 +34,20 @@ var getWidthInfoPayload = exports.getWidthInfoPayload = function getWidthInfoPay
|
|
|
32
34
|
})));
|
|
33
35
|
var editorWidth = renderer.scrollWidth;
|
|
34
36
|
return {
|
|
35
|
-
action:
|
|
36
|
-
actionSubject:
|
|
37
|
+
action: _tableEvents.TABLE_ACTION.TABLE_WIDTH_INFO,
|
|
38
|
+
actionSubject: _enums.ACTION_SUBJECT.TABLE,
|
|
37
39
|
attributes: {
|
|
38
40
|
editorWidth: editorWidth,
|
|
39
|
-
editorWidthBreakpoint: (0,
|
|
41
|
+
editorWidthBreakpoint: (0, _analytics.getBreakpointKey)(editorWidth),
|
|
40
42
|
tableWidthInfo: tablesInfo,
|
|
41
|
-
maxTableWidthBreakpoint: (0,
|
|
43
|
+
maxTableWidthBreakpoint: (0, _analytics.getBreakpointKey)(maxTableWidth),
|
|
42
44
|
hasTableWiderThanEditor: maxTableWidth > editorWidth,
|
|
43
45
|
hasTableWithScrollbar: tablesInfo.some(function (table) {
|
|
44
46
|
return table.hasScrollbar;
|
|
45
47
|
}),
|
|
46
|
-
mode:
|
|
48
|
+
mode: _generalEvents.MODE.RENDERER
|
|
47
49
|
},
|
|
48
|
-
eventType:
|
|
50
|
+
eventType: _enums.EVENT_TYPE.OPERATIONAL
|
|
49
51
|
};
|
|
50
52
|
};
|
|
51
53
|
var getHeightInfoPayload = exports.getHeightInfoPayload = function getHeightInfoPayload(renderer) {
|
|
@@ -77,8 +79,8 @@ var getHeightInfoPayload = exports.getHeightInfoPayload = function getHeightInfo
|
|
|
77
79
|
return undefined;
|
|
78
80
|
}
|
|
79
81
|
return {
|
|
80
|
-
action:
|
|
81
|
-
actionSubject:
|
|
82
|
+
action: _tableEvents.TABLE_ACTION.TABLE_RENDERER_HEIGHT_INFO,
|
|
83
|
+
actionSubject: _enums.ACTION_SUBJECT.TABLE,
|
|
82
84
|
attributes: {
|
|
83
85
|
viewportHeight: viewportHeight,
|
|
84
86
|
rendererHeight: rendererClientHeight,
|
|
@@ -86,6 +88,6 @@ var getHeightInfoPayload = exports.getHeightInfoPayload = function getHeightInfo
|
|
|
86
88
|
maxTableToViewportHeightRatio: maxTableHeight / viewportHeight,
|
|
87
89
|
tableHeightInfo: tablesInfo
|
|
88
90
|
},
|
|
89
|
-
eventType:
|
|
91
|
+
eventType: _enums.EVENT_TYPE.OPERATIONAL
|
|
90
92
|
};
|
|
91
93
|
};
|
|
@@ -8,7 +8,7 @@ exports.BreakoutSSRInlineScript = BreakoutSSRInlineScript;
|
|
|
8
8
|
exports.calcLineLength = exports.breakoutInlineScriptContext = void 0;
|
|
9
9
|
exports.createBreakoutInlineScript = createBreakoutInlineScript;
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
var
|
|
11
|
+
var _breakout = require("@atlaskit/editor-common/utils/breakout");
|
|
12
12
|
var _style = require("./style");
|
|
13
13
|
/* eslint-disable jsdoc/require-jsdoc -- SSR inline script helpers */
|
|
14
14
|
|
|
@@ -51,7 +51,7 @@ function BreakoutSSRInlineScript(_ref) {
|
|
|
51
51
|
function createBreakoutInlineScript(id, shouldSkipScript) {
|
|
52
52
|
return "(function(window){\nif(typeof window !== 'undefined' && window.__RENDERER_BYPASS_BREAKOUT_SSR__) { return; }\n".concat(breakoutInlineScriptContext, ";\n(").concat(applyBreakoutAfterSSR.toString(), ")(\"").concat(id, "\", breakoutConsts, ").concat(JSON.stringify(shouldSkipScript), ");\n})(window);\n");
|
|
53
53
|
}
|
|
54
|
-
var breakoutInlineScriptContext = exports.breakoutInlineScriptContext = "\n var breakoutConsts = ".concat(JSON.stringify(
|
|
54
|
+
var breakoutInlineScriptContext = exports.breakoutInlineScriptContext = "\n var breakoutConsts = ".concat(JSON.stringify(_breakout.breakoutConsts), ";\n breakoutConsts.mapBreakpointToLayoutMaxWidth = ").concat(_breakout.breakoutConsts.mapBreakpointToLayoutMaxWidth.toString(), ";\n breakoutConsts.getBreakpoint = ").concat(_breakout.breakoutConsts.getBreakpoint.toString(), ";\n breakoutConsts.calcBreakoutWidth = ").concat(_breakout.breakoutConsts.calcBreakoutWidth.toString(), ";\n breakoutConsts.calcLineLength = ").concat(_breakout.breakoutConsts.calcLineLength.toString(), ";\n breakoutConsts.calcWideWidth = ").concat(_breakout.breakoutConsts.calcWideWidth.toString(), ";\n breakoutConsts.FullPagePadding = ").concat(_style.FullPagePadding.toString(), ";\n");
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
57
|
* WARNING: NO EXTERNAL FUNCTION CALL IN THIS FUNCTION
|
|
@@ -225,4 +225,4 @@ function applyBreakoutAfterSSR(id, breakoutConsts, shouldSkipBreakoutScript) {
|
|
|
225
225
|
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
226
226
|
window.addEventListener('load', _disconnect);
|
|
227
227
|
}
|
|
228
|
-
var calcLineLength = exports.calcLineLength =
|
|
228
|
+
var calcLineLength = exports.calcLineLength = _breakout.breakoutConsts.calcLineLength(_breakout.breakoutConsts);
|
|
@@ -4,13 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.countNodes = countNodes;
|
|
7
|
-
var
|
|
7
|
+
var _reduce = require("@atlaskit/adf-utils/reduce");
|
|
8
8
|
/* eslint-disable jsdoc/require-jsdoc */
|
|
9
9
|
|
|
10
10
|
// Ignored via go/ees005
|
|
11
11
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12
12
|
function countNodes(adfDocument) {
|
|
13
|
-
return (0,
|
|
13
|
+
return (0, _reduce.reduce)(adfDocument, function (acc, node) {
|
|
14
14
|
acc[node.type] = (acc[node.type] || 0) + 1;
|
|
15
15
|
return acc;
|
|
16
16
|
}, {});
|
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getBaseFontSize = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _constants = require("@atlaskit/editor-shared-styles/constants");
|
|
8
8
|
var getBaseFontSize = exports.getBaseFontSize = function getBaseFontSize(appearance, contentMode) {
|
|
9
9
|
if (contentMode === 'compact') {
|
|
10
|
-
return
|
|
10
|
+
return _constants.akEditorFullPageDenseFontSize;
|
|
11
11
|
}
|
|
12
|
-
return appearance && appearance !== 'comment' ?
|
|
12
|
+
return appearance && appearance !== 'comment' ? _constants.akEditorFullPageDefaultFontSize : 14;
|
|
13
13
|
};
|
|
@@ -17,16 +17,23 @@ var _uuid = require("uuid");
|
|
|
17
17
|
var _schemaDefault = require("@atlaskit/adf-schema/schema-default");
|
|
18
18
|
var _types = require("@atlaskit/analytics-listeners/types");
|
|
19
19
|
var _FabricEditorAnalyticsContext = require("@atlaskit/analytics-namespaced-context/FabricEditorAnalyticsContext");
|
|
20
|
-
var
|
|
20
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
21
|
+
var _BaseTheme = require("@atlaskit/editor-common/BaseTheme");
|
|
21
22
|
var _browser = require("@atlaskit/editor-common/browser");
|
|
23
|
+
var _intlErrorBoundary = require("@atlaskit/editor-common/intl-error-boundary");
|
|
22
24
|
var _nesting = require("@atlaskit/editor-common/nesting");
|
|
23
25
|
var _normalizeFeatureFlags = require("@atlaskit/editor-common/normalize-feature-flags");
|
|
24
26
|
var _performanceMeasures = require("@atlaskit/editor-common/performance-measures");
|
|
25
27
|
var _measureRender = require("@atlaskit/editor-common/performance/measure-render");
|
|
26
28
|
var _navigation = require("@atlaskit/editor-common/performance/navigation");
|
|
27
|
-
var
|
|
28
|
-
var
|
|
29
|
+
var _context = require("@atlaskit/editor-common/provider-factory/context");
|
|
30
|
+
var _providerFactory = _interopRequireDefault(require("@atlaskit/editor-common/provider-factory/provider-factory"));
|
|
31
|
+
var _UnsupportedBlock = _interopRequireDefault(require("@atlaskit/editor-common/UnsupportedBlock"));
|
|
29
32
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
33
|
+
var _analytics = require("@atlaskit/editor-common/utils/analytics");
|
|
34
|
+
var _shouldForceTracking = require("@atlaskit/editor-common/utils/should-force-tracking");
|
|
35
|
+
var _WidthProvider = require("@atlaskit/editor-common/WidthProvider");
|
|
36
|
+
var _WithCreateAnalyticsEvent = require("@atlaskit/editor-common/WithCreateAnalyticsEvent");
|
|
30
37
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
31
38
|
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
32
39
|
var _analyticsContext = _interopRequireDefault(require("../../analytics/analyticsContext"));
|
|
@@ -72,7 +79,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
72
79
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
73
80
|
var RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
74
81
|
var packageName = "@atlaskit/renderer";
|
|
75
|
-
var packageVersion = "149.0.
|
|
82
|
+
var packageVersion = "149.0.4";
|
|
76
83
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
77
84
|
containerName: 'ak-renderer-wrapper',
|
|
78
85
|
containerType: 'inline-size'
|
|
@@ -191,7 +198,7 @@ var RendererFunctionalComponent = exports.RendererFunctionalComponent = function
|
|
|
191
198
|
var createAnalyticsEvent = props.createAnalyticsEvent;
|
|
192
199
|
var mouseDownSelection = (0, _react.useRef)(undefined);
|
|
193
200
|
var providerFactory = (0, _react.useMemo)(function () {
|
|
194
|
-
return props.dataProviders || new _providerFactory.
|
|
201
|
+
return props.dataProviders || new _providerFactory.default();
|
|
195
202
|
}, [props.dataProviders]);
|
|
196
203
|
var _useRendererContext = (0, _rendererContext.useRendererContext)(),
|
|
197
204
|
nestedRendererType = _useRendererContext.nestedRendererType;
|
|
@@ -318,13 +325,13 @@ var RendererFunctionalComponent = exports.RendererFunctionalComponent = function
|
|
|
318
325
|
var anchorLinkElement = document.getElementById(hash);
|
|
319
326
|
if (anchorLinkElement && editorRef.current.contains(anchorLinkElement)) {
|
|
320
327
|
_fireAnalyticsEvent({
|
|
321
|
-
action:
|
|
322
|
-
actionSubject:
|
|
328
|
+
action: _enums.ACTION.VIEWED,
|
|
329
|
+
actionSubject: _enums.ACTION_SUBJECT.ANCHOR_LINK,
|
|
323
330
|
attributes: {
|
|
324
331
|
platform: _events.PLATFORM.WEB,
|
|
325
332
|
mode: _events.MODE.RENDERER
|
|
326
333
|
},
|
|
327
|
-
eventType:
|
|
334
|
+
eventType: _enums.EVENT_TYPE.UI
|
|
328
335
|
});
|
|
329
336
|
}
|
|
330
337
|
}
|
|
@@ -351,20 +358,20 @@ var RendererFunctionalComponent = exports.RendererFunctionalComponent = function
|
|
|
351
358
|
var handleAnalytics = function handleAnalytics() {
|
|
352
359
|
if (Math.random() < RENDER_EVENT_SAMPLE_RATE) {
|
|
353
360
|
_fireAnalyticsEvent({
|
|
354
|
-
action:
|
|
355
|
-
actionSubject:
|
|
361
|
+
action: _enums.ACTION.STARTED,
|
|
362
|
+
actionSubject: _enums.ACTION_SUBJECT.RENDERER,
|
|
356
363
|
attributes: {
|
|
357
364
|
platform: _events.PLATFORM.WEB,
|
|
358
365
|
sampleRate: RENDER_EVENT_SAMPLE_RATE
|
|
359
366
|
},
|
|
360
|
-
eventType:
|
|
367
|
+
eventType: _enums.EVENT_TYPE.UI
|
|
361
368
|
});
|
|
362
369
|
}
|
|
363
370
|
rafID = requestAnimationFrame(function () {
|
|
364
371
|
(0, _performanceMeasures.stopMeasure)("Renderer Render Time: ".concat(id), function (duration) {
|
|
365
372
|
var _analyticsEventSeveri, _analyticsEventSeveri2;
|
|
366
|
-
var forceSeverityTracking = typeof analyticsEventSeverityTracking === 'undefined' && (0,
|
|
367
|
-
var severity = !!forceSeverityTracking || analyticsEventSeverityTracking !== null && analyticsEventSeverityTracking !== void 0 && analyticsEventSeverityTracking.enabled ? (0,
|
|
373
|
+
var forceSeverityTracking = typeof analyticsEventSeverityTracking === 'undefined' && (0, _shouldForceTracking.shouldForceTracking)();
|
|
374
|
+
var severity = !!forceSeverityTracking || analyticsEventSeverityTracking !== null && analyticsEventSeverityTracking !== void 0 && analyticsEventSeverityTracking.enabled ? (0, _analytics.getAnalyticsEventSeverity)(duration, (_analyticsEventSeveri = analyticsEventSeverityTracking === null || analyticsEventSeverityTracking === void 0 ? void 0 : analyticsEventSeverityTracking.severityNormalThreshold) !== null && _analyticsEventSeveri !== void 0 ? _analyticsEventSeveri : NORMAL_SEVERITY_THRESHOLD, (_analyticsEventSeveri2 = analyticsEventSeverityTracking === null || analyticsEventSeverityTracking === void 0 ? void 0 : analyticsEventSeverityTracking.severityDegradedThreshold) !== null && _analyticsEventSeveri2 !== void 0 ? _analyticsEventSeveri2 : DEGRADED_SEVERITY_THRESHOLD) : undefined;
|
|
368
375
|
var isTTRTrackingExplicitlyDisabled = (analyticsEventSeverityTracking === null || analyticsEventSeverityTracking === void 0 ? void 0 : analyticsEventSeverityTracking.enabled) === false;
|
|
369
376
|
|
|
370
377
|
// Ignored via go/ees005
|
|
@@ -387,8 +394,8 @@ var RendererFunctionalComponent = exports.RendererFunctionalComponent = function
|
|
|
387
394
|
}
|
|
388
395
|
if (!isTTRTrackingExplicitlyDisabled) {
|
|
389
396
|
var event = {
|
|
390
|
-
action:
|
|
391
|
-
actionSubject:
|
|
397
|
+
action: _enums.ACTION.RENDERED,
|
|
398
|
+
actionSubject: _enums.ACTION_SUBJECT.RENDERER,
|
|
392
399
|
attributes: {
|
|
393
400
|
platform: _events.PLATFORM.WEB,
|
|
394
401
|
duration: duration,
|
|
@@ -399,7 +406,7 @@ var RendererFunctionalComponent = exports.RendererFunctionalComponent = function
|
|
|
399
406
|
severity: severity,
|
|
400
407
|
sampleRate: RENDER_EVENT_SAMPLE_RATE
|
|
401
408
|
},
|
|
402
|
-
eventType:
|
|
409
|
+
eventType: _enums.EVENT_TYPE.OPERATIONAL
|
|
403
410
|
};
|
|
404
411
|
if (Math.random() < RENDER_EVENT_SAMPLE_RATE) {
|
|
405
412
|
_fireAnalyticsEvent(event);
|
|
@@ -517,7 +524,7 @@ var RendererFunctionalComponent = exports.RendererFunctionalComponent = function
|
|
|
517
524
|
return _fireAnalyticsEvent(event);
|
|
518
525
|
}
|
|
519
526
|
}
|
|
520
|
-
}, (0, _react2.jsx)(_SmartCardStorage.Provider, null, (0, _react2.jsx)(
|
|
527
|
+
}, (0, _react2.jsx)(_SmartCardStorage.Provider, null, (0, _react2.jsx)(_context.ProviderFactoryProvider, {
|
|
521
528
|
value: providerFactory
|
|
522
529
|
}, (0, _react2.jsx)(RendererWrapper, {
|
|
523
530
|
allowAnnotations: props.allowAnnotations,
|
|
@@ -584,7 +591,7 @@ var RendererFunctionalComponent = exports.RendererFunctionalComponent = function
|
|
|
584
591
|
},
|
|
585
592
|
isTopLevelRenderer: rendererContext.isTopLevelRenderer,
|
|
586
593
|
allowRendererContainerStyles: props.allowRendererContainerStyles
|
|
587
|
-
}, (0, _react2.jsx)(
|
|
594
|
+
}, (0, _react2.jsx)(_UnsupportedBlock.default, null));
|
|
588
595
|
}
|
|
589
596
|
};
|
|
590
597
|
var RendererFunctionalComponentMemoized = /*#__PURE__*/_react.default.memo(RendererFunctionalComponent);
|
|
@@ -640,17 +647,17 @@ var RendererWithAnalytics = exports.RendererWithAnalytics = /*#__PURE__*/_react.
|
|
|
640
647
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
641
648
|
editorSessionId: (0, _uuid.v4)()
|
|
642
649
|
}
|
|
643
|
-
}, (0, _react2.jsx)(
|
|
650
|
+
}, (0, _react2.jsx)(_WithCreateAnalyticsEvent.WithCreateAnalyticsEvent
|
|
644
651
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
645
652
|
, {
|
|
646
653
|
render: function render(createAnalyticsEvent) {
|
|
647
654
|
// `IntlErrorBoundary` only captures Internationalisation errors, leaving others for `ErrorBoundary`.
|
|
648
655
|
return (0, _react2.jsx)(_ErrorBoundary.ErrorBoundary, {
|
|
649
|
-
component:
|
|
656
|
+
component: _enums.ACTION_SUBJECT.RENDERER,
|
|
650
657
|
rethrowError: true,
|
|
651
658
|
fallbackComponent: null,
|
|
652
659
|
createAnalyticsEvent: createAnalyticsEvent
|
|
653
|
-
}, (0, _react2.jsx)(
|
|
660
|
+
}, (0, _react2.jsx)(_intlErrorBoundary.IntlErrorBoundary, null, (0, _react2.jsx)(Renderer
|
|
654
661
|
// Ignored via go/ees005
|
|
655
662
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
656
663
|
, (0, _extends2.default)({}, props, {
|
|
@@ -761,13 +768,13 @@ var RendererWrapper = /*#__PURE__*/_react.default.memo(function (props) {
|
|
|
761
768
|
};
|
|
762
769
|
}
|
|
763
770
|
}, [innerRef, addTelepointer]);
|
|
764
|
-
var renderer = (0, _react2.jsx)(
|
|
771
|
+
var renderer = (0, _react2.jsx)(_WidthProvider.WidthProvider
|
|
765
772
|
// eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides, @atlaskit/ui-styling-standard/no-classname-prop -- legacy renderer wrapper appearance classes
|
|
766
773
|
, {
|
|
767
774
|
className: "ak-renderer-wrapper is-".concat(appearance),
|
|
768
775
|
"data-appearance": appearance,
|
|
769
776
|
shouldCheckExistingValue: isInsideOfInlineExtension
|
|
770
|
-
}, (0, _react2.jsx)(
|
|
777
|
+
}, (0, _react2.jsx)(_BaseTheme.BaseTheme, {
|
|
771
778
|
baseFontSize: (0, _getBaseFontSize.getBaseFontSize)(appearance, contentMode)
|
|
772
779
|
}, (0, _react2.jsx)(_EditorMediaClientProvider.EditorMediaClientProvider, {
|
|
773
780
|
ssr: ssr
|
|
@@ -10,7 +10,7 @@ exports.RendererContext = exports.RendererActionsContextConsumer = void 0;
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _types = require("@atlaskit/analytics-listeners/types");
|
|
12
12
|
var _useAnalyticsEvents2 = require("@atlaskit/analytics-next/useAnalyticsEvents");
|
|
13
|
-
var
|
|
13
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
14
14
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
15
15
|
var _index = _interopRequireDefault(require("../../actions/index"));
|
|
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); }
|
|
@@ -36,7 +36,7 @@ function RendererActionsContext(_ref) {
|
|
|
36
36
|
var _ref2 = e,
|
|
37
37
|
stack = _ref2.stack;
|
|
38
38
|
createAnalyticsEvent({
|
|
39
|
-
eventType:
|
|
39
|
+
eventType: _enums.EVENT_TYPE.TRACK,
|
|
40
40
|
action: 'rendered',
|
|
41
41
|
actionSubject: 'multipleChildren',
|
|
42
42
|
actionSubjectId: 'rendererActionsContext',
|
|
@@ -10,7 +10,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _annotation = require("@atlaskit/adf-schema/annotation");
|
|
13
|
-
var
|
|
13
|
+
var _emitter = require("@atlaskit/editor-common/types/emitter");
|
|
14
14
|
var _RendererActionsContext = require("../../../ui/RendererActionsContext");
|
|
15
15
|
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); }
|
|
16
16
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -477,21 +477,21 @@ var AnnotationManagerProvider = exports.AnnotationManagerProvider = function Ann
|
|
|
477
477
|
type: 'resetSelectedAnnotation'
|
|
478
478
|
});
|
|
479
479
|
};
|
|
480
|
-
updateSubscriber === null || updateSubscriber === void 0 || updateSubscriber.on(
|
|
481
|
-
updateSubscriber === null || updateSubscriber === void 0 || updateSubscriber.on(
|
|
482
|
-
updateSubscriber === null || updateSubscriber === void 0 || updateSubscriber.on(
|
|
483
|
-
updateSubscriber === null || updateSubscriber === void 0 || updateSubscriber.on(
|
|
484
|
-
updateSubscriber === null || updateSubscriber === void 0 || updateSubscriber.on(
|
|
485
|
-
updateSubscriber === null || updateSubscriber === void 0 || updateSubscriber.on(
|
|
486
|
-
updateSubscriber === null || updateSubscriber === void 0 || updateSubscriber.on(
|
|
480
|
+
updateSubscriber === null || updateSubscriber === void 0 || updateSubscriber.on(_emitter.AnnotationUpdateEvent.SET_ANNOTATION_STATE, onSetAnnotationState);
|
|
481
|
+
updateSubscriber === null || updateSubscriber === void 0 || updateSubscriber.on(_emitter.AnnotationUpdateEvent.SET_ANNOTATION_FOCUS, onAnnotationSelected);
|
|
482
|
+
updateSubscriber === null || updateSubscriber === void 0 || updateSubscriber.on(_emitter.AnnotationUpdateEvent.SET_ANNOTATION_HOVERED, onAnnotationHovered);
|
|
483
|
+
updateSubscriber === null || updateSubscriber === void 0 || updateSubscriber.on(_emitter.AnnotationUpdateEvent.REMOVE_ANNOTATION_FOCUS, onAnnotationSelectedRemoved);
|
|
484
|
+
updateSubscriber === null || updateSubscriber === void 0 || updateSubscriber.on(_emitter.AnnotationUpdateEvent.REMOVE_ANNOTATION_HOVERED, onAnnotationHoveredRemoved);
|
|
485
|
+
updateSubscriber === null || updateSubscriber === void 0 || updateSubscriber.on(_emitter.AnnotationUpdateEvent.ON_ANNOTATION_CLICK, onAnnotationClick);
|
|
486
|
+
updateSubscriber === null || updateSubscriber === void 0 || updateSubscriber.on(_emitter.AnnotationUpdateEvent.DESELECT_ANNOTATIONS, onAnnotationDeselect);
|
|
487
487
|
return function () {
|
|
488
|
-
updateSubscriber === null || updateSubscriber === void 0 || updateSubscriber.off(
|
|
489
|
-
updateSubscriber === null || updateSubscriber === void 0 || updateSubscriber.off(
|
|
490
|
-
updateSubscriber === null || updateSubscriber === void 0 || updateSubscriber.off(
|
|
491
|
-
updateSubscriber === null || updateSubscriber === void 0 || updateSubscriber.off(
|
|
492
|
-
updateSubscriber === null || updateSubscriber === void 0 || updateSubscriber.off(
|
|
493
|
-
updateSubscriber === null || updateSubscriber === void 0 || updateSubscriber.off(
|
|
494
|
-
updateSubscriber === null || updateSubscriber === void 0 || updateSubscriber.off(
|
|
488
|
+
updateSubscriber === null || updateSubscriber === void 0 || updateSubscriber.off(_emitter.AnnotationUpdateEvent.SET_ANNOTATION_STATE, onSetAnnotationState);
|
|
489
|
+
updateSubscriber === null || updateSubscriber === void 0 || updateSubscriber.off(_emitter.AnnotationUpdateEvent.SET_ANNOTATION_FOCUS, onAnnotationSelected);
|
|
490
|
+
updateSubscriber === null || updateSubscriber === void 0 || updateSubscriber.off(_emitter.AnnotationUpdateEvent.SET_ANNOTATION_HOVERED, onAnnotationHovered);
|
|
491
|
+
updateSubscriber === null || updateSubscriber === void 0 || updateSubscriber.off(_emitter.AnnotationUpdateEvent.REMOVE_ANNOTATION_FOCUS, onAnnotationSelectedRemoved);
|
|
492
|
+
updateSubscriber === null || updateSubscriber === void 0 || updateSubscriber.off(_emitter.AnnotationUpdateEvent.REMOVE_ANNOTATION_HOVERED, onAnnotationHoveredRemoved);
|
|
493
|
+
updateSubscriber === null || updateSubscriber === void 0 || updateSubscriber.off(_emitter.AnnotationUpdateEvent.ON_ANNOTATION_CLICK, onAnnotationClick);
|
|
494
|
+
updateSubscriber === null || updateSubscriber === void 0 || updateSubscriber.off(_emitter.AnnotationUpdateEvent.DESELECT_ANNOTATIONS, onAnnotationDeselect);
|
|
495
495
|
};
|
|
496
496
|
}, [updateSubscriber]);
|
|
497
497
|
var dispatchData = (0, _react.useMemo)(function () {
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.MarkElement = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _annotation = require("@atlaskit/adf-schema/annotation");
|
|
10
|
-
var
|
|
10
|
+
var _emitter = require("@atlaskit/editor-common/types/emitter");
|
|
11
11
|
var _context = require("../context");
|
|
12
12
|
var _AnnotationManagerContext = require("../contexts/AnnotationManagerContext");
|
|
13
13
|
var _useEvents = require("../hooks/use-events");
|
|
@@ -79,7 +79,7 @@ var MarkElement = exports.MarkElement = function MarkElement(_ref) {
|
|
|
79
79
|
// TODO: EDITOR-595 - An error occurred while checking the preemptive gate. We should report this error.
|
|
80
80
|
});
|
|
81
81
|
} else {
|
|
82
|
-
updateSubscriber.emit(
|
|
82
|
+
updateSubscriber.emit(_emitter.AnnotationUpdateEvent.ON_ANNOTATION_CLICK, {
|
|
83
83
|
annotationIds: annotationIds,
|
|
84
84
|
eventTarget: eventTarget
|
|
85
85
|
});
|
|
@@ -10,8 +10,8 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
10
10
|
var _react = require("react");
|
|
11
11
|
var _annotation = require("@atlaskit/adf-schema/annotation");
|
|
12
12
|
var _types = require("@atlaskit/analytics-listeners/types");
|
|
13
|
-
var
|
|
14
|
-
var
|
|
13
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
14
|
+
var _emitter = require("@atlaskit/editor-common/types/emitter");
|
|
15
15
|
var _AnnotationManagerContext = require("../contexts/AnnotationManagerContext");
|
|
16
16
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
17
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -47,9 +47,9 @@ var useAnnotationStateByTypeEvent = exports.useAnnotationStateByTypeEvent = func
|
|
|
47
47
|
setStates(_objectSpread(_objectSpread({}, states), nextStates));
|
|
48
48
|
};
|
|
49
49
|
if (!isAnnotationManagerEnabled) {
|
|
50
|
-
updateSubscriber.on(
|
|
50
|
+
updateSubscriber.on(_emitter.AnnotationUpdateEvent.SET_ANNOTATION_STATE, cb);
|
|
51
51
|
return function () {
|
|
52
|
-
updateSubscriber.off(
|
|
52
|
+
updateSubscriber.off(_emitter.AnnotationUpdateEvent.SET_ANNOTATION_STATE, cb);
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
55
|
}, [states, type, updateSubscriber, dispatch, isAnnotationManagerEnabled]);
|
|
@@ -98,15 +98,15 @@ var useHasFocusEvent = exports.useHasFocusEvent = function useHasFocusEvent(_ref
|
|
|
98
98
|
setIsHovered(false);
|
|
99
99
|
};
|
|
100
100
|
if (!isAnnotationManagerEnabled) {
|
|
101
|
-
updateSubscriber.on(
|
|
102
|
-
updateSubscriber.on(
|
|
103
|
-
updateSubscriber.on(
|
|
104
|
-
updateSubscriber.on(
|
|
101
|
+
updateSubscriber.on(_emitter.AnnotationUpdateEvent.SET_ANNOTATION_FOCUS, cb);
|
|
102
|
+
updateSubscriber.on(_emitter.AnnotationUpdateEvent.SET_ANNOTATION_HOVERED, callbackForHoveredAnnotation);
|
|
103
|
+
updateSubscriber.on(_emitter.AnnotationUpdateEvent.REMOVE_ANNOTATION_FOCUS, removeFocus);
|
|
104
|
+
updateSubscriber.on(_emitter.AnnotationUpdateEvent.REMOVE_ANNOTATION_HOVERED, removeHoverEffect);
|
|
105
105
|
return function () {
|
|
106
|
-
updateSubscriber.off(
|
|
107
|
-
updateSubscriber.off(
|
|
108
|
-
updateSubscriber.off(
|
|
109
|
-
updateSubscriber.off(
|
|
106
|
+
updateSubscriber.off(_emitter.AnnotationUpdateEvent.SET_ANNOTATION_FOCUS, cb);
|
|
107
|
+
updateSubscriber.off(_emitter.AnnotationUpdateEvent.SET_ANNOTATION_HOVERED, callbackForHoveredAnnotation);
|
|
108
|
+
updateSubscriber.off(_emitter.AnnotationUpdateEvent.REMOVE_ANNOTATION_FOCUS, removeFocus);
|
|
109
|
+
updateSubscriber.off(_emitter.AnnotationUpdateEvent.SET_ANNOTATION_HOVERED, removeHoverEffect);
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
112
|
}, [id, updateSubscriber, isAnnotationManagerEnabled]);
|
|
@@ -172,10 +172,10 @@ var useAnnotationClickEvent = exports.useAnnotationClickEvent = function useAnno
|
|
|
172
172
|
});
|
|
173
173
|
if (createAnalyticsEvent) {
|
|
174
174
|
createAnalyticsEvent({
|
|
175
|
-
action:
|
|
176
|
-
actionSubject:
|
|
177
|
-
actionSubjectId:
|
|
178
|
-
eventType:
|
|
175
|
+
action: _enums.ACTION.VIEWED,
|
|
176
|
+
actionSubject: _enums.ACTION_SUBJECT.ANNOTATION,
|
|
177
|
+
actionSubjectId: _enums.ACTION_SUBJECT_ID.INLINE_COMMENT,
|
|
178
|
+
eventType: _enums.EVENT_TYPE.TRACK,
|
|
179
179
|
attributes: {
|
|
180
180
|
overlap: annotationsByType.length || 0,
|
|
181
181
|
targetNodeType: eventTargetType,
|
|
@@ -195,11 +195,11 @@ var useAnnotationClickEvent = exports.useAnnotationClickEvent = function useAnno
|
|
|
195
195
|
});
|
|
196
196
|
};
|
|
197
197
|
if (!isAnnotationManagerEnabled) {
|
|
198
|
-
updateSubscriber.on(
|
|
199
|
-
updateSubscriber.on(
|
|
198
|
+
updateSubscriber.on(_emitter.AnnotationUpdateEvent.ON_ANNOTATION_CLICK, clickCb);
|
|
199
|
+
updateSubscriber.on(_emitter.AnnotationUpdateEvent.DESELECT_ANNOTATIONS, deselectCb);
|
|
200
200
|
return function () {
|
|
201
|
-
updateSubscriber.off(
|
|
202
|
-
updateSubscriber.off(
|
|
201
|
+
updateSubscriber.off(_emitter.AnnotationUpdateEvent.ON_ANNOTATION_CLICK, clickCb);
|
|
202
|
+
updateSubscriber.off(_emitter.AnnotationUpdateEvent.DESELECT_ANNOTATIONS, deselectCb);
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
205
|
}, [updateSubscriber, createAnalyticsEvent, isNestedRender, isAnnotationManagerEnabled]);
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.useLoadAnnotations = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = require("react");
|
|
10
|
-
var
|
|
10
|
+
var _emitter = require("@atlaskit/editor-common/types/emitter");
|
|
11
11
|
var _RendererActionsContext = require("../../RendererActionsContext");
|
|
12
12
|
var _context = require("../context");
|
|
13
13
|
var _AnnotationManagerContext = require("../contexts/AnnotationManagerContext");
|
|
@@ -64,7 +64,7 @@ var useLoadAnnotations = exports.useLoadAnnotations = function useLoadAnnotation
|
|
|
64
64
|
})
|
|
65
65
|
});
|
|
66
66
|
} else {
|
|
67
|
-
updateSubscriberInlineComment.emit(
|
|
67
|
+
updateSubscriberInlineComment.emit(_emitter.AnnotationUpdateEvent.SET_ANNOTATION_STATE, payload);
|
|
68
68
|
}
|
|
69
69
|
onLoadComplete && onLoadComplete({
|
|
70
70
|
numberOfUnresolvedInlineComments: data.filter(function (data) {
|
|
@@ -8,7 +8,7 @@ exports.Mounter = void 0;
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _annotation = require("@atlaskit/adf-schema/annotation");
|
|
10
10
|
var _types = require("@atlaskit/analytics-listeners/types");
|
|
11
|
-
var
|
|
11
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
12
12
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
13
13
|
var _RendererActionsContext = require("../../RendererActionsContext");
|
|
14
14
|
var _AnnotationRangeContext = require("../contexts/AnnotationRangeContext");
|
|
@@ -44,11 +44,11 @@ var Mounter = exports.Mounter = /*#__PURE__*/_react.default.memo(function (props
|
|
|
44
44
|
};
|
|
45
45
|
if (createAnalyticsEvent) {
|
|
46
46
|
createAnalyticsEvent({
|
|
47
|
-
action:
|
|
48
|
-
actionSubject:
|
|
49
|
-
actionSubjectId:
|
|
47
|
+
action: _enums.ACTION.INSERTED,
|
|
48
|
+
actionSubject: _enums.ACTION_SUBJECT.ANNOTATION,
|
|
49
|
+
actionSubjectId: _enums.ACTION_SUBJECT_ID.INLINE_COMMENT,
|
|
50
50
|
attributes: {},
|
|
51
|
-
eventType:
|
|
51
|
+
eventType: _enums.EVENT_TYPE.TRACK
|
|
52
52
|
}).fire(_types.FabricChannel.editor);
|
|
53
53
|
}
|
|
54
54
|
return applyAnnotation(positionToAnnotate, annotation);
|
|
@@ -67,14 +67,14 @@ var Mounter = exports.Mounter = /*#__PURE__*/_react.default.memo(function (props
|
|
|
67
67
|
if (!documentPosition || !isAnnotationAllowed) {
|
|
68
68
|
if (createAnalyticsEvent) {
|
|
69
69
|
createAnalyticsEvent({
|
|
70
|
-
action:
|
|
71
|
-
actionSubject:
|
|
72
|
-
actionSubjectId:
|
|
70
|
+
action: _enums.ACTION.CREATE_NOT_ALLOWED,
|
|
71
|
+
actionSubject: _enums.ACTION_SUBJECT.ANNOTATION,
|
|
72
|
+
actionSubjectId: _enums.ACTION_SUBJECT_ID.INLINE_COMMENT,
|
|
73
73
|
attributes: {
|
|
74
74
|
documentPosition: documentPosition,
|
|
75
75
|
isAnnotationAllowed: isAnnotationAllowed
|
|
76
76
|
},
|
|
77
|
-
eventType:
|
|
77
|
+
eventType: _enums.EVENT_TYPE.TRACK
|
|
78
78
|
}).fire(_types.FabricChannel.editor);
|
|
79
79
|
}
|
|
80
80
|
return false;
|
|
@@ -90,10 +90,10 @@ var Mounter = exports.Mounter = /*#__PURE__*/_react.default.memo(function (props
|
|
|
90
90
|
if (createAnalyticsEvent) {
|
|
91
91
|
var uniqueAnnotationsInRange = actions.getAnnotationsByPosition(range);
|
|
92
92
|
createAnalyticsEvent({
|
|
93
|
-
action:
|
|
94
|
-
actionSubject:
|
|
95
|
-
actionSubjectId:
|
|
96
|
-
eventType:
|
|
93
|
+
action: _enums.ACTION.OPENED,
|
|
94
|
+
actionSubject: _enums.ACTION_SUBJECT.ANNOTATION,
|
|
95
|
+
actionSubjectId: _enums.ACTION_SUBJECT_ID.INLINE_COMMENT,
|
|
96
|
+
eventType: _enums.EVENT_TYPE.TRACK,
|
|
97
97
|
attributes: {
|
|
98
98
|
overlap: uniqueAnnotationsInRange.length
|
|
99
99
|
}
|
|
@@ -116,15 +116,15 @@ var Mounter = exports.Mounter = /*#__PURE__*/_react.default.memo(function (props
|
|
|
116
116
|
if (!positionToAnnotate || !applyAnnotation || !options.annotationId) {
|
|
117
117
|
if (createAnalyticsEvent) {
|
|
118
118
|
createAnalyticsEvent({
|
|
119
|
-
action:
|
|
120
|
-
actionSubject:
|
|
121
|
-
actionSubjectId:
|
|
119
|
+
action: _enums.ACTION.CREATE_NOT_ALLOWED,
|
|
120
|
+
actionSubject: _enums.ACTION_SUBJECT.ANNOTATION,
|
|
121
|
+
actionSubjectId: _enums.ACTION_SUBJECT_ID.INLINE_COMMENT,
|
|
122
122
|
attributes: {
|
|
123
123
|
positionToAnnotate: positionToAnnotate,
|
|
124
124
|
applyAnnotationMissing: !applyAnnotation,
|
|
125
125
|
annotationId: options.annotationId
|
|
126
126
|
},
|
|
127
|
-
eventType:
|
|
127
|
+
eventType: _enums.EVENT_TYPE.TRACK
|
|
128
128
|
}).fire(_types.FabricChannel.editor);
|
|
129
129
|
}
|
|
130
130
|
return false;
|
|
@@ -145,10 +145,10 @@ var Mounter = exports.Mounter = /*#__PURE__*/_react.default.memo(function (props
|
|
|
145
145
|
var onCloseCallback = (0, _react.useCallback)(function () {
|
|
146
146
|
if (createAnalyticsEvent) {
|
|
147
147
|
createAnalyticsEvent({
|
|
148
|
-
action:
|
|
149
|
-
actionSubject:
|
|
150
|
-
actionSubjectId:
|
|
151
|
-
eventType:
|
|
148
|
+
action: _enums.ACTION.CLOSED,
|
|
149
|
+
actionSubject: _enums.ACTION_SUBJECT.ANNOTATION,
|
|
150
|
+
actionSubjectId: _enums.ACTION_SUBJECT_ID.INLINE_COMMENT,
|
|
151
|
+
eventType: _enums.EVENT_TYPE.TRACK,
|
|
152
152
|
attributes: {}
|
|
153
153
|
}).fire(_types.FabricChannel.editor);
|
|
154
154
|
}
|