@atlaskit/smart-card 32.0.0 → 32.1.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.
Files changed (29) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/analytics.spec.yaml +1 -1
  3. package/dist/cjs/common/analytics/generated/create-event-payload.js +1 -1
  4. package/dist/cjs/common/analytics/generated/use-analytics-events.js +1 -1
  5. package/dist/cjs/extractors/common/lozenge/extractLozenge.js +24 -5
  6. package/dist/cjs/utils/analytics/analytics.js +1 -1
  7. package/dist/cjs/view/CardWithUrl/component.js +1 -1
  8. package/dist/cjs/view/LinkUrl/index.js +1 -1
  9. package/dist/es2019/common/analytics/generated/create-event-payload.js +1 -1
  10. package/dist/es2019/common/analytics/generated/use-analytics-events.js +1 -1
  11. package/dist/es2019/extractors/common/lozenge/extractLozenge.js +19 -0
  12. package/dist/es2019/utils/analytics/analytics.js +1 -1
  13. package/dist/es2019/view/CardWithUrl/component.js +1 -1
  14. package/dist/es2019/view/LinkUrl/index.js +1 -1
  15. package/dist/esm/common/analytics/generated/create-event-payload.js +1 -1
  16. package/dist/esm/common/analytics/generated/use-analytics-events.js +1 -1
  17. package/dist/esm/extractors/common/lozenge/extractLozenge.js +24 -5
  18. package/dist/esm/utils/analytics/analytics.js +1 -1
  19. package/dist/esm/view/CardWithUrl/component.js +1 -1
  20. package/dist/esm/view/LinkUrl/index.js +1 -1
  21. package/dist/types/common/analytics/generated/analytics.types.d.ts +3 -3
  22. package/dist/types/common/analytics/generated/create-event-payload.d.ts +2 -2
  23. package/dist/types/extractors/common/lozenge/extractState.d.ts +2 -3
  24. package/dist/types/extractors/common/lozenge/types.d.ts +2 -0
  25. package/dist/types-ts4.5/common/analytics/generated/analytics.types.d.ts +3 -3
  26. package/dist/types-ts4.5/common/analytics/generated/create-event-payload.d.ts +2 -2
  27. package/dist/types-ts4.5/extractors/common/lozenge/extractState.d.ts +2 -3
  28. package/dist/types-ts4.5/extractors/common/lozenge/types.d.ts +2 -0
  29. package/package.json +8 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 32.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#170976](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/170976)
8
+ [`dd792fd8a84f0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/dd792fd8a84f0) -
9
+ Fix analytics naming for smartLinkIframe focused
10
+
11
+ ## 32.1.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [#170211](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/170211)
16
+ [`c2506e15d813c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c2506e15d813c) -
17
+ Smart card to always show lozenge if `atlassian:state` exists, regardless of json ld type
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+
3
23
  ## 32.0.0
4
24
 
5
25
  ### Major Changes
@@ -290,7 +290,7 @@ events:
290
290
  required: true
291
291
  type: number
292
292
  description: Percentage element was visible at end of dwell
293
- - smartLinkIframe focus:
293
+ - smartLinkIframe focused:
294
294
  type: ui
295
295
  description: fires when a user clicks or tabs into a Smart Link's iframe.
296
296
  attributes:
@@ -11,7 +11,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
11
11
  *
12
12
  * Generates Typescript types for analytics events from analytics.spec.yaml
13
13
  *
14
- * @codegen <<SignedSource::0d08fdca953a1eb1130683499e509165>>
14
+ * @codegen <<SignedSource::eb8cd1263459fb798341024dc0c461ea>>
15
15
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
16
16
  */
17
17
 
