@atlaskit/global-search
Version:
A cross-product search component (batteries included)
21 lines (19 loc) • 860 B
JavaScript
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
var buildCommonModelParameters = function buildCommonModelParameters(queryVersion) {
return [{
'@type': 'queryParams',
queryVersion: queryVersion
}];
};
export var buildJiraModelParams = function buildJiraModelParams(queryVersion, currentContainerId) {
return [].concat(_toConsumableArray(buildCommonModelParameters(queryVersion)), _toConsumableArray(currentContainerId ? [{
'@type': 'currentProject',
projectId: currentContainerId
}] : []));
};
export var buildConfluenceModelParams = function buildConfluenceModelParams(queryVersion, modelContext) {
return [].concat(_toConsumableArray(buildCommonModelParameters(queryVersion)), _toConsumableArray(modelContext.spaceKey ? [{
'@type': 'currentSpace',
spaceKey: modelContext.spaceKey
}] : []));
};