@atlaskit/link-datasource 4.1.14 → 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 +16 -0
- package/dist/cjs/ui/common/modal/search-count/index.js +2 -2
- package/dist/cjs/ui/datasource-table-view/datasourceTableView.js +3 -2
- package/dist/cjs/ui/jira-issues-modal/modal/index.js +3 -2
- package/dist/cjs/ui/table-footer/index.compiled.css +7 -0
- package/dist/cjs/ui/table-footer/index.js +54 -0
- package/dist/cjs/ui/table-footer/provider-link/index.compiled.css +8 -0
- package/dist/cjs/ui/table-footer/provider-link/index.js +69 -0
- package/dist/es2019/ui/common/modal/search-count/index.js +2 -2
- package/dist/es2019/ui/datasource-table-view/datasourceTableView.js +2 -1
- package/dist/es2019/ui/jira-issues-modal/modal/index.js +2 -1
- package/dist/es2019/ui/table-footer/index.compiled.css +7 -0
- package/dist/es2019/ui/table-footer/index.js +53 -1
- package/dist/es2019/ui/table-footer/provider-link/index.compiled.css +8 -0
- package/dist/es2019/ui/table-footer/provider-link/index.js +60 -0
- package/dist/esm/ui/common/modal/search-count/index.js +2 -2
- package/dist/esm/ui/datasource-table-view/datasourceTableView.js +2 -1
- package/dist/esm/ui/jira-issues-modal/modal/index.js +2 -1
- package/dist/esm/ui/table-footer/index.compiled.css +7 -0
- package/dist/esm/ui/table-footer/index.js +55 -1
- package/dist/esm/ui/table-footer/provider-link/index.compiled.css +8 -0
- package/dist/esm/ui/table-footer/provider-link/index.js +60 -0
- package/dist/types/ui/datasource-table-view/datasourceTableView.d.ts +5 -0
- package/dist/types/ui/jira-issues-modal/modal/index.d.ts +1 -0
- package/dist/types/ui/table-footer/provider-link/index.d.ts +4 -0
- package/dist/types-ts4.5/ui/datasource-table-view/datasourceTableView.d.ts +5 -0
- package/dist/types-ts4.5/ui/jira-issues-modal/modal/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/table-footer/provider-link/index.d.ts +4 -0
- package/examples-helpers/buildAssetsIssuesTable.tsx +12 -4
- package/examples-helpers/buildIssueLikeTable.tsx +14 -5
- package/examples-helpers/buildJiraIssuesTable.tsx +14 -5
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
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
|
+
|
|
11
|
+
## 4.1.15
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#135721](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/135721)
|
|
16
|
+
[`c8ce660c343db`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c8ce660c343db) -
|
|
17
|
+
Add internal exports
|
|
18
|
+
|
|
3
19
|
## 4.1.14
|
|
4
20
|
|
|
5
21
|
### 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
|
};
|
|
@@ -6,7 +6,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", {
|
|
7
7
|
value: true
|
|
8
8
|
});
|
|
9
|
-
exports.DatasourceTableView = void 0;
|
|
9
|
+
exports.DatasourceTableView = exports.DataSourceTableViewNoSuspense = void 0;
|
|
10
10
|
require("./datasourceTableView.compiled.css");
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var React = _react;
|
|
@@ -191,4 +191,5 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
|
|
|
191
191
|
};
|
|
192
192
|
var DatasourceTableView = exports.DatasourceTableView = (0, _analyticsNext.withAnalyticsContext)(_constants.componentMetadata.tableView)(function (props) {
|
|
193
193
|
return /*#__PURE__*/React.createElement(_state.StoreContainer, null, /*#__PURE__*/React.createElement(_datasourceExperienceId.DatasourceExperienceIdProvider, null, /*#__PURE__*/React.createElement(DatasourceTableViewWithoutAnalytics, props)));
|
|
194
|
-
});
|
|
194
|
+
});
|
|
195
|
+
var DataSourceTableViewNoSuspense = exports.DataSourceTableViewNoSuspense = DatasourceTableView;
|
|
@@ -5,7 +5,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.JiraIssuesConfigModal = void 0;
|
|
8
|
+
exports.JiraIssuesConfigModalNoSuspense = exports.JiraIssuesConfigModal = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
@@ -423,4 +423,5 @@ var JiraIssuesConfigModal = exports.JiraIssuesConfigModal = function JiraIssuesC
|
|
|
423
423
|
return /*#__PURE__*/_react.default.createElement(_state.StoreContainer, null, /*#__PURE__*/_react.default.createElement(ConnectedJiraIssueConfigModal, (0, _extends2.default)({}, props, {
|
|
424
424
|
onInsert: onInsertWithMacroAnalytics
|
|
425
425
|
})));
|
|
426
|
-
};
|
|
426
|
+
};
|
|
427
|
+
var JiraIssuesConfigModalNoSuspense = exports.JiraIssuesConfigModalNoSuspense = JiraIssuesConfigModal;
|
|
@@ -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 = ({
|
|
@@ -181,4 +181,5 @@ const DatasourceTableViewWithoutAnalytics = ({
|
|
|
181
181
|
url: url
|
|
182
182
|
})));
|
|
183
183
|
};
|
|
184
|
-
export const DatasourceTableView = withAnalyticsContext(componentMetadata.tableView)(props => /*#__PURE__*/React.createElement(StoreContainer, null, /*#__PURE__*/React.createElement(DatasourceExperienceIdProvider, null, /*#__PURE__*/React.createElement(DatasourceTableViewWithoutAnalytics, props))));
|
|
184
|
+
export const DatasourceTableView = withAnalyticsContext(componentMetadata.tableView)(props => /*#__PURE__*/React.createElement(StoreContainer, null, /*#__PURE__*/React.createElement(DatasourceExperienceIdProvider, null, /*#__PURE__*/React.createElement(DatasourceTableViewWithoutAnalytics, props))));
|
|
185
|
+
export const DataSourceTableViewNoSuspense = DatasourceTableView;
|
|
@@ -409,4 +409,5 @@ export const JiraIssuesConfigModal = props => {
|
|
|
409
409
|
return /*#__PURE__*/React.createElement(StoreContainer, null, /*#__PURE__*/React.createElement(ConnectedJiraIssueConfigModal, _extends({}, props, {
|
|
410
410
|
onInsert: onInsertWithMacroAnalytics
|
|
411
411
|
})));
|
|
412
|
-
};
|
|
412
|
+
};
|
|
413
|
+
export const JiraIssuesConfigModalNoSuspense = JiraIssuesConfigModal;
|
|
@@ -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
|
};
|
|
@@ -181,4 +181,5 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
|
|
|
181
181
|
};
|
|
182
182
|
export var DatasourceTableView = withAnalyticsContext(componentMetadata.tableView)(function (props) {
|
|
183
183
|
return /*#__PURE__*/React.createElement(StoreContainer, null, /*#__PURE__*/React.createElement(DatasourceExperienceIdProvider, null, /*#__PURE__*/React.createElement(DatasourceTableViewWithoutAnalytics, props)));
|
|
184
|
-
});
|
|
184
|
+
});
|
|
185
|
+
export var DataSourceTableViewNoSuspense = DatasourceTableView;
|
|
@@ -415,4 +415,5 @@ export var JiraIssuesConfigModal = function JiraIssuesConfigModal(props) {
|
|
|
415
415
|
return /*#__PURE__*/React.createElement(StoreContainer, null, /*#__PURE__*/React.createElement(ConnectedJiraIssueConfigModal, _extends({}, props, {
|
|
416
416
|
onInsert: onInsertWithMacroAnalytics
|
|
417
417
|
})));
|
|
418
|
-
};
|
|
418
|
+
};
|
|
419
|
+
export var JiraIssuesConfigModalNoSuspense = JiraIssuesConfigModal;
|
|
@@ -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
|
+
};
|
|
@@ -4,3 +4,8 @@ export declare const DatasourceTableView: import("react").ForwardRefExoticCompon
|
|
|
4
4
|
parameters: object;
|
|
5
5
|
url?: string | undefined;
|
|
6
6
|
} & Partial<Pick<import("../issue-like-table/types").IssueLikeDataTableViewProps, "visibleColumnKeys" | "wrappedColumnKeys" | "columnCustomSizes" | "onColumnResize" | "onVisibleColumnKeysChange" | "onWrappedColumnChange">> & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
|
|
7
|
+
export declare const DataSourceTableViewNoSuspense: import("react").ForwardRefExoticComponent<{
|
|
8
|
+
datasourceId: string;
|
|
9
|
+
parameters: object;
|
|
10
|
+
url?: string | undefined;
|
|
11
|
+
} & Partial<Pick<import("../issue-like-table/types").IssueLikeDataTableViewProps, "visibleColumnKeys" | "wrappedColumnKeys" | "columnCustomSizes" | "onColumnResize" | "onVisibleColumnKeysChange" | "onWrappedColumnChange">> & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type JiraConfigModalProps } from '../types';
|
|
3
3
|
export declare const JiraIssuesConfigModal: (props: JiraConfigModalProps) => React.JSX.Element;
|
|
4
|
+
export declare const JiraIssuesConfigModalNoSuspense: (props: JiraConfigModalProps) => React.JSX.Element;
|
|
@@ -4,3 +4,8 @@ export declare const DatasourceTableView: import("react").ForwardRefExoticCompon
|
|
|
4
4
|
parameters: object;
|
|
5
5
|
url?: string | undefined;
|
|
6
6
|
} & Partial<Pick<import("../issue-like-table/types").IssueLikeDataTableViewProps, "visibleColumnKeys" | "wrappedColumnKeys" | "columnCustomSizes" | "onColumnResize" | "onVisibleColumnKeysChange" | "onWrappedColumnChange">> & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
|
|
7
|
+
export declare const DataSourceTableViewNoSuspense: import("react").ForwardRefExoticComponent<{
|
|
8
|
+
datasourceId: string;
|
|
9
|
+
parameters: object;
|
|
10
|
+
url?: string | undefined;
|
|
11
|
+
} & Partial<Pick<import("../issue-like-table/types").IssueLikeDataTableViewProps, "visibleColumnKeys" | "wrappedColumnKeys" | "columnCustomSizes" | "onColumnResize" | "onVisibleColumnKeysChange" | "onWrappedColumnChange">> & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type JiraConfigModalProps } from '../types';
|
|
3
3
|
export declare const JiraIssuesConfigModal: (props: JiraConfigModalProps) => React.JSX.Element;
|
|
4
|
+
export declare const JiraIssuesConfigModalNoSuspense: (props: JiraConfigModalProps) => React.JSX.Element;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
3
|
import { IntlMessagesProvider } from '@atlaskit/intl-messages-provider';
|
|
4
|
+
import type { DatasourceTableView } from '@atlaskit/link-datasource';
|
|
4
5
|
import { SmartCardProvider } from '@atlaskit/link-provider';
|
|
5
6
|
import { type DatasourceParameters } from '@atlaskit/linking-types';
|
|
6
7
|
|
|
7
|
-
import { DatasourceTableView } from '../src';
|
|
8
8
|
import { fetchMessagesForLocale } from '../src/common/utils/locale/fetch-messages-for-locale';
|
|
9
9
|
import { ASSETS_LIST_OF_LINKS_DATASOURCE_ID } from '../src/ui/assets-modal';
|
|
10
10
|
import { type AssetsDatasourceParameters } from '../src/ui/assets-modal/types';
|
|
11
|
+
import { DataSourceTableViewNoSuspense } from '../src/ui/datasource-table-view/datasourceTableView';
|
|
11
12
|
|
|
12
13
|
import SmartLinkClient from './smartLinkCustomClient';
|
|
13
14
|
import { useAssetsTableProps } from './useAssetsTableProps';
|
|
@@ -15,9 +16,15 @@ import { useAssetsTableProps } from './useAssetsTableProps';
|
|
|
15
16
|
interface AssetsTableViewProps {
|
|
16
17
|
parameters?: DatasourceParameters;
|
|
17
18
|
mockDatasourceFetchRequest?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Used to use the lazy loaded version for examples on atlaskit
|
|
21
|
+
*/
|
|
22
|
+
DatasourceTable?: typeof DataSourceTableViewNoSuspense | typeof DatasourceTableView;
|
|
18
23
|
}
|
|
19
24
|
|
|
20
|
-
const AssetsTableView = (
|
|
25
|
+
const AssetsTableView = ({
|
|
26
|
+
DatasourceTable = DataSourceTableViewNoSuspense,
|
|
27
|
+
}: AssetsTableViewProps) => {
|
|
21
28
|
const datasourceParameters: AssetsDatasourceParameters = {
|
|
22
29
|
workspaceId: 'workspaceId',
|
|
23
30
|
aql: 'name like a',
|
|
@@ -38,7 +45,7 @@ const AssetsTableView = () => {
|
|
|
38
45
|
});
|
|
39
46
|
|
|
40
47
|
return (
|
|
41
|
-
<
|
|
48
|
+
<DatasourceTable
|
|
42
49
|
datasourceId={ASSETS_LIST_OF_LINKS_DATASOURCE_ID}
|
|
43
50
|
parameters={datasourceParameters}
|
|
44
51
|
visibleColumnKeys={visibleColumnKeys}
|
|
@@ -53,11 +60,12 @@ const AssetsTableView = () => {
|
|
|
53
60
|
|
|
54
61
|
export const ExampleAssetsIssuesTableView = ({
|
|
55
62
|
mockDatasourceFetchRequest = true,
|
|
63
|
+
...props
|
|
56
64
|
}: AssetsTableViewProps) => {
|
|
57
65
|
return (
|
|
58
66
|
<IntlMessagesProvider loaderFn={fetchMessagesForLocale}>
|
|
59
67
|
<SmartCardProvider client={new SmartLinkClient()}>
|
|
60
|
-
<AssetsTableView />
|
|
68
|
+
<AssetsTableView {...props} />
|
|
61
69
|
</SmartCardProvider>
|
|
62
70
|
</IntlMessagesProvider>
|
|
63
71
|
);
|
|
@@ -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
|
-
|
|
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
|
|
135
|
+
export const ExampleIssueLikeTableExample = (props: Props) => {
|
|
127
136
|
return (
|
|
128
137
|
<DatasourceExperienceIdProvider>
|
|
129
138
|
<IntlMessagesProvider loaderFn={fetchMessagesForLocale}>
|
|
@@ -8,17 +8,25 @@ import { type DatasourceParameters } from '@atlaskit/linking-types';
|
|
|
8
8
|
import { DatasourceTableView } from '../src';
|
|
9
9
|
import { fetchMessagesForLocale } from '../src/common/utils/locale/fetch-messages-for-locale';
|
|
10
10
|
import { DatasourceExperienceIdProvider } from '../src/contexts/datasource-experience-id';
|
|
11
|
+
import { DataSourceTableViewNoSuspense } from '../src/ui/datasource-table-view/datasourceTableView';
|
|
11
12
|
import { type JiraIssueDatasourceParameters } from '../src/ui/jira-issues-modal/types';
|
|
12
13
|
|
|
13
14
|
import SmartLinkClient from './smartLinkCustomClient';
|
|
14
15
|
import { useCommonTableProps } from './useCommonTableProps';
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
type JiraIssuesTableViewProps = {
|
|
17
18
|
parameters?: DatasourceParameters;
|
|
18
19
|
mockDatasourceFetchRequest?: boolean;
|
|
19
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Used to use the lazy loaded version for examples on atlaskit
|
|
22
|
+
*/
|
|
23
|
+
DatasourceTable?: typeof DataSourceTableViewNoSuspense | typeof DatasourceTableView;
|
|
24
|
+
};
|
|
20
25
|
|
|
21
|
-
const JiraIssuesTableView = ({
|
|
26
|
+
const JiraIssuesTableView = ({
|
|
27
|
+
parameters,
|
|
28
|
+
DatasourceTable = DataSourceTableViewNoSuspense,
|
|
29
|
+
}: JiraIssuesTableViewProps) => {
|
|
22
30
|
const cloudId = parameters?.cloudId || 'some-cloud-id';
|
|
23
31
|
|
|
24
32
|
const datasourceParameters = useMemo<JiraIssueDatasourceParameters>(
|
|
@@ -46,7 +54,7 @@ const JiraIssuesTableView = ({ parameters }: JiraIssuesTableViewProps) => {
|
|
|
46
54
|
});
|
|
47
55
|
|
|
48
56
|
return (
|
|
49
|
-
<
|
|
57
|
+
<DatasourceTable
|
|
50
58
|
datasourceId={'some-datasource-id'}
|
|
51
59
|
parameters={datasourceParameters}
|
|
52
60
|
visibleColumnKeys={visibleColumnKeys}
|
|
@@ -62,6 +70,7 @@ const JiraIssuesTableView = ({ parameters }: JiraIssuesTableViewProps) => {
|
|
|
62
70
|
export const ExampleJiraIssuesTableView = ({
|
|
63
71
|
parameters,
|
|
64
72
|
mockDatasourceFetchRequest = true,
|
|
73
|
+
...props
|
|
65
74
|
}: JiraIssuesTableViewProps) => {
|
|
66
75
|
if (mockDatasourceFetchRequest) {
|
|
67
76
|
mockDatasourceFetchRequests();
|
|
@@ -71,7 +80,7 @@ export const ExampleJiraIssuesTableView = ({
|
|
|
71
80
|
<DatasourceExperienceIdProvider>
|
|
72
81
|
<IntlMessagesProvider loaderFn={fetchMessagesForLocale}>
|
|
73
82
|
<SmartCardProvider client={new SmartLinkClient()}>
|
|
74
|
-
<JiraIssuesTableView parameters={parameters} />
|
|
83
|
+
<JiraIssuesTableView parameters={parameters} {...props} />
|
|
75
84
|
</SmartCardProvider>
|
|
76
85
|
</IntlMessagesProvider>
|
|
77
86
|
</DatasourceExperienceIdProvider>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "4.
|
|
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",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@atlaskit/empty-state": "^9.0.0",
|
|
52
52
|
"@atlaskit/flag": "^17.1.0",
|
|
53
53
|
"@atlaskit/form": "^12.0.0",
|
|
54
|
-
"@atlaskit/heading": "^5.
|
|
54
|
+
"@atlaskit/heading": "^5.2.0",
|
|
55
55
|
"@atlaskit/icon": "^25.5.0",
|
|
56
56
|
"@atlaskit/icon-object": "^7.0.0",
|
|
57
57
|
"@atlaskit/image": "^3.0.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.
|
|
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",
|
|
@@ -74,10 +74,10 @@
|
|
|
74
74
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.0",
|
|
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
|
-
"@atlaskit/primitives": "^14.
|
|
78
|
-
"@atlaskit/react-select": "^2.
|
|
79
|
-
"@atlaskit/select": "^20.
|
|
80
|
-
"@atlaskit/smart-card": "^36.
|
|
77
|
+
"@atlaskit/primitives": "^14.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",
|
|
@@ -105,8 +105,8 @@
|
|
|
105
105
|
"devDependencies": {
|
|
106
106
|
"@af/integration-testing": "^0.5.0",
|
|
107
107
|
"@af/visual-regression": "^1.3.0",
|
|
108
|
-
"@atlaskit/json-ld-types": "^1.
|
|
109
|
-
"@atlaskit/link-provider": "^2.
|
|
108
|
+
"@atlaskit/json-ld-types": "^1.1.0",
|
|
109
|
+
"@atlaskit/link-provider": "^2.1.0",
|
|
110
110
|
"@atlaskit/link-test-helpers": "^8.0.0",
|
|
111
111
|
"@atlaskit/ssr": "^0.4.0",
|
|
112
112
|
"@atlaskit/visual-regression": "^0.10.0",
|