@atlaskit/renderer 126.8.11 → 126.9.1
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 +18 -0
- package/dist/cjs/react/nodes/date.js +7 -2
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +9 -1
- package/dist/cjs/ui/Renderer/index.js +5 -3
- package/dist/es2019/react/nodes/date.js +8 -2
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +9 -1
- package/dist/es2019/ui/Renderer/index.js +5 -2
- package/dist/esm/react/nodes/date.js +7 -2
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +9 -1
- package/dist/esm/ui/Renderer/index.js +5 -3
- package/dist/types/renderer-context.d.ts +1 -0
- package/dist/types/ui/renderer-props.d.ts +1 -0
- package/dist/types-ts4.5/renderer-context.d.ts +1 -0
- package/dist/types-ts4.5/ui/renderer-props.d.ts +1 -0
- package/package.json +11 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 126.9.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`f47d5ca6cd33f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f47d5ca6cd33f) -
|
|
8
|
+
[EDITOR-5116] Fixes the unnecessary padding added when a heading is the first node in a panel
|
|
9
|
+
|
|
10
|
+
## 126.9.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- [`aac76ca1cde5b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/aac76ca1cde5b) -
|
|
15
|
+
Fix hydration error with dates in task lists
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 126.8.11
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -11,7 +11,9 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
13
13
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
14
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
14
15
|
var _reactIntlNext = require("react-intl-next");
|
|
16
|
+
var _rendererContext = require("../../renderer-context");
|
|
15
17
|
var _TaskItemsFormatContext = require("../../ui/TaskItemsFormatContext/TaskItemsFormatContext");
|
|
16
18
|
var _useInlineAnnotationProps = require("../../ui/annotations/element/useInlineAnnotationProps");
|
|
17
19
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
@@ -20,7 +22,10 @@ var Date = /*#__PURE__*/(0, _react.memo)(function Date(props) {
|
|
|
20
22
|
var timestamp = props.timestamp,
|
|
21
23
|
parentIsIncompleteTask = props.parentIsIncompleteTask,
|
|
22
24
|
intl = props.intl;
|
|
23
|
-
var
|
|
25
|
+
var _useRendererContext = (0, _rendererContext.useRendererContext)(),
|
|
26
|
+
contextTimeZone = _useRendererContext.timeZone;
|
|
27
|
+
var timeZone = (0, _expValEquals.expValEquals)('confluence_frontend_fix_date_hydration_error', 'isEnabled', true) ? contextTimeZone : undefined;
|
|
28
|
+
var className = !!parentIsIncompleteTask && (0, _utils.isPastDate)(timestamp, timeZone) ? 'date-node date-node-highlighted' : 'date-node';
|
|
24
29
|
return /*#__PURE__*/_react.default.createElement("span", (0, _extends2.default)({
|
|
25
30
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
26
31
|
className: _styles.DateSharedCssClassName.DATE_WRAPPER
|
|
@@ -31,7 +36,7 @@ var Date = /*#__PURE__*/(0, _react.memo)(function Date(props) {
|
|
|
31
36
|
className: className,
|
|
32
37
|
"data-node-type": "date",
|
|
33
38
|
"data-timestamp": timestamp
|
|
34
|
-
}, parentIsIncompleteTask ? (0, _utils.timestampToTaskContext)(timestamp, intl) : (0, _utils.timestampToString)(timestamp, intl)));
|
|
39
|
+
}, parentIsIncompleteTask ? (0, _utils.timestampToTaskContext)(timestamp, intl, timeZone) : (0, _utils.timestampToString)(timestamp, intl)));
|
|
35
40
|
});
|
|
36
41
|
var DateComponent = exports.DateComponent = (0, _reactIntlNext.injectIntl)(Date);
|
|
37
42
|
function DateWithFormatContext(props) {
|
|
@@ -956,6 +956,14 @@ var tasksAndDecisionsStyles = (0, _react.css)({
|
|
|
956
956
|
}
|
|
957
957
|
}
|
|
958
958
|
});
|
|
959
|
+
var headingPanelStyles = (0, _react.css)({
|
|
960
|
+
// Removes the margin top from the first heading in a panel
|
|
961
|
+
'.ak-editor-panel__content': {
|
|
962
|
+
'> .renderer-heading-wrapper:first-child': {
|
|
963
|
+
marginTop: 0
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
});
|
|
959
967
|
var smartCardStyles = (0, _react.css)((0, _defineProperty2.default)({}, ".".concat(_styles.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER), {
|
|
960
968
|
display: 'block',
|
|
961
969
|
margin: "".concat(_editorSharedStyles.blockNodesVerticalMargin, " 0 0"),
|
|
@@ -1934,7 +1942,7 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
|
|
|
1934
1942
|
},
|
|
1935
1943
|
css: [(0, _expValEquals.expValEquals)('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererFullWidthStyles : oldRendererFullWidthStyles), (appearance === 'full-width' || appearance === 'max' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true))) && !(0, _table.isTableResizingEnabled)(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true)) && ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && isCompactModeSupported && extensionStyle, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles,
|
|
1936
1944
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
1937
|
-
textHighlightPaddingStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, (0, _experiments.editorExperiment)('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
|
|
1945
|
+
textHighlightPaddingStyles, tasksAndDecisionsStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingPanelStyles, smartCardStyles, smartCardStylesAvatarFix, (0, _experiments.editorExperiment)('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
|
|
1938
1946
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
1939
1947
|
(0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor,
|
|
1940
1948
|
// this should be placed after baseOtherStyles
|
|
@@ -71,7 +71,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
71
71
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
72
72
|
var RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
73
73
|
var packageName = "@atlaskit/renderer";
|
|
74
|
-
var packageVersion = "126.
|
|
74
|
+
var packageVersion = "126.9.0";
|
|
75
75
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
76
76
|
containerName: 'ak-renderer-wrapper',
|
|
77
77
|
containerType: 'inline-size'
|
|
@@ -438,8 +438,10 @@ var RendererFunctionalComponent = exports.RendererFunctionalComponent = function
|
|
|
438
438
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
439
439
|
}, []);
|
|
440
440
|
var rendererContext = (0, _react.useMemo)(function () {
|
|
441
|
-
return createRendererContext(props.featureFlags, props.isTopLevelRenderer, props.contentMode)
|
|
442
|
-
|
|
441
|
+
return _objectSpread(_objectSpread({}, createRendererContext(props.featureFlags, props.isTopLevelRenderer, props.contentMode)), {}, {
|
|
442
|
+
timeZone: props.timeZone
|
|
443
|
+
});
|
|
444
|
+
}, [props.featureFlags, props.isTopLevelRenderer, createRendererContext, props.contentMode, props.timeZone]);
|
|
443
445
|
(0, _useScrollToBlock.useScrollToBlock)(editorRef, props.document);
|
|
444
446
|
try {
|
|
445
447
|
var _rendererContext$feat, _props$media;
|
|
@@ -2,7 +2,9 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React, { memo } from 'react';
|
|
3
3
|
import { DateSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
4
4
|
import { isPastDate, timestampToString, timestampToTaskContext } from '@atlaskit/editor-common/utils';
|
|
5
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
5
6
|
import { injectIntl } from 'react-intl-next';
|
|
7
|
+
import { useRendererContext } from '../../renderer-context';
|
|
6
8
|
import { useTaskItemsFormatContext } from '../../ui/TaskItemsFormatContext/TaskItemsFormatContext';
|
|
7
9
|
import { useInlineAnnotationProps } from '../../ui/annotations/element/useInlineAnnotationProps';
|
|
8
10
|
const Date = /*#__PURE__*/memo(function Date(props) {
|
|
@@ -12,7 +14,11 @@ const Date = /*#__PURE__*/memo(function Date(props) {
|
|
|
12
14
|
parentIsIncompleteTask,
|
|
13
15
|
intl
|
|
14
16
|
} = props;
|
|
15
|
-
const
|
|
17
|
+
const {
|
|
18
|
+
timeZone: contextTimeZone
|
|
19
|
+
} = useRendererContext();
|
|
20
|
+
const timeZone = expValEquals('confluence_frontend_fix_date_hydration_error', 'isEnabled', true) ? contextTimeZone : undefined;
|
|
21
|
+
const className = !!parentIsIncompleteTask && isPastDate(timestamp, timeZone) ? 'date-node date-node-highlighted' : 'date-node';
|
|
16
22
|
return /*#__PURE__*/React.createElement("span", _extends({
|
|
17
23
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
18
24
|
className: DateSharedCssClassName.DATE_WRAPPER
|
|
@@ -23,7 +29,7 @@ const Date = /*#__PURE__*/memo(function Date(props) {
|
|
|
23
29
|
className: className,
|
|
24
30
|
"data-node-type": "date",
|
|
25
31
|
"data-timestamp": timestamp
|
|
26
|
-
}, parentIsIncompleteTask ? timestampToTaskContext(timestamp, intl) : timestampToString(timestamp, intl)));
|
|
32
|
+
}, parentIsIncompleteTask ? timestampToTaskContext(timestamp, intl, timeZone) : timestampToString(timestamp, intl)));
|
|
27
33
|
});
|
|
28
34
|
export const DateComponent = injectIntl(Date);
|
|
29
35
|
function DateWithFormatContext(props) {
|
|
@@ -1135,6 +1135,14 @@ const tasksAndDecisionsStyles = css({
|
|
|
1135
1135
|
}
|
|
1136
1136
|
}
|
|
1137
1137
|
});
|
|
1138
|
+
const headingPanelStyles = css({
|
|
1139
|
+
// Removes the margin top from the first heading in a panel
|
|
1140
|
+
'.ak-editor-panel__content': {
|
|
1141
|
+
'> .renderer-heading-wrapper:first-child': {
|
|
1142
|
+
marginTop: 0
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
});
|
|
1138
1146
|
const smartCardStyles = css({
|
|
1139
1147
|
[`.${SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER}`]: {
|
|
1140
1148
|
display: 'block',
|
|
@@ -2459,7 +2467,7 @@ export const RendererStyleContainer = props => {
|
|
|
2459
2467
|
},
|
|
2460
2468
|
css: [expValEquals('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererFullWidthStyles : oldRendererFullWidthStyles), (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && isCompactModeSupported && extensionStyle, fg('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles,
|
|
2461
2469
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
2462
|
-
textHighlightPaddingStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, editorExperiment('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
|
|
2470
|
+
textHighlightPaddingStyles, tasksAndDecisionsStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingPanelStyles, smartCardStyles, smartCardStylesAvatarFix, editorExperiment('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
|
|
2463
2471
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
2464
2472
|
fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor,
|
|
2465
2473
|
// this should be placed after baseOtherStyles
|
|
@@ -57,7 +57,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
57
57
|
const TABLE_INFO_TIMEOUT = 10000;
|
|
58
58
|
const RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
59
59
|
const packageName = "@atlaskit/renderer";
|
|
60
|
-
const packageVersion = "126.
|
|
60
|
+
const packageVersion = "126.9.0";
|
|
61
61
|
const setAsQueryContainerStyles = css({
|
|
62
62
|
containerName: 'ak-renderer-wrapper',
|
|
63
63
|
containerType: 'inline-size'
|
|
@@ -430,7 +430,10 @@ export const RendererFunctionalComponent = props => {
|
|
|
430
430
|
// having a dependency array means we run stopMeasure twice per render
|
|
431
431
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
432
432
|
}, []);
|
|
433
|
-
const rendererContext = useMemo(() =>
|
|
433
|
+
const rendererContext = useMemo(() => ({
|
|
434
|
+
...createRendererContext(props.featureFlags, props.isTopLevelRenderer, props.contentMode),
|
|
435
|
+
timeZone: props.timeZone
|
|
436
|
+
}), [props.featureFlags, props.isTopLevelRenderer, createRendererContext, props.contentMode, props.timeZone]);
|
|
434
437
|
useScrollToBlock(editorRef, props.document);
|
|
435
438
|
try {
|
|
436
439
|
var _rendererContext$feat, _props$media;
|
|
@@ -3,7 +3,9 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
import React, { memo } from 'react';
|
|
4
4
|
import { DateSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
5
5
|
import { isPastDate, timestampToString, timestampToTaskContext } from '@atlaskit/editor-common/utils';
|
|
6
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
7
|
import { injectIntl } from 'react-intl-next';
|
|
8
|
+
import { useRendererContext } from '../../renderer-context';
|
|
7
9
|
import { useTaskItemsFormatContext } from '../../ui/TaskItemsFormatContext/TaskItemsFormatContext';
|
|
8
10
|
import { useInlineAnnotationProps } from '../../ui/annotations/element/useInlineAnnotationProps';
|
|
9
11
|
var Date = /*#__PURE__*/memo(function Date(props) {
|
|
@@ -11,7 +13,10 @@ var Date = /*#__PURE__*/memo(function Date(props) {
|
|
|
11
13
|
var timestamp = props.timestamp,
|
|
12
14
|
parentIsIncompleteTask = props.parentIsIncompleteTask,
|
|
13
15
|
intl = props.intl;
|
|
14
|
-
var
|
|
16
|
+
var _useRendererContext = useRendererContext(),
|
|
17
|
+
contextTimeZone = _useRendererContext.timeZone;
|
|
18
|
+
var timeZone = expValEquals('confluence_frontend_fix_date_hydration_error', 'isEnabled', true) ? contextTimeZone : undefined;
|
|
19
|
+
var className = !!parentIsIncompleteTask && isPastDate(timestamp, timeZone) ? 'date-node date-node-highlighted' : 'date-node';
|
|
15
20
|
return /*#__PURE__*/React.createElement("span", _extends({
|
|
16
21
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
17
22
|
className: DateSharedCssClassName.DATE_WRAPPER
|
|
@@ -22,7 +27,7 @@ var Date = /*#__PURE__*/memo(function Date(props) {
|
|
|
22
27
|
className: className,
|
|
23
28
|
"data-node-type": "date",
|
|
24
29
|
"data-timestamp": timestamp
|
|
25
|
-
}, parentIsIncompleteTask ? timestampToTaskContext(timestamp, intl) : timestampToString(timestamp, intl)));
|
|
30
|
+
}, parentIsIncompleteTask ? timestampToTaskContext(timestamp, intl, timeZone) : timestampToString(timestamp, intl)));
|
|
26
31
|
});
|
|
27
32
|
export var DateComponent = injectIntl(Date);
|
|
28
33
|
function DateWithFormatContext(props) {
|
|
@@ -949,6 +949,14 @@ var tasksAndDecisionsStyles = css({
|
|
|
949
949
|
}
|
|
950
950
|
}
|
|
951
951
|
});
|
|
952
|
+
var headingPanelStyles = css({
|
|
953
|
+
// Removes the margin top from the first heading in a panel
|
|
954
|
+
'.ak-editor-panel__content': {
|
|
955
|
+
'> .renderer-heading-wrapper:first-child': {
|
|
956
|
+
marginTop: 0
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
});
|
|
952
960
|
var smartCardStyles = css(_defineProperty({}, ".".concat(SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER), {
|
|
953
961
|
display: 'block',
|
|
954
962
|
margin: "".concat(blockNodesVerticalMargin, " 0 0"),
|
|
@@ -1927,7 +1935,7 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
|
|
|
1927
1935
|
},
|
|
1928
1936
|
css: [expValEquals('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererFullWidthStyles : oldRendererFullWidthStyles), (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && isCompactModeSupported && extensionStyle, fg('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles,
|
|
1929
1937
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
1930
|
-
textHighlightPaddingStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, editorExperiment('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
|
|
1938
|
+
textHighlightPaddingStyles, tasksAndDecisionsStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingPanelStyles, smartCardStyles, smartCardStylesAvatarFix, editorExperiment('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
|
|
1931
1939
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
1932
1940
|
fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor,
|
|
1933
1941
|
// this should be placed after baseOtherStyles
|
|
@@ -62,7 +62,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
62
62
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
63
63
|
var RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
64
64
|
var packageName = "@atlaskit/renderer";
|
|
65
|
-
var packageVersion = "126.
|
|
65
|
+
var packageVersion = "126.9.0";
|
|
66
66
|
var setAsQueryContainerStyles = css({
|
|
67
67
|
containerName: 'ak-renderer-wrapper',
|
|
68
68
|
containerType: 'inline-size'
|
|
@@ -429,8 +429,10 @@ export var RendererFunctionalComponent = function RendererFunctionalComponent(pr
|
|
|
429
429
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
430
430
|
}, []);
|
|
431
431
|
var rendererContext = useMemo(function () {
|
|
432
|
-
return createRendererContext(props.featureFlags, props.isTopLevelRenderer, props.contentMode)
|
|
433
|
-
|
|
432
|
+
return _objectSpread(_objectSpread({}, createRendererContext(props.featureFlags, props.isTopLevelRenderer, props.contentMode)), {}, {
|
|
433
|
+
timeZone: props.timeZone
|
|
434
|
+
});
|
|
435
|
+
}, [props.featureFlags, props.isTopLevelRenderer, createRendererContext, props.contentMode, props.timeZone]);
|
|
434
436
|
useScrollToBlock(editorRef, props.document);
|
|
435
437
|
try {
|
|
436
438
|
var _rendererContext$feat, _props$media;
|
|
@@ -6,6 +6,7 @@ export type RendererContextProps = {
|
|
|
6
6
|
featureFlags?: FeatureFlags;
|
|
7
7
|
isTopLevelRenderer?: boolean;
|
|
8
8
|
nestedRendererType?: NestedRendererType;
|
|
9
|
+
timeZone?: string;
|
|
9
10
|
};
|
|
10
11
|
export declare const useRendererContext: () => RendererContextProps;
|
|
11
12
|
export declare const RendererContextProvider: React.Provider<{}>;
|
|
@@ -147,6 +147,7 @@ export interface RendererProps {
|
|
|
147
147
|
smartLinks?: SmartLinksOptions;
|
|
148
148
|
stickyHeaders?: StickyHeaderProps;
|
|
149
149
|
textHighlighter?: TextHighlighter;
|
|
150
|
+
timeZone?: string;
|
|
150
151
|
truncated?: boolean;
|
|
151
152
|
UNSTABLE_allowTableAlignment?: boolean;
|
|
152
153
|
UNSTABLE_allowTableResizing?: boolean;
|
|
@@ -6,6 +6,7 @@ export type RendererContextProps = {
|
|
|
6
6
|
featureFlags?: FeatureFlags;
|
|
7
7
|
isTopLevelRenderer?: boolean;
|
|
8
8
|
nestedRendererType?: NestedRendererType;
|
|
9
|
+
timeZone?: string;
|
|
9
10
|
};
|
|
10
11
|
export declare const useRendererContext: () => RendererContextProps;
|
|
11
12
|
export declare const RendererContextProvider: React.Provider<{}>;
|
|
@@ -147,6 +147,7 @@ export interface RendererProps {
|
|
|
147
147
|
smartLinks?: SmartLinksOptions;
|
|
148
148
|
stickyHeaders?: StickyHeaderProps;
|
|
149
149
|
textHighlighter?: TextHighlighter;
|
|
150
|
+
timeZone?: string;
|
|
150
151
|
truncated?: boolean;
|
|
151
152
|
UNSTABLE_allowTableAlignment?: boolean;
|
|
152
153
|
UNSTABLE_allowTableResizing?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "126.
|
|
3
|
+
"version": "126.9.1",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
"@atlaskit/link-extractors": "^2.4.0",
|
|
45
45
|
"@atlaskit/linking-common": "^9.9.0",
|
|
46
46
|
"@atlaskit/media-card": "^79.15.0",
|
|
47
|
-
"@atlaskit/media-client": "^35.
|
|
48
|
-
"@atlaskit/media-client-react": "^4.
|
|
49
|
-
"@atlaskit/media-common": "^12.
|
|
47
|
+
"@atlaskit/media-client": "^35.8.0",
|
|
48
|
+
"@atlaskit/media-client-react": "^4.2.0",
|
|
49
|
+
"@atlaskit/media-common": "^12.4.0",
|
|
50
50
|
"@atlaskit/media-filmstrip": "^51.1.0",
|
|
51
51
|
"@atlaskit/media-ui": "^28.7.0",
|
|
52
|
-
"@atlaskit/media-viewer": "^52.
|
|
52
|
+
"@atlaskit/media-viewer": "^52.8.0",
|
|
53
53
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
54
54
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
55
55
|
"@atlaskit/react-ufo": "^5.2.0",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@atlaskit/status": "^3.1.0",
|
|
58
58
|
"@atlaskit/task-decision": "^19.2.0",
|
|
59
59
|
"@atlaskit/theme": "^21.0.0",
|
|
60
|
-
"@atlaskit/tmp-editor-statsig": "^25.
|
|
60
|
+
"@atlaskit/tmp-editor-statsig": "^25.6.0",
|
|
61
61
|
"@atlaskit/tokens": "^11.0.0",
|
|
62
62
|
"@atlaskit/tooltip": "^20.14.0",
|
|
63
63
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"uuid": "^3.1.0"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
|
-
"@atlaskit/editor-common": "^111.
|
|
74
|
+
"@atlaskit/editor-common": "^111.15.0",
|
|
75
75
|
"@atlaskit/link-provider": "^4.2.0",
|
|
76
76
|
"@atlaskit/media-core": "^37.0.0",
|
|
77
77
|
"react": "^18.2.0",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"@atlaskit/mention": "^24.4.0",
|
|
91
91
|
"@atlaskit/modal-dialog": "^14.10.0",
|
|
92
92
|
"@atlaskit/navigation-next": "patch:@atlaskit/navigation-next@npm%3A9.0.17#~/.yarn/patches/@atlaskit-navigation-next-npm-9.0.17-958ca0ab9d.patch",
|
|
93
|
-
"@atlaskit/profilecard": "^24.
|
|
93
|
+
"@atlaskit/profilecard": "^24.36.0",
|
|
94
94
|
"@atlaskit/util-data-test": "^18.5.0",
|
|
95
95
|
"@atlassian/a11y-jest-testing": "^0.10.0",
|
|
96
96
|
"@atlassian/feature-flags-test-utils": "^1.0.0",
|
|
@@ -124,6 +124,9 @@
|
|
|
124
124
|
}
|
|
125
125
|
},
|
|
126
126
|
"platform-feature-flags": {
|
|
127
|
+
"confluence_frontend_fix_date_hydration_error": {
|
|
128
|
+
"type": "boolean"
|
|
129
|
+
},
|
|
127
130
|
"confluence_frontend_table_scrollbar_ttvc_fix": {
|
|
128
131
|
"type": "boolean"
|
|
129
132
|
},
|