Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:appbaseio/reactivesearch into dev
Browse files Browse the repository at this point in the history
siddharthlatest committed Dec 29, 2017

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 4c1d5ec + bfe22c4 commit 9147aba
Showing 10 changed files with 40 additions and 52 deletions.
2 changes: 1 addition & 1 deletion packages/reactivecore
Submodule reactivecore updated 1 files
+1 −1 package.json
5 changes: 3 additions & 2 deletions packages/web/package.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,8 @@
"description": "A React UI components library for building search experiences",
"main": "lib/index.js",
"files": [
"lib/"
"lib/",
"umd"
],
"scripts": {
"watch": "yarn run build -w",
@@ -21,7 +22,7 @@
"author": "metagrover",
"license": "Apache-2.0",
"dependencies": {
"@appbaseio/reactivecore": "^1.2.2",
"@appbaseio/reactivecore": "^1.2.3",
"appbase-js": "^2.2.1",
"downshift": "^1.22.1",
"emotion": "^8.0.11",
17 changes: 10 additions & 7 deletions packages/web/src/components/result/ReactiveList.js
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ import {
import types from '@appbaseio/reactivecore/lib/utils/types';

import Button, { pagination } from '../../styles/Button';
import { resultsInfo, resultStats, sortOptions } from '../../styles/results';
import ResultsInfo, { resultStats, sortOptions } from '../../styles/ResultsInfo';

class ReactiveList extends Component {
constructor(props) {
@@ -389,18 +389,21 @@ class ReactiveList extends Component {
return (
<div style={this.props.style} className={this.props.className}>
{this.props.isLoading && this.props.pagination && this.props.loader && this.props.loader}
<div className={`${resultsInfo} ${getClassName(this.props.innerClass, 'resultsInfo')}`}>
<ResultsInfo
reverse={!!this.props.sortOptions}
className={getClassName(this.props.innerClass, 'resultsInfo')}
>
{
this.props.showResultStats
? this.renderResultStats()
this.props.sortOptions
? this.renderSortOptions()
: null
}
{
this.props.sortOptions
? this.renderSortOptions()
this.props.showResultStats
? this.renderResultStats()
: null
}
</div>
</ResultsInfo>
{
this.props.pagination && this.props.paginationAt !== 'bottom'
? this.renderPagination()
17 changes: 10 additions & 7 deletions packages/web/src/components/result/ResultCard.js
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ import types from '@appbaseio/reactivecore/lib/utils/types';
import Title from '../../styles/Title';
import Button, { pagination } from '../../styles/Button';
import Card, { container, Image } from '../../styles/Card';
import { resultsInfo, resultStats, sortOptions } from '../../styles/results';
import ResultsInfo, { resultStats, sortOptions } from '../../styles/ResultsInfo';

class ResultCard extends Component {
constructor(props) {
@@ -412,18 +412,21 @@ class ResultCard extends Component {
return (
<div style={this.props.style} className={this.props.className}>
{this.props.isLoading && this.props.pagination && this.props.loader && this.props.loader}
<div className={`${resultsInfo} ${getClassName(this.props.innerClass, 'resultsInfo')}`}>
<ResultsInfo
reverse={!!this.props.sortOptions}
className={getClassName(this.props.innerClass, 'resultsInfo')}
>
{
this.props.showResultStats
? this.renderResultStats()
this.props.sortOptions
? this.renderSortOptions()
: null
}
{
this.props.sortOptions
? this.renderSortOptions()
this.props.showResultStats
? this.renderResultStats()
: null
}
</div>
</ResultsInfo>
{
this.props.pagination && this.props.paginationAt !== 'bottom'
? this.renderPagination()
17 changes: 10 additions & 7 deletions packages/web/src/components/result/ResultList.js
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ import types from '@appbaseio/reactivecore/lib/utils/types';
import Title from '../../styles/Title';
import Button, { pagination } from '../../styles/Button';
import ListItem, { container, Image } from '../../styles/ListItem';
import { resultsInfo, resultStats, sortOptions } from '../../styles/results';
import ResultsInfo, { resultStats, sortOptions } from '../../styles/ResultsInfo';

class ResultList extends Component {
constructor(props) {
@@ -423,18 +423,21 @@ class ResultList extends Component {
return (
<div style={this.props.style} className={this.props.className}>
{this.props.isLoading && this.props.pagination && this.props.loader && this.props.loader}
<div className={`${resultsInfo} ${getClassName(this.props.innerClass, 'resultsInfo')}`}>
<ResultsInfo
reverse={!!this.props.sortOptions}
className={getClassName(this.props.innerClass, 'resultsInfo')}
>
{
this.props.showResultStats
? this.renderResultStats()
this.props.sortOptions
? this.renderSortOptions()
: null
}
{
this.props.sortOptions
? this.renderSortOptions()
this.props.showResultStats
? this.renderResultStats()
: null
}
</div>
</ResultsInfo>
{
this.props.pagination && this.props.paginationAt !== 'bottom'
? this.renderPagination()
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
import styled from 'react-emotion';
import { css } from 'emotion';

const resultsInfo = css`
const ResultsInfo = styled('div')`
display: flex;
flex-direction: row;
flex-direction: ${props => (props.reverse ? 'row-reverse' : 'row')};
justify-content: space-between;
align-items: center;
position: relative;
`;

const resultStats = css`
flex-grow: 1;
`;

const sortOptions = css`
position: absolute;
color: #424242;
right: 0;
height: 30px;
padding: 0 25px 0 10px;
background: url(data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0Ljk1IDEwIj48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6I2ZmZjt9LmNscy0ye2ZpbGw6IzQ0NDt9PC9zdHlsZT48L2RlZnM+PHRpdGxlPmFycm93czwvdGl0bGU+PHJlY3QgY2xhc3M9ImNscy0xIiB3aWR0aD0iNC45NSIgaGVpZ2h0PSIxMCIvPjxwb2x5Z29uIGNsYXNzPSJjbHMtMiIgcG9pbnRzPSIxLjQxIDQuNjcgMi40OCAzLjE4IDMuNTQgNC42NyAxLjQxIDQuNjciLz48cG9seWdvbiBjbGFzcz0iY2xzLTIiIHBvaW50cz0iMy41NCA1LjMzIDIuNDggNi44MiAxLjQxIDUuMzMgMy41NCA1LjMzIi8+PC9zdmc+) no-repeat 95% 50%;
@@ -30,4 +28,5 @@ const sortOptions = css`
outline-offset: -1px;
`;

export { resultsInfo, resultStats, sortOptions };
export default ResultsInfo;
export { resultStats, sortOptions };
2 changes: 1 addition & 1 deletion packages/web/umd/reactivesearch.js

Large diffs are not rendered by default.

Binary file modified packages/web/umd/reactivesearch.js.br
Binary file not shown.
Binary file modified packages/web/umd/reactivesearch.js.gzip
Binary file not shown.
21 changes: 0 additions & 21 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -49,19 +49,6 @@
react-inspector "^2.2.2"
uuid "^3.1.0"

"@storybook/addon-info@^3.1.6":
version "3.2.19"
resolved "https://registry.yarnpkg.com/@storybook/addon-info/-/addon-info-3.2.19.tgz#dfc0165ec49666c5d533f4019b3b24ad02600daf"
dependencies:
"@storybook/addons" "^3.2.19"
"@storybook/components" "^3.2.19"
babel-runtime "^6.26.0"
global "^4.3.2"
marksy "^2.0.0"
prop-types "^15.6.0"
react-addons-create-fragment "^15.5.3"
util-deprecate "^1.0.2"

"@storybook/addon-info@^3.3.2":
version "3.3.2"
resolved "https://registry.yarnpkg.com/@storybook/addon-info/-/addon-info-3.3.2.tgz#f38d2b4b94e0ae1ce0e1fe127c8f80ee27a72acd"
@@ -4684,14 +4671,6 @@ marked@^0.3.6:
version "0.3.9"
resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.9.tgz#54ce6a57e720c3ac6098374ec625fcbcc97ff290"

marksy@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/marksy/-/marksy-2.0.1.tgz#019eb9c13ff37120ce4dddeb7774aba152b5d7e0"
dependencies:
babel-standalone "^6.24.0"
he "^1.1.1"
marked "^0.3.6"

marksy@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/marksy/-/marksy-6.0.1.tgz#ea05f170a5f8a3f935b2ef51a9b7847c947b7402"

0 comments on commit 9147aba

Please sign in to comment.