@@ -14,7 +14,7 @@ var _createEventPayload = _interopRequireDefault(require("./create-event-payload
14
14
  *
15
15
  * Generates Typescript types for analytics events from analytics.spec.yaml
16
16
  *
17
- * @codegen <<SignedSource::3fdfbbdbdb062babb9a2ab4e53454d79>>
17
+ * @codegen <<SignedSource::1f3587129789e7883af37adad3817cd2>>
18
18
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
19
19
  */
20
20
 
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.extractLozenge = void 0;
7
7
  var _linkExtractors = require("@atlaskit/link-extractors");
8
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
8
9
  var _extractState = require("./extractState");
9
10
  var _extractTag = require("./extractTag");
10
11
  var _extractTaskStatus = require("./extractTaskStatus");
@@ -13,14 +14,32 @@ var DOC_TYPES = ['schema:BlogPosting', 'schema:TextDigitalDocument', 'schema:Dig
13
14
  var extractLozenge = exports.extractLozenge = function extractLozenge(jsonLd) {
14
15
  var type = (0, _linkExtractors.extractType)(jsonLd);
15
16
  if (type) {
17
+ if ((0, _platformFeatureFlags.fg)('linking_platform_show_lozenge_atlassian_state')) {
18
+ if (type.includes('atlassian:Task')) {
19
+ var jsonLdTask = jsonLd;
20
+ var lozengeFromTag = (0, _extractTag.extractTag)(jsonLdTask);
21
+ var lozengeFromStatus = (0, _extractTaskStatus.extractTaskStatus)(jsonLdTask);
22
+ var lozengeFromTaskType = extractLozengeFromTaskType(jsonLdTask);
23
+ return lozengeFromTag || lozengeFromStatus || lozengeFromTaskType;
24
+ }
25
+ if (type.includes('atlassian:UndefinedLink')) {
26
+ return {
27
+ text: 'UNDEFINED',
28
+ appearance: 'inprogress'
29
+ };
30
+ }
31
+
32
+ // casting it because `extractState` can safely handle missing properties
33
+ return (0, _extractState.extractState)(jsonLd);
34
+ }
16
35
  if (type.includes('atlassian:SourceCodePullRequest')) {
17
36
  return (0, _extractState.extractState)(jsonLd);
18
37
  } else if (type.includes('atlassian:Task')) {
19
- var jsonLdTask = jsonLd;
20
- var lozengeFromTag = (0, _extractTag.extractTag)(jsonLdTask);
21
- var lozengeFromStatus = (0, _extractTaskStatus.extractTaskStatus)(jsonLdTask);
22
- var lozengeFromTaskType = extractLozengeFromTaskType(jsonLdTask);
23
- return lozengeFromTag || lozengeFromStatus || lozengeFromTaskType;
38
+ var _jsonLdTask = jsonLd;
39
+ var _lozengeFromTag = (0, _extractTag.extractTag)(_jsonLdTask);
40
+ var _lozengeFromStatus = (0, _extractTaskStatus.extractTaskStatus)(_jsonLdTask);
41
+ var _lozengeFromTaskType = extractLozengeFromTaskType(_jsonLdTask);
42
+ return _lozengeFromTag || _lozengeFromStatus || _lozengeFromTaskType;
24
43
  } else if (type.some(function (types) {
25
44
  return DOC_TYPES.includes(types);
26
45
  })) {
@@ -17,7 +17,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
17
17
  var context = exports.context = {
18
18
  componentName: 'smart-cards',
19
19
  packageName: "@atlaskit/smart-card",
20
- packageVersion: "32.0.0"
20
+ packageVersion: "32.1.1"
21
21
  };
22
22
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
23
23
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -167,7 +167,7 @@ function Component(_ref) {
167
167
  });
168
168
  }, [id, appearance, definitionId, isFlexibleUi, fireEvent]);
169
169
  var onIframeFocus = (0, _react.useCallback)(function () {
170
- fireEvent('ui.smartLinkIframe.focus', {
170
+ fireEvent('ui.smartLinkIframe.focused', {
171
171
  id: id,
172
172
  definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null,
173
173
  display: isFlexibleUi ? 'flexible' : appearance
@@ -17,7 +17,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
17
17
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
18
18
  var PACKAGE_DATA = {
19
19
  packageName: "@atlaskit/smart-card",
20
- packageVersion: "32.0.0",
20
+ packageVersion: "32.1.1",
21
21
  componentName: 'linkUrl'
22
22
  };
23
23
  var Link = (0, _click.withLinkClickedEvent)('a');
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Generates Typescript types for analytics events from analytics.spec.yaml
5
5
  *
6
- * @codegen <<SignedSource::0d08fdca953a1eb1130683499e509165>>
6
+ * @codegen <<SignedSource::eb8cd1263459fb798341024dc0c461ea>>
7
7
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
8
8
  */
9
9
 
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Generates Typescript types for analytics events from analytics.spec.yaml
5
5
  *
6
- * @codegen <<SignedSource::3fdfbbdbdb062babb9a2ab4e53454d79>>
6
+ * @codegen <<SignedSource::1f3587129789e7883af37adad3817cd2>>
7
7
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
8
8
  */
9
9
  import { useCallback } from 'react';
@@ -1,4 +1,5 @@
1
1
  import { extractType } from '@atlaskit/link-extractors';
2
+ import { fg } from '@atlaskit/platform-feature-flags';
2
3
  import { extractState } from './extractState';
3
4
  import { extractTag } from './extractTag';
4
5
  import { extractTaskStatus } from './extractTaskStatus';
@@ -7,6 +8,24 @@ const DOC_TYPES = ['schema:BlogPosting', 'schema:TextDigitalDocument', 'schema:D
7
8
  export const extractLozenge = jsonLd => {
8
9
  const type = extractType(jsonLd);
9
10
  if (type) {
11
+ if (fg('linking_platform_show_lozenge_atlassian_state')) {
12
+ if (type.includes('atlassian:Task')) {
13
+ const jsonLdTask = jsonLd;
14
+ const lozengeFromTag = extractTag(jsonLdTask);
15
+ const lozengeFromStatus = extractTaskStatus(jsonLdTask);
16
+ const lozengeFromTaskType = extractLozengeFromTaskType(jsonLdTask);
17
+ return lozengeFromTag || lozengeFromStatus || lozengeFromTaskType;
18
+ }
19
+ if (type.includes('atlassian:UndefinedLink')) {
20
+ return {
21
+ text: 'UNDEFINED',
22
+ appearance: 'inprogress'
23
+ };
24
+ }
25
+
26
+ // casting it because `extractState` can safely handle missing properties
27
+ return extractState(jsonLd);
28
+ }
10
29
  if (type.includes('atlassian:SourceCodePullRequest')) {
11
30
  return extractState(jsonLd);
12
31
  } else if (type.includes('atlassian:Task')) {
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
4
4
  export const context = {
5
5
  componentName: 'smart-cards',
6
6
  packageName: "@atlaskit/smart-card",
7
- packageVersion: "32.0.0"
7
+ packageVersion: "32.1.1"
8
8
  };
9
9
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -155,7 +155,7 @@ function Component({
155
155
  });
156
156
  }, [id, appearance, definitionId, isFlexibleUi, fireEvent]);
157
157
  const onIframeFocus = useCallback(() => {
158
- fireEvent('ui.smartLinkIframe.focus', {
158
+ fireEvent('ui.smartLinkIframe.focused', {
159
159
  id,
160
160
  definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null,
161
161
  display: isFlexibleUi ? 'flexible' : appearance
@@ -7,7 +7,7 @@ import LinkWarningModal from './LinkWarningModal';
7
7
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
8
8
  const PACKAGE_DATA = {
9
9
  packageName: "@atlaskit/smart-card",
10
- packageVersion: "32.0.0",
10
+ packageVersion: "32.1.1",
11
11
  componentName: 'linkUrl'
12
12
  };
13
13
  const Link = withLinkClickedEvent('a');
@@ -4,7 +4,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  *
5
5
  * Generates Typescript types for analytics events from analytics.spec.yaml
6
6
  *
7
- * @codegen <<SignedSource::0d08fdca953a1eb1130683499e509165>>
7
+ * @codegen <<SignedSource::eb8cd1263459fb798341024dc0c461ea>>
8
8
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
9
9
  */
10
10
 
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Generates Typescript types for analytics events from analytics.spec.yaml
5
5
  *
6
- * @codegen <<SignedSource::3fdfbbdbdb062babb9a2ab4e53454d79>>
6
+ * @codegen <<SignedSource::1f3587129789e7883af37adad3817cd2>>
7
7
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
8
8
  */
9
9
  import { useCallback } from 'react';
@@ -1,4 +1,5 @@
1
1
  import { extractType } from '@atlaskit/link-extractors';
2
+ import { fg } from '@atlaskit/platform-feature-flags';
2
3
  import { extractState } from './extractState';
3
4
  import { extractTag } from './extractTag';
4
5
  import { extractTaskStatus } from './extractTaskStatus';
@@ -7,14 +8,32 @@ var DOC_TYPES = ['schema:BlogPosting', 'schema:TextDigitalDocument', 'schema:Dig
7
8
  export var extractLozenge = function extractLozenge(jsonLd) {
8
9
  var type = extractType(jsonLd);
9
10
  if (type) {
11
+ if (fg('linking_platform_show_lozenge_atlassian_state')) {
12
+ if (type.includes('atlassian:Task')) {
13
+ var jsonLdTask = jsonLd;
14
+ var lozengeFromTag = extractTag(jsonLdTask);
15
+ var lozengeFromStatus = extractTaskStatus(jsonLdTask);
16
+ var lozengeFromTaskType = extractLozengeFromTaskType(jsonLdTask);
17
+ return lozengeFromTag || lozengeFromStatus || lozengeFromTaskType;
18
+ }
19
+ if (type.includes('atlassian:UndefinedLink')) {
20
+ return {
21
+ text: 'UNDEFINED',
22
+ appearance: 'inprogress'
23
+ };
24
+ }
25
+
26
+ // casting it because `extractState` can safely handle missing properties
27
+ return extractState(jsonLd);
28
+ }
10
29
  if (type.includes('atlassian:SourceCodePullRequest')) {
11
30
  return extractState(jsonLd);
12
31
  } else if (type.includes('atlassian:Task')) {
13
- var jsonLdTask = jsonLd;
14
- var lozengeFromTag = extractTag(jsonLdTask);
15
- var lozengeFromStatus = extractTaskStatus(jsonLdTask);
16
- var lozengeFromTaskType = extractLozengeFromTaskType(jsonLdTask);
17
- return lozengeFromTag || lozengeFromStatus || lozengeFromTaskType;
32
+ var _jsonLdTask = jsonLd;
33
+ var _lozengeFromTag = extractTag(_jsonLdTask);
34
+ var _lozengeFromStatus = extractTaskStatus(_jsonLdTask);
35
+ var _lozengeFromTaskType = extractLozengeFromTaskType(_jsonLdTask);
36
+ return _lozengeFromTag || _lozengeFromStatus || _lozengeFromTaskType;
18
37
  } else if (type.some(function (types) {
19
38
  return DOC_TYPES.includes(types);
20
39
  })) {
@@ -10,7 +10,7 @@ export var ANALYTICS_CHANNEL = 'media';
10
10
  export var context = {
11
11
  componentName: 'smart-cards',
12
12
  packageName: "@atlaskit/smart-card",
13
- packageVersion: "32.0.0"
13
+ packageVersion: "32.1.1"
14
14
  };
15
15
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
16
16
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -157,7 +157,7 @@ function Component(_ref) {
157
157
  });
158
158
  }, [id, appearance, definitionId, isFlexibleUi, fireEvent]);
159
159
  var onIframeFocus = useCallback(function () {
160
- fireEvent('ui.smartLinkIframe.focus', {
160
+ fireEvent('ui.smartLinkIframe.focused', {
161
161
  id: id,
162
162
  definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null,
163
163
  display: isFlexibleUi ? 'flexible' : appearance
@@ -10,7 +10,7 @@ import LinkWarningModal from './LinkWarningModal';
10
10
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
11
11
  var PACKAGE_DATA = {
12
12
  packageName: "@atlaskit/smart-card",
13
- packageVersion: "32.0.0",
13
+ packageVersion: "32.1.1",
14
14
  componentName: 'linkUrl'
15
15
  };
16
16
  var Link = withLinkClickedEvent('a');
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Generates Typescript types for analytics events from analytics.spec.yaml
5
5
  *
6
- * @codegen <<SignedSource::b25cecd58c98d2c650c7c6c94fdf3c0c>>
6
+ * @codegen <<SignedSource::6a2a0a5715993e0dd235d38d95d6bbcc>>
7
7
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
8
8
  */
9
9
  export type PackageMetaDataContextType = {
@@ -71,7 +71,7 @@ export type SmartLinkIframeDwelledAttributesType = {
71
71
  dwellTime: number;
72
72
  dwellPercentVisible: number;
73
73
  };
74
- export type SmartLinkIframeFocusAttributesType = {
74
+ export type SmartLinkIframeFocusedAttributesType = {
75
75
  id: string;
76
76
  display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview';
77
77
  definitionId: string | null;
@@ -138,7 +138,7 @@ export type AnalyticsEventAttributes = {
138
138
  'ui.smartLinkIframe.dwelled': SmartLinkIframeDwelledAttributesType;
139
139
  /**
140
140
  * fires when a user clicks or tabs into a Smart Link's iframe. */
141
- 'ui.smartLinkIframe.focus': SmartLinkIframeFocusAttributesType;
141
+ 'ui.smartLinkIframe.focused': SmartLinkIframeFocusedAttributesType;
142
142
  /**
143
143
  * user connecting their account to view a Smart Link. */
144
144
  'track.applicationAccount.connected': ApplicationAccountConnectedAttributesType;
@@ -3,10 +3,10 @@
3
3
  *
4
4
  * Generates Typescript types for analytics events from analytics.spec.yaml
5
5
  *
6
- * @codegen <<SignedSource::0d08fdca953a1eb1130683499e509165>>
6
+ * @codegen <<SignedSource::eb8cd1263459fb798341024dc0c461ea>>
7
7
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
8
8
  */
9
- import { type AnalyticsEventAttributes, type EventKey } from './analytics.types';
9
+ import type { AnalyticsEventAttributes, EventKey } from './analytics.types';
10
10
  type OptionalIfUndefined<T> = undefined extends T ? [param?: T] : [param: T];
11
11
  export type EventPayloadAttributes<K extends EventKey> = OptionalIfUndefined<AnalyticsEventAttributes[K]>;
12
12
  type EventTypes = 'ui' | 'track' | 'operational' | 'screen';
@@ -1,3 +1,2 @@
1
- import { type JsonLd } from 'json-ld-types';
2
- import { type LinkLozenge } from './types';
3
- export declare const extractState: (jsonLd: JsonLd.Data.SourceCodePullRequest | JsonLd.Data.Document | JsonLd.Data.Project | JsonLd.Data.Goal) => LinkLozenge | undefined;
1
+ import { type LinkLozenge, type LinkStateType } from './types';
2
+ export declare const extractState: (jsonLd: LinkStateType) => LinkLozenge | undefined;
@@ -1,3 +1,4 @@
1
+ import { type JsonLd } from 'json-ld-types';
1
2
  import { type LozengeProps as AtlaskitLozengeProps } from '@atlaskit/lozenge';
2
3
  import { type InvokeActions } from '../../../state/hooks/use-invoke/types';
3
4
  export type LinkLozengeColor = 'default' | 'success' | 'removed' | 'inprogress' | 'new' | 'moved';
@@ -12,3 +13,4 @@ export interface LinkLozenge {
12
13
  export type LinkDocumentState = 'archived' | 'draft' | 'current';
13
14
  export type LinkPullRequestState = 'open' | 'merged' | 'declined' | 'closed';
14
15
  export type LinkState = LinkDocumentState & LinkPullRequestState;
16
+ export type LinkStateType = JsonLd.Data.Document | JsonLd.Data.SourceCodePullRequest | JsonLd.Data.Project | JsonLd.Data.Goal;
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Generates Typescript types for analytics events from analytics.spec.yaml
5
5
  *
6
- * @codegen <<SignedSource::b25cecd58c98d2c650c7c6c94fdf3c0c>>
6
+ * @codegen <<SignedSource::6a2a0a5715993e0dd235d38d95d6bbcc>>
7
7
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
8
8
  */
9
9
  export type PackageMetaDataContextType = {
@@ -71,7 +71,7 @@ export type SmartLinkIframeDwelledAttributesType = {
71
71
  dwellTime: number;
72
72
  dwellPercentVisible: number;
73
73
  };
74
- export type SmartLinkIframeFocusAttributesType = {
74
+ export type SmartLinkIframeFocusedAttributesType = {
75
75
  id: string;
76
76
  display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview';
77
77
  definitionId: string | null;
@@ -138,7 +138,7 @@ export type AnalyticsEventAttributes = {
138
138
  'ui.smartLinkIframe.dwelled': SmartLinkIframeDwelledAttributesType;
139
139
  /**
140
140
  * fires when a user clicks or tabs into a Smart Link's iframe. */
141
- 'ui.smartLinkIframe.focus': SmartLinkIframeFocusAttributesType;
141
+ 'ui.smartLinkIframe.focused': SmartLinkIframeFocusedAttributesType;
142
142
  /**
143
143
  * user connecting their account to view a Smart Link. */
144
144
  'track.applicationAccount.connected': ApplicationAccountConnectedAttributesType;
@@ -3,10 +3,10 @@
3
3
  *
4
4
  * Generates Typescript types for analytics events from analytics.spec.yaml
5
5
  *
6
- * @codegen <<SignedSource::0d08fdca953a1eb1130683499e509165>>
6
+ * @codegen <<SignedSource::eb8cd1263459fb798341024dc0c461ea>>
7
7
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
8
8
  */
9
- import { type AnalyticsEventAttributes, type EventKey } from './analytics.types';
9
+ import type { AnalyticsEventAttributes, EventKey } from './analytics.types';
10
10
  type OptionalIfUndefined<T> = undefined extends T ? [
11
11
  param?: T
12
12
  ] : [
@@ -1,3 +1,2 @@
1
- import { type JsonLd } from 'json-ld-types';
2
- import { type LinkLozenge } from './types';
3
- export declare const extractState: (jsonLd: JsonLd.Data.SourceCodePullRequest | JsonLd.Data.Document | JsonLd.Data.Project | JsonLd.Data.Goal) => LinkLozenge | undefined;
1
+ import { type LinkLozenge, type LinkStateType } from './types';
2
+ export declare const extractState: (jsonLd: LinkStateType) => LinkLozenge | undefined;
@@ -1,3 +1,4 @@
1
+ import { type JsonLd } from 'json-ld-types';
1
2
  import { type LozengeProps as AtlaskitLozengeProps } from '@atlaskit/lozenge';
2
3
  import { type InvokeActions } from '../../../state/hooks/use-invoke/types';
3
4
  export type LinkLozengeColor = 'default' | 'success' | 'removed' | 'inprogress' | 'new' | 'moved';
@@ -12,3 +13,4 @@ export interface LinkLozenge {
12
13
  export type LinkDocumentState = 'archived' | 'draft' | 'current';
13
14
  export type LinkPullRequestState = 'open' | 'merged' | 'declined' | 'closed';
14
15
  export type LinkState = LinkDocumentState & LinkPullRequestState;
16
+ export type LinkStateType = JsonLd.Data.Document | JsonLd.Data.SourceCodePullRequest | JsonLd.Data.Project | JsonLd.Data.Goal;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "32.0.0",
3
+ "version": "32.1.1",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -33,10 +33,10 @@
33
33
  "@atlaskit/button": "^20.3.0",
34
34
  "@atlaskit/checkbox": "^15.2.0",
35
35
  "@atlaskit/dropdown-menu": "^12.23.0",
36
- "@atlaskit/form": "^10.5.0",
36
+ "@atlaskit/form": "^10.6.0",
37
37
  "@atlaskit/frontend-utilities": "^2.7.0",
38
38
  "@atlaskit/heading": "^3.1.0",
39
- "@atlaskit/icon": "^22.26.0",
39
+ "@atlaskit/icon": "^22.27.0",
40
40
  "@atlaskit/icon-file-type": "^6.7.0",
41
41
  "@atlaskit/icon-object": "^6.7.0",
42
42
  "@atlaskit/icon-priority": "^6.3.0",
@@ -49,7 +49,7 @@
49
49
  "@atlaskit/logo": "^14.3.0",
50
50
  "@atlaskit/lozenge": "^11.12.0",
51
51
  "@atlaskit/menu": "^2.13.0",
52
- "@atlaskit/modal-dialog": "^12.17.0",
52
+ "@atlaskit/modal-dialog": "^12.18.0",
53
53
  "@atlaskit/outbound-auth-flow-client": "^3.4.0",
54
54
  "@atlaskit/platform-feature-flags": "^0.3.0",
55
55
  "@atlaskit/popup": "^1.29.0",
@@ -60,7 +60,7 @@
60
60
  "@atlaskit/textarea": "^5.6.0",
61
61
  "@atlaskit/textfield": "^6.6.0",
62
62
  "@atlaskit/theme": "^14.0.0",
63
- "@atlaskit/tokens": "^2.3.0",
63
+ "@atlaskit/tokens": "^2.4.0",
64
64
  "@atlaskit/tooltip": "^18.9.0",
65
65
  "@atlaskit/ufo": "^0.3.0",
66
66
  "@babel/runtime": "^7.0.0",
@@ -171,6 +171,9 @@
171
171
  "platform-visual-refresh-icons": {
172
172
  "type": "boolean"
173
173
  },
174
+ "linking_platform_show_lozenge_atlassian_state": {
175
+ "type": "boolean"
176
+ },
174
177
  "smart_links_for_plans_platform": {
175
178
  "type": "boolean"
176
179
  },