This Widget provides an easy-to-use fullscreen UI for a search interface.
SearchWidget.create({
apiUrl: 'http://jjuhznbemfbsm7ibz-mock.stoplight-proxy.io/search' // required
preload: true, // whether to fetch data on create or not (optional)
triggerRoute: '#/finder', // used to open the widget (optional)
triggerKey: 'F', // hit SHIFT+F to open the widget (optional)
localStorageKey: 'search-widget-react-redux', // used to identify data in localstorage (optional)
});The embedding page needs to provide the following libraries:
Ensure you have installed (globally) the following software on your system:
# install dependencies
$ yarn install
# start the development server
$ yarn start
# run the tests
$ yarn test
# run the tests in watch mode
$ yarn test:watch
# run the linters (js+css)
$ yarn lintIn order to fetch data, the apiUrl endpoint is required to be json:api spec compliant. The dummy apiUrl is specified here: https://search-widget-react-redux.api-docs.io.
Passing the query parameter is also implemented according to jsonapi:spec filtering recommandation.
Babelfor transpiling JavaScriptwebpackfor module bundlingReactfor building user interfacesReduxfor state managementRedux-Sagafor managing side effectsJestfor testingtestdoublefor mocking/stubbing/spyingeslintfor linting JavaScript
PostCSSfor transforming CSScssnextfor using tomorrow's CSS syntax todaySUITCSSfor compoent-based UIdevelopmentAtomic Designfor creating and maintaining robust UI systemsstylelintfor linting CSS
stoplightfor defining the mock apijson:apifor shared conventions on implementing JSON API'ssurgefor publishing static web front-endscirclecifor continuous integrationcodeclimatefor healthy codepre-pushfor running git-hooks, like linting and testing
Copyright © Rudolf Schmidt, released under the MIT license
