UNPKG

@atlaskit/global-search

Version:

A cross-product search component (batteries included)

19 lines (18 loc) 602 B
const buildCommonModelParameters = queryVersion => { return [{ '@type': 'queryParams', queryVersion }]; }; export const buildJiraModelParams = (queryVersion, currentContainerId) => { return [...buildCommonModelParameters(queryVersion), ...(currentContainerId ? [{ '@type': 'currentProject', projectId: currentContainerId }] : [])]; }; export const buildConfluenceModelParams = (queryVersion, modelContext) => { return [...buildCommonModelParameters(queryVersion), ...(modelContext.spaceKey ? [{ '@type': 'currentSpace', spaceKey: modelContext.spaceKey }] : [])]; };