@atlaskit/smart-card 45.0.2 → 45.1.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 +22 -0
- package/dist/cjs/messages.js +8 -8
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/EmbedModal/index.js +2 -3
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-date-time-element/index.js +48 -13
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/messages.js +8 -8
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/EmbedModal/index.js +2 -3
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-date-time-element/index.js +36 -2
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/messages.js +8 -8
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/EmbedModal/index.js +2 -3
- package/dist/esm/view/FlexibleCard/components/elements/common/base-date-time-element/index.js +48 -13
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/elements/common/base-date-time-element/index.d.ts +5 -1
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 45.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`754e04aa98a74`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/754e04aa98a74) -
|
|
8
|
+
Add new 'timeZone' prop for ModifiedOn smartlink block to allow for server hydrated modified on
|
|
9
|
+
display
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`8e6266d49dafa`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8e6266d49dafa) -
|
|
14
|
+
NAVX-5111 Updating formatting for inline cta rovo chat prompts
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
17
|
+
## 45.0.3
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- [`3c78f7149e895`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3c78f7149e895) -
|
|
22
|
+
Clean up experiment `cc_integrations_editor_open_link_click_analytics`.
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
|
|
3
25
|
## 45.0.2
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
package/dist/cjs/messages.js
CHANGED
|
@@ -1089,13 +1089,13 @@ var messages = exports.messages = (0, _reactIntl.defineMessages)({
|
|
|
1089
1089
|
},
|
|
1090
1090
|
rovo_prompt_message_summarize_document: {
|
|
1091
1091
|
id: 'fabric.linking.rovo_prompt_message_summarize_document.non-final',
|
|
1092
|
-
defaultMessage: "Summarize this doc {url} into a concise, easy-to-scan overview. Adapt to whatever the content is and focus on the main ideas, important decisions, key updates, and next steps, only include these if they exist; don't mention their absence. Avoid unnecessary detail, repetition, or formatting commentary. Write in plain language and optimize for a quick 5\u201310 second read",
|
|
1093
|
-
description: 'The prompt message to send to Rovo Chat. {url} refers to Smart Link that the user triggers this action from.'
|
|
1092
|
+
defaultMessage: "<p>Summarize this doc <a>{url}</a> into a concise, easy-to-scan overview. Adapt to whatever the content is and focus on the main ideas, important decisions, key updates, and next steps, only include these if they exist; don't mention their absence. Avoid unnecessary detail, repetition, or formatting commentary. Write in plain language and optimize for a quick 5\u201310 second read</p>",
|
|
1093
|
+
description: 'The prompt message to send to Rovo Chat. {url} refers to Smart Link that the user triggers this action from. (Please make sure all html tags remain the same.)'
|
|
1094
1094
|
},
|
|
1095
1095
|
rovo_prompt_message_summarize_presentation: {
|
|
1096
1096
|
id: 'fabric.linking.rovo_prompt_message_summarize_presentation.non-final',
|
|
1097
|
-
defaultMessage: "Summarize this Google Slides deck {url} into a concise executive overview. Focus on the tldr, key findings, decisions, metrics, risks, and next steps, if there are any. Use a short executive summary followed by 2-3 bullet points. Avoid slide-by-slide narration, design details, repetition, and filler
|
|
1098
|
-
description: 'The prompt message to send to Rovo Chat. {url} refers to Smart Link that the user triggers this action from.'
|
|
1097
|
+
defaultMessage: "<p>Summarize this Google Slides deck <a>{url}</a> into a concise executive overview. Focus on the tldr, key findings, decisions, metrics, risks, and next steps, if there are any. Use a short executive summary followed by 2-3 bullet points. Avoid slide-by-slide narration, design details, repetition, and filler.</p>",
|
|
1098
|
+
description: 'The prompt message to send to Rovo Chat. {url} refers to Smart Link that the user triggers this action from. (Please make sure all html tags remain the same.)'
|
|
1099
1099
|
},
|
|
1100
1100
|
rovo_prompt_button_explain_code: {
|
|
1101
1101
|
id: 'fabric.linking.rovo_prompt_button_explain_code.non-final',
|
|
@@ -1104,7 +1104,7 @@ var messages = exports.messages = (0, _reactIntl.defineMessages)({
|
|
|
1104
1104
|
},
|
|
1105
1105
|
rovo_prompt_message_explain_code: {
|
|
1106
1106
|
id: 'fabric.linking.rovo_prompt_message_explain_code.non-final',
|
|
1107
|
-
defaultMessage: "<p>Explain this code, pull request, or commit {url} in clear, plain language for a non-technical audience.</p><p>Cover:</p><ol><li><strong>Purpose</strong> \u2014 What problem does it solve or what goal does it achieve?</li><li><strong>How it works</strong> \u2014 High-level mechanics (no implementation detail unless critical to understanding).</li><li><strong>Why</strong> \u2014 Motivation for the change or design choice.</li><li><strong>Impact</strong> \u2014 Key behavior changes, risks, or downstream effects worth noting.</li></ol><p>Constraints:</p><ul><li>3\u20135 sentences or 100\u2013150 words max.</li><li>Omit sections with nothing meaningful to say.</li><li>Prefer concrete language over abstract descriptions (e.g., \"speeds up page load by caching results\" over \"improves performance\").</li></ul>",
|
|
1107
|
+
defaultMessage: "<p>Explain this code, pull request, or commit <a>{url}</a> in clear, plain language for a non-technical audience.</p><p>Cover:</p><ol><li><strong>Purpose</strong> \u2014 What problem does it solve or what goal does it achieve?</li><li><strong>How it works</strong> \u2014 High-level mechanics (no implementation detail unless critical to understanding).</li><li><strong>Why</strong> \u2014 Motivation for the change or design choice.</li><li><strong>Impact</strong> \u2014 Key behavior changes, risks, or downstream effects worth noting.</li></ol><p>Constraints:</p><ul><li>3\u20135 sentences or 100\u2013150 words max.</li><li>Omit sections with nothing meaningful to say.</li><li>Prefer concrete language over abstract descriptions (e.g., \"speeds up page load by caching results\" over \"improves performance\").</li></ul>",
|
|
1108
1108
|
description: 'The prompt message to send to Rovo Chat. {url} refers to Smart Link that the user triggers this action from. (Please make sure all html tags remain the same.)'
|
|
1109
1109
|
},
|
|
1110
1110
|
rovo_prompt_button_catch_up: {
|
|
@@ -1114,7 +1114,7 @@ var messages = exports.messages = (0, _reactIntl.defineMessages)({
|
|
|
1114
1114
|
},
|
|
1115
1115
|
rovo_prompt_message_catch_up: {
|
|
1116
1116
|
id: 'fabric.linking.rovo_prompt_message_catch_up.non-final',
|
|
1117
|
-
defaultMessage: "Catch me up on the latest {provider} conversations or channel activity in {url} from the last two weeks. If there's no activity in the past two weeks, expand the window to the most recent 30 days (or until meaningful activity is found). Summarize the most important updates, decisions, and discussions so the user can quickly understand what they missed. Focus on key changes, unresolved questions, and any action items or follow-ups. Prioritize recent messages with the most activity. Keep the response concise \u2014 ideally 80\u2013150 words or a short set of 3\u20135 key bullets
|
|
1117
|
+
defaultMessage: "<p>Catch me up on the latest {provider} conversations or channel activity in <a>{url}</a> from the last two weeks. If there's no activity in the past two weeks, expand the window to the most recent 30 days (or until meaningful activity is found). Summarize the most important updates, decisions, and discussions so the user can quickly understand what they missed. Focus on key changes, unresolved questions, and any action items or follow-ups. Prioritize recent messages with the most activity. Keep the response concise \u2014 ideally 80\u2013150 words or a short set of 3\u20135 key bullets.</p>",
|
|
1118
1118
|
description: 'The prompt message to send to Rovo Chat. {url} refers to Smart Link that the user triggers this action from. {provider} is the 3P app name (Please make sure all html tags remain the same.)'
|
|
1119
1119
|
},
|
|
1120
1120
|
rovo_prompt_button_salesforce_prep: {
|
|
@@ -1124,8 +1124,8 @@ var messages = exports.messages = (0, _reactIntl.defineMessages)({
|
|
|
1124
1124
|
},
|
|
1125
1125
|
rovo_prompt_message_salesforce_prep: {
|
|
1126
1126
|
id: 'fabric.linking.rovo_prompt_message_salesforce_prep.non-final',
|
|
1127
|
-
defaultMessage: "Prep me for this Salesforce record {url}
|
|
1128
|
-
description: 'The prompt message to send to Rovo Chat. {url} refers to Smart Link that the user triggers this action from'
|
|
1127
|
+
defaultMessage: "<p>Prep me for this Salesforce record <a>{url}</a>. What's the current state, what's the recent activity, what risks or opportunities should I be aware of, and what would be useful to know before a conversation about it?</p>",
|
|
1128
|
+
description: 'The prompt message to send to Rovo Chat. {url} refers to Smart Link that the user triggers this action from. (Please make sure all html tags remain the same.)'
|
|
1129
1129
|
},
|
|
1130
1130
|
// TODO: remove when social-proof-3p-unauth-block-fg is cleaned up
|
|
1131
1131
|
pre_auth_block_social_proof_not_low: {
|
|
@@ -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: "45.0
|
|
14
|
+
packageVersion: "45.1.0" || ''
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -10,7 +10,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _modalDialog = _interopRequireWildcard(require("@atlaskit/modal-dialog"));
|
|
13
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
14
13
|
var _tokens = require("@atlaskit/tokens");
|
|
15
14
|
var _constants = require("../../constants");
|
|
16
15
|
var _useInvokeClientAction = _interopRequireDefault(require("../../state/hooks/use-invoke-client-action"));
|
|
@@ -94,7 +93,7 @@ var EmbedModal = function EmbedModal(_ref) {
|
|
|
94
93
|
}
|
|
95
94
|
if (invokeViewAction) {
|
|
96
95
|
var visitedDisplay = invokeViewAction.display && invokeViewAction.display !== 'url' ? invokeViewAction.display : null;
|
|
97
|
-
if (visitedDisplay
|
|
96
|
+
if (visitedDisplay) {
|
|
98
97
|
var _invokeViewAction$id, _invokeViewAction$def;
|
|
99
98
|
fireEvent === null || fireEvent === void 0 || fireEvent('track.smartLink.visited', {
|
|
100
99
|
id: (_invokeViewAction$id = invokeViewAction.id) !== null && _invokeViewAction$id !== void 0 ? _invokeViewAction$id : iframeName,
|
|
@@ -110,7 +109,7 @@ var EmbedModal = function EmbedModal(_ref) {
|
|
|
110
109
|
if (invokeViewAction) {
|
|
111
110
|
invoke(invokeViewAction);
|
|
112
111
|
var visitedDisplay = invokeViewAction.display && invokeViewAction.display !== 'url' ? invokeViewAction.display : null;
|
|
113
|
-
if (visitedDisplay
|
|
112
|
+
if (visitedDisplay) {
|
|
114
113
|
var _invokeViewAction$id2, _invokeViewAction$def2;
|
|
115
114
|
fireEvent === null || fireEvent === void 0 || fireEvent('track.smartLink.visited', {
|
|
116
115
|
id: (_invokeViewAction$id2 = invokeViewAction.id) !== null && _invokeViewAction$id2 !== void 0 ? _invokeViewAction$id2 : iframeName,
|
package/dist/cjs/view/FlexibleCard/components/elements/common/base-date-time-element/index.js
CHANGED
|
@@ -11,11 +11,41 @@ require("./index.compiled.css");
|
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _runtime = require("@compiled/react/runtime");
|
|
13
13
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
14
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
15
|
var _intlUtils = require("@formatjs/intl-utils");
|
|
15
16
|
var _reactIntl = require("react-intl");
|
|
17
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
18
|
var _messages = require("../../../../../../messages");
|
|
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
|
+
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; }
|
|
21
|
+
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; }
|
|
18
22
|
var styles = null;
|
|
23
|
+
var ABSOLUTE_DATE_FORMAT = {
|
|
24
|
+
month: 'short',
|
|
25
|
+
day: 'numeric',
|
|
26
|
+
year: 'numeric'
|
|
27
|
+
};
|
|
28
|
+
var isValidTimeZone = function isValidTimeZone(timeZone) {
|
|
29
|
+
try {
|
|
30
|
+
new Intl.DateTimeFormat(undefined, {
|
|
31
|
+
timeZone: timeZone
|
|
32
|
+
});
|
|
33
|
+
return true;
|
|
34
|
+
} catch (_unused) {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var formatAbsoluteDateWithOptionalTimeZone = function formatAbsoluteDateWithOptionalTimeZone(_ref) {
|
|
39
|
+
var date = _ref.date,
|
|
40
|
+
formatDate = _ref.formatDate,
|
|
41
|
+
timeZone = _ref.timeZone;
|
|
42
|
+
if (!timeZone || !isValidTimeZone(timeZone)) {
|
|
43
|
+
return formatDate(date, ABSOLUTE_DATE_FORMAT);
|
|
44
|
+
}
|
|
45
|
+
return formatDate(date, _objectSpread(_objectSpread({}, ABSOLUTE_DATE_FORMAT), {}, {
|
|
46
|
+
timeZone: timeZone
|
|
47
|
+
}));
|
|
48
|
+
};
|
|
19
49
|
var typeToDescriptorMap = {
|
|
20
50
|
created: {
|
|
21
51
|
relative: _messages.messages.created_on_relative,
|
|
@@ -43,18 +73,19 @@ var fontOverrideStyleMap = {
|
|
|
43
73
|
* @see ModifiedOn
|
|
44
74
|
* @see SentOn
|
|
45
75
|
*/
|
|
46
|
-
var BaseDateTimeElement = function BaseDateTimeElement(
|
|
47
|
-
var date =
|
|
48
|
-
name =
|
|
49
|
-
className =
|
|
50
|
-
type =
|
|
51
|
-
|
|
52
|
-
testId =
|
|
53
|
-
text =
|
|
54
|
-
|
|
55
|
-
hideDatePrefix =
|
|
56
|
-
color =
|
|
57
|
-
fontSize =
|
|
76
|
+
var BaseDateTimeElement = function BaseDateTimeElement(_ref2) {
|
|
77
|
+
var date = _ref2.date,
|
|
78
|
+
name = _ref2.name,
|
|
79
|
+
className = _ref2.className,
|
|
80
|
+
type = _ref2.type,
|
|
81
|
+
_ref2$testId = _ref2.testId,
|
|
82
|
+
testId = _ref2$testId === void 0 ? 'smart-element-date-time' : _ref2$testId,
|
|
83
|
+
text = _ref2.text,
|
|
84
|
+
_ref2$hideDatePrefix = _ref2.hideDatePrefix,
|
|
85
|
+
hideDatePrefix = _ref2$hideDatePrefix === void 0 ? false : _ref2$hideDatePrefix,
|
|
86
|
+
color = _ref2.color,
|
|
87
|
+
fontSize = _ref2.fontSize,
|
|
88
|
+
timeZone = _ref2.timeZone;
|
|
58
89
|
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
59
90
|
formatRelativeTime = _useIntl.formatRelativeTime,
|
|
60
91
|
formatDate = _useIntl.formatDate;
|
|
@@ -66,7 +97,11 @@ var BaseDateTimeElement = function BaseDateTimeElement(_ref) {
|
|
|
66
97
|
var typeVariant;
|
|
67
98
|
if (isLongerThenWeek) {
|
|
68
99
|
typeVariant = 'absolute';
|
|
69
|
-
context =
|
|
100
|
+
context = (0, _platformFeatureFlags.fg)('dfo_issue_view_remote_data_srr_group') ? formatAbsoluteDateWithOptionalTimeZone({
|
|
101
|
+
date: date,
|
|
102
|
+
formatDate: formatDate,
|
|
103
|
+
timeZone: timeZone
|
|
104
|
+
}) : formatDate(date, {
|
|
70
105
|
month: 'short',
|
|
71
106
|
day: 'numeric',
|
|
72
107
|
year: 'numeric'
|
|
@@ -19,7 +19,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
19
19
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
20
20
|
var PACKAGE_DATA = {
|
|
21
21
|
packageName: "@atlaskit/smart-card",
|
|
22
|
-
packageVersion: "45.0
|
|
22
|
+
packageVersion: "45.1.0",
|
|
23
23
|
componentName: 'linkUrl'
|
|
24
24
|
};
|
|
25
25
|
var LinkUrl = function LinkUrl(_ref) {
|
package/dist/es2019/messages.js
CHANGED
|
@@ -1083,13 +1083,13 @@ export const messages = defineMessages({
|
|
|
1083
1083
|
},
|
|
1084
1084
|
rovo_prompt_message_summarize_document: {
|
|
1085
1085
|
id: 'fabric.linking.rovo_prompt_message_summarize_document.non-final',
|
|
1086
|
-
defaultMessage:
|
|
1087
|
-
description: 'The prompt message to send to Rovo Chat. {url} refers to Smart Link that the user triggers this action from.'
|
|
1086
|
+
defaultMessage: `<p>Summarize this doc <a>{url}</a> into a concise, easy-to-scan overview. Adapt to whatever the content is and focus on the main ideas, important decisions, key updates, and next steps, only include these if they exist; don't mention their absence. Avoid unnecessary detail, repetition, or formatting commentary. Write in plain language and optimize for a quick 5–10 second read</p>`,
|
|
1087
|
+
description: 'The prompt message to send to Rovo Chat. {url} refers to Smart Link that the user triggers this action from. (Please make sure all html tags remain the same.)'
|
|
1088
1088
|
},
|
|
1089
1089
|
rovo_prompt_message_summarize_presentation: {
|
|
1090
1090
|
id: 'fabric.linking.rovo_prompt_message_summarize_presentation.non-final',
|
|
1091
|
-
defaultMessage:
|
|
1092
|
-
description: 'The prompt message to send to Rovo Chat. {url} refers to Smart Link that the user triggers this action from.'
|
|
1091
|
+
defaultMessage: `<p>Summarize this Google Slides deck <a>{url}</a> into a concise executive overview. Focus on the tldr, key findings, decisions, metrics, risks, and next steps, if there are any. Use a short executive summary followed by 2-3 bullet points. Avoid slide-by-slide narration, design details, repetition, and filler.</p>`,
|
|
1092
|
+
description: 'The prompt message to send to Rovo Chat. {url} refers to Smart Link that the user triggers this action from. (Please make sure all html tags remain the same.)'
|
|
1093
1093
|
},
|
|
1094
1094
|
rovo_prompt_button_explain_code: {
|
|
1095
1095
|
id: 'fabric.linking.rovo_prompt_button_explain_code.non-final',
|
|
@@ -1098,7 +1098,7 @@ export const messages = defineMessages({
|
|
|
1098
1098
|
},
|
|
1099
1099
|
rovo_prompt_message_explain_code: {
|
|
1100
1100
|
id: 'fabric.linking.rovo_prompt_message_explain_code.non-final',
|
|
1101
|
-
defaultMessage: `<p>Explain this code, pull request, or commit {url} in clear, plain language for a non-technical audience.</p><p>Cover:</p><ol><li><strong>Purpose</strong> — What problem does it solve or what goal does it achieve?</li><li><strong>How it works</strong> — High-level mechanics (no implementation detail unless critical to understanding).</li><li><strong>Why</strong> — Motivation for the change or design choice.</li><li><strong>Impact</strong> — Key behavior changes, risks, or downstream effects worth noting.</li></ol><p>Constraints:</p><ul><li>3–5 sentences or 100–150 words max.</li><li>Omit sections with nothing meaningful to say.</li><li>Prefer concrete language over abstract descriptions (e.g., "speeds up page load by caching results" over "improves performance").</li></ul>`,
|
|
1101
|
+
defaultMessage: `<p>Explain this code, pull request, or commit <a>{url}</a> in clear, plain language for a non-technical audience.</p><p>Cover:</p><ol><li><strong>Purpose</strong> — What problem does it solve or what goal does it achieve?</li><li><strong>How it works</strong> — High-level mechanics (no implementation detail unless critical to understanding).</li><li><strong>Why</strong> — Motivation for the change or design choice.</li><li><strong>Impact</strong> — Key behavior changes, risks, or downstream effects worth noting.</li></ol><p>Constraints:</p><ul><li>3–5 sentences or 100–150 words max.</li><li>Omit sections with nothing meaningful to say.</li><li>Prefer concrete language over abstract descriptions (e.g., "speeds up page load by caching results" over "improves performance").</li></ul>`,
|
|
1102
1102
|
description: 'The prompt message to send to Rovo Chat. {url} refers to Smart Link that the user triggers this action from. (Please make sure all html tags remain the same.)'
|
|
1103
1103
|
},
|
|
1104
1104
|
rovo_prompt_button_catch_up: {
|
|
@@ -1108,7 +1108,7 @@ export const messages = defineMessages({
|
|
|
1108
1108
|
},
|
|
1109
1109
|
rovo_prompt_message_catch_up: {
|
|
1110
1110
|
id: 'fabric.linking.rovo_prompt_message_catch_up.non-final',
|
|
1111
|
-
defaultMessage:
|
|
1111
|
+
defaultMessage: `<p>Catch me up on the latest {provider} conversations or channel activity in <a>{url}</a> from the last two weeks. If there's no activity in the past two weeks, expand the window to the most recent 30 days (or until meaningful activity is found). Summarize the most important updates, decisions, and discussions so the user can quickly understand what they missed. Focus on key changes, unresolved questions, and any action items or follow-ups. Prioritize recent messages with the most activity. Keep the response concise — ideally 80–150 words or a short set of 3–5 key bullets.</p>`,
|
|
1112
1112
|
description: 'The prompt message to send to Rovo Chat. {url} refers to Smart Link that the user triggers this action from. {provider} is the 3P app name (Please make sure all html tags remain the same.)'
|
|
1113
1113
|
},
|
|
1114
1114
|
rovo_prompt_button_salesforce_prep: {
|
|
@@ -1118,8 +1118,8 @@ export const messages = defineMessages({
|
|
|
1118
1118
|
},
|
|
1119
1119
|
rovo_prompt_message_salesforce_prep: {
|
|
1120
1120
|
id: 'fabric.linking.rovo_prompt_message_salesforce_prep.non-final',
|
|
1121
|
-
defaultMessage:
|
|
1122
|
-
description: 'The prompt message to send to Rovo Chat. {url} refers to Smart Link that the user triggers this action from'
|
|
1121
|
+
defaultMessage: `<p>Prep me for this Salesforce record <a>{url}</a>. What's the current state, what's the recent activity, what risks or opportunities should I be aware of, and what would be useful to know before a conversation about it?</p>`,
|
|
1122
|
+
description: 'The prompt message to send to Rovo Chat. {url} refers to Smart Link that the user triggers this action from. (Please make sure all html tags remain the same.)'
|
|
1123
1123
|
},
|
|
1124
1124
|
// TODO: remove when social-proof-3p-unauth-block-fg is cleaned up
|
|
1125
1125
|
pre_auth_block_social_proof_not_low: {
|
|
@@ -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: "45.0
|
|
5
|
+
packageVersion: "45.1.0" || ''
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useCallback, useRef, useState } from 'react';
|
|
3
3
|
import ModalDialog, { ModalBody, ModalTransition } from '@atlaskit/modal-dialog';
|
|
4
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
5
4
|
import { useThemeObserver } from '@atlaskit/tokens';
|
|
6
5
|
import { SmartLinkSize } from '../../constants';
|
|
7
6
|
import useInvokeClientAction from '../../state/hooks/use-invoke-client-action';
|
|
@@ -70,7 +69,7 @@ const EmbedModal = ({
|
|
|
70
69
|
}
|
|
71
70
|
if (invokeViewAction) {
|
|
72
71
|
const visitedDisplay = invokeViewAction.display && invokeViewAction.display !== 'url' ? invokeViewAction.display : null;
|
|
73
|
-
if (visitedDisplay
|
|
72
|
+
if (visitedDisplay) {
|
|
74
73
|
var _invokeViewAction$id, _invokeViewAction$def;
|
|
75
74
|
fireEvent === null || fireEvent === void 0 ? void 0 : fireEvent('track.smartLink.visited', {
|
|
76
75
|
id: (_invokeViewAction$id = invokeViewAction.id) !== null && _invokeViewAction$id !== void 0 ? _invokeViewAction$id : iframeName,
|
|
@@ -86,7 +85,7 @@ const EmbedModal = ({
|
|
|
86
85
|
if (invokeViewAction) {
|
|
87
86
|
invoke(invokeViewAction);
|
|
88
87
|
const visitedDisplay = invokeViewAction.display && invokeViewAction.display !== 'url' ? invokeViewAction.display : null;
|
|
89
|
-
if (visitedDisplay
|
|
88
|
+
if (visitedDisplay) {
|
|
90
89
|
var _invokeViewAction$id2, _invokeViewAction$def2;
|
|
91
90
|
fireEvent === null || fireEvent === void 0 ? void 0 : fireEvent('track.smartLink.visited', {
|
|
92
91
|
id: (_invokeViewAction$id2 = invokeViewAction.id) !== null && _invokeViewAction$id2 !== void 0 ? _invokeViewAction$id2 : iframeName,
|
package/dist/es2019/view/FlexibleCard/components/elements/common/base-date-time-element/index.js
CHANGED
|
@@ -5,8 +5,37 @@ import * as React from 'react';
|
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { selectUnit } from '@formatjs/intl-utils';
|
|
7
7
|
import { FormattedMessage, useIntl } from 'react-intl';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
9
|
import { messages } from '../../../../../../messages';
|
|
9
10
|
const styles = null;
|
|
11
|
+
const ABSOLUTE_DATE_FORMAT = {
|
|
12
|
+
month: 'short',
|
|
13
|
+
day: 'numeric',
|
|
14
|
+
year: 'numeric'
|
|
15
|
+
};
|
|
16
|
+
const isValidTimeZone = timeZone => {
|
|
17
|
+
try {
|
|
18
|
+
new Intl.DateTimeFormat(undefined, {
|
|
19
|
+
timeZone
|
|
20
|
+
});
|
|
21
|
+
return true;
|
|
22
|
+
} catch {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
const formatAbsoluteDateWithOptionalTimeZone = ({
|
|
27
|
+
date,
|
|
28
|
+
formatDate,
|
|
29
|
+
timeZone
|
|
30
|
+
}) => {
|
|
31
|
+
if (!timeZone || !isValidTimeZone(timeZone)) {
|
|
32
|
+
return formatDate(date, ABSOLUTE_DATE_FORMAT);
|
|
33
|
+
}
|
|
34
|
+
return formatDate(date, {
|
|
35
|
+
...ABSOLUTE_DATE_FORMAT,
|
|
36
|
+
timeZone
|
|
37
|
+
});
|
|
38
|
+
};
|
|
10
39
|
const typeToDescriptorMap = {
|
|
11
40
|
created: {
|
|
12
41
|
relative: messages.created_on_relative,
|
|
@@ -43,7 +72,8 @@ const BaseDateTimeElement = ({
|
|
|
43
72
|
text,
|
|
44
73
|
hideDatePrefix = false,
|
|
45
74
|
color,
|
|
46
|
-
fontSize
|
|
75
|
+
fontSize,
|
|
76
|
+
timeZone
|
|
47
77
|
}) => {
|
|
48
78
|
const {
|
|
49
79
|
formatRelativeTime,
|
|
@@ -57,7 +87,11 @@ const BaseDateTimeElement = ({
|
|
|
57
87
|
let typeVariant;
|
|
58
88
|
if (isLongerThenWeek) {
|
|
59
89
|
typeVariant = 'absolute';
|
|
60
|
-
context =
|
|
90
|
+
context = fg('dfo_issue_view_remote_data_srr_group') ? formatAbsoluteDateWithOptionalTimeZone({
|
|
91
|
+
date,
|
|
92
|
+
formatDate,
|
|
93
|
+
timeZone
|
|
94
|
+
}) : formatDate(date, {
|
|
61
95
|
month: 'short',
|
|
62
96
|
day: 'numeric',
|
|
63
97
|
year: 'numeric'
|
|
@@ -9,7 +9,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
9
9
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
10
10
|
const PACKAGE_DATA = {
|
|
11
11
|
packageName: "@atlaskit/smart-card",
|
|
12
|
-
packageVersion: "45.0
|
|
12
|
+
packageVersion: "45.1.0",
|
|
13
13
|
componentName: 'linkUrl'
|
|
14
14
|
};
|
|
15
15
|
const LinkUrl = ({
|
package/dist/esm/messages.js
CHANGED
|
@@ -1083,13 +1083,13 @@ export var messages = defineMessages({
|
|
|
1083
1083
|
},
|
|
1084
1084
|
rovo_prompt_message_summarize_document: {
|
|
1085
1085
|
id: 'fabric.linking.rovo_prompt_message_summarize_document.non-final',
|
|
1086
|
-
defaultMessage: "Summarize this doc {url} into a concise, easy-to-scan overview. Adapt to whatever the content is and focus on the main ideas, important decisions, key updates, and next steps, only include these if they exist; don't mention their absence. Avoid unnecessary detail, repetition, or formatting commentary. Write in plain language and optimize for a quick 5\u201310 second read",
|
|
1087
|
-
description: 'The prompt message to send to Rovo Chat. {url} refers to Smart Link that the user triggers this action from.'
|
|
1086
|
+
defaultMessage: "<p>Summarize this doc <a>{url}</a> into a concise, easy-to-scan overview. Adapt to whatever the content is and focus on the main ideas, important decisions, key updates, and next steps, only include these if they exist; don't mention their absence. Avoid unnecessary detail, repetition, or formatting commentary. Write in plain language and optimize for a quick 5\u201310 second read</p>",
|
|
1087
|
+
description: 'The prompt message to send to Rovo Chat. {url} refers to Smart Link that the user triggers this action from. (Please make sure all html tags remain the same.)'
|
|
1088
1088
|
},
|
|
1089
1089
|
rovo_prompt_message_summarize_presentation: {
|
|
1090
1090
|
id: 'fabric.linking.rovo_prompt_message_summarize_presentation.non-final',
|
|
1091
|
-
defaultMessage: "Summarize this Google Slides deck {url} into a concise executive overview. Focus on the tldr, key findings, decisions, metrics, risks, and next steps, if there are any. Use a short executive summary followed by 2-3 bullet points. Avoid slide-by-slide narration, design details, repetition, and filler
|
|
1092
|
-
description: 'The prompt message to send to Rovo Chat. {url} refers to Smart Link that the user triggers this action from.'
|
|
1091
|
+
defaultMessage: "<p>Summarize this Google Slides deck <a>{url}</a> into a concise executive overview. Focus on the tldr, key findings, decisions, metrics, risks, and next steps, if there are any. Use a short executive summary followed by 2-3 bullet points. Avoid slide-by-slide narration, design details, repetition, and filler.</p>",
|
|
1092
|
+
description: 'The prompt message to send to Rovo Chat. {url} refers to Smart Link that the user triggers this action from. (Please make sure all html tags remain the same.)'
|
|
1093
1093
|
},
|
|
1094
1094
|
rovo_prompt_button_explain_code: {
|
|
1095
1095
|
id: 'fabric.linking.rovo_prompt_button_explain_code.non-final',
|
|
@@ -1098,7 +1098,7 @@ export var messages = defineMessages({
|
|
|
1098
1098
|
},
|
|
1099
1099
|
rovo_prompt_message_explain_code: {
|
|
1100
1100
|
id: 'fabric.linking.rovo_prompt_message_explain_code.non-final',
|
|
1101
|
-
defaultMessage: "<p>Explain this code, pull request, or commit {url} in clear, plain language for a non-technical audience.</p><p>Cover:</p><ol><li><strong>Purpose</strong> \u2014 What problem does it solve or what goal does it achieve?</li><li><strong>How it works</strong> \u2014 High-level mechanics (no implementation detail unless critical to understanding).</li><li><strong>Why</strong> \u2014 Motivation for the change or design choice.</li><li><strong>Impact</strong> \u2014 Key behavior changes, risks, or downstream effects worth noting.</li></ol><p>Constraints:</p><ul><li>3\u20135 sentences or 100\u2013150 words max.</li><li>Omit sections with nothing meaningful to say.</li><li>Prefer concrete language over abstract descriptions (e.g., \"speeds up page load by caching results\" over \"improves performance\").</li></ul>",
|
|
1101
|
+
defaultMessage: "<p>Explain this code, pull request, or commit <a>{url}</a> in clear, plain language for a non-technical audience.</p><p>Cover:</p><ol><li><strong>Purpose</strong> \u2014 What problem does it solve or what goal does it achieve?</li><li><strong>How it works</strong> \u2014 High-level mechanics (no implementation detail unless critical to understanding).</li><li><strong>Why</strong> \u2014 Motivation for the change or design choice.</li><li><strong>Impact</strong> \u2014 Key behavior changes, risks, or downstream effects worth noting.</li></ol><p>Constraints:</p><ul><li>3\u20135 sentences or 100\u2013150 words max.</li><li>Omit sections with nothing meaningful to say.</li><li>Prefer concrete language over abstract descriptions (e.g., \"speeds up page load by caching results\" over \"improves performance\").</li></ul>",
|
|
1102
1102
|
description: 'The prompt message to send to Rovo Chat. {url} refers to Smart Link that the user triggers this action from. (Please make sure all html tags remain the same.)'
|
|
1103
1103
|
},
|
|
1104
1104
|
rovo_prompt_button_catch_up: {
|
|
@@ -1108,7 +1108,7 @@ export var messages = defineMessages({
|
|
|
1108
1108
|
},
|
|
1109
1109
|
rovo_prompt_message_catch_up: {
|
|
1110
1110
|
id: 'fabric.linking.rovo_prompt_message_catch_up.non-final',
|
|
1111
|
-
defaultMessage: "Catch me up on the latest {provider} conversations or channel activity in {url} from the last two weeks. If there's no activity in the past two weeks, expand the window to the most recent 30 days (or until meaningful activity is found). Summarize the most important updates, decisions, and discussions so the user can quickly understand what they missed. Focus on key changes, unresolved questions, and any action items or follow-ups. Prioritize recent messages with the most activity. Keep the response concise \u2014 ideally 80\u2013150 words or a short set of 3\u20135 key bullets
|
|
1111
|
+
defaultMessage: "<p>Catch me up on the latest {provider} conversations or channel activity in <a>{url}</a> from the last two weeks. If there's no activity in the past two weeks, expand the window to the most recent 30 days (or until meaningful activity is found). Summarize the most important updates, decisions, and discussions so the user can quickly understand what they missed. Focus on key changes, unresolved questions, and any action items or follow-ups. Prioritize recent messages with the most activity. Keep the response concise \u2014 ideally 80\u2013150 words or a short set of 3\u20135 key bullets.</p>",
|
|
1112
1112
|
description: 'The prompt message to send to Rovo Chat. {url} refers to Smart Link that the user triggers this action from. {provider} is the 3P app name (Please make sure all html tags remain the same.)'
|
|
1113
1113
|
},
|
|
1114
1114
|
rovo_prompt_button_salesforce_prep: {
|
|
@@ -1118,8 +1118,8 @@ export var messages = defineMessages({
|
|
|
1118
1118
|
},
|
|
1119
1119
|
rovo_prompt_message_salesforce_prep: {
|
|
1120
1120
|
id: 'fabric.linking.rovo_prompt_message_salesforce_prep.non-final',
|
|
1121
|
-
defaultMessage: "Prep me for this Salesforce record {url}
|
|
1122
|
-
description: 'The prompt message to send to Rovo Chat. {url} refers to Smart Link that the user triggers this action from'
|
|
1121
|
+
defaultMessage: "<p>Prep me for this Salesforce record <a>{url}</a>. What's the current state, what's the recent activity, what risks or opportunities should I be aware of, and what would be useful to know before a conversation about it?</p>",
|
|
1122
|
+
description: 'The prompt message to send to Rovo Chat. {url} refers to Smart Link that the user triggers this action from. (Please make sure all html tags remain the same.)'
|
|
1123
1123
|
},
|
|
1124
1124
|
// TODO: remove when social-proof-3p-unauth-block-fg is cleaned up
|
|
1125
1125
|
pre_auth_block_social_proof_not_low: {
|
|
@@ -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: "45.0
|
|
7
|
+
packageVersion: "45.1.0" || ''
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -2,7 +2,6 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import React, { useCallback, useRef, useState } from 'react';
|
|
4
4
|
import ModalDialog, { ModalBody, ModalTransition } from '@atlaskit/modal-dialog';
|
|
5
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
5
|
import { useThemeObserver } from '@atlaskit/tokens';
|
|
7
6
|
import { SmartLinkSize } from '../../constants';
|
|
8
7
|
import useInvokeClientAction from '../../state/hooks/use-invoke-client-action';
|
|
@@ -85,7 +84,7 @@ var EmbedModal = function EmbedModal(_ref) {
|
|
|
85
84
|
}
|
|
86
85
|
if (invokeViewAction) {
|
|
87
86
|
var visitedDisplay = invokeViewAction.display && invokeViewAction.display !== 'url' ? invokeViewAction.display : null;
|
|
88
|
-
if (visitedDisplay
|
|
87
|
+
if (visitedDisplay) {
|
|
89
88
|
var _invokeViewAction$id, _invokeViewAction$def;
|
|
90
89
|
fireEvent === null || fireEvent === void 0 || fireEvent('track.smartLink.visited', {
|
|
91
90
|
id: (_invokeViewAction$id = invokeViewAction.id) !== null && _invokeViewAction$id !== void 0 ? _invokeViewAction$id : iframeName,
|
|
@@ -101,7 +100,7 @@ var EmbedModal = function EmbedModal(_ref) {
|
|
|
101
100
|
if (invokeViewAction) {
|
|
102
101
|
invoke(invokeViewAction);
|
|
103
102
|
var visitedDisplay = invokeViewAction.display && invokeViewAction.display !== 'url' ? invokeViewAction.display : null;
|
|
104
|
-
if (visitedDisplay
|
|
103
|
+
if (visitedDisplay) {
|
|
105
104
|
var _invokeViewAction$id2, _invokeViewAction$def2;
|
|
106
105
|
fireEvent === null || fireEvent === void 0 || fireEvent('track.smartLink.visited', {
|
|
107
106
|
id: (_invokeViewAction$id2 = invokeViewAction.id) !== null && _invokeViewAction$id2 !== void 0 ? _invokeViewAction$id2 : iframeName,
|
package/dist/esm/view/FlexibleCard/components/elements/common/base-date-time-element/index.js
CHANGED
|
@@ -1,12 +1,42 @@
|
|
|
1
1
|
/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
4
|
import "./index.compiled.css";
|
|
4
5
|
import * as React from 'react';
|
|
5
6
|
import { ax, ix } from "@compiled/react/runtime";
|
|
7
|
+
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; }
|
|
8
|
+
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) { _defineProperty(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; }
|
|
6
9
|
import { selectUnit } from '@formatjs/intl-utils';
|
|
7
10
|
import { FormattedMessage, useIntl } from 'react-intl';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
12
|
import { messages } from '../../../../../../messages';
|
|
9
13
|
var styles = null;
|
|
14
|
+
var ABSOLUTE_DATE_FORMAT = {
|
|
15
|
+
month: 'short',
|
|
16
|
+
day: 'numeric',
|
|
17
|
+
year: 'numeric'
|
|
18
|
+
};
|
|
19
|
+
var isValidTimeZone = function isValidTimeZone(timeZone) {
|
|
20
|
+
try {
|
|
21
|
+
new Intl.DateTimeFormat(undefined, {
|
|
22
|
+
timeZone: timeZone
|
|
23
|
+
});
|
|
24
|
+
return true;
|
|
25
|
+
} catch (_unused) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
var formatAbsoluteDateWithOptionalTimeZone = function formatAbsoluteDateWithOptionalTimeZone(_ref) {
|
|
30
|
+
var date = _ref.date,
|
|
31
|
+
formatDate = _ref.formatDate,
|
|
32
|
+
timeZone = _ref.timeZone;
|
|
33
|
+
if (!timeZone || !isValidTimeZone(timeZone)) {
|
|
34
|
+
return formatDate(date, ABSOLUTE_DATE_FORMAT);
|
|
35
|
+
}
|
|
36
|
+
return formatDate(date, _objectSpread(_objectSpread({}, ABSOLUTE_DATE_FORMAT), {}, {
|
|
37
|
+
timeZone: timeZone
|
|
38
|
+
}));
|
|
39
|
+
};
|
|
10
40
|
var typeToDescriptorMap = {
|
|
11
41
|
created: {
|
|
12
42
|
relative: messages.created_on_relative,
|
|
@@ -34,18 +64,19 @@ var fontOverrideStyleMap = {
|
|
|
34
64
|
* @see ModifiedOn
|
|
35
65
|
* @see SentOn
|
|
36
66
|
*/
|
|
37
|
-
var BaseDateTimeElement = function BaseDateTimeElement(
|
|
38
|
-
var date =
|
|
39
|
-
name =
|
|
40
|
-
className =
|
|
41
|
-
type =
|
|
42
|
-
|
|
43
|
-
testId =
|
|
44
|
-
text =
|
|
45
|
-
|
|
46
|
-
hideDatePrefix =
|
|
47
|
-
color =
|
|
48
|
-
fontSize =
|
|
67
|
+
var BaseDateTimeElement = function BaseDateTimeElement(_ref2) {
|
|
68
|
+
var date = _ref2.date,
|
|
69
|
+
name = _ref2.name,
|
|
70
|
+
className = _ref2.className,
|
|
71
|
+
type = _ref2.type,
|
|
72
|
+
_ref2$testId = _ref2.testId,
|
|
73
|
+
testId = _ref2$testId === void 0 ? 'smart-element-date-time' : _ref2$testId,
|
|
74
|
+
text = _ref2.text,
|
|
75
|
+
_ref2$hideDatePrefix = _ref2.hideDatePrefix,
|
|
76
|
+
hideDatePrefix = _ref2$hideDatePrefix === void 0 ? false : _ref2$hideDatePrefix,
|
|
77
|
+
color = _ref2.color,
|
|
78
|
+
fontSize = _ref2.fontSize,
|
|
79
|
+
timeZone = _ref2.timeZone;
|
|
49
80
|
var _useIntl = useIntl(),
|
|
50
81
|
formatRelativeTime = _useIntl.formatRelativeTime,
|
|
51
82
|
formatDate = _useIntl.formatDate;
|
|
@@ -57,7 +88,11 @@ var BaseDateTimeElement = function BaseDateTimeElement(_ref) {
|
|
|
57
88
|
var typeVariant;
|
|
58
89
|
if (isLongerThenWeek) {
|
|
59
90
|
typeVariant = 'absolute';
|
|
60
|
-
context =
|
|
91
|
+
context = fg('dfo_issue_view_remote_data_srr_group') ? formatAbsoluteDateWithOptionalTimeZone({
|
|
92
|
+
date: date,
|
|
93
|
+
formatDate: formatDate,
|
|
94
|
+
timeZone: timeZone
|
|
95
|
+
}) : formatDate(date, {
|
|
61
96
|
month: 'short',
|
|
62
97
|
day: 'numeric',
|
|
63
98
|
year: 'numeric'
|
|
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
12
12
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
13
13
|
var PACKAGE_DATA = {
|
|
14
14
|
packageName: "@atlaskit/smart-card",
|
|
15
|
-
packageVersion: "45.0
|
|
15
|
+
packageVersion: "45.1.0",
|
|
16
16
|
componentName: 'linkUrl'
|
|
17
17
|
};
|
|
18
18
|
var LinkUrl = function LinkUrl(_ref) {
|
|
@@ -325,7 +325,7 @@ export type ModifiedBy = {
|
|
|
325
325
|
*/
|
|
326
326
|
export type ModifiedOn = {
|
|
327
327
|
name: ElementName.ModifiedOn;
|
|
328
|
-
} & Pick<ModifiedOnProps, 'fontSize' | 'text'>;
|
|
328
|
+
} & Pick<ModifiedOnProps, 'fontSize' | 'text' | 'timeZone'>;
|
|
329
329
|
/**
|
|
330
330
|
* Represents the props available for an Preview element.
|
|
331
331
|
* @see Preview
|
package/dist/types/view/FlexibleCard/components/elements/common/base-date-time-element/index.d.ts
CHANGED
|
@@ -23,6 +23,10 @@ export type BaseDateTimeElementProps = ElementProps & {
|
|
|
23
23
|
* The override text which will show next to the date
|
|
24
24
|
*/
|
|
25
25
|
text?: string;
|
|
26
|
+
/**
|
|
27
|
+
* IANA timezone used for absolute date formatting.
|
|
28
|
+
*/
|
|
29
|
+
timeZone?: string;
|
|
26
30
|
/**
|
|
27
31
|
* Whether the date time element text should contain "Modified" or "Created" or "sent"
|
|
28
32
|
*/
|
|
@@ -36,6 +40,6 @@ export type BaseDateTimeElementProps = ElementProps & {
|
|
|
36
40
|
* @see ModifiedOn
|
|
37
41
|
* @see SentOn
|
|
38
42
|
*/
|
|
39
|
-
declare const BaseDateTimeElement: ({ date, name, className, type, testId, text, hideDatePrefix, color, fontSize, }: BaseDateTimeElementProps) => JSX.Element | null;
|
|
43
|
+
declare const BaseDateTimeElement: ({ date, name, className, type, testId, text, hideDatePrefix, color, fontSize, timeZone, }: BaseDateTimeElementProps) => JSX.Element | null;
|
|
40
44
|
export default BaseDateTimeElement;
|
|
41
45
|
export declare const toDateTimeProps: (type: "created" | "modified" | "sent", dateString?: string) => Partial<BaseDateTimeElementProps> | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "45.0
|
|
3
|
+
"version": "45.1.0",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@atlaskit/lozenge": "^14.0.0",
|
|
71
71
|
"@atlaskit/menu": "^9.0.0",
|
|
72
72
|
"@atlaskit/modal-dialog": "^16.0.0",
|
|
73
|
-
"@atlaskit/motion": "^7.
|
|
73
|
+
"@atlaskit/motion": "^7.1.0",
|
|
74
74
|
"@atlaskit/object": "^2.0.0",
|
|
75
75
|
"@atlaskit/outbound-auth-flow-client": "^4.0.0",
|
|
76
76
|
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"@atlaskit/textfield": "^9.0.0",
|
|
88
88
|
"@atlaskit/theme": "^26.0.0",
|
|
89
89
|
"@atlaskit/tile": "^2.0.0",
|
|
90
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
90
|
+
"@atlaskit/tmp-editor-statsig": "^107.1.0",
|
|
91
91
|
"@atlaskit/tokens": "^14.0.0",
|
|
92
92
|
"@atlaskit/tooltip": "^23.0.0",
|
|
93
93
|
"@atlaskit/ufo": "^1.0.0",
|
|
@@ -274,6 +274,9 @@
|
|
|
274
274
|
},
|
|
275
275
|
"platform_smartlink_inline_resolve_optimization": {
|
|
276
276
|
"type": "boolean"
|
|
277
|
+
},
|
|
278
|
+
"dfo_issue_view_remote_data_srr_group": {
|
|
279
|
+
"type": "boolean"
|
|
277
280
|
}
|
|
278
281
|
},
|
|
279
282
|
"compassUnitTestMetricSourceId": "ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:metric-source/c5751cc6-3513-4070-9deb-af31e86aed34/f74ef1bc-7240-4aac-9dc8-9dc43b502089"
|