@atlaskit/smart-card 45.23.3 → 45.24.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 +28 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/automation-modal-header/smart-card-automation-modal-header-title--default--platform-dst-modal-dialog-use-modal-title-false.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/automation-modal-header/smart-card-automation-modal-header-title--default--platform-dst-modal-dialog-use-modal-title-true.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/embedded-card-navigation/embedded-card-navigation-disabled--default.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/embedded-card-navigation/embedded-card-navigation-enabled--default.png +3 -0
- package/dist/cjs/extractors/action/extract-invoke-preview-action.js +4 -4
- package/dist/cjs/linkProvider.js +3 -3
- package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/index.js +2 -2
- package/dist/cjs/state/hooks/use-response/index.js +4 -4
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/CardWithUrl/component.js +19 -7
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/header/main.js +22 -24
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/TitleBlock.js +3 -2
- package/dist/cjs/view/FlexibleCard/components/container/index.js +9 -6
- package/dist/cjs/view/FlexibleCard/components/elements/title-element/index.js +8 -4
- package/dist/cjs/view/FlexibleCard/index.js +3 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/__tests__/vr-tests/__snapshots__/automation-modal-header/smart-card-automation-modal-header-title--default--platform-dst-modal-dialog-use-modal-title-false.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/automation-modal-header/smart-card-automation-modal-header-title--default--platform-dst-modal-dialog-use-modal-title-true.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/embedded-card-navigation/embedded-card-navigation-disabled--default.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/embedded-card-navigation/embedded-card-navigation-enabled--default.png +3 -0
- package/dist/es2019/extractors/action/extract-invoke-preview-action.js +1 -1
- package/dist/es2019/linkProvider.js +1 -1
- package/dist/es2019/state/hooks/use-ai-summary/ai-summary-service/index.js +1 -1
- package/dist/es2019/state/hooks/use-response/index.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/CardWithUrl/component.js +18 -7
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/header/main.js +22 -24
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/TitleBlock.js +3 -2
- package/dist/es2019/view/FlexibleCard/components/container/index.js +9 -6
- package/dist/es2019/view/FlexibleCard/components/elements/title-element/index.js +8 -4
- package/dist/es2019/view/FlexibleCard/index.js +3 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/__tests__/vr-tests/__snapshots__/automation-modal-header/smart-card-automation-modal-header-title--default--platform-dst-modal-dialog-use-modal-title-false.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/automation-modal-header/smart-card-automation-modal-header-title--default--platform-dst-modal-dialog-use-modal-title-true.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/embedded-card-navigation/embedded-card-navigation-disabled--default.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/embedded-card-navigation/embedded-card-navigation-enabled--default.png +3 -0
- package/dist/esm/extractors/action/extract-invoke-preview-action.js +1 -1
- package/dist/esm/linkProvider.js +1 -1
- package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/index.js +1 -1
- package/dist/esm/state/hooks/use-response/index.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/CardWithUrl/component.js +19 -7
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/header/main.js +22 -24
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/TitleBlock.js +3 -2
- package/dist/esm/view/FlexibleCard/components/container/index.js +9 -6
- package/dist/esm/view/FlexibleCard/components/elements/title-element/index.js +8 -4
- package/dist/esm/view/FlexibleCard/index.js +3 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/linkProvider.d.ts +1 -1
- package/dist/types/state/flexible-ui-context/index.d.ts +2 -1
- package/dist/types/state/hooks/use-response/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/types.d.ts +5 -0
- package/package.json +12 -4
|
@@ -28,6 +28,7 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
28
28
|
var _details$meta2, _flexibleCardContext$;
|
|
29
29
|
var _ref$appearance = _ref.appearance,
|
|
30
30
|
appearance = _ref$appearance === void 0 ? 'flexible' : _ref$appearance,
|
|
31
|
+
navigation = _ref.navigation,
|
|
31
32
|
cardState = _ref.cardState,
|
|
32
33
|
children = _ref.children,
|
|
33
34
|
id = _ref.id,
|
|
@@ -104,10 +105,11 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
104
105
|
var flexibleCardContext = useMemo(function () {
|
|
105
106
|
return {
|
|
106
107
|
data: context,
|
|
108
|
+
navigation: context ? navigation : undefined,
|
|
107
109
|
status: placeHolderStatus !== null && placeHolderStatus !== void 0 ? placeHolderStatus : status,
|
|
108
110
|
ui: ui
|
|
109
111
|
};
|
|
110
|
-
}, [context, placeHolderStatus, status, ui]);
|
|
112
|
+
}, [context, placeHolderStatus, status, ui, navigation]);
|
|
111
113
|
var _ref2 = context || {},
|
|
112
114
|
linkTitle = _ref2.linkTitle;
|
|
113
115
|
var title = linkTitle === null || linkTitle === void 0 ? void 0 : linkTitle.text;
|
|
@@ -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.23.
|
|
15
|
+
packageVersion: "45.23.4",
|
|
16
16
|
componentName: 'linkUrl'
|
|
17
17
|
};
|
|
18
18
|
var LinkUrl = function LinkUrl(_ref) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-661 Internal documentation for deprecation (no external access)} */
|
|
2
|
-
export { editorCardProvider, EditorCardProvider } from '@atlaskit/link-provider';
|
|
2
|
+
export { editorCardProvider, EditorCardProvider } from '@atlaskit/link-provider/editor';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { type Context } from 'react';
|
|
2
2
|
import { type SmartLinkStatus } from '../../constants';
|
|
3
|
-
import { type InternalFlexibleUiOptions } from '../../view/FlexibleCard/types';
|
|
3
|
+
import { type FlexibleCardProps, type InternalFlexibleUiOptions } from '../../view/FlexibleCard/types';
|
|
4
4
|
import { type FlexibleUiDataContext } from './types';
|
|
5
5
|
export type FlexibleCardContextType = {
|
|
6
6
|
data?: FlexibleUiDataContext;
|
|
7
|
+
navigation?: FlexibleCardProps['navigation'];
|
|
7
8
|
status?: SmartLinkStatus;
|
|
8
9
|
ui?: InternalFlexibleUiOptions;
|
|
9
10
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { JsonLd } from '@atlaskit/json-ld-types/jsonld';
|
|
2
2
|
import type { MetadataStatus } from '@atlaskit/linking-common/types';
|
|
3
|
-
import { APIError } from '@atlaskit/linking-common';
|
|
3
|
+
import { APIError } from '@atlaskit/linking-common/api-error';
|
|
4
4
|
declare const useResponse: () => {
|
|
5
5
|
handleResolvedLinkError: (url: string, error: APIError, response?: JsonLd.Response, isMetadataRequest?: boolean) => void;
|
|
6
6
|
handleResolvedLinkResponse: (resourceUrl: string, response: JsonLd.Response | undefined, isReloading?: boolean, isMetadataRequest?: boolean, metadataStatus?: MetadataStatus) => void;
|
|
@@ -6,5 +6,5 @@ import { type FlexibleCardProps } from './types';
|
|
|
6
6
|
* Note: TitleBlock is mandatory for a Flexible Card to render.
|
|
7
7
|
* @see Container
|
|
8
8
|
*/
|
|
9
|
-
declare const FlexibleCard: ({ appearance, cardState, children, id, onAuthorize, onClick, onAuxClick, onContextMenu, onError, onResolve, origin, placeholderData, renderers, showHoverPreview, hoverPreviewOptions, actionOptions, testId, ui, url, title: ssrTitle, }: FlexibleCardProps) => React.JSX.Element;
|
|
9
|
+
declare const FlexibleCard: ({ appearance, navigation, cardState, children, id, onAuthorize, onClick, onAuxClick, onContextMenu, onError, onResolve, origin, placeholderData, renderers, showHoverPreview, hoverPreviewOptions, actionOptions, testId, ui, url, title: ssrTitle, }: FlexibleCardProps) => React.JSX.Element;
|
|
10
10
|
export default FlexibleCard;
|
|
@@ -13,6 +13,7 @@ import { type AnalyticsOrigin } from '../../utils/types';
|
|
|
13
13
|
import { type InternalCardActionOptions as CardActionOptions, type CardInnerAppearance, type OnResolveCallback } from '../Card/types';
|
|
14
14
|
import { type HoverPreviewOptions } from '../HoverCard/types';
|
|
15
15
|
import { type OnErrorCallback } from '../types';
|
|
16
|
+
import type { AnchorTarget } from './components/types';
|
|
16
17
|
export type FlexibleCardProps = {
|
|
17
18
|
/**
|
|
18
19
|
* Configure visibility of server and client actions
|
|
@@ -52,6 +53,10 @@ export type FlexibleCardProps = {
|
|
|
52
53
|
* @internal A unique ID for a Smart Link.
|
|
53
54
|
*/
|
|
54
55
|
id?: string;
|
|
56
|
+
navigation?: {
|
|
57
|
+
target?: AnchorTarget;
|
|
58
|
+
url: string;
|
|
59
|
+
};
|
|
55
60
|
/**
|
|
56
61
|
* An additional action that can be performed when link is not resolved, e.g.
|
|
57
62
|
* connect account to gain access to 403 link.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "45.
|
|
3
|
+
"version": "45.24.0",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@atlaskit/link-client-extension": "^7.3.0",
|
|
65
65
|
"@atlaskit/link-extractors": "^4.2.0",
|
|
66
66
|
"@atlaskit/link-test-helpers": "^11.2.0",
|
|
67
|
-
"@atlaskit/linking-common": "^12.
|
|
67
|
+
"@atlaskit/linking-common": "^12.3.0",
|
|
68
68
|
"@atlaskit/linking-types": "^15.3.0",
|
|
69
69
|
"@atlaskit/logo": "^23.0.0",
|
|
70
70
|
"@atlaskit/lozenge": "^15.4.0",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"@atlaskit/textfield": "^10.2.0",
|
|
91
91
|
"@atlaskit/theme": "^28.2.0",
|
|
92
92
|
"@atlaskit/tile": "^4.1.0",
|
|
93
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
93
|
+
"@atlaskit/tmp-editor-statsig": "^197.0.0",
|
|
94
94
|
"@atlaskit/tokens": "^17.0.0",
|
|
95
95
|
"@atlaskit/tooltip": "^24.3.0",
|
|
96
96
|
"@atlaskit/ufo": "^1.2.0",
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"uuid": "^11.1.1"
|
|
111
111
|
},
|
|
112
112
|
"peerDependencies": {
|
|
113
|
-
"@atlaskit/link-provider": "^5.
|
|
113
|
+
"@atlaskit/link-provider": "^5.7.0",
|
|
114
114
|
"react": "^18.2.0",
|
|
115
115
|
"react-dom": "^18.2.0",
|
|
116
116
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
@@ -162,6 +162,10 @@
|
|
|
162
162
|
"xhr-mock": "^2.4.0"
|
|
163
163
|
},
|
|
164
164
|
"platform-feature-flags": {
|
|
165
|
+
"confluence_ep_shim_macro_links_v2": {
|
|
166
|
+
"type": "boolean",
|
|
167
|
+
"referenceOnly": true
|
|
168
|
+
},
|
|
165
169
|
"platform_navx_3298_message_wrapper": {
|
|
166
170
|
"type": "boolean"
|
|
167
171
|
},
|
|
@@ -250,6 +254,10 @@
|
|
|
250
254
|
},
|
|
251
255
|
"nike_r19_render_unmount": {
|
|
252
256
|
"type": "boolean"
|
|
257
|
+
},
|
|
258
|
+
"platform_dst_modal-dialog-use-modal-title": {
|
|
259
|
+
"type": "boolean",
|
|
260
|
+
"referenceOnly": true
|
|
253
261
|
}
|
|
254
262
|
},
|
|
255
263
|
"compassUnitTestMetricSourceId": "ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:metric-source/c5751cc6-3513-4070-9deb-af31e86aed34/f74ef1bc-7240-4aac-9dc8-9dc43b502089"
|