@atlaskit/link-datasource 4.1.15 → 4.2.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,13 @@
1
1
  # @atlaskit/link-datasource
2
2
 
3
+ ## 4.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#133731](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/133731)
8
+ [`10bd29b685adb`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/10bd29b685adb) -
9
+ [ux] EDM-11648 SLLV Footer design refresh
10
+
3
11
  ## 4.1.15
4
12
 
5
13
  ### Patch Changes
@@ -36,10 +36,10 @@ var ItemCountWrapper = function ItemCountWrapper(_ref) {
36
36
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
37
37
  ,
38
38
  style: {
39
- color: "var(--ds-text-accent-gray, ".concat(_colors.N800, ")"),
39
+ color: (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-sllv') ? "var(--ds-text-subtlest, #626F86)" : "var(--ds-text-accent-gray, ".concat(_colors.N800, ")"),
40
40
  textDecoration: !url ? 'none' : ''
41
41
  }
42
- }, /*#__PURE__*/_react.default.createElement(_heading.default, {
42
+ }, (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-sllv') ? children : /*#__PURE__*/_react.default.createElement(_heading.default, {
43
43
  size: "xxsmall"
44
44
  }, children)));
45
45
  };
@@ -1,6 +1,8 @@
1
+ ._11c81o8v{font:var(--ds-font-body-small,normal 400 11px/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
1
2
  ._11c8dcr7{font:var(--ds-font-body-UNSAFE_small,normal 400 9pt/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
2
3
  ._2rko1kw7{border-radius:inherit}
3
4
  ._x3do17u4{border-top:2px solid var(--ds-background-accent-gray-subtler,#dfe1e6)}
5
+ ._x3dozgxb{border-top:1px solid var(--ds-border,#091e4224)}
4
6
  ._13liidpf{border-top-left-radius:0}
5
7
  ._19bvpxbi{padding-left:var(--ds-space-200,1pc)}
6
8
  ._19bvze3t{padding-left:var(--ds-space-0,0)}
@@ -9,12 +11,17 @@
9
11
  ._2hwx12x7{margin-right:var(--ds-space-075,6px)}
10
12
  ._4cvr1h6o{align-items:center}
11
13
  ._bfhk1j9a{background-color:var(--ds-background-input,#fff)}
14
+ ._bfhkhp5a{background-color:var(--ds-surface-raised,#fff)}
15
+ ._ca0q1ejb{padding-top:var(--ds-space-300,24px)}
12
16
  ._ca0qv47k{padding-top:var(--ds-space-250,20px)}
13
17
  ._ca0qze3t{padding-top:var(--ds-space-0,0)}
18
+ ._n3td1ejb{padding-bottom:var(--ds-space-300,24px)}
14
19
  ._n3tdv47k{padding-bottom:var(--ds-space-250,20px)}
15
20
  ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
16
21
  ._qrwqidpf{border-top-right-radius:0}
22
+ ._syaz131l{color:var(--ds-text-subtlest,#626f86)}
17
23
  ._syaz1dyx{color:var(--ds-text-accent-gray,#44546f)}
24
+ ._syazmuej{color:var(--ds-border,#091e4224)}
18
25
  ._u5f3pxbi{padding-right:var(--ds-space-200,1pc)}
19
26
  ._u5f3ze3t{padding-right:var(--ds-space-0,0)}
20
27
  ._vchhusvi{box-sizing:border-box}
@@ -16,6 +16,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
16
16
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
17
17
  var _reactIntlNext = require("react-intl-next");
18
18
  var _button = _interopRequireDefault(require("@atlaskit/button"));
19
+ var _new = require("@atlaskit/button/new");
19
20
  var _refresh = _interopRequireDefault(require("@atlaskit/icon/core/migration/refresh"));
20
21
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
21
22
  var _compiled = require("@atlaskit/primitives/compiled");
@@ -24,6 +25,7 @@ var _assetsModal = require("../assets-modal");
24
25
  var _searchCount = _interopRequireWildcard(require("../common/modal/search-count"));
25
26
  var _messages = require("./messages");
26
27
  var _poweredByJsmAssets = require("./powered-by-jsm-assets");
28
+ var _providerLink = require("./provider-link");
27
29
  var _syncInfo = require("./sync-info");
28
30
  var _excluded = ["as", "style"],
29
31
  _excluded2 = ["as", "style"],
@@ -31,6 +33,11 @@ var _excluded = ["as", "style"],
31
33
  _excluded4 = ["as", "style"];
32
34
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
33
35
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
36
+ var styles = {
37
+ footer: "_11c81o8v _2rko1kw7 _x3dozgxb _syaz131l _ca0q1ejb _u5f3pxbi _n3td1ejb _19bvpxbi _vchhusvi _13liidpf _qrwqidpf _bfhkhp5a",
38
+ separator: "_syazmuej"
39
+ };
40
+
34
41
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
35
42
  var FooterWrapper = (0, _react.forwardRef)(function (_ref, __cmplr) {
36
43
  var _ref$as = _ref.as,
@@ -111,6 +118,53 @@ var TableFooter = exports.TableFooter = function TableFooter(_ref5) {
111
118
  setLastSyncTime(new Date());
112
119
  }
113
120
  }, [isLoading]);
121
+ if ((0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-sllv')) {
122
+ return onRefresh || showItemCount ? /*#__PURE__*/React.createElement("div", {
123
+ "data-testid": "table-footer",
124
+ className: (0, _runtime.ax)([styles.footer])
125
+ }, /*#__PURE__*/React.createElement(_compiled.Inline, {
126
+ alignBlock: "center",
127
+ alignInline: "end",
128
+ grow: "hug",
129
+ spread: "space-between"
130
+ }, /*#__PURE__*/React.createElement(_compiled.Box, null, /*#__PURE__*/React.createElement(_providerLink.ProviderLink, {
131
+ datasourceId: datasourceId
132
+ })), /*#__PURE__*/React.createElement(_compiled.Inline, {
133
+ alignBlock: "center",
134
+ space: "space.100",
135
+ separator: /*#__PURE__*/React.createElement("div", {
136
+ className: (0, _runtime.ax)([styles.separator])
137
+ }, "\u2022")
138
+ }, onRefresh && /*#__PURE__*/React.createElement(_compiled.Inline, {
139
+ alignBlock: "center",
140
+ space: "space.050"
141
+ }, /*#__PURE__*/React.createElement(_new.IconButton, {
142
+ appearance: "subtle",
143
+ icon: function icon(iconProps) {
144
+ return /*#__PURE__*/React.createElement(_refresh.default, (0, _extends2.default)({}, iconProps, {
145
+ color: "var(--ds-text-subtlest, #626F86)"
146
+ }));
147
+ },
148
+ isDisabled: isLoading,
149
+ label: intl.formatMessage(_messages.footerMessages.refreshLabel),
150
+ onClick: onRefresh,
151
+ spacing: "compact",
152
+ testId: "refresh-button"
153
+ }), /*#__PURE__*/React.createElement(_compiled.Box, {
154
+ testId: "sync-text"
155
+ }, isLoading ? /*#__PURE__*/React.createElement(_reactIntlNext.FormattedMessage, _messages.footerMessages.loadingText) : /*#__PURE__*/React.createElement(_syncInfo.SyncInfo, {
156
+ lastSyncTime: lastSyncTime
157
+ }))), showItemCount && /*#__PURE__*/React.createElement(_compiled.Flex, null, datasourceId === _assetsModal.ASSETS_LIST_OF_LINKS_DATASOURCE_ID ? /*#__PURE__*/React.createElement(_searchCount.AssetsItemCount, {
158
+ searchCount: itemCount,
159
+ url: url,
160
+ testId: "item-count"
161
+ }) : /*#__PURE__*/React.createElement(_searchCount.default, {
162
+ searchCount: itemCount,
163
+ url: url,
164
+ prefixTextType: "item",
165
+ testId: "item-count"
166
+ }))))) : null;
167
+ }
114
168
 
115
169
  // If only one of the two is passed in, still show the other one (Note: We keep the div encapsulating the one not shown to
116
170
  // ensure correct positioning since 'justify-content: space-between' is used).
@@ -0,0 +1,8 @@
1
+
2
+ ._1hmsglyw{text-decoration-line:none}
3
+ ._4bfu1r31{text-decoration-color:currentColor}
4
+ ._ajmmnqa1{text-decoration-style:solid}
5
+ ._syaz131l{color:var(--ds-text-subtlest,#626f86)}._1bnxglyw:hover{text-decoration-line:none}
6
+ ._30l3131l:hover{color:var(--ds-text-subtlest,#626f86)}
7
+ ._9oik1r31:hover{text-decoration-color:currentColor}
8
+ ._jf4cnqa1:hover{text-decoration-style:solid}
@@ -0,0 +1,69 @@
1
+ /* index.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ "use strict";
3
+
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.ProviderLink = void 0;
9
+ require("./index.compiled.css");
10
+ var _runtime = require("@compiled/react/runtime");
11
+ var _react = _interopRequireWildcard(require("react"));
12
+ var _reactIntlNext = require("react-intl-next");
13
+ var _logo = require("@atlaskit/logo");
14
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
+ var _compiled = require("@atlaskit/primitives/compiled");
16
+ var _assets = require("@atlaskit/temp-nav-app-icons/assets");
17
+ var _analytics = require("../../../analytics");
18
+ var _assetsModal = require("../../assets-modal");
19
+ var _messages = require("../messages");
20
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
21
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
22
+ var styles = {
23
+ anchor: "_4bfu1r31 _1hmsglyw _ajmmnqa1 _syaz131l _9oik1r31 _1bnxglyw _jf4cnqa1 _30l3131l"
24
+ };
25
+ var ProviderLink = exports.ProviderLink = function ProviderLink(_ref) {
26
+ var datasourceId = _ref.datasourceId;
27
+ var intl = (0, _reactIntlNext.useIntl)();
28
+ var _useDatasourceAnalyti = (0, _analytics.useDatasourceAnalyticsEvents)(),
29
+ fireEvent = _useDatasourceAnalyti.fireEvent;
30
+ var anchor = (0, _react.useMemo)(function () {
31
+ if (datasourceId === _assetsModal.ASSETS_LIST_OF_LINKS_DATASOURCE_ID) {
32
+ return (0, _platformFeatureFlags.fg)('assets_as_an_app_v2') ? {
33
+ content: intl.formatMessage(_messages.footerMessages.poweredByAssets),
34
+ extensionKey: 'jsm-cmdb-gateway',
35
+ icon: /*#__PURE__*/_react.default.createElement(_assets.AssetsIcon, {
36
+ size: "20"
37
+ }),
38
+ interactionName: 'atlas-link',
39
+ url: '/jira/assets'
40
+ } : {
41
+ content: intl.formatMessage(_messages.footerMessages.powerByJSM),
42
+ extensionKey: 'jsm-cmdb-gateway',
43
+ icon: /*#__PURE__*/_react.default.createElement(_logo.JiraServiceManagementIcon, {
44
+ appearance: "neutral",
45
+ size: "small"
46
+ }),
47
+ interactionName: 'atlas-link',
48
+ url: '/jira/servicedesk/assets'
49
+ };
50
+ }
51
+ }, [datasourceId, intl]);
52
+ return anchor ? /*#__PURE__*/_react.default.createElement(_compiled.Anchor, {
53
+ href: anchor.url,
54
+ interactionName: anchor.interactionName,
55
+ onClick: function onClick() {
56
+ return fireEvent('ui.link.clicked.poweredBy', {
57
+ componentHierarchy: 'datasourceTable',
58
+ extensionKey: anchor.extensionKey
59
+ });
60
+ },
61
+ rel: "noopener noreferrer",
62
+ target: "_blank",
63
+ testId: "powered-by-jsm-assets-link",
64
+ xcss: styles.anchor
65
+ }, /*#__PURE__*/_react.default.createElement(_compiled.Inline, {
66
+ alignBlock: "center",
67
+ space: "space.075"
68
+ }, anchor.icon, anchor.content)) : null;
69
+ };
@@ -29,10 +29,10 @@ const ItemCountWrapper = ({
29
29
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
30
30
  ,
31
31
  style: {
32
- color: `var(--ds-text-accent-gray, ${N800})`,
32
+ color: fg('platform-linking-visual-refresh-sllv') ? "var(--ds-text-subtlest, #626F86)" : `var(--ds-text-accent-gray, ${N800})`,
33
33
  textDecoration: !url ? 'none' : ''
34
34
  }
35
- }, /*#__PURE__*/React.createElement(Heading, {
35
+ }, fg('platform-linking-visual-refresh-sllv') ? children : /*#__PURE__*/React.createElement(Heading, {
36
36
  size: "xxsmall"
37
37
  }, children)));
38
38
  export const AssetsItemCount = ({
@@ -1,6 +1,8 @@
1
+ ._11c81o8v{font:var(--ds-font-body-small,normal 400 11px/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
1
2
  ._11c8dcr7{font:var(--ds-font-body-UNSAFE_small,normal 400 9pt/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
2
3
  ._2rko1kw7{border-radius:inherit}
3
4
  ._x3do17u4{border-top:2px solid var(--ds-background-accent-gray-subtler,#dfe1e6)}
5
+ ._x3dozgxb{border-top:1px solid var(--ds-border,#091e4224)}
4
6
  ._13liidpf{border-top-left-radius:0}
5
7
  ._19bvpxbi{padding-left:var(--ds-space-200,1pc)}
6
8
  ._19bvze3t{padding-left:var(--ds-space-0,0)}
@@ -9,12 +11,17 @@
9
11
  ._2hwx12x7{margin-right:var(--ds-space-075,6px)}
10
12
  ._4cvr1h6o{align-items:center}
11
13
  ._bfhk1j9a{background-color:var(--ds-background-input,#fff)}
14
+ ._bfhkhp5a{background-color:var(--ds-surface-raised,#fff)}
15
+ ._ca0q1ejb{padding-top:var(--ds-space-300,24px)}
12
16
  ._ca0qv47k{padding-top:var(--ds-space-250,20px)}
13
17
  ._ca0qze3t{padding-top:var(--ds-space-0,0)}
18
+ ._n3td1ejb{padding-bottom:var(--ds-space-300,24px)}
14
19
  ._n3tdv47k{padding-bottom:var(--ds-space-250,20px)}
15
20
  ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
16
21
  ._qrwqidpf{border-top-right-radius:0}
22
+ ._syaz131l{color:var(--ds-text-subtlest,#626f86)}
17
23
  ._syaz1dyx{color:var(--ds-text-accent-gray,#44546f)}
24
+ ._syazmuej{color:var(--ds-border,#091e4224)}
18
25
  ._u5f3pxbi{padding-right:var(--ds-space-200,1pc)}
19
26
  ._u5f3ze3t{padding-right:var(--ds-space-0,0)}
20
27
  ._vchhusvi{box-sizing:border-box}
@@ -7,15 +7,22 @@ import { ax, ix } from "@compiled/react/runtime";
7
7
  import { Fragment, useEffect, useState } from 'react';
8
8
  import { FormattedMessage, useIntl } from 'react-intl-next';
9
9
  import Button from '@atlaskit/button';
10
+ import { IconButton } from '@atlaskit/button/new';
10
11
  import RefreshIcon from '@atlaskit/icon/core/migration/refresh';
11
12
  import { fg } from '@atlaskit/platform-feature-flags';
12
- import { Flex } from '@atlaskit/primitives/compiled';
13
+ import { Box, Flex, Inline } from '@atlaskit/primitives/compiled';
13
14
  import { N0, N40 } from '@atlaskit/theme/colors';
14
15
  import { ASSETS_LIST_OF_LINKS_DATASOURCE_ID } from '../assets-modal';
15
16
  import TableSearchCount, { AssetsItemCount } from '../common/modal/search-count';
16
17
  import { footerMessages } from './messages';
17
18
  import { PoweredByJSMAssets } from './powered-by-jsm-assets';
19
+ import { ProviderLink } from './provider-link';
18
20
  import { SyncInfo } from './sync-info';
21
+ const styles = {
22
+ footer: "_11c81o8v _2rko1kw7 _x3dozgxb _syaz131l _ca0q1ejb _u5f3pxbi _n3td1ejb _19bvpxbi _vchhusvi _13liidpf _qrwqidpf _bfhkhp5a",
23
+ separator: "_syazmuej"
24
+ };
25
+
19
26
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
20
27
  const FooterWrapper = forwardRef(({
21
28
  as: C = "div",
@@ -94,6 +101,51 @@ export const TableFooter = ({
94
101
  setLastSyncTime(new Date());
95
102
  }
96
103
  }, [isLoading]);
104
+ if (fg('platform-linking-visual-refresh-sllv')) {
105
+ return onRefresh || showItemCount ? /*#__PURE__*/React.createElement("div", {
106
+ "data-testid": "table-footer",
107
+ className: ax([styles.footer])
108
+ }, /*#__PURE__*/React.createElement(Inline, {
109
+ alignBlock: "center",
110
+ alignInline: "end",
111
+ grow: "hug",
112
+ spread: "space-between"
113
+ }, /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(ProviderLink, {
114
+ datasourceId: datasourceId
115
+ })), /*#__PURE__*/React.createElement(Inline, {
116
+ alignBlock: "center",
117
+ space: "space.100",
118
+ separator: /*#__PURE__*/React.createElement("div", {
119
+ className: ax([styles.separator])
120
+ }, "\u2022")
121
+ }, onRefresh && /*#__PURE__*/React.createElement(Inline, {
122
+ alignBlock: "center",
123
+ space: "space.050"
124
+ }, /*#__PURE__*/React.createElement(IconButton, {
125
+ appearance: "subtle",
126
+ icon: iconProps => /*#__PURE__*/React.createElement(RefreshIcon, _extends({}, iconProps, {
127
+ color: "var(--ds-text-subtlest, #626F86)"
128
+ })),
129
+ isDisabled: isLoading,
130
+ label: intl.formatMessage(footerMessages.refreshLabel),
131
+ onClick: onRefresh,
132
+ spacing: "compact",
133
+ testId: "refresh-button"
134
+ }), /*#__PURE__*/React.createElement(Box, {
135
+ testId: "sync-text"
136
+ }, isLoading ? /*#__PURE__*/React.createElement(FormattedMessage, footerMessages.loadingText) : /*#__PURE__*/React.createElement(SyncInfo, {
137
+ lastSyncTime: lastSyncTime
138
+ }))), showItemCount && /*#__PURE__*/React.createElement(Flex, null, datasourceId === ASSETS_LIST_OF_LINKS_DATASOURCE_ID ? /*#__PURE__*/React.createElement(AssetsItemCount, {
139
+ searchCount: itemCount,
140
+ url: url,
141
+ testId: "item-count"
142
+ }) : /*#__PURE__*/React.createElement(TableSearchCount, {
143
+ searchCount: itemCount,
144
+ url: url,
145
+ prefixTextType: "item",
146
+ testId: "item-count"
147
+ }))))) : null;
148
+ }
97
149
 
98
150
  // If only one of the two is passed in, still show the other one (Note: We keep the div encapsulating the one not shown to
99
151
  // ensure correct positioning since 'justify-content: space-between' is used).
@@ -0,0 +1,8 @@
1
+
2
+ ._1hmsglyw{text-decoration-line:none}
3
+ ._4bfu1r31{text-decoration-color:currentColor}
4
+ ._ajmmnqa1{text-decoration-style:solid}
5
+ ._syaz131l{color:var(--ds-text-subtlest,#626f86)}._1bnxglyw:hover{text-decoration-line:none}
6
+ ._30l3131l:hover{color:var(--ds-text-subtlest,#626f86)}
7
+ ._9oik1r31:hover{text-decoration-color:currentColor}
8
+ ._jf4cnqa1:hover{text-decoration-style:solid}
@@ -0,0 +1,60 @@
1
+ /* index.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import "./index.compiled.css";
3
+ import { ax, ix } from "@compiled/react/runtime";
4
+ import React, { useMemo } from 'react';
5
+ import { useIntl } from 'react-intl-next';
6
+ import { JiraServiceManagementIcon } from '@atlaskit/logo';
7
+ import { fg } from '@atlaskit/platform-feature-flags';
8
+ import { Anchor, Inline } from '@atlaskit/primitives/compiled';
9
+ import { AssetsIcon } from '@atlaskit/temp-nav-app-icons/assets';
10
+ import { useDatasourceAnalyticsEvents } from '../../../analytics';
11
+ import { ASSETS_LIST_OF_LINKS_DATASOURCE_ID } from '../../assets-modal';
12
+ import { footerMessages } from '../messages';
13
+ const styles = {
14
+ anchor: "_4bfu1r31 _1hmsglyw _ajmmnqa1 _syaz131l _9oik1r31 _1bnxglyw _jf4cnqa1 _30l3131l"
15
+ };
16
+ export const ProviderLink = ({
17
+ datasourceId
18
+ }) => {
19
+ const intl = useIntl();
20
+ const {
21
+ fireEvent
22
+ } = useDatasourceAnalyticsEvents();
23
+ const anchor = useMemo(() => {
24
+ if (datasourceId === ASSETS_LIST_OF_LINKS_DATASOURCE_ID) {
25
+ return fg('assets_as_an_app_v2') ? {
26
+ content: intl.formatMessage(footerMessages.poweredByAssets),
27
+ extensionKey: 'jsm-cmdb-gateway',
28
+ icon: /*#__PURE__*/React.createElement(AssetsIcon, {
29
+ size: "20"
30
+ }),
31
+ interactionName: 'atlas-link',
32
+ url: '/jira/assets'
33
+ } : {
34
+ content: intl.formatMessage(footerMessages.powerByJSM),
35
+ extensionKey: 'jsm-cmdb-gateway',
36
+ icon: /*#__PURE__*/React.createElement(JiraServiceManagementIcon, {
37
+ appearance: "neutral",
38
+ size: "small"
39
+ }),
40
+ interactionName: 'atlas-link',
41
+ url: '/jira/servicedesk/assets'
42
+ };
43
+ }
44
+ }, [datasourceId, intl]);
45
+ return anchor ? /*#__PURE__*/React.createElement(Anchor, {
46
+ href: anchor.url,
47
+ interactionName: anchor.interactionName,
48
+ onClick: () => fireEvent('ui.link.clicked.poweredBy', {
49
+ componentHierarchy: 'datasourceTable',
50
+ extensionKey: anchor.extensionKey
51
+ }),
52
+ rel: "noopener noreferrer",
53
+ target: "_blank",
54
+ testId: "powered-by-jsm-assets-link",
55
+ xcss: styles.anchor
56
+ }, /*#__PURE__*/React.createElement(Inline, {
57
+ alignBlock: "center",
58
+ space: "space.075"
59
+ }, anchor.icon, anchor.content)) : null;
60
+ };
@@ -29,10 +29,10 @@ var ItemCountWrapper = function ItemCountWrapper(_ref) {
29
29
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
30
30
  ,
31
31
  style: {
32
- color: "var(--ds-text-accent-gray, ".concat(N800, ")"),
32
+ color: fg('platform-linking-visual-refresh-sllv') ? "var(--ds-text-subtlest, #626F86)" : "var(--ds-text-accent-gray, ".concat(N800, ")"),
33
33
  textDecoration: !url ? 'none' : ''
34
34
  }
35
- }, /*#__PURE__*/React.createElement(Heading, {
35
+ }, fg('platform-linking-visual-refresh-sllv') ? children : /*#__PURE__*/React.createElement(Heading, {
36
36
  size: "xxsmall"
37
37
  }, children)));
38
38
  };
@@ -1,6 +1,8 @@
1
+ ._11c81o8v{font:var(--ds-font-body-small,normal 400 11px/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
1
2
  ._11c8dcr7{font:var(--ds-font-body-UNSAFE_small,normal 400 9pt/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
2
3
  ._2rko1kw7{border-radius:inherit}
3
4
  ._x3do17u4{border-top:2px solid var(--ds-background-accent-gray-subtler,#dfe1e6)}
5
+ ._x3dozgxb{border-top:1px solid var(--ds-border,#091e4224)}
4
6
  ._13liidpf{border-top-left-radius:0}
5
7
  ._19bvpxbi{padding-left:var(--ds-space-200,1pc)}
6
8
  ._19bvze3t{padding-left:var(--ds-space-0,0)}
@@ -9,12 +11,17 @@
9
11
  ._2hwx12x7{margin-right:var(--ds-space-075,6px)}
10
12
  ._4cvr1h6o{align-items:center}
11
13
  ._bfhk1j9a{background-color:var(--ds-background-input,#fff)}
14
+ ._bfhkhp5a{background-color:var(--ds-surface-raised,#fff)}
15
+ ._ca0q1ejb{padding-top:var(--ds-space-300,24px)}
12
16
  ._ca0qv47k{padding-top:var(--ds-space-250,20px)}
13
17
  ._ca0qze3t{padding-top:var(--ds-space-0,0)}
18
+ ._n3td1ejb{padding-bottom:var(--ds-space-300,24px)}
14
19
  ._n3tdv47k{padding-bottom:var(--ds-space-250,20px)}
15
20
  ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
16
21
  ._qrwqidpf{border-top-right-radius:0}
22
+ ._syaz131l{color:var(--ds-text-subtlest,#626f86)}
17
23
  ._syaz1dyx{color:var(--ds-text-accent-gray,#44546f)}
24
+ ._syazmuej{color:var(--ds-border,#091e4224)}
18
25
  ._u5f3pxbi{padding-right:var(--ds-space-200,1pc)}
19
26
  ._u5f3ze3t{padding-right:var(--ds-space-0,0)}
20
27
  ._vchhusvi{box-sizing:border-box}
@@ -13,15 +13,22 @@ import { ax, ix } from "@compiled/react/runtime";
13
13
  import { Fragment, useEffect, useState } from 'react';
14
14
  import { FormattedMessage, useIntl } from 'react-intl-next';
15
15
  import Button from '@atlaskit/button';
16
+ import { IconButton } from '@atlaskit/button/new';
16
17
  import RefreshIcon from '@atlaskit/icon/core/migration/refresh';
17
18
  import { fg } from '@atlaskit/platform-feature-flags';
18
- import { Flex } from '@atlaskit/primitives/compiled';
19
+ import { Box, Flex, Inline } from '@atlaskit/primitives/compiled';
19
20
  import { N0, N40 } from '@atlaskit/theme/colors';
20
21
  import { ASSETS_LIST_OF_LINKS_DATASOURCE_ID } from '../assets-modal';
21
22
  import TableSearchCount, { AssetsItemCount } from '../common/modal/search-count';
22
23
  import { footerMessages } from './messages';
23
24
  import { PoweredByJSMAssets } from './powered-by-jsm-assets';
25
+ import { ProviderLink } from './provider-link';
24
26
  import { SyncInfo } from './sync-info';
27
+ var styles = {
28
+ footer: "_11c81o8v _2rko1kw7 _x3dozgxb _syaz131l _ca0q1ejb _u5f3pxbi _n3td1ejb _19bvpxbi _vchhusvi _13liidpf _qrwqidpf _bfhkhp5a",
29
+ separator: "_syazmuej"
30
+ };
31
+
25
32
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
26
33
  var FooterWrapper = forwardRef(function (_ref, __cmplr) {
27
34
  var _ref$as = _ref.as,
@@ -102,6 +109,53 @@ export var TableFooter = function TableFooter(_ref5) {
102
109
  setLastSyncTime(new Date());
103
110
  }
104
111
  }, [isLoading]);
112
+ if (fg('platform-linking-visual-refresh-sllv')) {
113
+ return onRefresh || showItemCount ? /*#__PURE__*/React.createElement("div", {
114
+ "data-testid": "table-footer",
115
+ className: ax([styles.footer])
116
+ }, /*#__PURE__*/React.createElement(Inline, {
117
+ alignBlock: "center",
118
+ alignInline: "end",
119
+ grow: "hug",
120
+ spread: "space-between"
121
+ }, /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(ProviderLink, {
122
+ datasourceId: datasourceId
123
+ })), /*#__PURE__*/React.createElement(Inline, {
124
+ alignBlock: "center",
125
+ space: "space.100",
126
+ separator: /*#__PURE__*/React.createElement("div", {
127
+ className: ax([styles.separator])
128
+ }, "\u2022")
129
+ }, onRefresh && /*#__PURE__*/React.createElement(Inline, {
130
+ alignBlock: "center",
131
+ space: "space.050"
132
+ }, /*#__PURE__*/React.createElement(IconButton, {
133
+ appearance: "subtle",
134
+ icon: function icon(iconProps) {
135
+ return /*#__PURE__*/React.createElement(RefreshIcon, _extends({}, iconProps, {
136
+ color: "var(--ds-text-subtlest, #626F86)"
137
+ }));
138
+ },
139
+ isDisabled: isLoading,
140
+ label: intl.formatMessage(footerMessages.refreshLabel),
141
+ onClick: onRefresh,
142
+ spacing: "compact",
143
+ testId: "refresh-button"
144
+ }), /*#__PURE__*/React.createElement(Box, {
145
+ testId: "sync-text"
146
+ }, isLoading ? /*#__PURE__*/React.createElement(FormattedMessage, footerMessages.loadingText) : /*#__PURE__*/React.createElement(SyncInfo, {
147
+ lastSyncTime: lastSyncTime
148
+ }))), showItemCount && /*#__PURE__*/React.createElement(Flex, null, datasourceId === ASSETS_LIST_OF_LINKS_DATASOURCE_ID ? /*#__PURE__*/React.createElement(AssetsItemCount, {
149
+ searchCount: itemCount,
150
+ url: url,
151
+ testId: "item-count"
152
+ }) : /*#__PURE__*/React.createElement(TableSearchCount, {
153
+ searchCount: itemCount,
154
+ url: url,
155
+ prefixTextType: "item",
156
+ testId: "item-count"
157
+ }))))) : null;
158
+ }
105
159
 
106
160
  // If only one of the two is passed in, still show the other one (Note: We keep the div encapsulating the one not shown to
107
161
  // ensure correct positioning since 'justify-content: space-between' is used).
@@ -0,0 +1,8 @@
1
+
2
+ ._1hmsglyw{text-decoration-line:none}
3
+ ._4bfu1r31{text-decoration-color:currentColor}
4
+ ._ajmmnqa1{text-decoration-style:solid}
5
+ ._syaz131l{color:var(--ds-text-subtlest,#626f86)}._1bnxglyw:hover{text-decoration-line:none}
6
+ ._30l3131l:hover{color:var(--ds-text-subtlest,#626f86)}
7
+ ._9oik1r31:hover{text-decoration-color:currentColor}
8
+ ._jf4cnqa1:hover{text-decoration-style:solid}
@@ -0,0 +1,60 @@
1
+ /* index.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import "./index.compiled.css";
3
+ import { ax, ix } from "@compiled/react/runtime";
4
+ import React, { useMemo } from 'react';
5
+ import { useIntl } from 'react-intl-next';
6
+ import { JiraServiceManagementIcon } from '@atlaskit/logo';
7
+ import { fg } from '@atlaskit/platform-feature-flags';
8
+ import { Anchor, Inline } from '@atlaskit/primitives/compiled';
9
+ import { AssetsIcon } from '@atlaskit/temp-nav-app-icons/assets';
10
+ import { useDatasourceAnalyticsEvents } from '../../../analytics';
11
+ import { ASSETS_LIST_OF_LINKS_DATASOURCE_ID } from '../../assets-modal';
12
+ import { footerMessages } from '../messages';
13
+ var styles = {
14
+ anchor: "_4bfu1r31 _1hmsglyw _ajmmnqa1 _syaz131l _9oik1r31 _1bnxglyw _jf4cnqa1 _30l3131l"
15
+ };
16
+ export var ProviderLink = function ProviderLink(_ref) {
17
+ var datasourceId = _ref.datasourceId;
18
+ var intl = useIntl();
19
+ var _useDatasourceAnalyti = useDatasourceAnalyticsEvents(),
20
+ fireEvent = _useDatasourceAnalyti.fireEvent;
21
+ var anchor = useMemo(function () {
22
+ if (datasourceId === ASSETS_LIST_OF_LINKS_DATASOURCE_ID) {
23
+ return fg('assets_as_an_app_v2') ? {
24
+ content: intl.formatMessage(footerMessages.poweredByAssets),
25
+ extensionKey: 'jsm-cmdb-gateway',
26
+ icon: /*#__PURE__*/React.createElement(AssetsIcon, {
27
+ size: "20"
28
+ }),
29
+ interactionName: 'atlas-link',
30
+ url: '/jira/assets'
31
+ } : {
32
+ content: intl.formatMessage(footerMessages.powerByJSM),
33
+ extensionKey: 'jsm-cmdb-gateway',
34
+ icon: /*#__PURE__*/React.createElement(JiraServiceManagementIcon, {
35
+ appearance: "neutral",
36
+ size: "small"
37
+ }),
38
+ interactionName: 'atlas-link',
39
+ url: '/jira/servicedesk/assets'
40
+ };
41
+ }
42
+ }, [datasourceId, intl]);
43
+ return anchor ? /*#__PURE__*/React.createElement(Anchor, {
44
+ href: anchor.url,
45
+ interactionName: anchor.interactionName,
46
+ onClick: function onClick() {
47
+ return fireEvent('ui.link.clicked.poweredBy', {
48
+ componentHierarchy: 'datasourceTable',
49
+ extensionKey: anchor.extensionKey
50
+ });
51
+ },
52
+ rel: "noopener noreferrer",
53
+ target: "_blank",
54
+ testId: "powered-by-jsm-assets-link",
55
+ xcss: styles.anchor
56
+ }, /*#__PURE__*/React.createElement(Inline, {
57
+ alignBlock: "center",
58
+ space: "space.075"
59
+ }, anchor.icon, anchor.content)) : null;
60
+ };
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export declare const ProviderLink: ({ datasourceId }: {
3
+ datasourceId: string;
4
+ }) => React.JSX.Element | null;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export declare const ProviderLink: ({ datasourceId }: {
3
+ datasourceId: string;
4
+ }) => React.JSX.Element | null;
@@ -20,16 +20,19 @@ import { type JiraIssueDatasourceParameters } from '../src/ui/jira-issues-modal/
20
20
  import SmartLinkClient from './smartLinkCustomClient';
21
21
  import { useCommonTableProps } from './useCommonTableProps';
22
22
 
23
- mockDatasourceFetchRequests();
24
-
25
- interface Props {
23
+ type Props = {
26
24
  isReadonly?: boolean;
27
25
  canResizeColumns?: boolean;
28
26
  canControlWrapping?: boolean;
29
27
  skipIntl?: boolean;
30
28
  forceLoading?: boolean;
31
29
  visibleColumnKeys?: string[];
32
- }
30
+ /**
31
+ * Use infinity for an infinite delay (promise never resolves or rejects)
32
+ * Default is 600ms
33
+ */
34
+ mockExecutionDelay?: number;
35
+ };
33
36
 
34
37
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
35
38
  const TableViewWrapper = styled.div({
@@ -46,6 +49,7 @@ const ExampleBody = ({
46
49
  canControlWrapping = true,
47
50
  forceLoading = false,
48
51
  visibleColumnKeys: overrideVisibleColumnKeys,
52
+ mockExecutionDelay = 600,
49
53
  }: Props) => {
50
54
  const parameters = useMemo<JiraIssueDatasourceParameters>(
51
55
  () => ({
@@ -55,6 +59,11 @@ const ExampleBody = ({
55
59
  [],
56
60
  );
57
61
 
62
+ useEffect(() => {
63
+ mockDatasourceFetchRequests({ mockExecutionDelay });
64
+ // eslint-disable-next-line react-hooks/exhaustive-deps
65
+ }, []);
66
+
58
67
  const {
59
68
  status,
60
69
  onNextPage,
@@ -123,7 +132,7 @@ const ExampleBody = ({
123
132
  );
124
133
  };
125
134
 
126
- export const ExampleIssueLikeTable = (props: Props) => {
135
+ export const ExampleIssueLikeTableExample = (props: Props) => {
127
136
  return (
128
137
  <DatasourceExperienceIdProvider>
129
138
  <IntlMessagesProvider loaderFn={fetchMessagesForLocale}>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "4.1.15",
3
+ "version": "4.2.0",
4
4
  "description": "UI Components to support linking platform dataset feature",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -63,7 +63,7 @@
63
63
  "@atlaskit/layering": "^2.1.0",
64
64
  "@atlaskit/link-client-extension": "^4.0.0",
65
65
  "@atlaskit/linking-common": "^8.0.0",
66
- "@atlaskit/linking-types": "^9.7.0",
66
+ "@atlaskit/linking-types": "^9.8.0",
67
67
  "@atlaskit/logo": "^16.0.0",
68
68
  "@atlaskit/lozenge": "^12.2.0",
69
69
  "@atlaskit/modal-dialog": "^14.1.0",
@@ -75,9 +75,9 @@
75
75
  "@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll": "^2.0.0",
76
76
  "@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.0.0",
77
77
  "@atlaskit/primitives": "^14.4.0",
78
- "@atlaskit/react-select": "^2.1.0",
79
- "@atlaskit/select": "^20.2.0",
80
- "@atlaskit/smart-card": "^36.4.0",
78
+ "@atlaskit/react-select": "^2.2.0",
79
+ "@atlaskit/select": "^20.3.0",
80
+ "@atlaskit/smart-card": "^36.5.0",
81
81
  "@atlaskit/smart-user-picker": "^8.0.0",
82
82
  "@atlaskit/spinner": "^18.0.0",
83
83
  "@atlaskit/tag": "^14.0.0",