@atlaskit/renderer 114.10.1 → 114.11.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 CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 114.11.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#143555](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/143555)
8
+ [`2827fa6f5b8d9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2827fa6f5b8d9) -
9
+ Updated embed card to support SSR
10
+
11
+ ## 114.10.2
12
+
13
+ ### Patch Changes
14
+
15
+ - [#145086](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/145086)
16
+ [`974da2c11753a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/974da2c11753a) -
17
+ Reduced dependency list of analytics callback in renderer
18
+ - Updated dependencies
19
+
3
20
  ## 114.10.1
4
21
 
5
22
  ### Patch Changes
@@ -10,9 +10,11 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
10
10
  var _react = require("@emotion/react");
11
11
  var _react2 = require("react");
12
12
  var _smartCard = require("@atlaskit/smart-card");
13
+ var _ssr = require("@atlaskit/smart-card/ssr");
13
14
  var _linkProvider = require("@atlaskit/link-provider");
14
15
  var _ui = require("@atlaskit/editor-common/ui");
15
16
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
17
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
18
  var _fallback = require("./fallback");
17
19
  var _style = require("../../ui/Renderer/style");
18
20
  var _getCardClickHandler = require("../utils/getCardClickHandler");
@@ -146,6 +148,39 @@ function EmbedCard(props) {
146
148
  throw err;
147
149
  }
148
150
  };
151
+ var cardComponent;
152
+ if (smartLinks !== null && smartLinks !== void 0 && smartLinks.ssr && url && (0, _platformFeatureFlags.fg)('platform_ssr_smartlink_embeds')) {
153
+ var _smartLinks$frameStyl2;
154
+ var ssrCardProps = {
155
+ url: url,
156
+ onClick: onClick,
157
+ container: portal,
158
+ platform: platform,
159
+ frameStyle: (_smartLinks$frameStyl2 = smartLinks === null || smartLinks === void 0 ? void 0 : smartLinks.frameStyle) !== null && _smartLinks$frameStyl2 !== void 0 ? _smartLinks$frameStyl2 : 'show',
160
+ actionOptions: actionOptions
161
+ };
162
+ cardComponent = (0, _react.jsx)(_ssr.CardSSR, (0, _extends2.default)({
163
+ appearance: "embed"
164
+ // Ignored via go/ees005
165
+ // eslint-disable-next-line react/jsx-props-no-spreading
166
+ }, ssrCardProps, {
167
+ onResolve: onResolve,
168
+ inheritDimensions: true,
169
+ embedIframeRef: embedIframeRef,
170
+ onError: onError
171
+ }));
172
+ } else {
173
+ cardComponent = (0, _react.jsx)(_smartCard.Card, (0, _extends2.default)({
174
+ appearance: "embed"
175
+ // Ignored via go/ees005
176
+ // eslint-disable-next-line react/jsx-props-no-spreading
177
+ }, cardProps, {
178
+ onResolve: onResolve,
179
+ inheritDimensions: true,
180
+ embedIframeRef: embedIframeRef,
181
+ onError: onError
182
+ }));
183
+ }
149
184
  return (
150
185
  // Ignored via go/ees005
151
186
  // eslint-disable-next-line react/jsx-props-no-spreading
@@ -177,16 +212,7 @@ function EmbedCard(props) {
177
212
  "data-card-data": data ? JSON.stringify(data) : undefined,
178
213
  "data-card-url": url,
179
214
  "data-card-original-height": originalHeight
180
- }, (0, _react.jsx)(_smartCard.Card, (0, _extends2.default)({
181
- appearance: "embed"
182
- // Ignored via go/ees005
183
- // eslint-disable-next-line react/jsx-props-no-spreading
184
- }, cardProps, {
185
- onResolve: onResolve,
186
- inheritDimensions: true,
187
- embedIframeRef: embedIframeRef,
188
- onError: onError
189
- })))))))
215
+ }, cardComponent)))))
190
216
  );
191
217
  }));
192
218
  }
@@ -57,7 +57,7 @@ var TableRow = exports.default = /*#__PURE__*/function (_React$Component) {
57
57
  });
58
58
  (0, _defineProperty2.default)(_this, "addColGroupWidth", function (childrenArray) {
59
59
  var _this$state$colGroupW;
60
- if ((0, _platformFeatureFlags.fg)('platform_editor_table_column_group_width_check') ? (_this$state$colGroupW = _this.state.colGroupWidths) === null || _this$state$colGroupW === void 0 ? void 0 : _this$state$colGroupW.length : _this.state.colGroupWidths) {
60
+ if ((0, _platformFeatureFlags.fg)('platform_editor_table_column_group_width_check_3') ? (_this$state$colGroupW = _this.state.colGroupWidths) === null || _this$state$colGroupW === void 0 ? void 0 : _this$state$colGroupW.length : _this.state.colGroupWidths) {
61
61
  childrenArray = childrenArray.map(function (child, index) {
62
62
  if ( /*#__PURE__*/_react.default.isValidElement(child)) {
63
63
  return /*#__PURE__*/_react.default.cloneElement(child, {
@@ -472,17 +472,17 @@ var listsSharedStyles = (0, _react.css)((_css3 = {
472
472
  }
473
473
  }, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_css3, "".concat(_adfSchema.orderedListSelector, ", ").concat(_adfSchema.bulletListSelector), {
474
474
  /*
475
- Ensures list item content adheres to the list's margin instead
476
- of filling the entire block row. This is important to allow
477
- clicking interactive elements which are floated next to a list.
478
- For some history and context on this block, see PRs related to tickets.:
479
- @see ED-6551 - original issue.
480
- @see ED-7015 - follow up issue.
481
- @see ED-7447 - flow-root change.
475
+ Ensures list item content adheres to the list's margin instead
476
+ of filling the entire block row. This is important to allow
477
+ clicking interactive elements which are floated next to a list.
478
+ For some history and context on this block, see PRs related to tickets.:
479
+ @see ED-6551 - original issue.
480
+ @see ED-7015 - follow up issue.
481
+ @see ED-7447 - flow-root change.
482
482
  used to have display: 'table' in tag template style but not supported in object styles
483
483
  removed display: 'table' as 'flow-root' is supported in latest browsers
484
- @see https://css-tricks.com/display-flow-root/
485
- */
484
+ @see https://css-tricks.com/display-flow-root/
485
+ */
486
486
  display: 'flow-root'
487
487
  }), 'ul, ul ul ul ul', {
488
488
  listStyleType: 'disc'
@@ -1365,7 +1365,7 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
1365
1365
  var isAdvancedLayoutsOn = (0, _experiments.editorExperiment)('advanced_layouts', true);
1366
1366
  if ((0, _platformFeatureFlags.fg)('platform_editor_emotion_refactor_renderer')) {
1367
1367
  return (
1368
- // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
1368
+ // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions, @atlassian/a11y/interactive-element-not-keyboard-focusable
1369
1369
  (0, _react.jsx)("div", {
1370
1370
  ref: innerRef,
1371
1371
  onClick: onClick,
@@ -1392,7 +1392,7 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
1392
1392
  );
1393
1393
  }
1394
1394
  return (
1395
- // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
1395
+ // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions, @atlassian/a11y/interactive-element-not-keyboard-focusable
1396
1396
  (0, _react.jsx)("div", {
1397
1397
  ref: innerRef,
1398
1398
  onClick: onClick,