@atlaskit/link-datasource 1.11.0 → 1.12.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 +20 -0
- package/dist/cjs/analytics/constants.js +1 -1
- package/dist/cjs/services/mocks.js +134 -0
- package/dist/cjs/services/useBasicFilterAGG.js +119 -0
- package/dist/cjs/services/utils.js +8 -0
- package/dist/cjs/ui/assets-modal/modal/index.js +2 -2
- package/dist/cjs/ui/datasource-table-view/datasourceTableView.js +5 -1
- package/dist/cjs/ui/issue-like-table/draggable-table-heading.js +109 -5
- package/dist/cjs/ui/issue-like-table/index.js +109 -95
- package/dist/cjs/ui/jira-issues-modal/basic-filters/mocks/fieldValuesEmptyResponse.js +20 -0
- package/dist/cjs/ui/jira-issues-modal/basic-filters/mocks/fieldValuesExpectedResponseForAssignees.js +155 -0
- package/dist/cjs/ui/jira-issues-modal/basic-filters/mocks/fieldValuesStandardResponseForProjects.js +82 -0
- package/dist/cjs/ui/jira-issues-modal/basic-filters/mocks/fieldValuesStandardResponseForStatuses.js +87 -0
- package/dist/cjs/ui/jira-issues-modal/basic-filters/mocks/fieldValuesStandardResponseForTypes.js +97 -0
- package/dist/cjs/ui/jira-issues-modal/basic-filters/mocks/hydrateJqlEmptyResponse.js +18 -0
- package/dist/cjs/ui/jira-issues-modal/basic-filters/mocks/hydrateJqlStandardResponse.js +111 -0
- package/dist/cjs/ui/jira-issues-modal/basic-filters/types.js +15 -0
- package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/async-popup-select/formatOptionLabel.js +0 -1
- package/dist/cjs/ui/jira-issues-modal/basic-filters/utils/transformers.js +97 -0
- package/dist/cjs/ui/jira-issues-modal/jira-search-container/buildJQL.js +23 -3
- package/dist/cjs/ui/jira-issues-modal/modal/index.js +16 -5
- package/dist/es2019/analytics/constants.js +1 -1
- package/dist/es2019/services/mocks.js +128 -0
- package/dist/es2019/services/useBasicFilterAGG.js +72 -0
- package/dist/es2019/services/utils.js +113 -0
- package/dist/es2019/ui/assets-modal/modal/index.js +2 -2
- package/dist/es2019/ui/datasource-table-view/datasourceTableView.js +5 -1
- package/dist/es2019/ui/issue-like-table/draggable-table-heading.js +113 -5
- package/dist/es2019/ui/issue-like-table/index.js +82 -72
- package/dist/es2019/ui/jira-issues-modal/basic-filters/mocks/fieldValuesEmptyResponse.js +14 -0
- package/dist/es2019/ui/jira-issues-modal/basic-filters/mocks/fieldValuesExpectedResponseForAssignees.js +149 -0
- package/dist/es2019/ui/jira-issues-modal/basic-filters/mocks/fieldValuesStandardResponseForProjects.js +76 -0
- package/dist/es2019/ui/jira-issues-modal/basic-filters/mocks/fieldValuesStandardResponseForStatuses.js +81 -0
- package/dist/es2019/ui/jira-issues-modal/basic-filters/mocks/fieldValuesStandardResponseForTypes.js +91 -0
- package/dist/es2019/ui/jira-issues-modal/basic-filters/mocks/hydrateJqlEmptyResponse.js +12 -0
- package/dist/es2019/ui/jira-issues-modal/basic-filters/mocks/hydrateJqlStandardResponse.js +105 -0
- package/dist/es2019/ui/jira-issues-modal/basic-filters/types.js +9 -0
- package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/async-popup-select/formatOptionLabel.js +0 -1
- package/dist/es2019/ui/jira-issues-modal/basic-filters/utils/transformers.js +91 -0
- package/dist/es2019/ui/jira-issues-modal/jira-search-container/buildJQL.js +17 -4
- package/dist/es2019/ui/jira-issues-modal/modal/index.js +15 -4
- package/dist/esm/analytics/constants.js +1 -1
- package/dist/esm/services/mocks.js +128 -0
- package/dist/esm/services/useBasicFilterAGG.js +112 -0
- package/dist/esm/services/utils.js +2 -0
- package/dist/esm/ui/assets-modal/modal/index.js +2 -2
- package/dist/esm/ui/datasource-table-view/datasourceTableView.js +5 -1
- package/dist/esm/ui/issue-like-table/draggable-table-heading.js +109 -5
- package/dist/esm/ui/issue-like-table/index.js +108 -94
- package/dist/esm/ui/jira-issues-modal/basic-filters/mocks/fieldValuesEmptyResponse.js +14 -0
- package/dist/esm/ui/jira-issues-modal/basic-filters/mocks/fieldValuesExpectedResponseForAssignees.js +149 -0
- package/dist/esm/ui/jira-issues-modal/basic-filters/mocks/fieldValuesStandardResponseForProjects.js +76 -0
- package/dist/esm/ui/jira-issues-modal/basic-filters/mocks/fieldValuesStandardResponseForStatuses.js +81 -0
- package/dist/esm/ui/jira-issues-modal/basic-filters/mocks/fieldValuesStandardResponseForTypes.js +91 -0
- package/dist/esm/ui/jira-issues-modal/basic-filters/mocks/hydrateJqlEmptyResponse.js +12 -0
- package/dist/esm/ui/jira-issues-modal/basic-filters/mocks/hydrateJqlStandardResponse.js +105 -0
- package/dist/esm/ui/jira-issues-modal/basic-filters/types.js +9 -0
- package/dist/esm/ui/jira-issues-modal/basic-filters/ui/async-popup-select/formatOptionLabel.js +0 -1
- package/dist/esm/ui/jira-issues-modal/basic-filters/utils/transformers.js +89 -0
- package/dist/esm/ui/jira-issues-modal/jira-search-container/buildJQL.js +23 -4
- package/dist/esm/ui/jira-issues-modal/modal/index.js +17 -6
- package/dist/types/services/mocks.d.ts +3 -0
- package/dist/types/services/useBasicFilterAGG.d.ts +5 -0
- package/dist/types/services/utils.d.ts +2 -0
- package/dist/types/ui/datasource-table-view/types.d.ts +4 -0
- package/dist/types/ui/issue-like-table/draggable-table-heading.d.ts +3 -2
- package/dist/types/ui/issue-like-table/index.d.ts +5 -3
- package/dist/types/ui/issue-like-table/types.d.ts +5 -0
- package/dist/types/ui/jira-issues-modal/basic-filters/hooks/useFieldValues.d.ts +1 -1
- package/dist/types/ui/jira-issues-modal/basic-filters/mocks/fieldValuesEmptyResponse.d.ts +3 -0
- package/dist/types/ui/jira-issues-modal/basic-filters/mocks/fieldValuesExpectedResponseForAssignees.d.ts +17 -0
- package/dist/types/ui/jira-issues-modal/basic-filters/mocks/fieldValuesStandardResponseForProjects.d.ts +8 -0
- package/dist/types/ui/jira-issues-modal/basic-filters/mocks/fieldValuesStandardResponseForStatuses.d.ts +8 -0
- package/dist/types/ui/jira-issues-modal/basic-filters/mocks/fieldValuesStandardResponseForTypes.d.ts +8 -0
- package/dist/types/ui/jira-issues-modal/basic-filters/mocks/hydrateJqlEmptyResponse.d.ts +3 -0
- package/dist/types/ui/jira-issues-modal/basic-filters/mocks/hydrateJqlStandardResponse.d.ts +29 -0
- package/dist/types/ui/jira-issues-modal/basic-filters/types.d.ts +93 -0
- package/dist/types/ui/jira-issues-modal/basic-filters/ui/async-popup-select/control.d.ts +1 -1
- package/dist/types/ui/jira-issues-modal/basic-filters/ui/async-popup-select/formatOptionLabel.d.ts +1 -1
- package/dist/types/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.d.ts +1 -1
- package/dist/types/ui/jira-issues-modal/basic-filters/ui/async-popup-select/trigger.d.ts +1 -1
- package/dist/types/ui/jira-issues-modal/basic-filters/utils/transformers.d.ts +8 -0
- package/dist/types/ui/jira-issues-modal/jira-search-container/buildJQL.d.ts +4 -0
- package/dist/types/ui/jira-issues-modal/types.d.ts +4 -0
- package/dist/types-ts4.5/services/mocks.d.ts +3 -0
- package/dist/types-ts4.5/services/useBasicFilterAGG.d.ts +5 -0
- package/dist/types-ts4.5/services/utils.d.ts +2 -0
- package/dist/types-ts4.5/ui/datasource-table-view/types.d.ts +4 -0
- package/dist/types-ts4.5/ui/issue-like-table/draggable-table-heading.d.ts +3 -2
- package/dist/types-ts4.5/ui/issue-like-table/index.d.ts +5 -3
- package/dist/types-ts4.5/ui/issue-like-table/types.d.ts +5 -0
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/hooks/useFieldValues.d.ts +1 -1
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/mocks/fieldValuesEmptyResponse.d.ts +3 -0
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/mocks/fieldValuesExpectedResponseForAssignees.d.ts +17 -0
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/mocks/fieldValuesStandardResponseForProjects.d.ts +8 -0
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/mocks/fieldValuesStandardResponseForStatuses.d.ts +8 -0
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/mocks/fieldValuesStandardResponseForTypes.d.ts +8 -0
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/mocks/hydrateJqlEmptyResponse.d.ts +3 -0
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/mocks/hydrateJqlStandardResponse.d.ts +29 -0
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/types.d.ts +93 -0
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/ui/async-popup-select/control.d.ts +1 -1
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/ui/async-popup-select/formatOptionLabel.d.ts +1 -1
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/ui/async-popup-select/trigger.d.ts +1 -1
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/utils/transformers.d.ts +8 -0
- package/dist/types-ts4.5/ui/jira-issues-modal/jira-search-container/buildJQL.d.ts +4 -0
- package/dist/types-ts4.5/ui/jira-issues-modal/types.d.ts +4 -0
- package/examples-helpers/buildIssueLikeTable.tsx +15 -1
- package/examples-helpers/buildJiraIssuesTable.tsx +15 -1
- package/package.json +5 -5
- package/report.api.md +11 -0
- package/tmp/api-report-tmp.d.ts +11 -0
- package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/async-popup-select/types.js +0 -5
- package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/async-popup-select/types.js +0 -1
- package/dist/esm/ui/jira-issues-modal/basic-filters/ui/async-popup-select/types.js +0 -1
- package/dist/types/ui/jira-issues-modal/basic-filters/ui/async-popup-select/types.d.ts +0 -23
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/ui/async-popup-select/types.d.ts +0 -23
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
2
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
4
3
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
4
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
5
5
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
6
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
6
7
|
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; }
|
|
7
8
|
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; }
|
|
8
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
9
9
|
/** @jsx jsx */
|
|
10
10
|
import { Fragment, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
11
11
|
import { css, jsx } from '@emotion/react';
|
|
@@ -86,6 +86,7 @@ export var getColumnAction = function getColumnAction(oldVisibleColumnKeys, newV
|
|
|
86
86
|
};
|
|
87
87
|
export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
88
88
|
var datasourceId = props.datasourceId,
|
|
89
|
+
initialColumnCustomSizes = props.columnCustomSizes,
|
|
89
90
|
onCancel = props.onCancel,
|
|
90
91
|
onInsert = props.onInsert,
|
|
91
92
|
_props$viewMode = props.viewMode,
|
|
@@ -131,6 +132,13 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
131
132
|
} : undefined;
|
|
132
133
|
}, [cloudId, jql]);
|
|
133
134
|
var isParametersSet = !!(jql && cloudId);
|
|
135
|
+
var _useState13 = useState(initialColumnCustomSizes),
|
|
136
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
137
|
+
columnCustomSizes = _useState14[0],
|
|
138
|
+
setColumnCustomSizes = _useState14[1];
|
|
139
|
+
var onColumnResize = useCallback(function (key, width) {
|
|
140
|
+
setColumnCustomSizes(_objectSpread(_objectSpread({}, columnCustomSizes), {}, _defineProperty({}, key, width)));
|
|
141
|
+
}, [columnCustomSizes]);
|
|
134
142
|
var _useDatasourceTableSt = useDatasourceTableState({
|
|
135
143
|
datasourceId: datasourceId,
|
|
136
144
|
parameters: isParametersSet ? parameters : undefined,
|
|
@@ -367,7 +375,8 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
367
375
|
properties: {
|
|
368
376
|
columns: visibleColumnKeys === null || visibleColumnKeys === void 0 ? void 0 : visibleColumnKeys.map(function (key) {
|
|
369
377
|
return {
|
|
370
|
-
key: key
|
|
378
|
+
key: key,
|
|
379
|
+
width: columnCustomSizes === null || columnCustomSizes === void 0 ? void 0 : columnCustomSizes[key]
|
|
371
380
|
};
|
|
372
381
|
})
|
|
373
382
|
}
|
|
@@ -376,7 +385,7 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
376
385
|
}
|
|
377
386
|
}, consumerEvent);
|
|
378
387
|
}
|
|
379
|
-
}, [isParametersSet, jql, selectedJiraSite, analyticsPayload, totalCount, visibleColumnKeys, currentViewMode, retrieveUrlForSmartCardRender, responseItems.length, onInsert, jqlUrl, datasourceId, cloudId]);
|
|
388
|
+
}, [isParametersSet, jql, selectedJiraSite, analyticsPayload, totalCount, visibleColumnKeys, currentViewMode, retrieveUrlForSmartCardRender, responseItems.length, onInsert, jqlUrl, datasourceId, cloudId, columnCustomSizes]);
|
|
380
389
|
var handleViewModeChange = function handleViewModeChange(selectedMode) {
|
|
381
390
|
userInteractionActions.current.add(DatasourceAction.DISPLAY_VIEW_CHANGED);
|
|
382
391
|
setCurrentViewMode(selectedMode);
|
|
@@ -407,9 +416,11 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
407
416
|
onLoadDatasourceDetails: loadDatasourceDetails,
|
|
408
417
|
onVisibleColumnKeysChange: handleVisibleColumnKeysChange,
|
|
409
418
|
parentContainerRenderInstanceId: modalRenderInstanceId,
|
|
410
|
-
extensionKey: extensionKey
|
|
419
|
+
extensionKey: extensionKey,
|
|
420
|
+
columnCustomSizes: columnCustomSizes,
|
|
421
|
+
onColumnResize: onColumnResize
|
|
411
422
|
}));
|
|
412
|
-
}, [columns, defaultVisibleColumnKeys, handleOnNextPage, handleVisibleColumnKeysChange, hasNextPage, loadDatasourceDetails, modalRenderInstanceId, responseItems, status, visibleColumnKeys, extensionKey]);
|
|
423
|
+
}, [columns, defaultVisibleColumnKeys, handleOnNextPage, handleVisibleColumnKeysChange, hasNextPage, loadDatasourceDetails, modalRenderInstanceId, responseItems, status, visibleColumnKeys, extensionKey, columnCustomSizes, onColumnResize]);
|
|
413
424
|
var renderCountModeContent = useCallback(function () {
|
|
414
425
|
var selectedJiraSiteUrl = selectedJiraSite === null || selectedJiraSite === void 0 ? void 0 : selectedJiraSite.url;
|
|
415
426
|
if (status === 'unauthorized') {
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BasicFilterFieldType, FieldValuesResponse, HydrateResponse } from '../ui/jira-issues-modal/basic-filters/types';
|
|
2
|
+
export declare const useBasicFilterAGG: () => {
|
|
3
|
+
getHydratedJQL: (cloudId: string, jql: string) => Promise<HydrateResponse>;
|
|
4
|
+
getFieldValues: (cloudId: string, jql: string, jqlTerm: BasicFilterFieldType, searchString: string, pageCursor?: string) => Promise<FieldValuesResponse>;
|
|
5
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const hydrateJQLQuery = "query hydrate($cloudId: ID!, $jql: String!) {\n jira {\n jqlBuilder(cloudId: $cloudId) {\n hydrateJqlQuery(query: $jql) {\n ... on JiraJqlHydratedQuery {\n fields {\n ... on JiraJqlQueryHydratedField {\n jqlTerm\n values {\n ... on JiraJqlQueryHydratedValue {\n values {\n ... on JiraJqlProjectFieldValue {\n jqlTerm\n displayName\n project {\n avatar {\n small\n }\n }\n }\n ... on JiraJqlStatusFieldValue {\n jqlTerm\n displayName\n statusCategory {\n colorName\n }\n }\n ... on JiraJqlIssueTypeFieldValue {\n jqlTerm\n displayName\n issueTypes {\n avatar {\n small\n }\n }\n }\n ... on JiraJqlUserFieldValue {\n jqlTerm\n displayName\n user {\n picture\n }\n }\n ... on JiraJqlGroupFieldValue {\n jqlTerm\n displayName\n group {\n name\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n}";
|
|
2
|
+
export declare const fieldValuesQuery = "query fieldValues($cloudId: ID!, $first: Int = 10, $jqlTerm: String!, $jql: String!, $searchString: String!, $after: String, $projectOptions: JiraProjectOptions) {\n jira {\n jqlBuilder(cloudId: $cloudId) {\n fieldValues(\n first: $first\n jqlTerm: $jqlTerm\n jqlContext: $jql\n searchString: $searchString\n after: $after\n ) {\n totalCount\n pageInfo {\n endCursor\n }\n edges {\n node {\n jqlTerm\n displayName\n ... on JiraJqlProjectFieldValue {\n project {\n avatar {\n small\n }\n }\n }\n ... on JiraJqlIssueTypeFieldValue {\n issueTypes {\n avatar {\n small\n }\n }\n }\n ... on JiraJqlStatusFieldValue {\n statusCategory {\n colorName\n }\n }\n ... on JiraJqlUserFieldValue {\n user {\n picture\n }\n }\n ... on JiraJqlGroupFieldValue {\n group {\n name\n }\n }\n }\n }\n }\n }\n }\n}";
|
|
@@ -14,4 +14,8 @@ export interface DatasourceTableViewProps {
|
|
|
14
14
|
visibleColumnKeys?: string[];
|
|
15
15
|
/** Url for an existing datasource, initially used for displaying to a user unauthorized to query that site */
|
|
16
16
|
url?: string;
|
|
17
|
+
columnCustomSizes?: {
|
|
18
|
+
[key: string]: number;
|
|
19
|
+
};
|
|
20
|
+
onColumnResize?: (key: string, width: number) => void;
|
|
17
21
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
|
-
export declare const DraggableTableHeading: ({ children, id, index, tableId, dndPreviewHeight, dragPreview,
|
|
4
|
+
export declare const DraggableTableHeading: ({ children, id, index, tableId, dndPreviewHeight, dragPreview, width, onWidthChange, }: {
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
id: string;
|
|
7
7
|
index: number;
|
|
8
8
|
tableId: Symbol;
|
|
9
9
|
dndPreviewHeight: number;
|
|
10
10
|
dragPreview: React.ReactNode;
|
|
11
|
-
|
|
11
|
+
width: number;
|
|
12
|
+
onWidthChange?: ((width: number) => void) | undefined;
|
|
12
13
|
}) => jsx.JSX.Element;
|
|
@@ -10,9 +10,11 @@ export interface RowType {
|
|
|
10
10
|
}
|
|
11
11
|
export interface RowCellType {
|
|
12
12
|
key: string;
|
|
13
|
+
width: number;
|
|
14
|
+
shouldTruncate?: boolean;
|
|
13
15
|
content?: React.ReactNode | string;
|
|
14
|
-
maxWidth?: number;
|
|
15
16
|
}
|
|
16
|
-
export declare const
|
|
17
|
-
export declare const
|
|
17
|
+
export declare const getOrderedColumns: (columns: DatasourceResponseSchemaProperty[], visibleColumnKeys: string[]) => DatasourceResponseSchemaProperty[];
|
|
18
|
+
export declare const COLUMN_MIN_WIDTH: number;
|
|
19
|
+
export declare const IssueLikeDataTableView: ({ testId, onNextPage, onLoadDatasourceDetails, items, columns, renderItem, visibleColumnKeys, onVisibleColumnKeysChange, columnCustomSizes, onColumnResize, status, hasNextPage, scrollableContainerHeight, parentContainerRenderInstanceId, extensionKey, }: IssueLikeDataTableViewProps) => jsx.JSX.Element;
|
|
18
20
|
export declare const EmptyState: ({ isCompact, testId }: import("./empty-state").Props) => jsx.JSX.Element;
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
import { DatasourceDataResponseItem, DatasourceResponseSchemaProperty, DatasourceTableStatusType, DatasourceType } from '@atlaskit/linking-types';
|
|
3
3
|
import { NextPageType } from '../../hooks/useDatasourceTableState';
|
|
4
4
|
export type TableViewPropsRenderType = (item: DatasourceType) => React.ReactNode;
|
|
5
|
+
export interface ColumnSizesMap {
|
|
6
|
+
[key: string]: number;
|
|
7
|
+
}
|
|
5
8
|
export interface IssueLikeDataTableViewProps {
|
|
6
9
|
testId?: string;
|
|
7
10
|
/**
|
|
@@ -50,4 +53,6 @@ export interface IssueLikeDataTableViewProps {
|
|
|
50
53
|
* It this number is undefined it will not restrict height and not make container scrollable.
|
|
51
54
|
*/
|
|
52
55
|
scrollableContainerHeight?: number;
|
|
56
|
+
columnCustomSizes?: ColumnSizesMap;
|
|
57
|
+
onColumnResize?: (key: string, width: number) => void;
|
|
53
58
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FieldValuesResponse } from '../types';
|
|
2
|
+
export declare const fieldValuesResponseForAssignees: FieldValuesResponse;
|
|
3
|
+
export declare const fieldValuesResponseForAssigneesMapped: ({
|
|
4
|
+
isGroup: boolean;
|
|
5
|
+
label: string;
|
|
6
|
+
optionType: string;
|
|
7
|
+
value: string;
|
|
8
|
+
avatar?: undefined;
|
|
9
|
+
isSquare?: undefined;
|
|
10
|
+
} | {
|
|
11
|
+
avatar: string;
|
|
12
|
+
isSquare: boolean;
|
|
13
|
+
label: string;
|
|
14
|
+
optionType: string;
|
|
15
|
+
value: string;
|
|
16
|
+
isGroup?: undefined;
|
|
17
|
+
})[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FieldValuesResponse } from '../types';
|
|
2
|
+
export declare const fieldValuesResponseForStatuses: FieldValuesResponse;
|
|
3
|
+
export declare const fieldValuesResponseForStatusesMapped: {
|
|
4
|
+
appearance: string;
|
|
5
|
+
label: string;
|
|
6
|
+
optionType: string;
|
|
7
|
+
value: string;
|
|
8
|
+
}[];
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { HydrateResponse } from '../types';
|
|
2
|
+
export declare const hydrateJqlStandardResponse: HydrateResponse;
|
|
3
|
+
export declare const hydrateJqlStandardResponseMapped: {
|
|
4
|
+
issuetype: {
|
|
5
|
+
icon: string;
|
|
6
|
+
label: string;
|
|
7
|
+
optionType: string;
|
|
8
|
+
value: string;
|
|
9
|
+
}[];
|
|
10
|
+
project: {
|
|
11
|
+
icon: string;
|
|
12
|
+
label: string;
|
|
13
|
+
optionType: string;
|
|
14
|
+
value: string;
|
|
15
|
+
}[];
|
|
16
|
+
assignee: {
|
|
17
|
+
avatar: string;
|
|
18
|
+
isSquare: boolean;
|
|
19
|
+
label: string;
|
|
20
|
+
optionType: string;
|
|
21
|
+
value: string;
|
|
22
|
+
}[];
|
|
23
|
+
status: {
|
|
24
|
+
appearance: string;
|
|
25
|
+
label: string;
|
|
26
|
+
optionType: string;
|
|
27
|
+
value: string;
|
|
28
|
+
}[];
|
|
29
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
export type BasicFilterFieldType = 'project' | 'assignee' | 'issuetype' | 'status';
|
|
3
|
+
export interface OptionBase {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
}
|
|
7
|
+
export type IconLabelOption = OptionBase & {
|
|
8
|
+
optionType: 'iconLabel';
|
|
9
|
+
icon: string;
|
|
10
|
+
};
|
|
11
|
+
export type LozengeLabelOption = OptionBase & {
|
|
12
|
+
optionType: 'lozengeLabel';
|
|
13
|
+
appearance?: LozengeAppearance;
|
|
14
|
+
};
|
|
15
|
+
export type LozengeAppearance = 'default' | 'inprogress' | 'moved' | 'new' | 'removed' | 'success';
|
|
16
|
+
export type AvatarLabelOption = OptionBase & {
|
|
17
|
+
optionType: 'avatarLabel';
|
|
18
|
+
avatar?: string;
|
|
19
|
+
isSquare?: boolean;
|
|
20
|
+
isGroup?: boolean;
|
|
21
|
+
};
|
|
22
|
+
export type SelectOption = IconLabelOption | LozengeLabelOption | AvatarLabelOption;
|
|
23
|
+
export type FormatOptionLabel = (option: SelectOption) => ReactElement;
|
|
24
|
+
export declare const appearanceMap: {
|
|
25
|
+
readonly BLUE_GRAY: "default";
|
|
26
|
+
readonly MEDIUM_GRAY: "default";
|
|
27
|
+
readonly BROWN: "default";
|
|
28
|
+
readonly GREEN: "success";
|
|
29
|
+
readonly YELLOW: "inprogress";
|
|
30
|
+
readonly WARM_RED: "removed";
|
|
31
|
+
};
|
|
32
|
+
export type ColorName = keyof typeof appearanceMap;
|
|
33
|
+
export type Appearance = (typeof appearanceMap)[ColorName];
|
|
34
|
+
type JQLBuilderResponse<T> = {
|
|
35
|
+
data: {
|
|
36
|
+
jira?: {
|
|
37
|
+
jqlBuilder: T;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
errors?: Array<object>;
|
|
41
|
+
};
|
|
42
|
+
type HydrateJqlQueryBody = {
|
|
43
|
+
hydrateJqlQuery: {
|
|
44
|
+
fields: Array<{
|
|
45
|
+
jqlTerm: BasicFilterFieldType;
|
|
46
|
+
values: Array<{
|
|
47
|
+
values: Array<AggJqlBuilderFieldNode>;
|
|
48
|
+
}>;
|
|
49
|
+
}>;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
type FieldValuesBody = {
|
|
53
|
+
fieldValues: {
|
|
54
|
+
totalCount: number;
|
|
55
|
+
pageInfo: {
|
|
56
|
+
endCursor?: string;
|
|
57
|
+
};
|
|
58
|
+
edges: Array<{
|
|
59
|
+
node: AggJqlBuilderFieldNode;
|
|
60
|
+
}>;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
type JqlBuilderProject = {
|
|
64
|
+
avatar: {
|
|
65
|
+
small: string;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
type JqlBuilderUser = {
|
|
69
|
+
picture?: string;
|
|
70
|
+
};
|
|
71
|
+
type JqlBuilderGroup = {
|
|
72
|
+
name: string;
|
|
73
|
+
};
|
|
74
|
+
type JqlBuilderIssueType = {
|
|
75
|
+
avatar: {
|
|
76
|
+
small: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
type JqlBuilderStatusCategory = {
|
|
80
|
+
colorName: string;
|
|
81
|
+
};
|
|
82
|
+
export type AggJqlBuilderFieldNode = {
|
|
83
|
+
jqlTerm: string;
|
|
84
|
+
displayName: string;
|
|
85
|
+
project?: JqlBuilderProject;
|
|
86
|
+
user?: JqlBuilderUser;
|
|
87
|
+
issueTypes?: Array<JqlBuilderIssueType>;
|
|
88
|
+
statusCategory?: JqlBuilderStatusCategory;
|
|
89
|
+
group?: JqlBuilderGroup;
|
|
90
|
+
};
|
|
91
|
+
export type HydrateResponse = JQLBuilderResponse<HydrateJqlQueryBody>;
|
|
92
|
+
export type FieldValuesResponse = JQLBuilderResponse<FieldValuesBody>;
|
|
93
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ControlProps } from '@atlaskit/select';
|
|
3
|
-
import { SelectOption } from '
|
|
3
|
+
import { SelectOption } from '../../types';
|
|
4
4
|
export declare const CustomControl: ({ children, ...innerProps }: ControlProps<SelectOption, true>) => JSX.Element;
|
|
5
5
|
export default CustomControl;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { BasicFilterFieldType, SelectOption } from '
|
|
2
|
+
import { BasicFilterFieldType, SelectOption } from '../../types';
|
|
3
3
|
export interface AsyncPopupSelectProps {
|
|
4
4
|
filterType: BasicFilterFieldType;
|
|
5
5
|
selection: SelectOption[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FieldValuesResponse, HydrateResponse, SelectOption } from '../types';
|
|
2
|
+
export declare function mapHydrateResponseData({ data }: HydrateResponse): {
|
|
3
|
+
status?: SelectOption[] | undefined;
|
|
4
|
+
assignee?: SelectOption[] | undefined;
|
|
5
|
+
project?: SelectOption[] | undefined;
|
|
6
|
+
issuetype?: SelectOption[] | undefined;
|
|
7
|
+
};
|
|
8
|
+
export declare function mapFieldValuesResponseData({ data, }: FieldValuesResponse): SelectOption[];
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import { BasicFilterFieldType, SelectOption } from '../basic-filters/types';
|
|
1
2
|
type BuildJQLInput = {
|
|
2
3
|
rawSearch: string;
|
|
3
4
|
orderDirection?: string;
|
|
4
5
|
orderKey?: string;
|
|
6
|
+
filterValues?: {
|
|
7
|
+
[key in BasicFilterFieldType]?: SelectOption[];
|
|
8
|
+
};
|
|
5
9
|
};
|
|
6
10
|
export declare const buildJQL: (input: BuildJQLInput) => string;
|
|
7
11
|
export {};
|
|
@@ -26,6 +26,7 @@ export interface JiraIssuesDatasourceAdf extends DatasourceAdf {
|
|
|
26
26
|
properties?: {
|
|
27
27
|
columns: {
|
|
28
28
|
key: string;
|
|
29
|
+
width?: number;
|
|
29
30
|
}[];
|
|
30
31
|
};
|
|
31
32
|
}
|
|
@@ -38,6 +39,9 @@ export interface JiraIssuesConfigModalProps {
|
|
|
38
39
|
datasourceId: string;
|
|
39
40
|
/** The keys for each of the visible columns to the shown in the rendered table */
|
|
40
41
|
visibleColumnKeys?: string[];
|
|
42
|
+
columnCustomSizes?: {
|
|
43
|
+
[key: string]: number;
|
|
44
|
+
};
|
|
41
45
|
/** The url that was used to insert a Jira List of Links */
|
|
42
46
|
url?: string;
|
|
43
47
|
/** Parameters for making the data requests necessary to render data within the table */
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BasicFilterFieldType, FieldValuesResponse, HydrateResponse } from '../ui/jira-issues-modal/basic-filters/types';
|
|
2
|
+
export declare const useBasicFilterAGG: () => {
|
|
3
|
+
getHydratedJQL: (cloudId: string, jql: string) => Promise<HydrateResponse>;
|
|
4
|
+
getFieldValues: (cloudId: string, jql: string, jqlTerm: BasicFilterFieldType, searchString: string, pageCursor?: string) => Promise<FieldValuesResponse>;
|
|
5
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const hydrateJQLQuery = "query hydrate($cloudId: ID!, $jql: String!) {\n jira {\n jqlBuilder(cloudId: $cloudId) {\n hydrateJqlQuery(query: $jql) {\n ... on JiraJqlHydratedQuery {\n fields {\n ... on JiraJqlQueryHydratedField {\n jqlTerm\n values {\n ... on JiraJqlQueryHydratedValue {\n values {\n ... on JiraJqlProjectFieldValue {\n jqlTerm\n displayName\n project {\n avatar {\n small\n }\n }\n }\n ... on JiraJqlStatusFieldValue {\n jqlTerm\n displayName\n statusCategory {\n colorName\n }\n }\n ... on JiraJqlIssueTypeFieldValue {\n jqlTerm\n displayName\n issueTypes {\n avatar {\n small\n }\n }\n }\n ... on JiraJqlUserFieldValue {\n jqlTerm\n displayName\n user {\n picture\n }\n }\n ... on JiraJqlGroupFieldValue {\n jqlTerm\n displayName\n group {\n name\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n}";
|
|
2
|
+
export declare const fieldValuesQuery = "query fieldValues($cloudId: ID!, $first: Int = 10, $jqlTerm: String!, $jql: String!, $searchString: String!, $after: String, $projectOptions: JiraProjectOptions) {\n jira {\n jqlBuilder(cloudId: $cloudId) {\n fieldValues(\n first: $first\n jqlTerm: $jqlTerm\n jqlContext: $jql\n searchString: $searchString\n after: $after\n ) {\n totalCount\n pageInfo {\n endCursor\n }\n edges {\n node {\n jqlTerm\n displayName\n ... on JiraJqlProjectFieldValue {\n project {\n avatar {\n small\n }\n }\n }\n ... on JiraJqlIssueTypeFieldValue {\n issueTypes {\n avatar {\n small\n }\n }\n }\n ... on JiraJqlStatusFieldValue {\n statusCategory {\n colorName\n }\n }\n ... on JiraJqlUserFieldValue {\n user {\n picture\n }\n }\n ... on JiraJqlGroupFieldValue {\n group {\n name\n }\n }\n }\n }\n }\n }\n }\n}";
|
|
@@ -14,4 +14,8 @@ export interface DatasourceTableViewProps {
|
|
|
14
14
|
visibleColumnKeys?: string[];
|
|
15
15
|
/** Url for an existing datasource, initially used for displaying to a user unauthorized to query that site */
|
|
16
16
|
url?: string;
|
|
17
|
+
columnCustomSizes?: {
|
|
18
|
+
[key: string]: number;
|
|
19
|
+
};
|
|
20
|
+
onColumnResize?: (key: string, width: number) => void;
|
|
17
21
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
|
-
export declare const DraggableTableHeading: ({ children, id, index, tableId, dndPreviewHeight, dragPreview,
|
|
4
|
+
export declare const DraggableTableHeading: ({ children, id, index, tableId, dndPreviewHeight, dragPreview, width, onWidthChange, }: {
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
id: string;
|
|
7
7
|
index: number;
|
|
8
8
|
tableId: Symbol;
|
|
9
9
|
dndPreviewHeight: number;
|
|
10
10
|
dragPreview: React.ReactNode;
|
|
11
|
-
|
|
11
|
+
width: number;
|
|
12
|
+
onWidthChange?: ((width: number) => void) | undefined;
|
|
12
13
|
}) => jsx.JSX.Element;
|
|
@@ -10,9 +10,11 @@ export interface RowType {
|
|
|
10
10
|
}
|
|
11
11
|
export interface RowCellType {
|
|
12
12
|
key: string;
|
|
13
|
+
width: number;
|
|
14
|
+
shouldTruncate?: boolean;
|
|
13
15
|
content?: React.ReactNode | string;
|
|
14
|
-
maxWidth?: number;
|
|
15
16
|
}
|
|
16
|
-
export declare const
|
|
17
|
-
export declare const
|
|
17
|
+
export declare const getOrderedColumns: (columns: DatasourceResponseSchemaProperty[], visibleColumnKeys: string[]) => DatasourceResponseSchemaProperty[];
|
|
18
|
+
export declare const COLUMN_MIN_WIDTH: number;
|
|
19
|
+
export declare const IssueLikeDataTableView: ({ testId, onNextPage, onLoadDatasourceDetails, items, columns, renderItem, visibleColumnKeys, onVisibleColumnKeysChange, columnCustomSizes, onColumnResize, status, hasNextPage, scrollableContainerHeight, parentContainerRenderInstanceId, extensionKey, }: IssueLikeDataTableViewProps) => jsx.JSX.Element;
|
|
18
20
|
export declare const EmptyState: ({ isCompact, testId }: import("./empty-state").Props) => jsx.JSX.Element;
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
import { DatasourceDataResponseItem, DatasourceResponseSchemaProperty, DatasourceTableStatusType, DatasourceType } from '@atlaskit/linking-types';
|
|
3
3
|
import { NextPageType } from '../../hooks/useDatasourceTableState';
|
|
4
4
|
export type TableViewPropsRenderType = (item: DatasourceType) => React.ReactNode;
|
|
5
|
+
export interface ColumnSizesMap {
|
|
6
|
+
[key: string]: number;
|
|
7
|
+
}
|
|
5
8
|
export interface IssueLikeDataTableViewProps {
|
|
6
9
|
testId?: string;
|
|
7
10
|
/**
|
|
@@ -50,4 +53,6 @@ export interface IssueLikeDataTableViewProps {
|
|
|
50
53
|
* It this number is undefined it will not restrict height and not make container scrollable.
|
|
51
54
|
*/
|
|
52
55
|
scrollableContainerHeight?: number;
|
|
56
|
+
columnCustomSizes?: ColumnSizesMap;
|
|
57
|
+
onColumnResize?: (key: string, width: number) => void;
|
|
53
58
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FieldValuesResponse } from '../types';
|
|
2
|
+
export declare const fieldValuesResponseForAssignees: FieldValuesResponse;
|
|
3
|
+
export declare const fieldValuesResponseForAssigneesMapped: ({
|
|
4
|
+
isGroup: boolean;
|
|
5
|
+
label: string;
|
|
6
|
+
optionType: string;
|
|
7
|
+
value: string;
|
|
8
|
+
avatar?: undefined;
|
|
9
|
+
isSquare?: undefined;
|
|
10
|
+
} | {
|
|
11
|
+
avatar: string;
|
|
12
|
+
isSquare: boolean;
|
|
13
|
+
label: string;
|
|
14
|
+
optionType: string;
|
|
15
|
+
value: string;
|
|
16
|
+
isGroup?: undefined;
|
|
17
|
+
})[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FieldValuesResponse } from '../types';
|
|
2
|
+
export declare const fieldValuesResponseForStatuses: FieldValuesResponse;
|
|
3
|
+
export declare const fieldValuesResponseForStatusesMapped: {
|
|
4
|
+
appearance: string;
|
|
5
|
+
label: string;
|
|
6
|
+
optionType: string;
|
|
7
|
+
value: string;
|
|
8
|
+
}[];
|
package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/mocks/hydrateJqlStandardResponse.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { HydrateResponse } from '../types';
|
|
2
|
+
export declare const hydrateJqlStandardResponse: HydrateResponse;
|
|
3
|
+
export declare const hydrateJqlStandardResponseMapped: {
|
|
4
|
+
issuetype: {
|
|
5
|
+
icon: string;
|
|
6
|
+
label: string;
|
|
7
|
+
optionType: string;
|
|
8
|
+
value: string;
|
|
9
|
+
}[];
|
|
10
|
+
project: {
|
|
11
|
+
icon: string;
|
|
12
|
+
label: string;
|
|
13
|
+
optionType: string;
|
|
14
|
+
value: string;
|
|
15
|
+
}[];
|
|
16
|
+
assignee: {
|
|
17
|
+
avatar: string;
|
|
18
|
+
isSquare: boolean;
|
|
19
|
+
label: string;
|
|
20
|
+
optionType: string;
|
|
21
|
+
value: string;
|
|
22
|
+
}[];
|
|
23
|
+
status: {
|
|
24
|
+
appearance: string;
|
|
25
|
+
label: string;
|
|
26
|
+
optionType: string;
|
|
27
|
+
value: string;
|
|
28
|
+
}[];
|
|
29
|
+
};
|