@atlaskit/smart-card 38.21.0 → 39.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 39.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#181697](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/181697)
8
+ [`2f25a0bbfb4b7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2f25a0bbfb4b7) -
9
+ [ux] Modify OwnedByElement textPrefix prop to take in keys from messages
10
+
11
+ ### Migration
12
+
13
+ Modify any `textPrefix` props usage to match one of the keys described in the new type.
14
+
15
+ If a new `textPrefix` is required, a new contribution to OwnedByElement is needed within the
16
+ `messages`
17
+
3
18
  ## 38.21.0
4
19
 
5
20
  ### Minor Changes
@@ -375,6 +375,11 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
375
375
  defaultMessage: 'Owned by {context}',
376
376
  description: 'Indicates the person or entity that owns or maintains the resource.'
377
377
  },
378
+ owned_by_override: {
379
+ id: 'fabric.linking.owned_by_override',
380
+ defaultMessage: 'By {context}',
381
+ description: 'Indicates the person or entity that owns or maintains the resource.'
382
+ },
378
383
  preview_description: {
379
384
  id: 'fabric.linking.preview_description',
380
385
  defaultMessage: 'Open a full screen preview of this link',
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
11
11
  var context = exports.context = {
12
12
  componentName: 'smart-cards',
13
13
  packageName: "@atlaskit/smart-card",
14
- packageVersion: "38.20.2"
14
+ packageVersion: "38.21.0"
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -14,23 +14,17 @@ var _constants = require("../../../../../constants");
14
14
  var _messages = require("../../../../../messages");
15
15
  var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
16
16
  var _common = require("../common");
17
- var _excluded = ["onRender"];
17
+ var _excluded = ["onRender", "textPrefix"];
18
18
  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); }
19
- var getOwnedByText = function getOwnedByText(context, textPrefix) {
20
- if (!(0, _platformFeatureFlags.fg)('bandicoots-smart-card-teamwork-context')) {
21
- return context.ownedBy;
22
- }
23
- if (context.ownedBy === undefined || context.ownedBy === '') {
24
- return '';
25
- }
26
- return textPrefix ? "".concat(textPrefix, " ").concat(context.ownedBy).trim() : context.ownedBy;
27
- };
28
19
  var OwnedByElement = function OwnedByElement(props) {
29
20
  var context = (0, _flexibleUiContext.useFlexibleUiContext)();
30
- var data = context ? (0, _common.toFormattedTextProps)(_messages.messages.owned_by, getOwnedByText(context, props === null || props === void 0 ? void 0 : props.textPrefix)) : null;
31
21
  var _ref = props || {},
32
22
  onRender = _ref.onRender,
23
+ _ref$textPrefix = _ref.textPrefix,
24
+ textPrefix = _ref$textPrefix === void 0 ? 'owned_by' : _ref$textPrefix,
33
25
  restProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
26
+ var data = context ? (0, _common.toFormattedTextProps)((0, _platformFeatureFlags.fg)('bandicoots-smart-card-teamwork-context') ? _messages.messages[textPrefix] : _messages.messages.owned_by, context === null || context === void 0 ? void 0 : context.ownedBy) : null;
27
+
34
28
  // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
35
29
  if ((0, _platformFeatureFlags.fg)('platform-linking-additional-flexible-element-props')) {
36
30
  // eslint-disable-next-line react-hooks/rules-of-hooks
@@ -20,7 +20,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
20
20
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
21
21
  var PACKAGE_DATA = {
22
22
  packageName: "@atlaskit/smart-card",
23
- packageVersion: "38.20.2",
23
+ packageVersion: "38.21.0",
24
24
  componentName: 'linkUrl'
25
25
  };
26
26
  var Anchor = (0, _click.withLinkClickedEvent)('a');
@@ -369,6 +369,11 @@ export const messages = defineMessages({
369
369
  defaultMessage: 'Owned by {context}',
370
370
  description: 'Indicates the person or entity that owns or maintains the resource.'
371
371
  },
372
+ owned_by_override: {
373
+ id: 'fabric.linking.owned_by_override',
374
+ defaultMessage: 'By {context}',
375
+ description: 'Indicates the person or entity that owns or maintains the resource.'
376
+ },
372
377
  preview_description: {
373
378
  id: 'fabric.linking.preview_description',
374
379
  defaultMessage: 'Open a full screen preview of this link',
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
2
2
  export const context = {
3
3
  componentName: 'smart-cards',
4
4
  packageName: "@atlaskit/smart-card",
5
- packageVersion: "38.20.2"
5
+ packageVersion: "38.21.0"
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -5,22 +5,15 @@ import { ElementName } from '../../../../../constants';
5
5
  import { messages } from '../../../../../messages';
6
6
  import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
7
7
  import { BaseTextElement, toFormattedTextProps } from '../common';
8
- const getOwnedByText = (context, textPrefix) => {
9
- if (!fg('bandicoots-smart-card-teamwork-context')) {
10
- return context.ownedBy;
11
- }
12
- if (context.ownedBy === undefined || context.ownedBy === '') {
13
- return '';
14
- }
15
- return textPrefix ? `${textPrefix} ${context.ownedBy}`.trim() : context.ownedBy;
16
- };
17
8
  const OwnedByElement = props => {
18
9
  const context = useFlexibleUiContext();
19
- const data = context ? toFormattedTextProps(messages.owned_by, getOwnedByText(context, props === null || props === void 0 ? void 0 : props.textPrefix)) : null;
20
10
  const {
21
11
  onRender,
12
+ textPrefix = 'owned_by',
22
13
  ...restProps
23
14
  } = props || {};
15
+ const data = context ? toFormattedTextProps(fg('bandicoots-smart-card-teamwork-context') ? messages[textPrefix] : messages.owned_by, context === null || context === void 0 ? void 0 : context.ownedBy) : null;
16
+
24
17
  // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
25
18
  if (fg('platform-linking-additional-flexible-element-props')) {
26
19
  // eslint-disable-next-line react-hooks/rules-of-hooks
@@ -10,7 +10,7 @@ import LinkWarningModal from './LinkWarningModal';
10
10
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
11
11
  const PACKAGE_DATA = {
12
12
  packageName: "@atlaskit/smart-card",
13
- packageVersion: "38.20.2",
13
+ packageVersion: "38.21.0",
14
14
  componentName: 'linkUrl'
15
15
  };
16
16
  const Anchor = withLinkClickedEvent('a');
@@ -369,6 +369,11 @@ export var messages = defineMessages({
369
369
  defaultMessage: 'Owned by {context}',
370
370
  description: 'Indicates the person or entity that owns or maintains the resource.'
371
371
  },
372
+ owned_by_override: {
373
+ id: 'fabric.linking.owned_by_override',
374
+ defaultMessage: 'By {context}',
375
+ description: 'Indicates the person or entity that owns or maintains the resource.'
376
+ },
372
377
  preview_description: {
373
378
  id: 'fabric.linking.preview_description',
374
379
  defaultMessage: 'Open a full screen preview of this link',
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
4
4
  export var context = {
5
5
  componentName: 'smart-cards',
6
6
  packageName: "@atlaskit/smart-card",
7
- packageVersion: "38.20.2"
7
+ packageVersion: "38.21.0"
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,27 +1,21 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["onRender"];
3
+ var _excluded = ["onRender", "textPrefix"];
4
4
  import React, { useEffect } from 'react';
5
5
  import { fg } from '@atlaskit/platform-feature-flags';
6
6
  import { ElementName } from '../../../../../constants';
7
7
  import { messages } from '../../../../../messages';
8
8
  import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
9
9
  import { BaseTextElement, toFormattedTextProps } from '../common';
10
- var getOwnedByText = function getOwnedByText(context, textPrefix) {
11
- if (!fg('bandicoots-smart-card-teamwork-context')) {
12
- return context.ownedBy;
13
- }
14
- if (context.ownedBy === undefined || context.ownedBy === '') {
15
- return '';
16
- }
17
- return textPrefix ? "".concat(textPrefix, " ").concat(context.ownedBy).trim() : context.ownedBy;
18
- };
19
10
  var OwnedByElement = function OwnedByElement(props) {
20
11
  var context = useFlexibleUiContext();
21
- var data = context ? toFormattedTextProps(messages.owned_by, getOwnedByText(context, props === null || props === void 0 ? void 0 : props.textPrefix)) : null;
22
12
  var _ref = props || {},
23
13
  onRender = _ref.onRender,
14
+ _ref$textPrefix = _ref.textPrefix,
15
+ textPrefix = _ref$textPrefix === void 0 ? 'owned_by' : _ref$textPrefix,
24
16
  restProps = _objectWithoutProperties(_ref, _excluded);
17
+ var data = context ? toFormattedTextProps(fg('bandicoots-smart-card-teamwork-context') ? messages[textPrefix] : messages.owned_by, context === null || context === void 0 ? void 0 : context.ownedBy) : null;
18
+
25
19
  // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
26
20
  if (fg('platform-linking-additional-flexible-element-props')) {
27
21
  // eslint-disable-next-line react-hooks/rules-of-hooks
@@ -13,7 +13,7 @@ import LinkWarningModal from './LinkWarningModal';
13
13
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
14
14
  var PACKAGE_DATA = {
15
15
  packageName: "@atlaskit/smart-card",
16
- packageVersion: "38.20.2",
16
+ packageVersion: "38.21.0",
17
17
  componentName: 'linkUrl'
18
18
  };
19
19
  var Anchor = withLinkClickedEvent('a');
@@ -1,6 +1,6 @@
1
1
  import { type MessageDescriptor } from 'react-intl-next';
2
2
  export type RequestAccessMessageKey = 'click_to_join' | 'click_to_join_description' | 'forbidden_description' | 'request_access' | 'request_access_description' | 'request_access_pending' | 'request_access_pending_title' | 'request_access_pending_description' | 'request_denied_description' | 'default_no_access_title' | 'direct_access_title' | 'direct_access_description' | 'direct_access' | 'access_exists_description' | 'not_found_description' | 'not_found_title';
3
- export type MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action' | 'ai_summary_action_description' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'compass_applied_components_count' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_description' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'user_attributes' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related' | 'generic_error_message' | 'related_links_modal_error_header' | 'related_links_modal_error_title' | 'related_links_modal_error_message' | 'related_links_modal_error_description' | 'related_links_modal_unavailable_header' | 'related_links_modal_unavailable_title' | 'related_links_modal_unavailable_message' | 'related_links_modal_unavailable_description' | 'related_links_modal_title' | 'related_links_modal_title_v2' | 'related_links_view_related_urls' | 'related_links_view_related_links' | 'related_links_found_in' | 'related_links_found_in_v2' | 'related_links_includes_links_to' | 'related_links_includes_links_to_v2' | 'related_links_not_found' | 'join_to_viewIssueTermRefresh' | 'open_issue_in_jiraIssueTermRefresh' | 'request_access_to_viewIssueTermRefresh' | 'team_members_count' | 'status_change_permission_errorIssueTermRefresh';
3
+ export type MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action' | 'ai_summary_action_description' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'compass_applied_components_count' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'owned_by_override' | 'preview_description' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'user_attributes' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related' | 'generic_error_message' | 'related_links_modal_error_header' | 'related_links_modal_error_title' | 'related_links_modal_error_message' | 'related_links_modal_error_description' | 'related_links_modal_unavailable_header' | 'related_links_modal_unavailable_title' | 'related_links_modal_unavailable_message' | 'related_links_modal_unavailable_description' | 'related_links_modal_title' | 'related_links_modal_title_v2' | 'related_links_view_related_urls' | 'related_links_view_related_links' | 'related_links_found_in' | 'related_links_found_in_v2' | 'related_links_includes_links_to' | 'related_links_includes_links_to_v2' | 'related_links_not_found' | 'join_to_viewIssueTermRefresh' | 'open_issue_in_jiraIssueTermRefresh' | 'request_access_to_viewIssueTermRefresh' | 'team_members_count' | 'status_change_permission_errorIssueTermRefresh';
4
4
  type Messages = {
5
5
  [K in MessageKey]: MessageDescriptor;
6
6
  };
@@ -1,5 +1,6 @@
1
1
  import { type ReactNode, type Ref } from 'react';
2
2
  import { type ActionName, type ElementName, type SmartLinkDirection, type SmartLinkSize, type SmartLinkStatus } from '../../../../constants';
3
+ import { type OwnedByElementProps } from '../../external';
3
4
  import { type ActionProps } from '../actions/action/types';
4
5
  export type BlockProps = {
5
6
  /**
@@ -287,6 +288,8 @@ export type CreatedBy = {
287
288
  */
288
289
  export type OwnedBy = {
289
290
  name: ElementName.OwnedBy;
291
+ textPrefix?: OwnedByElementProps['textPrefix'];
292
+ hideFormat?: OwnedByElementProps['hideFormat'];
290
293
  };
291
294
  /**
292
295
  * Represents the props available for an CreatedOn element.
@@ -1,11 +1,8 @@
1
1
  /// <reference types="react" />
2
+ import { messages } from '../../../../../messages';
2
3
  import { type BaseTextElementProps } from '../common';
3
4
  export type OwnedByElementProps = BaseTextElementProps & {
4
- /**
5
- * The text prefix to display before the owned by text.
6
- * Best used when hideFormat is enabled
7
- */
8
- textPrefix?: string;
5
+ textPrefix?: keyof Pick<typeof messages, 'owned_by' | 'owned_by_override'>;
9
6
  onRender?: (hasData: boolean) => void;
10
7
  };
11
8
  declare const OwnedByElement: (props: OwnedByElementProps) => JSX.Element | null;
@@ -29,7 +29,7 @@ export declare const LocationElement: () => React.JSX.Element;
29
29
  export declare const ModifiedByElement: () => React.JSX.Element;
30
30
  type ModifiedOnElementProps = Pick<React.ComponentProps<typeof ModifiedOn>, 'hideDatePrefix' | 'color' | 'onRender' | 'fontSize'>;
31
31
  export declare const ModifiedOnElement: (props?: ModifiedOnElementProps) => React.JSX.Element;
32
- type OwnedByElementProps = Pick<React.ComponentProps<typeof OwnedBy>, 'hideFormat' | 'color' | 'onRender' | 'textPrefix' | 'fontSize'>;
32
+ export type OwnedByElementProps = Pick<React.ComponentProps<typeof OwnedBy>, 'hideFormat' | 'color' | 'onRender' | 'textPrefix' | 'fontSize'>;
33
33
  export declare const OwnedByElement: (props?: OwnedByElementProps) => React.JSX.Element;
34
34
  type OwnedByGroupElementProps = Pick<React.ComponentProps<typeof OwnedByGroup>, 'onRender'>;
35
35
  export declare const OwnedByGroupElement: (props?: OwnedByGroupElementProps) => React.JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { type MessageDescriptor } from 'react-intl-next';
2
2
  export type RequestAccessMessageKey = 'click_to_join' | 'click_to_join_description' | 'forbidden_description' | 'request_access' | 'request_access_description' | 'request_access_pending' | 'request_access_pending_title' | 'request_access_pending_description' | 'request_denied_description' | 'default_no_access_title' | 'direct_access_title' | 'direct_access_description' | 'direct_access' | 'access_exists_description' | 'not_found_description' | 'not_found_title';
3
- export type MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action' | 'ai_summary_action_description' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'compass_applied_components_count' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_description' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'user_attributes' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related' | 'generic_error_message' | 'related_links_modal_error_header' | 'related_links_modal_error_title' | 'related_links_modal_error_message' | 'related_links_modal_error_description' | 'related_links_modal_unavailable_header' | 'related_links_modal_unavailable_title' | 'related_links_modal_unavailable_message' | 'related_links_modal_unavailable_description' | 'related_links_modal_title' | 'related_links_modal_title_v2' | 'related_links_view_related_urls' | 'related_links_view_related_links' | 'related_links_found_in' | 'related_links_found_in_v2' | 'related_links_includes_links_to' | 'related_links_includes_links_to_v2' | 'related_links_not_found' | 'join_to_viewIssueTermRefresh' | 'open_issue_in_jiraIssueTermRefresh' | 'request_access_to_viewIssueTermRefresh' | 'team_members_count' | 'status_change_permission_errorIssueTermRefresh';
3
+ export type MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action' | 'ai_summary_action_description' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'compass_applied_components_count' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'owned_by_override' | 'preview_description' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'user_attributes' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related' | 'generic_error_message' | 'related_links_modal_error_header' | 'related_links_modal_error_title' | 'related_links_modal_error_message' | 'related_links_modal_error_description' | 'related_links_modal_unavailable_header' | 'related_links_modal_unavailable_title' | 'related_links_modal_unavailable_message' | 'related_links_modal_unavailable_description' | 'related_links_modal_title' | 'related_links_modal_title_v2' | 'related_links_view_related_urls' | 'related_links_view_related_links' | 'related_links_found_in' | 'related_links_found_in_v2' | 'related_links_includes_links_to' | 'related_links_includes_links_to_v2' | 'related_links_not_found' | 'join_to_viewIssueTermRefresh' | 'open_issue_in_jiraIssueTermRefresh' | 'request_access_to_viewIssueTermRefresh' | 'team_members_count' | 'status_change_permission_errorIssueTermRefresh';
4
4
  type Messages = {
5
5
  [K in MessageKey]: MessageDescriptor;
6
6
  };
@@ -1,5 +1,6 @@
1
1
  import { type ReactNode, type Ref } from 'react';
2
2
  import { type ActionName, type ElementName, type SmartLinkDirection, type SmartLinkSize, type SmartLinkStatus } from '../../../../constants';
3
+ import { type OwnedByElementProps } from '../../external';
3
4
  import { type ActionProps } from '../actions/action/types';
4
5
  export type BlockProps = {
5
6
  /**
@@ -287,6 +288,8 @@ export type CreatedBy = {
287
288
  */
288
289
  export type OwnedBy = {
289
290
  name: ElementName.OwnedBy;
291
+ textPrefix?: OwnedByElementProps['textPrefix'];
292
+ hideFormat?: OwnedByElementProps['hideFormat'];
290
293
  };
291
294
  /**
292
295
  * Represents the props available for an CreatedOn element.
@@ -1,11 +1,8 @@
1
1
  /// <reference types="react" />
2
+ import { messages } from '../../../../../messages';
2
3
  import { type BaseTextElementProps } from '../common';
3
4
  export type OwnedByElementProps = BaseTextElementProps & {
4
- /**
5
- * The text prefix to display before the owned by text.
6
- * Best used when hideFormat is enabled
7
- */
8
- textPrefix?: string;
5
+ textPrefix?: keyof Pick<typeof messages, 'owned_by' | 'owned_by_override'>;
9
6
  onRender?: (hasData: boolean) => void;
10
7
  };
11
8
  declare const OwnedByElement: (props: OwnedByElementProps) => JSX.Element | null;
@@ -29,7 +29,7 @@ export declare const LocationElement: () => React.JSX.Element;
29
29
  export declare const ModifiedByElement: () => React.JSX.Element;
30
30
  type ModifiedOnElementProps = Pick<React.ComponentProps<typeof ModifiedOn>, 'hideDatePrefix' | 'color' | 'onRender' | 'fontSize'>;
31
31
  export declare const ModifiedOnElement: (props?: ModifiedOnElementProps) => React.JSX.Element;
32
- type OwnedByElementProps = Pick<React.ComponentProps<typeof OwnedBy>, 'hideFormat' | 'color' | 'onRender' | 'textPrefix' | 'fontSize'>;
32
+ export type OwnedByElementProps = Pick<React.ComponentProps<typeof OwnedBy>, 'hideFormat' | 'color' | 'onRender' | 'textPrefix' | 'fontSize'>;
33
33
  export declare const OwnedByElement: (props?: OwnedByElementProps) => React.JSX.Element;
34
34
  type OwnedByGroupElementProps = Pick<React.ComponentProps<typeof OwnedByGroup>, 'onRender'>;
35
35
  export declare const OwnedByGroupElement: (props?: OwnedByGroupElementProps) => React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "38.21.0",
3
+ "version": "39.0.0",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"