@atlaskit/link-datasource 1.27.4 → 1.28.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 +6 -0
- package/dist/cjs/ui/common/modal/popup-select/formatOptionLabel.js +7 -1
- package/dist/cjs/ui/confluence-search-modal/basic-filters/filters/date-range-picker/PopupComponent.js +19 -0
- package/dist/cjs/ui/confluence-search-modal/basic-filters/filters/date-range-picker/index.js +89 -0
- package/dist/cjs/ui/confluence-search-modal/basic-filters/filters/date-range-picker/messages.js +49 -0
- package/dist/cjs/ui/confluence-search-modal/basic-filters/filters/date-range-picker/styled.js +75 -0
- package/dist/cjs/ui/confluence-search-modal/basic-filters/filters/date-range-picker/trigger.js +32 -0
- package/dist/cjs/ui/confluence-search-modal/basic-filters/index.js +5 -3
- package/dist/cjs/ui/confluence-search-modal/basic-filters/types.js +11 -0
- package/dist/cjs/ui/confluence-search-modal/confluence-search-container/index.js +16 -1
- package/dist/cjs/ui/confluence-search-modal/modal/index.js +22 -10
- package/dist/cjs/ui/datasource-table-view/datasourceTableView.js +1 -0
- package/dist/cjs/ui/table-footer/index.js +8 -2
- package/dist/cjs/ui/table-footer/messages.js +5 -0
- package/dist/cjs/ui/table-footer/powered-by-jsm-assets/index.js +53 -0
- package/dist/es2019/ui/common/modal/popup-select/formatOptionLabel.js +4 -1
- package/dist/es2019/ui/confluence-search-modal/basic-filters/filters/date-range-picker/PopupComponent.js +7 -0
- package/dist/es2019/ui/confluence-search-modal/basic-filters/filters/date-range-picker/index.js +68 -0
- package/dist/es2019/ui/confluence-search-modal/basic-filters/filters/date-range-picker/messages.js +43 -0
- package/dist/es2019/ui/confluence-search-modal/basic-filters/filters/date-range-picker/styled.js +66 -0
- package/dist/es2019/ui/confluence-search-modal/basic-filters/filters/date-range-picker/trigger.js +26 -0
- package/dist/es2019/ui/confluence-search-modal/basic-filters/index.js +7 -2
- package/dist/es2019/ui/confluence-search-modal/basic-filters/types.js +5 -0
- package/dist/es2019/ui/confluence-search-modal/confluence-search-container/index.js +13 -1
- package/dist/es2019/ui/confluence-search-modal/modal/index.js +11 -3
- package/dist/es2019/ui/datasource-table-view/datasourceTableView.js +1 -0
- package/dist/es2019/ui/table-footer/index.js +7 -1
- package/dist/es2019/ui/table-footer/messages.js +5 -0
- package/dist/es2019/ui/table-footer/powered-by-jsm-assets/index.js +45 -0
- package/dist/esm/ui/common/modal/popup-select/formatOptionLabel.js +4 -1
- package/dist/esm/ui/confluence-search-modal/basic-filters/filters/date-range-picker/PopupComponent.js +9 -0
- package/dist/esm/ui/confluence-search-modal/basic-filters/filters/date-range-picker/index.js +79 -0
- package/dist/esm/ui/confluence-search-modal/basic-filters/filters/date-range-picker/messages.js +43 -0
- package/dist/esm/ui/confluence-search-modal/basic-filters/filters/date-range-picker/styled.js +68 -0
- package/dist/esm/ui/confluence-search-modal/basic-filters/filters/date-range-picker/trigger.js +25 -0
- package/dist/esm/ui/confluence-search-modal/basic-filters/index.js +5 -3
- package/dist/esm/ui/confluence-search-modal/basic-filters/types.js +5 -0
- package/dist/esm/ui/confluence-search-modal/confluence-search-container/index.js +16 -1
- package/dist/esm/ui/confluence-search-modal/modal/index.js +22 -10
- package/dist/esm/ui/datasource-table-view/datasourceTableView.js +1 -0
- package/dist/esm/ui/table-footer/index.js +8 -2
- package/dist/esm/ui/table-footer/messages.js +5 -0
- package/dist/esm/ui/table-footer/powered-by-jsm-assets/index.js +46 -0
- package/dist/types/analytics/generated/analytics.types.d.ts +7 -0
- package/dist/types/ui/common/modal/popup-select/types.d.ts +6 -1
- package/dist/types/ui/confluence-search-modal/basic-filters/filters/date-range-picker/PopupComponent.d.ts +3 -0
- package/dist/types/ui/confluence-search-modal/basic-filters/filters/date-range-picker/index.d.ts +8 -0
- package/dist/types/ui/confluence-search-modal/basic-filters/filters/date-range-picker/messages.d.ts +42 -0
- package/dist/types/ui/confluence-search-modal/basic-filters/filters/date-range-picker/styled.d.ts +31 -0
- package/dist/types/ui/confluence-search-modal/basic-filters/filters/date-range-picker/trigger.d.ts +10 -0
- package/dist/types/ui/confluence-search-modal/basic-filters/index.d.ts +4 -1
- package/dist/types/ui/confluence-search-modal/basic-filters/types.d.ts +20 -0
- package/dist/types/ui/confluence-search-modal/confluence-search-container/index.d.ts +2 -1
- package/dist/types/ui/confluence-search-modal/types.d.ts +2 -1
- package/dist/types/ui/table-footer/index.d.ts +2 -1
- package/dist/types/ui/table-footer/messages.d.ts +5 -0
- package/dist/types/ui/table-footer/powered-by-jsm-assets/index.d.ts +4 -0
- package/dist/types-ts4.5/analytics/generated/analytics.types.d.ts +7 -0
- package/dist/types-ts4.5/ui/common/modal/popup-select/types.d.ts +6 -1
- package/dist/types-ts4.5/ui/confluence-search-modal/basic-filters/filters/date-range-picker/PopupComponent.d.ts +3 -0
- package/dist/types-ts4.5/ui/confluence-search-modal/basic-filters/filters/date-range-picker/index.d.ts +8 -0
- package/dist/types-ts4.5/ui/confluence-search-modal/basic-filters/filters/date-range-picker/messages.d.ts +42 -0
- package/dist/types-ts4.5/ui/confluence-search-modal/basic-filters/filters/date-range-picker/styled.d.ts +31 -0
- package/dist/types-ts4.5/ui/confluence-search-modal/basic-filters/filters/date-range-picker/trigger.d.ts +10 -0
- package/dist/types-ts4.5/ui/confluence-search-modal/basic-filters/index.d.ts +4 -1
- package/dist/types-ts4.5/ui/confluence-search-modal/basic-filters/types.d.ts +20 -0
- package/dist/types-ts4.5/ui/confluence-search-modal/confluence-search-container/index.d.ts +2 -1
- package/dist/types-ts4.5/ui/confluence-search-modal/types.d.ts +2 -1
- package/dist/types-ts4.5/ui/table-footer/index.d.ts +2 -1
- package/dist/types-ts4.5/ui/table-footer/messages.d.ts +5 -0
- package/dist/types-ts4.5/ui/table-footer/powered-by-jsm-assets/index.d.ts +4 -0
- package/examples-helpers/buildAssetsIssuesTable.tsx +71 -0
- package/examples-helpers/useAssetsTableProps.tsx +57 -0
- package/package.json +6 -1
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import _objectDestructuringEmpty from "@babel/runtime/helpers/objectDestructuringEmpty";
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import { Flex, xcss } from '@atlaskit/primitives';
|
|
3
|
+
import { DateRangePicker } from './filters/date-range-picker';
|
|
4
4
|
var basicFilterContainerStyles = xcss({
|
|
5
5
|
paddingLeft: 'space.100'
|
|
6
6
|
});
|
|
7
7
|
var BasicFilterContainer = function BasicFilterContainer(_ref) {
|
|
8
|
-
|
|
8
|
+
var onChange = _ref.onChange;
|
|
9
9
|
return /*#__PURE__*/React.createElement(Flex, {
|
|
10
10
|
xcss: basicFilterContainerStyles,
|
|
11
11
|
gap: "space.100",
|
|
12
12
|
testId: "clol-basic-filter-container"
|
|
13
|
-
}, /*#__PURE__*/React.createElement(
|
|
13
|
+
}, /*#__PURE__*/React.createElement(DateRangePicker, {
|
|
14
|
+
onSelectionChange: onChange
|
|
15
|
+
}), /*#__PURE__*/React.createElement(React.Fragment, null));
|
|
14
16
|
};
|
|
15
17
|
export default BasicFilterContainer;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
1
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2
5
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
3
6
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
4
7
|
import { Flex, xcss } from '@atlaskit/primitives';
|
|
@@ -18,6 +21,10 @@ var ConfluenceSearchContainer = function ConfluenceSearchContainer(_ref) {
|
|
|
18
21
|
_useState2 = _slicedToArray(_useState, 2),
|
|
19
22
|
searchBarSearchString = _useState2[0],
|
|
20
23
|
setSearchBarSearchString = _useState2[1];
|
|
24
|
+
var _useState3 = useState({}),
|
|
25
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
26
|
+
filterSelections = _useState4[0],
|
|
27
|
+
setFilterSelections = _useState4[1];
|
|
21
28
|
var handleSearchChange = useCallback(function (e) {
|
|
22
29
|
var rawSearch = e.currentTarget.value;
|
|
23
30
|
setSearchBarSearchString(rawSearch);
|
|
@@ -31,6 +38,12 @@ var ConfluenceSearchContainer = function ConfluenceSearchContainer(_ref) {
|
|
|
31
38
|
currentCloudId.current = cloudId;
|
|
32
39
|
}
|
|
33
40
|
}, [cloudId]);
|
|
41
|
+
var handleBasicFilterSelectionChange = useCallback(function (filterType, options) {
|
|
42
|
+
var updatedSelection = _objectSpread(_objectSpread({}, filterSelections), {}, _defineProperty({}, filterType, options));
|
|
43
|
+
setFilterSelections(updatedSelection);
|
|
44
|
+
//TODO: move to debounce fn in https://product-fabric.atlassian.net/browse/EDM-9485
|
|
45
|
+
onSearch(searchBarSearchString, updatedSelection);
|
|
46
|
+
}, [filterSelections, onSearch, searchBarSearchString]);
|
|
34
47
|
var showBasicFilters = useMemo(function () {
|
|
35
48
|
if (getBooleanFF('platform.linking-platform.datasource.show-clol-basic-filters')) {
|
|
36
49
|
return true;
|
|
@@ -48,6 +61,8 @@ var ConfluenceSearchContainer = function ConfluenceSearchContainer(_ref) {
|
|
|
48
61
|
searchTerm: searchBarSearchString,
|
|
49
62
|
placeholder: searchMessages.searchLabel,
|
|
50
63
|
fullWidth: !showBasicFilters
|
|
51
|
-
}), showBasicFilters && /*#__PURE__*/React.createElement(BasicFilters,
|
|
64
|
+
}), showBasicFilters && /*#__PURE__*/React.createElement(BasicFilters, {
|
|
65
|
+
onChange: handleBasicFilterSelectionChange
|
|
66
|
+
}));
|
|
52
67
|
};
|
|
53
68
|
export default ConfluenceSearchContainer;
|
|
@@ -99,6 +99,10 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
|
|
|
99
99
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
100
100
|
visibleColumnKeys = _useState10[0],
|
|
101
101
|
setVisibleColumnKeys = _useState10[1];
|
|
102
|
+
var _useState11 = useState(),
|
|
103
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
104
|
+
lastModified = _useState12[0],
|
|
105
|
+
setLastModified = _useState12[1];
|
|
102
106
|
|
|
103
107
|
// analytics related parameters
|
|
104
108
|
var searchCount = useRef(0);
|
|
@@ -111,8 +115,10 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
|
|
|
111
115
|
return _objectSpread(_objectSpread({}, initialParameters), {}, {
|
|
112
116
|
cloudId: cloudId,
|
|
113
117
|
searchString: searchString
|
|
118
|
+
}, lastModified && {
|
|
119
|
+
lastModified: lastModified
|
|
114
120
|
});
|
|
115
|
-
}, [cloudId, initialParameters, searchString /** Add more parameters when more filters are added */]);
|
|
121
|
+
}, [cloudId, lastModified, initialParameters, searchString /** Add more parameters when more filters are added */]);
|
|
116
122
|
var isParametersSet = useMemo(function () {
|
|
117
123
|
return !!cloudId && Object.values(parameters !== null && parameters !== void 0 ? parameters : {}).filter(function (v) {
|
|
118
124
|
return v !== undefined;
|
|
@@ -218,17 +224,17 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
|
|
|
218
224
|
setVisibleColumnKeys(newVisibleColumnKeys);
|
|
219
225
|
}, [initialVisibleColumnKeys, defaultVisibleColumnKeys]);
|
|
220
226
|
var siteSelectorLabel = availableSites && availableSites.length > 1 ? confluenceSearchModalMessages.insertIssuesTitleManySites : confluenceSearchModalMessages.insertIssuesTitle;
|
|
221
|
-
var
|
|
222
|
-
|
|
223
|
-
columnCustomSizes =
|
|
224
|
-
setColumnCustomSizes =
|
|
227
|
+
var _useState13 = useState(initialColumnCustomSizes),
|
|
228
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
229
|
+
columnCustomSizes = _useState14[0],
|
|
230
|
+
setColumnCustomSizes = _useState14[1];
|
|
225
231
|
var onColumnResize = useCallback(function (key, width) {
|
|
226
232
|
setColumnCustomSizes(_objectSpread(_objectSpread({}, columnCustomSizes), {}, _defineProperty({}, key, width)));
|
|
227
233
|
}, [columnCustomSizes]);
|
|
228
|
-
var
|
|
229
|
-
|
|
230
|
-
wrappedColumnKeys =
|
|
231
|
-
setWrappedColumnKeys =
|
|
234
|
+
var _useState15 = useState(initialWrappedColumnKeys),
|
|
235
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
236
|
+
wrappedColumnKeys = _useState16[0],
|
|
237
|
+
setWrappedColumnKeys = _useState16[1];
|
|
232
238
|
var onWrappedColumnChange = useCallback(function (key, isWrapped) {
|
|
233
239
|
var set = new Set(wrappedColumnKeys);
|
|
234
240
|
if (isWrapped) {
|
|
@@ -407,9 +413,15 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
|
|
|
407
413
|
userInteractionActions.current.add(DatasourceAction.DISPLAY_VIEW_CHANGED);
|
|
408
414
|
setCurrentViewMode(selectedMode);
|
|
409
415
|
};
|
|
410
|
-
var onSearch = useCallback(function (newSearchString) {
|
|
416
|
+
var onSearch = useCallback(function (newSearchString, filters) {
|
|
411
417
|
searchCount.current++;
|
|
412
418
|
userInteractionActions.current.add(DatasourceAction.QUERY_UPDATED);
|
|
419
|
+
if (filters !== null && filters !== void 0 && filters.lastModified) {
|
|
420
|
+
var lastModifiedValue = filters.lastModified.find(function (range) {
|
|
421
|
+
return range.value;
|
|
422
|
+
});
|
|
423
|
+
setLastModified(lastModifiedValue === null || lastModifiedValue === void 0 ? void 0 : lastModifiedValue.value);
|
|
424
|
+
}
|
|
413
425
|
setSearchString(newSearchString);
|
|
414
426
|
reset({
|
|
415
427
|
shouldForceRequest: true
|
|
@@ -170,6 +170,7 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
|
|
|
170
170
|
testId: "datasource-table-view-skeleton",
|
|
171
171
|
isCompact: true
|
|
172
172
|
}), jsx(TableFooter, {
|
|
173
|
+
datasourceId: datasourceId,
|
|
173
174
|
itemCount: isDataReady ? totalCount : undefined,
|
|
174
175
|
onRefresh: onRefresh,
|
|
175
176
|
isLoading: !isDataReady || status === 'loading',
|
|
@@ -8,9 +8,12 @@ import { FormattedMessage, FormattedNumber, useIntl } from 'react-intl-next';
|
|
|
8
8
|
import Button from '@atlaskit/button';
|
|
9
9
|
import Heading from '@atlaskit/heading';
|
|
10
10
|
import RefreshIcon from '@atlaskit/icon/glyph/refresh';
|
|
11
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
11
12
|
import LinkUrl from '@atlaskit/smart-card/link-url';
|
|
12
13
|
import { N0, N40, N800, N90 } from '@atlaskit/theme/colors';
|
|
14
|
+
import { ASSETS_LIST_OF_LINKS_DATASOURCE_ID } from '../assets-modal';
|
|
13
15
|
import { footerMessages } from './messages';
|
|
16
|
+
import { PoweredByJSMAssets } from './powered-by-jsm-assets';
|
|
14
17
|
import { SyncInfo } from './sync-info';
|
|
15
18
|
var FooterWrapper = styled.div({
|
|
16
19
|
padding: "var(--ds-space-0, 0px)".concat(" ", "var(--ds-space-200, 16px)"),
|
|
@@ -41,7 +44,8 @@ var SyncTextWrapper = styled.div({
|
|
|
41
44
|
fontSize: '12px'
|
|
42
45
|
});
|
|
43
46
|
export var TableFooter = function TableFooter(_ref) {
|
|
44
|
-
var
|
|
47
|
+
var datasourceId = _ref.datasourceId,
|
|
48
|
+
itemCount = _ref.itemCount,
|
|
45
49
|
onRefresh = _ref.onRefresh,
|
|
46
50
|
isLoading = _ref.isLoading,
|
|
47
51
|
url = _ref.url;
|
|
@@ -80,7 +84,9 @@ export var TableFooter = function TableFooter(_ref) {
|
|
|
80
84
|
values: {
|
|
81
85
|
itemCount: itemCount
|
|
82
86
|
}
|
|
83
|
-
}))))),
|
|
87
|
+
}))))), getBooleanFF('platform.linking-platform.datasource-assets_objects_add_jsm_promotional_tag') && datasourceId === ASSETS_LIST_OF_LINKS_DATASOURCE_ID ? jsx(PoweredByJSMAssets, {
|
|
88
|
+
text: intl.formatMessage(footerMessages.powerByJSM)
|
|
89
|
+
}) : null, jsx(SyncWrapper, null, onRefresh && jsx(Fragment, null, jsx(SyncTextWrapper, {
|
|
84
90
|
"data-testid": "sync-text"
|
|
85
91
|
}, isLoading ? jsx(FormattedMessage, footerMessages.loadingText) : jsx(SyncInfo, {
|
|
86
92
|
lastSyncTime: lastSyncTime
|
|
@@ -14,5 +14,10 @@ export var footerMessages = defineMessages({
|
|
|
14
14
|
id: 'linkDataSource.table-footer.refresh',
|
|
15
15
|
description: 'Label for refresh icon',
|
|
16
16
|
defaultMessage: 'Refresh'
|
|
17
|
+
},
|
|
18
|
+
powerByJSM: {
|
|
19
|
+
id: 'linkDataSource.table-footer.power-by-jsm',
|
|
20
|
+
description: 'Displayed on the issue like table footer to increase JSM Assets visibility',
|
|
21
|
+
defaultMessage: 'Powered by Assets in Jira Service Management'
|
|
17
22
|
}
|
|
18
23
|
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { JiraServiceManagementIcon } from '@atlaskit/logo';
|
|
3
|
+
import { Box, xcss } from '@atlaskit/primitives';
|
|
4
|
+
import { useDatasourceAnalyticsEvents } from '../../../analytics';
|
|
5
|
+
var jsmTextStyles = xcss({
|
|
6
|
+
fontSize: 'small',
|
|
7
|
+
color: 'color.text.subtle',
|
|
8
|
+
marginLeft: "var(--ds-space-075, 6px)",
|
|
9
|
+
':hover': {
|
|
10
|
+
color: 'color.link.pressed'
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var jsmContainerStyles = xcss({
|
|
14
|
+
display: 'flex',
|
|
15
|
+
flexDirection: 'row-reverse'
|
|
16
|
+
});
|
|
17
|
+
export var PoweredByJSMAssets = function PoweredByJSMAssets(props) {
|
|
18
|
+
var ASSETS_LINK = '/jira/servicedesk/assets';
|
|
19
|
+
var _useDatasourceAnalyti = useDatasourceAnalyticsEvents(),
|
|
20
|
+
fireEvent = _useDatasourceAnalyti.fireEvent;
|
|
21
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
22
|
+
xcss: jsmContainerStyles,
|
|
23
|
+
padding: "space.150"
|
|
24
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
25
|
+
"data-testid": 'powered-by-jsm-assets-link',
|
|
26
|
+
onClick: function onClick() {
|
|
27
|
+
return fireEvent('ui.link.clicked.poweredBy', {
|
|
28
|
+
componentHierarchy: 'datasourceTable',
|
|
29
|
+
extensionKey: 'jsm-cmdb-gateway'
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
href: ASSETS_LINK,
|
|
33
|
+
rel: "noreferrer",
|
|
34
|
+
target: "_blank",
|
|
35
|
+
style: {
|
|
36
|
+
display: 'inline-flex',
|
|
37
|
+
alignItems: 'center'
|
|
38
|
+
}
|
|
39
|
+
}, /*#__PURE__*/React.createElement(JiraServiceManagementIcon, {
|
|
40
|
+
size: "xsmall",
|
|
41
|
+
appearance: "brand",
|
|
42
|
+
label: props.text
|
|
43
|
+
}), /*#__PURE__*/React.createElement(Box, {
|
|
44
|
+
xcss: jsmTextStyles
|
|
45
|
+
}, props.text)));
|
|
46
|
+
};
|
|
@@ -16,6 +16,10 @@ export type AnalyticsContextAttributesType = {
|
|
|
16
16
|
dataProvider: 'jira-issues' | 'jsm-assets' | 'confluence-search';
|
|
17
17
|
};
|
|
18
18
|
export type DatasourceModalDialogViewedAttributesType = {};
|
|
19
|
+
export type LinkClickedPoweredByAttributesType = {
|
|
20
|
+
extensionKey: string;
|
|
21
|
+
componentHierarchy: string;
|
|
22
|
+
};
|
|
19
23
|
export type ModalReadyDatasourceAttributesType = {
|
|
20
24
|
instancesCount: number | null;
|
|
21
25
|
schemasCount: number | null;
|
|
@@ -211,6 +215,9 @@ export type AnalyticsEventAttributes = {
|
|
|
211
215
|
/**
|
|
212
216
|
* Fired when the “show more” button inside the dropdown menu is clicked */
|
|
213
217
|
'ui.button.clicked.basicSearchDropdown': ButtonClickedBasicSearchDropdownAttributesType;
|
|
218
|
+
/**
|
|
219
|
+
* Fired when the “show more” button inside the dropdown menu is clicked */
|
|
220
|
+
'ui.link.clicked.poweredBy': LinkClickedPoweredByAttributesType;
|
|
214
221
|
/**
|
|
215
222
|
* Fired when search is initiated via the search icon or enter key press for aql editor input field. */
|
|
216
223
|
'ui.aqlEditor.searched': AqlEditorSearchedAttributesType;
|
|
@@ -18,5 +18,10 @@ export type AvatarLabelOption = OptionBase & {
|
|
|
18
18
|
isSquare?: boolean;
|
|
19
19
|
isGroup?: boolean;
|
|
20
20
|
};
|
|
21
|
-
export type
|
|
21
|
+
export type DateRangeType = 'anyTime' | 'today' | 'yesterday' | 'past7Days' | 'past30Days' | 'pastYear' | 'custom';
|
|
22
|
+
export type DateRangeOption = OptionBase & {
|
|
23
|
+
optionType: 'defaultOption';
|
|
24
|
+
value: DateRangeType;
|
|
25
|
+
};
|
|
26
|
+
export type SelectOption = IconLabelOption | LozengeLabelOption | AvatarLabelOption | DateRangeOption;
|
|
22
27
|
export type FormatOptionLabel = (option: SelectOption) => ReactElement;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PopupComponentProps } from '@atlaskit/popup';
|
|
3
|
+
export declare const PopupComponent: React.ForwardRefExoticComponent<Pick<PopupComponentProps, "style" | "children" | "id" | "tabIndex" | "data-testid" | "shouldRenderToParent" | "data-placement"> & React.RefAttributes<HTMLDivElement>>;
|
package/dist/types/ui/confluence-search-modal/basic-filters/filters/date-range-picker/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SelectOption } from '../../../../common/modal/popup-select/types';
|
|
3
|
+
import { CLOLBasicFilters } from '../../types';
|
|
4
|
+
interface DateRangeProps {
|
|
5
|
+
onSelectionChange: (filterType: CLOLBasicFilters, options: SelectOption[]) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const DateRangePicker: ({ onSelectionChange }: DateRangeProps) => JSX.Element;
|
|
8
|
+
export {};
|
package/dist/types/ui/confluence-search-modal/basic-filters/filters/date-range-picker/messages.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export declare const dateRangeMessages: {
|
|
2
|
+
dateRangeTitle: {
|
|
3
|
+
id: string;
|
|
4
|
+
defaultMessage: string;
|
|
5
|
+
description: string;
|
|
6
|
+
};
|
|
7
|
+
dateRangeAnyTime: {
|
|
8
|
+
id: string;
|
|
9
|
+
defaultMessage: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
dateRangeToday: {
|
|
13
|
+
id: string;
|
|
14
|
+
defaultMessage: string;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
dateRangeYesterday: {
|
|
18
|
+
id: string;
|
|
19
|
+
defaultMessage: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
dateRangeLastWeek: {
|
|
23
|
+
id: string;
|
|
24
|
+
defaultMessage: string;
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
dateRangeLastMonth: {
|
|
28
|
+
id: string;
|
|
29
|
+
defaultMessage: string;
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
dateRangeLastYear: {
|
|
33
|
+
id: string;
|
|
34
|
+
defaultMessage: string;
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
37
|
+
dateRangeCustom: {
|
|
38
|
+
id: string;
|
|
39
|
+
defaultMessage: string;
|
|
40
|
+
description: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
package/dist/types/ui/confluence-search-modal/basic-filters/filters/date-range-picker/styled.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const PopupComponentContainer: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
+
export declare const CustomDropdown: import("@emotion/styled").StyledComponent<{
|
|
7
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
+
as?: import("react").ElementType<any> | undefined;
|
|
9
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
|
+
export declare const CustomDropdownItem: import("@emotion/styled").StyledComponent<{
|
|
11
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
+
as?: import("react").ElementType<any> | undefined;
|
|
13
|
+
} & {
|
|
14
|
+
isSelected: boolean;
|
|
15
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
16
|
+
export declare const CustomDateWrapper: import("@emotion/styled").StyledComponent<{
|
|
17
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
18
|
+
as?: import("react").ElementType<any> | undefined;
|
|
19
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
20
|
+
export declare const DatePickersWrapper: import("@emotion/styled").StyledComponent<{
|
|
21
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
22
|
+
as?: import("react").ElementType<any> | undefined;
|
|
23
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
24
|
+
export declare const SelectDateRangeButton: import("@emotion/styled").StyledComponent<{
|
|
25
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
26
|
+
as?: import("react").ElementType<any> | undefined;
|
|
27
|
+
}, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
28
|
+
export declare const DateRangeErrorMessage: import("@emotion/styled").StyledComponent<{
|
|
29
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
30
|
+
as?: import("react").ElementType<any> | undefined;
|
|
31
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
package/dist/types/ui/confluence-search-modal/basic-filters/filters/date-range-picker/trigger.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { TriggerProps } from '@atlaskit/popup/types';
|
|
3
|
+
export interface PopupTriggerProps {
|
|
4
|
+
triggerProps: TriggerProps;
|
|
5
|
+
optionSelected: boolean;
|
|
6
|
+
label?: string;
|
|
7
|
+
selectedLabel?: string;
|
|
8
|
+
onClickButton: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const PopupTrigger: ({ triggerProps, optionSelected, label, selectedLabel, onClickButton, }: PopupTriggerProps) => JSX.Element;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { SelectOption } from '../../common/modal/popup-select/types';
|
|
3
|
+
import { CLOLBasicFilters } from './types';
|
|
2
4
|
export interface BasicFilterContainerProps {
|
|
5
|
+
onChange: (filterType: CLOLBasicFilters, options: SelectOption[]) => void;
|
|
3
6
|
}
|
|
4
|
-
declare const BasicFilterContainer: ({}: BasicFilterContainerProps) => JSX.Element;
|
|
7
|
+
declare const BasicFilterContainer: ({ onChange }: BasicFilterContainerProps) => JSX.Element;
|
|
5
8
|
export default BasicFilterContainer;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SelectOption } from '../../common/modal/popup-select/types';
|
|
2
|
+
export interface UserInfo {
|
|
3
|
+
accountId: string;
|
|
4
|
+
id: string;
|
|
5
|
+
}
|
|
6
|
+
export interface UserInfoAGGResponse {
|
|
7
|
+
data?: {
|
|
8
|
+
me: {
|
|
9
|
+
user: UserInfo;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
errors?: Array<object>;
|
|
13
|
+
}
|
|
14
|
+
export declare enum CLOLBasicFilters {
|
|
15
|
+
editedOrCreatedBy = "editedOrCreatedBy",
|
|
16
|
+
lastModified = "lastModified"
|
|
17
|
+
}
|
|
18
|
+
export type SelectedOptionsMap = {
|
|
19
|
+
[key in CLOLBasicFilters]?: SelectOption[];
|
|
20
|
+
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { SelectedOptionsMap } from '../basic-filters/types';
|
|
2
3
|
interface Props {
|
|
3
4
|
cloudId?: string;
|
|
4
5
|
initialSearchValue?: string;
|
|
5
6
|
isSearching: boolean;
|
|
6
|
-
onSearch: (searchTerm: string) => void;
|
|
7
|
+
onSearch: (searchTerm: string, filters?: SelectedOptionsMap) => void;
|
|
7
8
|
}
|
|
8
9
|
declare const ConfluenceSearchContainer: ({ cloudId, initialSearchValue, isSearching, onSearch, }: Props) => JSX.Element;
|
|
9
10
|
export default ConfluenceSearchContainer;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DatasourceAdf, InlineCardAdf } from '@atlaskit/linking-common/types';
|
|
2
2
|
import { ConfigModalProps } from '../../common/types';
|
|
3
|
+
import { DateRangeType } from '../common/modal/popup-select/types';
|
|
3
4
|
export interface ConfluenceSearchConfigModalProps extends ConfigModalProps<InlineCardAdf | ConfluenceSearchDatasourceAdf, ConfluenceSearchDatasourceParameters> {
|
|
4
5
|
disableDisplayDropdown?: boolean;
|
|
5
6
|
overrideParameters?: Pick<ConfluenceSearchDatasourceParameters, 'entityTypes'>;
|
|
@@ -16,7 +17,7 @@ export type ConfluenceSearchDatasourceParameters = {
|
|
|
16
17
|
containerStatus?: string[];
|
|
17
18
|
contentStatuses?: string[];
|
|
18
19
|
creatorAccountIds?: string[];
|
|
19
|
-
lastModified?:
|
|
20
|
+
lastModified?: DateRangeType;
|
|
20
21
|
lastModifiedFrom?: string;
|
|
21
22
|
lastModifiedTo?: string;
|
|
22
23
|
shouldMatchTitleOnly?: boolean;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
export type TableFooterProps = {
|
|
3
|
+
datasourceId: string;
|
|
3
4
|
itemCount?: number;
|
|
4
5
|
onRefresh?: () => void;
|
|
5
6
|
isLoading: boolean;
|
|
6
7
|
url?: string;
|
|
7
8
|
};
|
|
8
|
-
export declare const TableFooter: ({ itemCount, onRefresh, isLoading, url, }: TableFooterProps) => jsx.JSX.Element | null;
|
|
9
|
+
export declare const TableFooter: ({ datasourceId, itemCount, onRefresh, isLoading, url, }: TableFooterProps) => jsx.JSX.Element | null;
|
|
@@ -16,6 +16,10 @@ export type AnalyticsContextAttributesType = {
|
|
|
16
16
|
dataProvider: 'jira-issues' | 'jsm-assets' | 'confluence-search';
|
|
17
17
|
};
|
|
18
18
|
export type DatasourceModalDialogViewedAttributesType = {};
|
|
19
|
+
export type LinkClickedPoweredByAttributesType = {
|
|
20
|
+
extensionKey: string;
|
|
21
|
+
componentHierarchy: string;
|
|
22
|
+
};
|
|
19
23
|
export type ModalReadyDatasourceAttributesType = {
|
|
20
24
|
instancesCount: number | null;
|
|
21
25
|
schemasCount: number | null;
|
|
@@ -211,6 +215,9 @@ export type AnalyticsEventAttributes = {
|
|
|
211
215
|
/**
|
|
212
216
|
* Fired when the “show more” button inside the dropdown menu is clicked */
|
|
213
217
|
'ui.button.clicked.basicSearchDropdown': ButtonClickedBasicSearchDropdownAttributesType;
|
|
218
|
+
/**
|
|
219
|
+
* Fired when the “show more” button inside the dropdown menu is clicked */
|
|
220
|
+
'ui.link.clicked.poweredBy': LinkClickedPoweredByAttributesType;
|
|
214
221
|
/**
|
|
215
222
|
* Fired when search is initiated via the search icon or enter key press for aql editor input field. */
|
|
216
223
|
'ui.aqlEditor.searched': AqlEditorSearchedAttributesType;
|
|
@@ -18,5 +18,10 @@ export type AvatarLabelOption = OptionBase & {
|
|
|
18
18
|
isSquare?: boolean;
|
|
19
19
|
isGroup?: boolean;
|
|
20
20
|
};
|
|
21
|
-
export type
|
|
21
|
+
export type DateRangeType = 'anyTime' | 'today' | 'yesterday' | 'past7Days' | 'past30Days' | 'pastYear' | 'custom';
|
|
22
|
+
export type DateRangeOption = OptionBase & {
|
|
23
|
+
optionType: 'defaultOption';
|
|
24
|
+
value: DateRangeType;
|
|
25
|
+
};
|
|
26
|
+
export type SelectOption = IconLabelOption | LozengeLabelOption | AvatarLabelOption | DateRangeOption;
|
|
22
27
|
export type FormatOptionLabel = (option: SelectOption) => ReactElement;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PopupComponentProps } from '@atlaskit/popup';
|
|
3
|
+
export declare const PopupComponent: React.ForwardRefExoticComponent<Pick<PopupComponentProps, "style" | "children" | "id" | "tabIndex" | "data-testid" | "shouldRenderToParent" | "data-placement"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SelectOption } from '../../../../common/modal/popup-select/types';
|
|
3
|
+
import { CLOLBasicFilters } from '../../types';
|
|
4
|
+
interface DateRangeProps {
|
|
5
|
+
onSelectionChange: (filterType: CLOLBasicFilters, options: SelectOption[]) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const DateRangePicker: ({ onSelectionChange }: DateRangeProps) => JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export declare const dateRangeMessages: {
|
|
2
|
+
dateRangeTitle: {
|
|
3
|
+
id: string;
|
|
4
|
+
defaultMessage: string;
|
|
5
|
+
description: string;
|
|
6
|
+
};
|
|
7
|
+
dateRangeAnyTime: {
|
|
8
|
+
id: string;
|
|
9
|
+
defaultMessage: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
dateRangeToday: {
|
|
13
|
+
id: string;
|
|
14
|
+
defaultMessage: string;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
dateRangeYesterday: {
|
|
18
|
+
id: string;
|
|
19
|
+
defaultMessage: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
dateRangeLastWeek: {
|
|
23
|
+
id: string;
|
|
24
|
+
defaultMessage: string;
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
dateRangeLastMonth: {
|
|
28
|
+
id: string;
|
|
29
|
+
defaultMessage: string;
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
dateRangeLastYear: {
|
|
33
|
+
id: string;
|
|
34
|
+
defaultMessage: string;
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
37
|
+
dateRangeCustom: {
|
|
38
|
+
id: string;
|
|
39
|
+
defaultMessage: string;
|
|
40
|
+
description: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const PopupComponentContainer: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
+
export declare const CustomDropdown: import("@emotion/styled").StyledComponent<{
|
|
7
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
+
as?: import("react").ElementType<any> | undefined;
|
|
9
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
|
+
export declare const CustomDropdownItem: import("@emotion/styled").StyledComponent<{
|
|
11
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
+
as?: import("react").ElementType<any> | undefined;
|
|
13
|
+
} & {
|
|
14
|
+
isSelected: boolean;
|
|
15
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
16
|
+
export declare const CustomDateWrapper: import("@emotion/styled").StyledComponent<{
|
|
17
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
18
|
+
as?: import("react").ElementType<any> | undefined;
|
|
19
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
20
|
+
export declare const DatePickersWrapper: import("@emotion/styled").StyledComponent<{
|
|
21
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
22
|
+
as?: import("react").ElementType<any> | undefined;
|
|
23
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
24
|
+
export declare const SelectDateRangeButton: import("@emotion/styled").StyledComponent<{
|
|
25
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
26
|
+
as?: import("react").ElementType<any> | undefined;
|
|
27
|
+
}, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
28
|
+
export declare const DateRangeErrorMessage: import("@emotion/styled").StyledComponent<{
|
|
29
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
30
|
+
as?: import("react").ElementType<any> | undefined;
|
|
31
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { TriggerProps } from '@atlaskit/popup/types';
|
|
3
|
+
export interface PopupTriggerProps {
|
|
4
|
+
triggerProps: TriggerProps;
|
|
5
|
+
optionSelected: boolean;
|
|
6
|
+
label?: string;
|
|
7
|
+
selectedLabel?: string;
|
|
8
|
+
onClickButton: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const PopupTrigger: ({ triggerProps, optionSelected, label, selectedLabel, onClickButton, }: PopupTriggerProps) => JSX.Element;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { SelectOption } from '../../common/modal/popup-select/types';
|
|
3
|
+
import { CLOLBasicFilters } from './types';
|
|
2
4
|
export interface BasicFilterContainerProps {
|
|
5
|
+
onChange: (filterType: CLOLBasicFilters, options: SelectOption[]) => void;
|
|
3
6
|
}
|
|
4
|
-
declare const BasicFilterContainer: ({}: BasicFilterContainerProps) => JSX.Element;
|
|
7
|
+
declare const BasicFilterContainer: ({ onChange }: BasicFilterContainerProps) => JSX.Element;
|
|
5
8
|
export default BasicFilterContainer;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SelectOption } from '../../common/modal/popup-select/types';
|
|
2
|
+
export interface UserInfo {
|
|
3
|
+
accountId: string;
|
|
4
|
+
id: string;
|
|
5
|
+
}
|
|
6
|
+
export interface UserInfoAGGResponse {
|
|
7
|
+
data?: {
|
|
8
|
+
me: {
|
|
9
|
+
user: UserInfo;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
errors?: Array<object>;
|
|
13
|
+
}
|
|
14
|
+
export declare enum CLOLBasicFilters {
|
|
15
|
+
editedOrCreatedBy = "editedOrCreatedBy",
|
|
16
|
+
lastModified = "lastModified"
|
|
17
|
+
}
|
|
18
|
+
export type SelectedOptionsMap = {
|
|
19
|
+
[key in CLOLBasicFilters]?: SelectOption[];
|
|
20
|
+
};
|