├── .babelrc ├── .gitignore ├── README.md ├── dist ├── main.css └── react-filteredlist.js ├── doc_images ├── filteredlist_display.png └── filteredlist_text.png ├── example.filteredlistconfig.zip ├── example ├── readme.md └── src │ ├── .gitignore │ ├── demo-hosting-info.txt │ ├── example.js │ ├── example.scss │ ├── exampleConfigSimple.js │ ├── index.html │ ├── market │ ├── .gitignore │ ├── .npmignore │ ├── _utils │ │ └── index.js │ ├── components │ │ ├── CustomViewIconTemplate.zip │ │ ├── DisplayItem │ │ │ ├── actions.js │ │ │ ├── constants.js │ │ │ ├── index.js │ │ │ ├── messages.js │ │ │ ├── readme.md │ │ │ ├── reducer.js │ │ │ ├── sagas.js │ │ │ ├── styles.scss │ │ │ └── tests │ │ │ │ └── index.test.js │ │ ├── ExportIcon │ │ │ ├── index.js │ │ │ ├── readme.md │ │ │ └── styles.scss │ │ └── imports.scss │ ├── config.example.js │ ├── dataList.js │ ├── filterGroups │ │ ├── catalog-contracts.js │ │ ├── version-dates.js │ │ ├── version-metadata.js │ │ └── version-networks.js │ ├── filters │ │ ├── artwork.js │ │ ├── autocomplete.js │ │ ├── dateCreatedRange.js │ │ ├── dateEditedRange.js │ │ ├── genres.js │ │ ├── language.js │ │ ├── networks.js │ │ ├── search.js │ │ ├── state.js │ │ ├── still.js │ │ └── video.js │ ├── graphql │ │ ├── catalog.js │ │ └── index.js │ ├── hooks │ │ ├── beforeXHR.js │ │ ├── index.js │ │ ├── onCheck.js │ │ ├── onInit.js │ │ ├── onStateUpdate.js │ │ ├── onUnCheck.js │ │ ├── onXHRFail.js │ │ └── onXHRSuccess.js │ ├── index.js │ ├── maps │ │ ├── catalog.js │ │ ├── entityProp.js │ │ └── index.js │ ├── readme.md │ └── views │ │ ├── buyer.js │ │ └── index.js │ ├── xcomponent-bootstrap.js │ └── xcomponent.js ├── package-lock.json ├── package.json ├── src ├── App.js ├── components │ ├── AutoCompleteSelect │ │ ├── index.js │ │ └── theme.js │ ├── Checkbox │ │ ├── index.js │ │ ├── messages.js │ │ ├── styles.scss │ │ └── tests │ │ │ └── index.test.js │ ├── ColumnSelector │ │ ├── actions.js │ │ ├── constants.js │ │ ├── index.js │ │ ├── messages.js │ │ ├── reducer.js │ │ ├── sagas.js │ │ ├── styles.scss │ │ └── tests │ │ │ └── index.test.js │ ├── CustomItem │ │ ├── actions.js │ │ ├── constants.js │ │ ├── index.js │ │ ├── messages.js │ │ ├── readme.md │ │ ├── reducer.js │ │ ├── sagas.js │ │ ├── styles.scss │ │ └── tests │ │ │ └── index.test.js │ ├── DatePicker │ │ ├── index.js │ │ └── styles.scss │ ├── Dimensions │ │ ├── index.js │ │ ├── styles.css │ │ └── styles.scss │ ├── DisplayItem │ │ ├── _flags.scss │ │ ├── actions.js │ │ ├── constants.js │ │ ├── index.js │ │ ├── messages.js │ │ ├── readme.md │ │ ├── reducer.js │ │ ├── sagas.js │ │ ├── styles.scss │ │ └── tests │ │ │ └── index.test.js │ ├── Exports │ │ ├── actions.js │ │ ├── constants.js │ │ ├── index.js │ │ └── styles.scss │ ├── FilterGroup │ │ ├── actions.js │ │ ├── constants.js │ │ ├── index.js │ │ ├── messages.js │ │ ├── reducer.js │ │ ├── sagas.js │ │ ├── styles.scss │ │ └── tests │ │ │ └── index.test.js │ ├── FilterItem │ │ ├── actions.js │ │ ├── constants.js │ │ ├── index.js │ │ ├── messages.js │ │ ├── reducer.js │ │ ├── sagas.js │ │ ├── styles.scss │ │ └── tests │ │ │ └── index.test.js │ ├── ListFooter │ │ ├── actions.js │ │ ├── constants.js │ │ ├── index.js │ │ ├── messages.js │ │ ├── reducer.js │ │ ├── sagas.js │ │ ├── styles.scss │ │ └── tests │ │ │ └── index.test.js │ ├── ListHeader │ │ ├── actions.js │ │ ├── constants.js │ │ ├── index.js │ │ ├── messages.js │ │ ├── reducer.js │ │ ├── sagas.js │ │ ├── styles.scss │ │ └── tests │ │ │ └── index.test.js │ ├── ListRow │ │ ├── actions.js │ │ ├── constants.js │ │ ├── index.js │ │ ├── messages.js │ │ ├── reducer.js │ │ ├── sagas.js │ │ ├── styles.scss │ │ └── tests │ │ │ └── index.test.js │ ├── Modal │ │ ├── actions.js │ │ ├── constants.js │ │ ├── index.js │ │ └── styles.scss │ ├── Pagination │ │ ├── actions.js │ │ ├── constants.js │ │ ├── index.js │ │ ├── messages.js │ │ ├── reducer.js │ │ ├── sagas.js │ │ ├── styles.scss │ │ └── tests │ │ │ └── index.test.js │ ├── PropertySearch │ │ ├── index.js │ │ ├── styles.scss │ │ └── theme.js │ ├── SaveFilterset │ │ ├── actions.js │ │ ├── constants.js │ │ ├── index.js │ │ ├── messages.js │ │ ├── reducer.js │ │ ├── sagas.js │ │ ├── styles.scss │ │ └── tests │ │ │ └── index.test.js │ ├── Search │ │ ├── actions.js │ │ ├── constants.js │ │ ├── index.js │ │ ├── messages.js │ │ ├── reducer.js │ │ ├── sagas.js │ │ ├── styles.scss │ │ └── tests │ │ │ └── index.test.js │ ├── SortItem │ │ ├── index.js │ │ ├── messages.js │ │ ├── styles.scss │ │ └── tests │ │ │ └── index.test.js │ ├── TextItem │ │ ├── actions.js │ │ ├── constants.js │ │ ├── index.js │ │ ├── messages.js │ │ ├── reducer.js │ │ ├── sagas.js │ │ ├── styles.scss │ │ └── tests │ │ │ └── index.test.js │ ├── View │ │ ├── actions.js │ │ ├── constants.js │ │ ├── index.js │ │ ├── messages.js │ │ ├── reducer.js │ │ ├── sagas.js │ │ └── styles.scss │ ├── ViewInfo │ │ ├── actions.js │ │ ├── constants.js │ │ ├── index.js │ │ ├── messages.js │ │ ├── reducer.js │ │ ├── sagas.js │ │ ├── styles.scss │ │ └── tests │ │ │ └── index.test.js │ └── imports.scss ├── containers │ ├── App │ │ ├── actions.js │ │ ├── constants.js │ │ ├── index.js │ │ ├── messages.js │ │ ├── reducer.js │ │ ├── sagas.js │ │ ├── styles.scss │ │ └── tests │ │ │ └── index.test.js │ ├── DataList │ │ ├── actions.js │ │ ├── constants.js │ │ ├── index.js │ │ ├── messages.js │ │ ├── reducer.js │ │ ├── sagas.js │ │ ├── styles.scss │ │ └── tests │ │ │ └── index.test.js │ ├── Filters │ │ ├── actions.js │ │ ├── constants.js │ │ ├── index.js │ │ ├── messages.js │ │ ├── reducer.js │ │ ├── sagas.js │ │ ├── styles.scss │ │ └── tests │ │ │ └── index.test.js │ ├── Footer │ │ ├── actions.js │ │ ├── constants.js │ │ ├── index.js │ │ ├── messages.js │ │ ├── reducer.js │ │ ├── sagas.js │ │ ├── styles.scss │ │ └── tests │ │ │ └── index.test.js │ ├── Header │ │ ├── actions.js │ │ ├── constants.js │ │ ├── index.js │ │ ├── messages.js │ │ ├── reducer.js │ │ ├── sagas.js │ │ ├── styles.scss │ │ └── tests │ │ │ └── index.test.js │ ├── LanguageProvider │ │ ├── actions.js │ │ ├── constants.js │ │ ├── index.js │ │ ├── reducer.js │ │ └── tests │ │ │ ├── actions.test.js │ │ │ ├── index.test.js │ │ │ ├── reducer.test.js │ │ │ └── selectors.test.js │ └── imports.scss ├── dataListConfig.example.zip ├── favicon.ico ├── global-styles.js ├── i18n.js ├── index.js ├── reducers.js ├── store.js ├── style │ ├── base │ │ ├── _base-rules.scss │ │ ├── _color.scss │ │ ├── _imports.scss │ │ ├── _reset.scss │ │ └── _typebase.scss │ ├── components │ │ ├── _autocomplete.scss │ │ ├── _buttons.scss │ │ ├── _checkbox.scss │ │ ├── _datatable.scss │ │ ├── _imports.scss │ │ ├── _material.scss │ │ ├── _select.scss │ │ └── customDisplayItem │ │ │ ├── _flags.scss │ │ │ ├── _imports.scss │ │ │ └── styles.scss │ ├── layout │ │ ├── _grid.scss │ │ ├── _imports.scss │ │ └── _media-queries.scss │ ├── main.scss │ ├── pages │ │ ├── _all.scss │ │ └── _imports.scss │ ├── utils │ │ ├── _animations.scss │ │ ├── _clearfix.scss │ │ ├── _gradients.scss │ │ ├── _imports.scss │ │ ├── _placeholders.scss │ │ └── _util.scss │ ├── vendor │ │ ├── _flexbox.scss │ │ ├── _hint.scss │ │ ├── _imports.scss │ │ ├── _noty.scss │ │ ├── _react-datepicker.scss │ │ ├── _react-select.scss │ │ ├── _react-super-select.scss │ │ ├── animate-css │ │ │ └── _animate.scss │ │ ├── bootstrap │ │ │ ├── _bootstrap.scss │ │ │ └── bootstrap │ │ │ │ ├── _alerts.scss │ │ │ │ ├── _badges.scss │ │ │ │ ├── _breadcrumbs.scss │ │ │ │ ├── _button-groups.scss │ │ │ │ ├── _buttons.scss │ │ │ │ ├── _carousel.scss │ │ │ │ ├── _close.scss │ │ │ │ ├── _code.scss │ │ │ │ ├── _component-animations.scss │ │ │ │ ├── _dropdowns.scss │ │ │ │ ├── _forms.scss │ │ │ │ ├── _glyphicons.scss │ │ │ │ ├── _grid.scss │ │ │ │ ├── _input-groups.scss │ │ │ │ ├── _jumbotron.scss │ │ │ │ ├── _labels.scss │ │ │ │ ├── _list-group.scss │ │ │ │ ├── _media.scss │ │ │ │ ├── _mixins.scss │ │ │ │ ├── _modals.scss │ │ │ │ ├── _navbar.scss │ │ │ │ ├── _navs.scss │ │ │ │ ├── _normalize.scss │ │ │ │ ├── _pager.scss │ │ │ │ ├── _pagination.scss │ │ │ │ ├── _panels.scss │ │ │ │ ├── _popovers.scss │ │ │ │ ├── _print.scss │ │ │ │ ├── _progress-bars.scss │ │ │ │ ├── _responsive-embed.scss │ │ │ │ ├── _responsive-utilities.scss │ │ │ │ ├── _scaffolding.scss │ │ │ │ ├── _tables.scss │ │ │ │ ├── _theme.scss │ │ │ │ ├── _thumbnails.scss │ │ │ │ ├── _tooltip.scss │ │ │ │ ├── _type.scss │ │ │ │ ├── _utilities.scss │ │ │ │ ├── _variables.scss │ │ │ │ ├── _wells.scss │ │ │ │ └── mixins │ │ │ │ ├── _alerts.scss │ │ │ │ ├── _background-variant.scss │ │ │ │ ├── _border-radius.scss │ │ │ │ ├── _buttons.scss │ │ │ │ ├── _center-block.scss │ │ │ │ ├── _clearfix.scss │ │ │ │ ├── _forms.scss │ │ │ │ ├── _gradients.scss │ │ │ │ ├── _grid-framework.scss │ │ │ │ ├── _grid.scss │ │ │ │ ├── _hide-text.scss │ │ │ │ ├── _image.scss │ │ │ │ ├── _labels.scss │ │ │ │ ├── _list-group.scss │ │ │ │ ├── _nav-divider.scss │ │ │ │ ├── _nav-vertical-align.scss │ │ │ │ ├── _opacity.scss │ │ │ │ ├── _pagination.scss │ │ │ │ ├── _panels.scss │ │ │ │ ├── _progress-bar.scss │ │ │ │ ├── _reset-filter.scss │ │ │ │ ├── _reset-text.scss │ │ │ │ ├── _resize.scss │ │ │ │ ├── _responsive-visibility.scss │ │ │ │ ├── _size.scss │ │ │ │ ├── _tab-focus.scss │ │ │ │ ├── _table-row.scss │ │ │ │ ├── _text-emphasis.scss │ │ │ │ ├── _text-overflow.scss │ │ │ │ └── _vendor-prefixes.scss │ │ ├── flatpickr.scss │ │ ├── font-awesome │ │ │ ├── _animated.scss │ │ │ ├── _bordered-pulled.scss │ │ │ ├── _core.scss │ │ │ ├── _fixed-width.scss │ │ │ ├── _font-awesome.scss │ │ │ ├── _icons.scss │ │ │ ├── _larger.scss │ │ │ ├── _list.scss │ │ │ ├── _mixins.scss │ │ │ ├── _path.scss │ │ │ ├── _rotated-flipped.scss │ │ │ ├── _screen-reader.scss │ │ │ ├── _shims.scss │ │ │ ├── _spinning.scss │ │ │ ├── _stacked.scss │ │ │ ├── _variables.scss │ │ │ ├── brands.scss │ │ │ ├── fontawesome.scss │ │ │ ├── regular.scss │ │ │ ├── solid.scss │ │ │ └── v4-shims.scss │ │ ├── fonts │ │ │ ├── fa-brands-400.eot │ │ │ ├── fa-brands-400.svg │ │ │ ├── fa-brands-400.ttf │ │ │ ├── fa-brands-400.woff │ │ │ ├── fa-brands-400.woff2 │ │ │ ├── fa-regular-400.eot │ │ │ ├── fa-regular-400.svg │ │ │ ├── fa-regular-400.ttf │ │ │ ├── fa-regular-400.woff │ │ │ ├── fa-regular-400.woff2 │ │ │ ├── fa-solid-900.eot │ │ │ ├── fa-solid-900.svg │ │ │ ├── fa-solid-900.ttf │ │ │ ├── fa-solid-900.woff │ │ │ └── fa-solid-900.woff2 │ │ ├── hover-css │ │ │ ├── _hacks.scss │ │ │ ├── _hover.scss │ │ │ ├── _mixins.scss │ │ │ ├── _options.scss │ │ │ └── effects │ │ │ │ ├── 2d-transitions │ │ │ │ ├── _bob.scss │ │ │ │ ├── _bounce-in.scss │ │ │ │ ├── _bounce-out.scss │ │ │ │ ├── _buzz-out.scss │ │ │ │ ├── _buzz.scss │ │ │ │ ├── _float.scss │ │ │ │ ├── _grow-rotate.scss │ │ │ │ ├── _grow.scss │ │ │ │ ├── _hang.scss │ │ │ │ ├── _pop.scss │ │ │ │ ├── _pulse-grow.scss │ │ │ │ ├── _pulse-shrink.scss │ │ │ │ ├── _pulse.scss │ │ │ │ ├── _push.scss │ │ │ │ ├── _rotate.scss │ │ │ │ ├── _shrink.scss │ │ │ │ ├── _sink.scss │ │ │ │ ├── _skew-backward.scss │ │ │ │ ├── _skew-forward.scss │ │ │ │ ├── _skew.scss │ │ │ │ ├── _wobble-bottom.scss │ │ │ │ ├── _wobble-horizontal.scss │ │ │ │ ├── _wobble-skew.scss │ │ │ │ ├── _wobble-to-bottom-right.scss │ │ │ │ ├── _wobble-to-top-right.scss │ │ │ │ ├── _wobble-top.scss │ │ │ │ └── _wobble-vertical.scss │ │ │ │ ├── background-transitions │ │ │ │ ├── _back-pulse.scss │ │ │ │ ├── _bounce-to-bottom.scss │ │ │ │ ├── _bounce-to-left.scss │ │ │ │ ├── _bounce-to-right.scss │ │ │ │ ├── _bounce-to-top.scss │ │ │ │ ├── _fade.scss │ │ │ │ ├── _radial-in.scss │ │ │ │ ├── _radial-out.scss │ │ │ │ ├── _rectangle-in.scss │ │ │ │ ├── _rectangle-out.scss │ │ │ │ ├── _shutter-in-horizontal.scss │ │ │ │ ├── _shutter-in-vertical.scss │ │ │ │ ├── _shutter-out-horizontal.scss │ │ │ │ ├── _shutter-out-vertical.scss │ │ │ │ ├── _sweep-to-bottom.scss │ │ │ │ ├── _sweep-to-left.scss │ │ │ │ ├── _sweep-to-right.scss │ │ │ │ └── _sweep-to-top.scss │ │ │ │ ├── border-transitions │ │ │ │ ├── _border-fade.scss │ │ │ │ ├── _hollow.scss │ │ │ │ ├── _outline-in.scss │ │ │ │ ├── _outline-out.scss │ │ │ │ ├── _overline-from-center.scss │ │ │ │ ├── _overline-from-left.scss │ │ │ │ ├── _overline-from-right.scss │ │ │ │ ├── _overline-reveal.scss │ │ │ │ ├── _reveal.scss │ │ │ │ ├── _ripple-in.scss │ │ │ │ ├── _ripple-out.scss │ │ │ │ ├── _round-corners.scss │ │ │ │ ├── _trim.scss │ │ │ │ ├── _underline-from-center.scss │ │ │ │ ├── _underline-from-left.scss │ │ │ │ ├── _underline-from-right.scss │ │ │ │ └── _underline-reveal.scss │ │ │ │ ├── curls │ │ │ │ ├── _curl-bottom-left.scss │ │ │ │ ├── _curl-bottom-right.scss │ │ │ │ ├── _curl-top-left.scss │ │ │ │ └── _curl-top-right.scss │ │ │ │ ├── icons │ │ │ │ ├── _icon-back.scss │ │ │ │ ├── _icon-bob.scss │ │ │ │ ├── _icon-bounce-out.scss │ │ │ │ ├── _icon-bounce.scss │ │ │ │ ├── _icon-buzz-out.scss │ │ │ │ ├── _icon-buzz.scss │ │ │ │ ├── _icon-down.scss │ │ │ │ ├── _icon-drop.scss │ │ │ │ ├── _icon-fade.scss │ │ │ │ ├── _icon-float-away.scss │ │ │ │ ├── _icon-float.scss │ │ │ │ ├── _icon-forward.scss │ │ │ │ ├── _icon-grow-rotate.scss │ │ │ │ ├── _icon-grow.scss │ │ │ │ ├── _icon-hang.scss │ │ │ │ ├── _icon-pop.scss │ │ │ │ ├── _icon-pulse-grow.scss │ │ │ │ ├── _icon-pulse-shrink.scss │ │ │ │ ├── _icon-pulse.scss │ │ │ │ ├── _icon-push.scss │ │ │ │ ├── _icon-rotate.scss │ │ │ │ ├── _icon-shrink.scss │ │ │ │ ├── _icon-sink-away.scss │ │ │ │ ├── _icon-sink.scss │ │ │ │ ├── _icon-spin.scss │ │ │ │ ├── _icon-up.scss │ │ │ │ ├── _icon-wobble-horizontal.scss │ │ │ │ └── _icon-wobble-vertical.scss │ │ │ │ ├── shadow-and-glow-transitions │ │ │ │ ├── _box-shadow-inset.scss │ │ │ │ ├── _box-shadow-outset.scss │ │ │ │ ├── _float-shadow.scss │ │ │ │ ├── _glow.scss │ │ │ │ ├── _grow-shadow.scss │ │ │ │ ├── _shadow-radial.scss │ │ │ │ └── _shadow.scss │ │ │ │ └── speech-bubbles │ │ │ │ ├── _bubble-bottom.scss │ │ │ │ ├── _bubble-float-bottom.scss │ │ │ │ ├── _bubble-float-left.scss │ │ │ │ ├── _bubble-float-right.scss │ │ │ │ ├── _bubble-float-top.scss │ │ │ │ ├── _bubble-left.scss │ │ │ │ ├── _bubble-right.scss │ │ │ │ └── _bubble-top.scss │ │ ├── owl-carousel │ │ │ ├── _owlcarousel.scss │ │ │ └── _owlthemedefault.scss │ │ └── typeplate-sk │ │ │ ├── _typeplate-extends.scss │ │ │ ├── _typeplate-fonts.scss │ │ │ ├── _typeplate-functions.scss │ │ │ ├── _typeplate-helpers.scss │ │ │ ├── _typeplate-mixins.scss │ │ │ ├── _typeplate-styles.scss │ │ │ ├── _typeplate-vars.scss │ │ │ └── _typeplate.scss │ └── webfonts │ │ ├── fa-brands-400.eot │ │ ├── fa-brands-400.svg │ │ ├── fa-brands-400.ttf │ │ ├── fa-brands-400.woff │ │ ├── fa-brands-400.woff2 │ │ ├── fa-regular-400.eot │ │ ├── fa-regular-400.svg │ │ ├── fa-regular-400.ttf │ │ ├── fa-regular-400.woff │ │ ├── fa-regular-400.woff2 │ │ ├── fa-solid-900.eot │ │ ├── fa-solid-900.svg │ │ ├── fa-solid-900.ttf │ │ ├── fa-solid-900.woff │ │ └── fa-solid-900.woff2 ├── tests │ ├── i18n.test.js │ └── store.test.js ├── translations │ └── en.json └── utils │ ├── collections.js │ ├── dummy.js │ ├── filters.js │ ├── helpers.js │ ├── index.js │ └── queries.js └── webpack.config.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["env","react"], 3 | "plugins": ["transform-object-rest-spread"] 4 | } -------------------------------------------------------------------------------- /doc_images/filteredlist_display.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OlympusatDevelopment/react-filteredlist/d1353092bc3c8739687d7a47ab6dccd24a0c78a6/doc_images/filteredlist_display.png -------------------------------------------------------------------------------- /doc_images/filteredlist_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OlympusatDevelopment/react-filteredlist/d1353092bc3c8739687d7a47ab6dccd24a0c78a6/doc_images/filteredlist_text.png -------------------------------------------------------------------------------- /example.filteredlistconfig.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OlympusatDevelopment/react-filteredlist/d1353092bc3c8739687d7a47ab6dccd24a0c78a6/example.filteredlistconfig.zip -------------------------------------------------------------------------------- /example/readme.md: -------------------------------------------------------------------------------- 1 | To run the example locally, cd to the root directory of the project, then npm run watch. 2 | Open another terminal tab and run npm run examples. -------------------------------------------------------------------------------- /example/src/.gitignore: -------------------------------------------------------------------------------- 1 | ## This file is here to ensure it is included in the gh-pages branch, 2 | ## when `gulp deploy` is used to push updates to the demo site. 3 | 4 | # Dependency directory 5 | node_modules 6 | dataListConfig/config.js 7 | config.js 8 | -------------------------------------------------------------------------------- /example/src/demo-hosting-info.txt: -------------------------------------------------------------------------------- 1 | http://react.filteredlist.demo.s3-website-us-east-1.amazonaws.com -------------------------------------------------------------------------------- /example/src/example.js: -------------------------------------------------------------------------------- 1 | var React = require('react'); 2 | var ReactDOM = require('react-dom'); 3 | var FilteredList = require('react-filteredlist').default; 4 | 5 | // import config from './market'; 6 | import config from './exampleConfigSimple.js'; 7 | 8 | class App extends React.Component{ 9 | render () { 10 | console.log(FilteredList); 11 | return ( 12 |
13 | 14 |
15 | ); 16 | } 17 | } 18 | 19 | ReactDOM.render(, document.getElementById('app')); 20 | -------------------------------------------------------------------------------- /example/src/example.scss: -------------------------------------------------------------------------------- 1 | @import '../../lib/main.css'; -------------------------------------------------------------------------------- /example/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | FilteredList 4 | 5 | 6 | 7 |
8 |
9 |
10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /example/src/market/.gitignore: -------------------------------------------------------------------------------- 1 | config.js -------------------------------------------------------------------------------- /example/src/market/.npmignore: -------------------------------------------------------------------------------- 1 | config.js -------------------------------------------------------------------------------- /example/src/market/components/CustomViewIconTemplate.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OlympusatDevelopment/react-filteredlist/d1353092bc3c8739687d7a47ab6dccd24a0c78a6/example/src/market/components/CustomViewIconTemplate.zip -------------------------------------------------------------------------------- /example/src/market/components/DisplayItem/actions.js: -------------------------------------------------------------------------------- 1 | import {UPDATE_WORKSPACE} from './constants'; 2 | 3 | export function updateWorkspace(data) { 4 | return { 5 | type: UPDATE_WORKSPACE, 6 | data 7 | }; 8 | } -------------------------------------------------------------------------------- /example/src/market/components/DisplayItem/constants.js: -------------------------------------------------------------------------------- 1 | export const UPDATE_WORKSPACE = 'dl/UPDATE_WORKSPACE'; -------------------------------------------------------------------------------- /example/src/market/components/DisplayItem/readme.md: -------------------------------------------------------------------------------- 1 | Deps: 2 | https://www.flag-sprites.com/ 3 | 4 | -------------------------------------------------------------------------------- /example/src/market/components/DisplayItem/reducer.js: -------------------------------------------------------------------------------- 1 | import { } from './constants'; 2 | 3 | //@todo find a better place to inject this 4 | import config from '../../../dataListConfig'; 5 | 6 | const initialState = { 7 | config 8 | }; 9 | 10 | function displayItemReducer(state = initialState, action) { 11 | let _state = Object.assign({},state), 12 | _data = action.data; 13 | 14 | switch (action.type) { 15 | 16 | default: 17 | return _state; 18 | } 19 | } 20 | 21 | export default displayItemReducer; 22 | -------------------------------------------------------------------------------- /example/src/market/components/DisplayItem/sagas.js: -------------------------------------------------------------------------------- 1 | import * as effects from 'redux-saga/effects'; 2 | import {} from './constants'; 3 | import utils,{l,sagaRequest,sagaRequestSetup} from '../../utils'; 4 | 5 | /** 6 | * displayItem request/response handler 7 | */ 8 | export function* fetchDisplayItem(args) { 9 | yield* sagaRequest( 10 | displayItemsModel.getById, 11 | {entityUUID: args.data.entityUUID}, 12 | GET_APP_SUCCEEDED, 13 | GET_APP_FAILED, 14 | {...effects}, 15 | false 16 | ); 17 | } 18 | 19 | /** 20 | * Root saga manages watcher lifecycle 21 | */ 22 | export function* getDisplayItem() { 23 | yield* sagaRequestSetup(fetchDisplayItem, GET_APP, {...effects}) 24 | } 25 | 26 | // Bootstrap sagas 27 | export default [ 28 | getDisplayItem 29 | ]; 30 | -------------------------------------------------------------------------------- /example/src/market/components/DisplayItem/tests/index.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { shallow } from 'enzyme'; 3 | 4 | import DisplayItem from '../index'; 5 | 6 | describe('', () => { 7 | it('should render its children', () => { 8 | const children = (

Test

); 9 | const renderedComponent = shallow( 10 | 11 | {children} 12 | 13 | ); 14 | expect(renderedComponent.contains(children)).toBe(true); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /example/src/market/components/ExportIcon/index.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import FontAwesome from 'react-fontawesome'; 3 | 4 | class ExportIcon extends Component { 5 | constructor(props) { 6 | super(props) 7 | } 8 | 9 | iconClick(){ 10 | alert('on export icon click'); 11 | } 12 | 13 | render() { 14 | 15 | return ( 16 |
17 | 18 |
); 19 | } 20 | } 21 | 22 | export default ExportIcon; -------------------------------------------------------------------------------- /example/src/market/components/ExportIcon/readme.md: -------------------------------------------------------------------------------- 1 | Uses: react-fontawesome 2 | `npm install --save react-fontawesome` -------------------------------------------------------------------------------- /example/src/market/components/ExportIcon/styles.scss: -------------------------------------------------------------------------------- 1 | .exportIcon{ 2 | width: 37px; 3 | height: 37px; 4 | vertical-align: middle; 5 | float: right; 6 | text-align: center; 7 | font-size: 14px; 8 | padding-top: 10px; 9 | border: 1px solid #efefef; 10 | border-top: none; 11 | border-bottom: none; 12 | 13 | &:hover{ 14 | background: #efefef; 15 | cursor: pointer; 16 | } 17 | } -------------------------------------------------------------------------------- /example/src/market/components/imports.scss: -------------------------------------------------------------------------------- 1 | @import "./DisplayItem/styles"; 2 | @import "./ExportIcon/styles"; -------------------------------------------------------------------------------- /example/src/market/config.example.js: -------------------------------------------------------------------------------- 1 | export default{ 2 | buyerApiUrl : '', 3 | sellerApiUrl : '', 4 | defaultsApiUrl:'', 5 | assetsApiUrl:'', 6 | tokenLocalStorageKey : '', 7 | itemLinkBaseUrl : '' 8 | }; -------------------------------------------------------------------------------- /example/src/market/dataList.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This is the main configuration for the list portion of the DataList component. 3 | 4 | */ 5 | export default { 6 | height:'95vh', 7 | paginationBottomPosition: '-9px' 8 | } -------------------------------------------------------------------------------- /example/src/market/filterGroups/catalog-contracts.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Filter groups are sections in the filter objects that have group configuration properties and a collection of filters 3 | */ 4 | export default { 5 | label : 'Contracts', 6 | defaultOpen: true, 7 | accordian:{ 8 | color:{ 9 | background: '#105caa', 10 | text:'#fff' 11 | } 12 | }, 13 | filters:[ 14 | 15 | ] 16 | }; -------------------------------------------------------------------------------- /example/src/market/filterGroups/version-dates.js: -------------------------------------------------------------------------------- 1 | import dateCreatedRange from '../filters/dateCreatedRange'; 2 | import dateEditedRange from '../filters/dateEditedRange'; 3 | 4 | /** 5 | * Filter groups are objects that have group configuration properties and a collection of filters 6 | */ 7 | export default { 8 | label : 'Dates', 9 | defaultOpen: false, 10 | accordian:{ 11 | color:{ 12 | background: '#4db3d7', 13 | text:'#fff' 14 | } 15 | }, 16 | filters:[ 17 | dateCreatedRange, 18 | dateEditedRange 19 | ] 20 | }; -------------------------------------------------------------------------------- /example/src/market/filterGroups/version-metadata.js: -------------------------------------------------------------------------------- 1 | import genres from '../filters/genres'; 2 | import language from '../filters/language'; 3 | import state from '../filters/state'; 4 | import hasStills from '../filters/still'; 5 | import hasVideos from '../filters/video'; 6 | import hasArtwork from '../filters/artwork'; 7 | 8 | /** 9 | * Filter groups are objects that have group configuration properties and a collection of filters 10 | */ 11 | export default { 12 | label : 'Metadata', 13 | defaultOpen: false, 14 | accordian:{ 15 | color:{ 16 | background: '#4db3d7', 17 | text:'#fff' 18 | } 19 | }, 20 | filters:[ 21 | genres, 22 | language, 23 | //state, 24 | hasStills, 25 | hasVideos, 26 | hasArtwork 27 | ] 28 | }; -------------------------------------------------------------------------------- /example/src/market/filterGroups/version-networks.js: -------------------------------------------------------------------------------- 1 | import networks from '../filters/networks'; 2 | 3 | /** 4 | * Filter groups are objects that have group configuration properties and a collection of filters 5 | */ 6 | export default { 7 | label : 'Networks', 8 | defaultOpen: true, 9 | accordian:{ 10 | color:{ 11 | background: '#105caa', 12 | text:'#fff' 13 | } 14 | }, 15 | filters:[ 16 | networks 17 | ] 18 | }; -------------------------------------------------------------------------------- /example/src/market/filters/artwork.js: -------------------------------------------------------------------------------- 1 | import Promise from 'bluebird'; 2 | import _utils from '../_utils'; 3 | 4 | const filterKey = 'hasArtworkAssets'; 5 | 6 | export default { 7 | id: filterKey, 8 | type:'select', 9 | prop: filterKey, 10 | label: 'Has Artwork', 11 | value:null,//used this to set a default value. Value must be null or undefined to be excluded. Filters recognize boolean true/false 12 | multiple : true, 13 | options : { 14 | key : 'entityUUID', 15 | value : 'entityValue', 16 | 17 | // Must return a collection 18 | getOptions : ()=>new Promise((resolve,reject)=>{ 19 | resolve(_utils.defaults.appendToCollection(filterKey,[ 20 | {entityUUID:'yes',entityValue:'True'}, 21 | {entityUUID:'no',entityValue:'False'} 22 | ])[filterKey]); 23 | }) 24 | } 25 | }; -------------------------------------------------------------------------------- /example/src/market/filters/autocomplete.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OlympusatDevelopment/react-filteredlist/d1353092bc3c8739687d7a47ab6dccd24a0c78a6/example/src/market/filters/autocomplete.js -------------------------------------------------------------------------------- /example/src/market/filters/dateCreatedRange.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | export default { 4 | id: 'dateCreated', 5 | type:'range', 6 | prop: 'dateCreated', 7 | label: 'Date Created', 8 | range:{ 9 | start:null,//used this to set a default value. Value must be null or undefined to be excluded. Filters recognize boolean true/false 10 | end:null,//used this to set a default value. Value must be null or undefined to be excluded. Filters recognize boolean true/false 11 | } 12 | }; -------------------------------------------------------------------------------- /example/src/market/filters/dateEditedRange.js: -------------------------------------------------------------------------------- 1 | 2 | export default { 3 | id: 'dateEdited', 4 | type:'range', 5 | prop: 'dateEdited', 6 | label: 'Date Edited', 7 | range:{ 8 | start:null,//used this to set a default value. Value must be null or undefined to be excluded. Filters recognize boolean true/false 9 | end:null,//used this to set a default value. Value must be null or undefined to be excluded. Filters recognize boolean true/false 10 | } 11 | 12 | }; -------------------------------------------------------------------------------- /example/src/market/filters/genres.js: -------------------------------------------------------------------------------- 1 | import Promise from 'bluebird'; 2 | import _utils from '../_utils'; 3 | 4 | export default { 5 | id: 'genres', 6 | type:'select', 7 | prop: 'genres', 8 | label: 'Genres', 9 | value:null,//used this to set a default value. Value must be null or undefined to be excluded. Filters recognize boolean true/false 10 | multiple : true, 11 | options : { 12 | key : 'entityUUID', 13 | value : 'entityValue', 14 | 15 | // Must return a promise containing a collection 16 | getOptions : _utils.getDefaults.bind(_utils.getDefaults,'genres') 17 | } 18 | }; -------------------------------------------------------------------------------- /example/src/market/filters/language.js: -------------------------------------------------------------------------------- 1 | import Promise from 'bluebird'; 2 | import _utils from '../_utils'; 3 | 4 | export default { 5 | id: 'languages', 6 | type:'select', 7 | prop: 'languages', 8 | label: 'Languages', 9 | value:null,//used this to set a default value. Value must be null or undefined to be excluded. Filters recognize boolean true/false 10 | multiple : true, 11 | options : { 12 | key : 'entityUUID', 13 | value : 'entityValue', 14 | 15 | // Must return a collection 16 | getOptions : ()=>new Promise((resolve,reject)=>{ 17 | return _utils.getDefaults('languages') 18 | .then(resolve) 19 | }) 20 | } 21 | }; -------------------------------------------------------------------------------- /example/src/market/filters/networks.js: -------------------------------------------------------------------------------- 1 | import Promise from 'bluebird'; 2 | import _utils from '../_utils'; 3 | 4 | export default { 5 | id: 'primaryNetwork', 6 | type:'select', 7 | prop: 'primaryNetwork', 8 | label: 'Primary Network', 9 | value:null,//used this to set a default value. Value must be null or undefined to be excluded. Filters recognize boolean true/false 10 | multiple : true, 11 | options : { 12 | key : 'entityUUID', 13 | value : 'entityValue', 14 | 15 | // Must return a collection 16 | getOptions : ()=>new Promise((resolve,reject)=>{ 17 | return _utils.getDefaults('networks') 18 | .then(resolve) 19 | }) 20 | } 21 | }; -------------------------------------------------------------------------------- /example/src/market/filters/search.js: -------------------------------------------------------------------------------- 1 | export default { 2 | id: 'search', 3 | type:'search', 4 | prop: 'search', 5 | label: 'Search', 6 | value:null,//used this to set a default value. Value must be null or undefined to be excluded. Filters recognize boolean true/false 7 | }; -------------------------------------------------------------------------------- /example/src/market/filters/state.js: -------------------------------------------------------------------------------- 1 | import Promise from 'bluebird'; 2 | import _utils from '../_utils'; 3 | 4 | export default { 5 | id: 'state', 6 | type:'select', 7 | prop: 'state', 8 | label: 'States', 9 | value:null,//used this to set a default value. Value must be null or undefined to be excluded. Filters recognize boolean true/false 10 | multiple : true, 11 | options : { 12 | key : 'entityUUID', 13 | value : 'entityValue', 14 | 15 | // Must return a collection 16 | getOptions : ()=>new Promise((resolve,reject)=>{ 17 | return _utils.getDefaults('states') 18 | .then(resolve) 19 | }) 20 | } 21 | }; -------------------------------------------------------------------------------- /example/src/market/filters/still.js: -------------------------------------------------------------------------------- 1 | import Promise from 'bluebird'; 2 | import _utils from '../_utils'; 3 | 4 | const filterKey = 'hasStillAssets'; 5 | 6 | export default { 7 | id: filterKey, 8 | type:'select', 9 | prop: filterKey, 10 | label: 'Has Stills', 11 | value:null,//used this to set a default value. Value must be null or undefined to be excluded. Filters recognize boolean true/false 12 | multiple : true, 13 | options : { 14 | key : 'entityUUID', 15 | value : 'entityValue', 16 | 17 | // Must return a collection 18 | getOptions : ()=>new Promise((resolve,reject)=>{ 19 | resolve(_utils.defaults.appendToCollection(filterKey,[ 20 | {entityUUID:'yes',entityValue:'True'}, 21 | {entityUUID:'no',entityValue:'False'} 22 | ])[filterKey]); 23 | }) 24 | } 25 | }; -------------------------------------------------------------------------------- /example/src/market/filters/video.js: -------------------------------------------------------------------------------- 1 | import Promise from 'bluebird'; 2 | import _utils from '../_utils'; 3 | 4 | const filterKey = 'hasVideoAssets'; 5 | 6 | export default { 7 | id: filterKey, 8 | type:'select', 9 | prop: filterKey, 10 | label: 'Has Videos', 11 | value:null,//used this to set a default value. Value must be null or undefined to be excluded. Filters recognize boolean true/false 12 | multiple : true, 13 | options : { 14 | key : 'entityUUID', 15 | value : 'entityValue', 16 | 17 | // Must return a collection 18 | getOptions : ()=>new Promise((resolve,reject)=>{ 19 | resolve(_utils.defaults.appendToCollection(filterKey,[ 20 | {entityUUID:'yes',entityValue:'True'}, 21 | {entityUUID:'no',entityValue:'False'} 22 | ])[filterKey]); 23 | }) 24 | } 25 | }; -------------------------------------------------------------------------------- /example/src/market/graphql/catalog.js: -------------------------------------------------------------------------------- 1 | export default{ 2 | 3 | } -------------------------------------------------------------------------------- /example/src/market/graphql/index.js: -------------------------------------------------------------------------------- 1 | import catalog from './catalog'; 2 | 3 | export default{ 4 | catalog 5 | } -------------------------------------------------------------------------------- /example/src/market/hooks/index.js: -------------------------------------------------------------------------------- 1 | import beforeXHR from './beforeXHR'; 2 | import onXHRSuccess from './onXHRSuccess'; 3 | import onXHRFail from './onXHRFail'; 4 | import onCheck from './onCheck'; 5 | import onUnCheck from './onUnCheck'; 6 | import onStateUpdate from './onStateUpdate'; 7 | import onInit from './onInit'; 8 | 9 | export default { 10 | beforeXHR, 11 | onXHRSuccess, 12 | onXHRFail, 13 | onCheck, 14 | onUnCheck, 15 | onStateUpdate, 16 | onInit 17 | }; -------------------------------------------------------------------------------- /example/src/market/hooks/onCheck.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Hook for picking up check events 3 | * Note: You have access to all items currently in the workspace, but you must only return the item being mutated 4 | * Warning: a select all command will run this hook once for each item as it builds the workspaceItems list 5 | */ 6 | export default ({item,workspaceItems})=>item -------------------------------------------------------------------------------- /example/src/market/hooks/onInit.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Hook used to know when the app is initialized 3 | */ 4 | import _utils from '../_utils'; 5 | 6 | export default app=>{ 7 | _utils.getDefaults('genres');// Request defaults to ensure they're set on app load 8 | } -------------------------------------------------------------------------------- /example/src/market/hooks/onStateUpdate.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Hook gets called whenever the main application state gets updated. 4 | * Useful for getting the filters' current queryObject or queryString. 5 | * Pagination can also be read here as well as the current Selected View 6 | * @returns {*} 7 | */ 8 | export default state=>{ 9 | //console.log('CURRENT STATE HOOK',state) 10 | } -------------------------------------------------------------------------------- /example/src/market/hooks/onUnCheck.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Hook for picking up check events 3 | * Note: You have access to all items currently in the workspace, but you must only return the item being mutated 4 | * Warning: a select all command will run this hook once for each item as it empties the workspaceItems list 5 | */ 6 | export default ({item,workspaceItems})=>item -------------------------------------------------------------------------------- /example/src/market/hooks/onXHRFail.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Hook gets called when the xhr request kicks back an error 3 | * @param args 4 | * @returns {*} 5 | */ 6 | export default (err,body)=>{ 7 | return body; 8 | } -------------------------------------------------------------------------------- /example/src/market/maps/catalog.js: -------------------------------------------------------------------------------- 1 | export default { 2 | "olyplat-entity-movie": 'movie', 3 | "olyplat-entity-series": 'series', 4 | "olyplat-entity-episode": 'episode', 5 | "olyplat-entity-season": 'season', 6 | "olyplat-entity-version": 'version', 7 | }; 8 | -------------------------------------------------------------------------------- /example/src/market/maps/entityProp.js: -------------------------------------------------------------------------------- 1 | export default { 2 | genres: 'primaryGenre', 3 | languages: "language", 4 | dateCreated:'entityCreated' 5 | }; -------------------------------------------------------------------------------- /example/src/market/views/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Views are a collection of filter group objects 3 | */ 4 | import buyer from './buyer'; 5 | 6 | export default [ 7 | buyer 8 | ]; -------------------------------------------------------------------------------- /example/src/xcomponent-bootstrap.js: -------------------------------------------------------------------------------- 1 | /** 2 | * http://krakenjs.com/xcomponent/docs/example.html 3 | */ 4 | var xcomponent = require('./xcomponent.js'); 5 | var FilteredListComponent = xcomponent.create({ 6 | tag: 'react-filteredlist', 7 | url:'http://react.filteredlist.demo.s3-website-us-east-1.amazonaws.com', 8 | dimensions: { 9 | width: '100%', 10 | height: "600px" 11 | }, 12 | props: { 13 | config: { 14 | type: 'object', 15 | required: true 16 | } 17 | } 18 | }); -------------------------------------------------------------------------------- /src/components/Checkbox/styles.scss: -------------------------------------------------------------------------------- 1 | .dl__checkbox{ 2 | display: flex; 3 | flex: 1; 4 | justify-content: center; 5 | min-height: 100%; 6 | align-items: center; 7 | 8 | input { 9 | font-size: 16px; 10 | } 11 | } -------------------------------------------------------------------------------- /src/components/Checkbox/tests/index.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { shallow } from 'enzyme'; 3 | 4 | import Checkbox from '../index'; 5 | 6 | describe('', () => { 7 | it('should render its children', () => { 8 | const children = (

Test

); 9 | const renderedComponent = shallow( 10 | 11 | {children} 12 | 13 | ); 14 | expect(renderedComponent.contains(children)).toBe(true); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/components/ColumnSelector/actions.js: -------------------------------------------------------------------------------- 1 | import {UPDATE_VIEW_PROPS} from './constants'; 2 | 3 | /** 4 | * Load the repositories, this action starts the request saga 5 | */ 6 | export function updateViewProps(data) { 7 | return { 8 | type: UPDATE_VIEW_PROPS, 9 | data 10 | }; 11 | } -------------------------------------------------------------------------------- /src/components/ColumnSelector/constants.js: -------------------------------------------------------------------------------- 1 | /* 2 | * ColumnSelectorConstants 3 | * Each action has a corresponding type, which the reducer knows and picks up on. 4 | * To avoid weird typos between the reducer and the actions, we save them as 5 | * constants here. We prefix them with 'yourproject/YourComponent' so we avoid 6 | * reducers accidentally picking up actions they shouldn't. 7 | * 8 | * Follow this format: 9 | * export const YOUR_ACTION_CONSTANT = 'yourproject/YourContainer/YOUR_ACTION_CONSTANT'; 10 | */ 11 | export const DEFAULT_LOCALE = 'en'; 12 | export const UPDATE_VIEW_PROPS = 'dl/UPDATE_VIEW_PROPS'; 13 | -------------------------------------------------------------------------------- /src/components/ColumnSelector/reducer.js: -------------------------------------------------------------------------------- 1 | import { } from './constants'; 2 | 3 | //@todo find a better place to inject this 4 | import config from '../../../dataListConfig'; 5 | 6 | const initialState = { 7 | config 8 | }; 9 | 10 | function columnSelectorReducer(state = initialState, action) { 11 | let _state = Object.assign({},state), 12 | _data = action.data; 13 | 14 | switch (action.type) { 15 | 16 | default: 17 | return _state; 18 | } 19 | } 20 | 21 | export default columnSelectorReducer; 22 | -------------------------------------------------------------------------------- /src/components/ColumnSelector/sagas.js: -------------------------------------------------------------------------------- 1 | import * as effects from 'redux-saga/effects'; 2 | import {} from './constants'; 3 | import utils,{l,sagaRequest,sagaRequestSetup} from '../../utils'; 4 | 5 | /** 6 | * columnSelector request/response handler 7 | */ 8 | export function* fetchColumnSelector(args) { 9 | yield* sagaRequest( 10 | columnSelectorsModel.getById, 11 | {entityUUID: args.data.entityUUID}, 12 | GET_APP_SUCCEEDED, 13 | GET_APP_FAILED, 14 | {...effects}, 15 | false 16 | ); 17 | } 18 | 19 | /** 20 | * Root saga manages watcher lifecycle 21 | */ 22 | export function* getColumnSelector() { 23 | yield* sagaRequestSetup(fetchColumnSelector, GET_APP, {...effects}) 24 | } 25 | 26 | // Bootstrap sagas 27 | export default [ 28 | getColumnSelector 29 | ]; 30 | -------------------------------------------------------------------------------- /src/components/ColumnSelector/styles.scss: -------------------------------------------------------------------------------- 1 | .dl__columnSelector{ 2 | $bg : #fff; 3 | $border : #efefef; 4 | $shadow : #888; 5 | 6 | border: 1px solid #efefef; 7 | width: auto; 8 | position: absolute; 9 | right: 36px; 10 | top :21px; 11 | z-index: 101; 12 | padding: 18px 9px 18px 9px; 13 | border-radius: 3px; 14 | background: $bg; 15 | box-shadow: 0 0 6px $shadow; 16 | 17 | h4{ 18 | margin: 0; 19 | padding: 0 90px 0 0; 20 | font-weight: 700; 21 | font-size: 14px; 22 | border-bottom: 1px solid $border; 23 | margin-bottom: 9px; 24 | } 25 | 26 | span{ 27 | display: block; 28 | line-height: 18px; 29 | font-size: 12px; 30 | 31 | .dl__checkbox{ 32 | display: inline-block; 33 | } 34 | 35 | input{ 36 | margin-right: 6px; 37 | width: 12px; 38 | height: 12px; 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /src/components/ColumnSelector/tests/index.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { shallow } from 'enzyme'; 3 | 4 | import ColumnSelector from '../index'; 5 | 6 | describe('', () => { 7 | it('should render its children', () => { 8 | const children = (

Test

); 9 | const renderedComponent = shallow( 10 | 11 | {children} 12 | 13 | ); 14 | expect(renderedComponent.contains(children)).toBe(true); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/components/CustomItem/actions.js: -------------------------------------------------------------------------------- 1 | import {UPDATE_WORKSPACE} from './constants'; 2 | 3 | export function updateWorkspace(data) { 4 | return { 5 | type: UPDATE_WORKSPACE, 6 | data 7 | }; 8 | } -------------------------------------------------------------------------------- /src/components/CustomItem/constants.js: -------------------------------------------------------------------------------- 1 | export const UPDATE_WORKSPACE = 'dl/UPDATE_WORKSPACE'; -------------------------------------------------------------------------------- /src/components/CustomItem/readme.md: -------------------------------------------------------------------------------- 1 | Deps: 2 | https://www.flag-sprites.com/ 3 | 4 | -------------------------------------------------------------------------------- /src/components/CustomItem/reducer.js: -------------------------------------------------------------------------------- 1 | import { } from './constants'; 2 | 3 | //@todo find a better place to inject this 4 | import config from '../../../dataListConfig'; 5 | 6 | const initialState = { 7 | config 8 | }; 9 | 10 | function customItemReducer(state = initialState, action) { 11 | let _state = Object.assign({},state), 12 | _data = action.data; 13 | 14 | switch (action.type) { 15 | 16 | default: 17 | return _state; 18 | } 19 | } 20 | 21 | export default customItemReducer; 22 | -------------------------------------------------------------------------------- /src/components/CustomItem/sagas.js: -------------------------------------------------------------------------------- 1 | import * as effects from 'redux-saga/effects'; 2 | import {} from './constants'; 3 | import utils,{l,sagaRequest,sagaRequestSetup} from '../../utils'; 4 | 5 | /** 6 | * customItem request/response handler 7 | */ 8 | export function* fetchCustomItem(args) { 9 | yield* sagaRequest( 10 | customItemsModel.getById, 11 | {entityUUID: args.data.entityUUID}, 12 | GET_APP_SUCCEEDED, 13 | GET_APP_FAILED, 14 | {...effects}, 15 | false 16 | ); 17 | } 18 | 19 | /** 20 | * Root saga manages watcher lifecycle 21 | */ 22 | export function* getCustomItem() { 23 | yield* sagaRequestSetup(fetchCustomItem, GET_APP, {...effects}) 24 | } 25 | 26 | // Bootstrap sagas 27 | export default [ 28 | getCustomItem 29 | ]; 30 | -------------------------------------------------------------------------------- /src/components/CustomItem/styles.scss: -------------------------------------------------------------------------------- 1 | 2 | .dl__customItem{ 3 | $this : &; 4 | position: relative; 5 | z-index: 0; 6 | @extend .cf; 7 | 8 | a{ 9 | color: $color-link; 10 | //position: relative; 11 | } 12 | 13 | &Check{ 14 | display: inline-block; 15 | float: left; 16 | margin-top: 16px; 17 | 18 | // Commented out because we need to handle displaying for the checked state 19 | //input[type="checkbox"]{ 20 | // appearance: none; 21 | // -webkit-appearance: none; 22 | // background: none; 23 | // border: none; 24 | // border:1px solid $color-link; 25 | // color: $color-link; 26 | // width: 12px; 27 | // height: 12px; 28 | // border-radius: 2px; 29 | //} 30 | } 31 | } -------------------------------------------------------------------------------- /src/components/CustomItem/tests/index.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { shallow } from 'enzyme'; 3 | 4 | import CustomItem from '../index'; 5 | 6 | describe('', () => { 7 | it('should render its children', () => { 8 | const children = (

Test

); 9 | const renderedComponent = shallow( 10 | 11 | {children} 12 | 13 | ); 14 | expect(renderedComponent.contains(children)).toBe(true); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/components/DatePicker/index.js: -------------------------------------------------------------------------------- 1 | import React, {PureComponent} from 'react'; 2 | import ReactDatePicker from "react-datepicker"; 3 | 4 | class DatePicker extends PureComponent { 5 | constructor(props) { 6 | super(props); 7 | } 8 | 9 | render() { 10 | const {id, placeholderText, className, selected, onChange} = this.props; 11 | return (); 12 | } 13 | } 14 | 15 | export default DatePicker; 16 | -------------------------------------------------------------------------------- /src/components/DatePicker/styles.scss: -------------------------------------------------------------------------------- 1 | .dr__wrapper { 2 | display: flex; 3 | width: 100%; 4 | max-width: 100%; 5 | justify-content: space-between; 6 | align-items: center; 7 | background: none; 8 | padding: 3px 0px; 9 | position: relative; 10 | z-index: 10; 11 | 12 | 13 | .dr__datePicker { 14 | width: 100%; 15 | position: relative; 16 | line-height: 30px; 17 | padding: .25rem 50px .25rem .25rem; 18 | border: 1px solid rgba(51, 51, 51, 0.45); 19 | text-decoration: none; 20 | color: #666; 21 | border-radius: 0.25rem 0.25rem 0.25rem 0.25rem; 22 | background-clip: padding-box; 23 | cursor: pointer; 24 | outline: none; 25 | word-wrap: break-word; 26 | &:focus { 27 | background: none; 28 | } 29 | } 30 | 31 | .dr__divider svg { 32 | vertical-align: middle !important; 33 | fill: #565a5c !important; 34 | height: 24px !important; 35 | width: 18px !important; 36 | margin: 0 3px; 37 | } 38 | } -------------------------------------------------------------------------------- /src/components/DisplayItem/actions.js: -------------------------------------------------------------------------------- 1 | import {UPDATE_WORKSPACE} from './constants'; 2 | 3 | export function updateWorkspace(data) { 4 | return { 5 | type: UPDATE_WORKSPACE, 6 | data 7 | }; 8 | } -------------------------------------------------------------------------------- /src/components/DisplayItem/constants.js: -------------------------------------------------------------------------------- 1 | export const UPDATE_WORKSPACE = 'dl/UPDATE_WORKSPACE'; -------------------------------------------------------------------------------- /src/components/DisplayItem/readme.md: -------------------------------------------------------------------------------- 1 | Deps: 2 | https://www.flag-sprites.com/ 3 | 4 | -------------------------------------------------------------------------------- /src/components/DisplayItem/reducer.js: -------------------------------------------------------------------------------- 1 | import { } from './constants'; 2 | 3 | //@todo find a better place to inject this 4 | import config from '../../../dataListConfig'; 5 | 6 | const initialState = { 7 | config 8 | }; 9 | 10 | function displayItemReducer(state = initialState, action) { 11 | let _state = Object.assign({},state), 12 | _data = action.data; 13 | 14 | switch (action.type) { 15 | 16 | default: 17 | return _state; 18 | } 19 | } 20 | 21 | export default displayItemReducer; 22 | -------------------------------------------------------------------------------- /src/components/DisplayItem/sagas.js: -------------------------------------------------------------------------------- 1 | import * as effects from 'redux-saga/effects'; 2 | import {} from './constants'; 3 | import utils,{l,sagaRequest,sagaRequestSetup} from '../../utils'; 4 | 5 | /** 6 | * displayItem request/response handler 7 | */ 8 | export function* fetchDisplayItem(args) { 9 | yield* sagaRequest( 10 | displayItemsModel.getById, 11 | {entityUUID: args.data.entityUUID}, 12 | GET_APP_SUCCEEDED, 13 | GET_APP_FAILED, 14 | {...effects}, 15 | false 16 | ); 17 | } 18 | 19 | /** 20 | * Root saga manages watcher lifecycle 21 | */ 22 | export function* getDisplayItem() { 23 | yield* sagaRequestSetup(fetchDisplayItem, GET_APP, {...effects}) 24 | } 25 | 26 | // Bootstrap sagas 27 | export default [ 28 | getDisplayItem 29 | ]; 30 | -------------------------------------------------------------------------------- /src/components/DisplayItem/tests/index.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { shallow } from 'enzyme'; 3 | 4 | import DisplayItem from '../index'; 5 | 6 | describe('', () => { 7 | it('should render its children', () => { 8 | const children = (

Test

); 9 | const renderedComponent = shallow( 10 | 11 | {children} 12 | 13 | ); 14 | expect(renderedComponent.contains(children)).toBe(true); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/components/Exports/actions.js: -------------------------------------------------------------------------------- 1 | import { 2 | CONTROL_MODAL 3 | } from './constants'; 4 | 5 | export function controlModal(data) { 6 | return { 7 | type: CONTROL_MODAL, 8 | data 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /src/components/Exports/constants.js: -------------------------------------------------------------------------------- 1 | export const CONTROL_MODAL = 'dl/CONTROL_MODAL'; -------------------------------------------------------------------------------- /src/components/FilterGroup/actions.js: -------------------------------------------------------------------------------- 1 | import {} from './constants'; 2 | 3 | /** 4 | * Load the repositories, this action starts the request saga 5 | */ 6 | //export function notify(data) { 7 | // return { 8 | // type: NOTIFY, 9 | // data 10 | // }; 11 | //} -------------------------------------------------------------------------------- /src/components/FilterGroup/constants.js: -------------------------------------------------------------------------------- 1 | /* 2 | * FilterGroupConstants 3 | * Each action has a corresponding type, which the reducer knows and picks up on. 4 | * To avoid weird typos between the reducer and the actions, we save them as 5 | * constants here. We prefix them with 'yourproject/YourComponent' so we avoid 6 | * reducers accidentally picking up actions they shouldn't. 7 | * 8 | * Follow this format: 9 | * export const YOUR_ACTION_CONSTANT = 'yourproject/YourContainer/YOUR_ACTION_CONSTANT'; 10 | */ 11 | export const DEFAULT_LOCALE = 'en'; 12 | //export const DEFAULT_LOCALE = 'dataList/filterGroup/en'; -------------------------------------------------------------------------------- /src/components/FilterGroup/reducer.js: -------------------------------------------------------------------------------- 1 | import { } from './constants'; 2 | 3 | //@todo find a better place to inject this 4 | import config from '../../../dataListConfig'; 5 | 6 | const initialState = { 7 | config 8 | }; 9 | 10 | function filterGroupReducer(state = initialState, action) { 11 | let _state = Object.assign({},state), 12 | _data = action.data; 13 | 14 | switch (action.type) { 15 | 16 | default: 17 | return _state; 18 | } 19 | } 20 | 21 | export default filterGroupReducer; 22 | -------------------------------------------------------------------------------- /src/components/FilterGroup/sagas.js: -------------------------------------------------------------------------------- 1 | import * as effects from 'redux-saga/effects'; 2 | import {} from './constants'; 3 | import utils,{l,sagaRequest,sagaRequestSetup} from '../../utils'; 4 | 5 | /** 6 | * filterGroup request/response handler 7 | */ 8 | export function* fetchFilterGroup(args) { 9 | yield* sagaRequest( 10 | filterGroupsModel.getById, 11 | {entityUUID: args.data.entityUUID}, 12 | GET_APP_SUCCEEDED, 13 | GET_APP_FAILED, 14 | {...effects}, 15 | false 16 | ); 17 | } 18 | 19 | /** 20 | * Root saga manages watcher lifecycle 21 | */ 22 | export function* getFilterGroup() { 23 | yield* sagaRequestSetup(fetchFilterGroup, GET_APP, {...effects}) 24 | } 25 | 26 | // Bootstrap sagas 27 | export default [ 28 | getFilterGroup 29 | ]; 30 | -------------------------------------------------------------------------------- /src/components/FilterGroup/tests/index.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { shallow } from 'enzyme'; 3 | 4 | import FilterGroup from '../index'; 5 | 6 | describe('', () => { 7 | it('should render its children', () => { 8 | const children = (

Test

); 9 | const renderedComponent = shallow( 10 | 11 | {children} 12 | 13 | ); 14 | expect(renderedComponent.contains(children)).toBe(true); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/components/FilterItem/actions.js: -------------------------------------------------------------------------------- 1 | import {FILTER_CHANGE} from './constants'; 2 | 3 | export function filterChange(data) { 4 | return { 5 | type: FILTER_CHANGE, 6 | data 7 | }; 8 | } -------------------------------------------------------------------------------- /src/components/FilterItem/constants.js: -------------------------------------------------------------------------------- 1 | /* 2 | * FilterItemConstants 3 | * Each action has a corresponding type, which the reducer knows and picks up on. 4 | * To avoid weird typos between the reducer and the actions, we save them as 5 | * constants here. We prefix them with 'yourproject/YourComponent' so we avoid 6 | * reducers accidentally picking up actions they shouldn't. 7 | * 8 | * Follow this format: 9 | * export const YOUR_ACTION_CONSTANT = 'yourproject/YourContainer/YOUR_ACTION_CONSTANT'; 10 | */ 11 | export const FILTER_CHANGE = 'dl/FILTER_CHANGE'; -------------------------------------------------------------------------------- /src/components/FilterItem/reducer.js: -------------------------------------------------------------------------------- 1 | import { } from './constants'; 2 | 3 | //@todo find a better place to inject this 4 | import config from '../../../dataListConfig'; 5 | 6 | const initialState = { 7 | config 8 | }; 9 | 10 | function filterItemReducer(state = initialState, action) { 11 | let _state = Object.assign({},state), 12 | _data = action.data; 13 | 14 | switch (action.type) { 15 | 16 | default: 17 | return _state; 18 | } 19 | } 20 | 21 | export default filterItemReducer; 22 | -------------------------------------------------------------------------------- /src/components/FilterItem/sagas.js: -------------------------------------------------------------------------------- 1 | import * as effects from 'redux-saga/effects'; 2 | import {} from './constants'; 3 | import utils,{l,sagaRequest,sagaRequestSetup} from '../../utils'; 4 | 5 | /** 6 | * filterItem request/response handler 7 | */ 8 | export function* fetchFilterItem(args) { 9 | yield* sagaRequest( 10 | filterItemsModel.getById, 11 | {entityUUID: args.data.entityUUID}, 12 | GET_APP_SUCCEEDED, 13 | GET_APP_FAILED, 14 | {...effects}, 15 | false 16 | ); 17 | } 18 | 19 | /** 20 | * Root saga manages watcher lifecycle 21 | */ 22 | export function* getFilterItem() { 23 | yield* sagaRequestSetup(fetchFilterItem, GET_APP, {...effects}) 24 | } 25 | 26 | // Bootstrap sagas 27 | export default [ 28 | getFilterItem 29 | ]; 30 | -------------------------------------------------------------------------------- /src/components/FilterItem/tests/index.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { shallow } from 'enzyme'; 3 | 4 | import FilterItem from '../index'; 5 | 6 | describe('', () => { 7 | it('should render its children', () => { 8 | const children = (

Test

); 9 | const renderedComponent = shallow( 10 | 11 | {children} 12 | 13 | ); 14 | expect(renderedComponent.contains(children)).toBe(true); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/components/ListFooter/actions.js: -------------------------------------------------------------------------------- 1 | import {} from './constants'; 2 | 3 | /** 4 | * Load the repositories, this action starts the request saga 5 | */ 6 | //export function notify(data) { 7 | // return { 8 | // type: NOTIFY, 9 | // data 10 | // }; 11 | //} -------------------------------------------------------------------------------- /src/components/ListFooter/constants.js: -------------------------------------------------------------------------------- 1 | /* 2 | * ListFooterConstants 3 | * Each action has a corresponding type, which the reducer knows and picks up on. 4 | * To avoid weird typos between the reducer and the actions, we save them as 5 | * constants here. We prefix them with 'yourproject/YourComponent' so we avoid 6 | * reducers accidentally picking up actions they shouldn't. 7 | * 8 | * Follow this format: 9 | * export const YOUR_ACTION_CONSTANT = 'yourproject/YourContainer/YOUR_ACTION_CONSTANT'; 10 | */ 11 | export const DEFAULT_LOCALE = 'en'; 12 | //export const DEFAULT_LOCALE = 'dataList/listFooter/en'; -------------------------------------------------------------------------------- /src/components/ListFooter/reducer.js: -------------------------------------------------------------------------------- 1 | import { } from './constants'; 2 | 3 | //@todo find a better place to inject this 4 | import config from '../../../dataListConfig'; 5 | 6 | const initialState = { 7 | config 8 | }; 9 | 10 | function listFooterReducer(state = initialState, action) { 11 | let _state = Object.assign({},state), 12 | _data = action.data; 13 | 14 | switch (action.type) { 15 | 16 | default: 17 | return _state; 18 | } 19 | } 20 | 21 | export default listFooterReducer; 22 | -------------------------------------------------------------------------------- /src/components/ListFooter/sagas.js: -------------------------------------------------------------------------------- 1 | import * as effects from 'redux-saga/effects'; 2 | import {} from './constants'; 3 | import utils,{l,sagaRequest,sagaRequestSetup} from '../../utils'; 4 | 5 | /** 6 | * listFooter request/response handler 7 | */ 8 | export function* fetchListFooter(args) { 9 | yield* sagaRequest( 10 | listFootersModel.getById, 11 | {entityUUID: args.data.entityUUID}, 12 | GET_APP_SUCCEEDED, 13 | GET_APP_FAILED, 14 | {...effects}, 15 | false 16 | ); 17 | } 18 | 19 | /** 20 | * Root saga manages watcher lifecycle 21 | */ 22 | export function* getListFooter() { 23 | yield* sagaRequestSetup(fetchListFooter, GET_APP, {...effects}) 24 | } 25 | 26 | // Bootstrap sagas 27 | export default [ 28 | getListFooter 29 | ]; 30 | -------------------------------------------------------------------------------- /src/components/ListFooter/styles.scss: -------------------------------------------------------------------------------- 1 | .dl__listFooter{ 2 | 3 | } -------------------------------------------------------------------------------- /src/components/ListFooter/tests/index.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { shallow } from 'enzyme'; 3 | 4 | import ListFooter from '../index'; 5 | 6 | describe('', () => { 7 | it('should render its children', () => { 8 | const children = (

Test

); 9 | const renderedComponent = shallow( 10 | 11 | {children} 12 | 13 | ); 14 | expect(renderedComponent.contains(children)).toBe(true); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/components/ListHeader/actions.js: -------------------------------------------------------------------------------- 1 | import {UPDATE_WORKSPACE,FILTER_CHANGE} from './constants'; 2 | 3 | export function updateWorkspace(data) { 4 | return { 5 | type: UPDATE_WORKSPACE, 6 | data 7 | }; 8 | } 9 | 10 | 11 | export function filterChange(data) { 12 | return { 13 | type: FILTER_CHANGE, 14 | data 15 | }; 16 | } -------------------------------------------------------------------------------- /src/components/ListHeader/constants.js: -------------------------------------------------------------------------------- 1 | export const UPDATE_WORKSPACE = 'dl/UPDATE_WORKSPACE'; 2 | export const FILTER_CHANGE = 'dl/FILTER_CHANGE'; -------------------------------------------------------------------------------- /src/components/ListHeader/reducer.js: -------------------------------------------------------------------------------- 1 | import { } from './constants'; 2 | 3 | //@todo find a better place to inject this 4 | import config from '../../../dataListConfig'; 5 | 6 | const initialState = { 7 | config 8 | }; 9 | 10 | function listHeaderReducer(state = initialState, action) { 11 | let _state = Object.assign({},state), 12 | _data = action.data; 13 | 14 | switch (action.type) { 15 | 16 | default: 17 | return _state; 18 | } 19 | } 20 | 21 | export default listHeaderReducer; 22 | -------------------------------------------------------------------------------- /src/components/ListHeader/sagas.js: -------------------------------------------------------------------------------- 1 | import * as effects from 'redux-saga/effects'; 2 | import {} from './constants'; 3 | import utils,{l,sagaRequest,sagaRequestSetup} from '../../utils'; 4 | 5 | /** 6 | * listHeader request/response handler 7 | */ 8 | export function* fetchListHeader(args) { 9 | yield* sagaRequest( 10 | listHeadersModel.getById, 11 | {entityUUID: args.data.entityUUID}, 12 | GET_APP_SUCCEEDED, 13 | GET_APP_FAILED, 14 | {...effects}, 15 | false 16 | ); 17 | } 18 | 19 | /** 20 | * Root saga manages watcher lifecycle 21 | */ 22 | export function* getListHeader() { 23 | yield* sagaRequestSetup(fetchListHeader, GET_APP, {...effects}) 24 | } 25 | 26 | // Bootstrap sagas 27 | export default [ 28 | getListHeader 29 | ]; 30 | -------------------------------------------------------------------------------- /src/components/ListHeader/tests/index.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { shallow } from 'enzyme'; 3 | 4 | import ListHeader from '../index'; 5 | 6 | describe('', () => { 7 | it('should render its children', () => { 8 | const children = (

Test

); 9 | const renderedComponent = shallow( 10 | 11 | {children} 12 | 13 | ); 14 | expect(renderedComponent.contains(children)).toBe(true); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/components/ListRow/actions.js: -------------------------------------------------------------------------------- 1 | import {} from './constants'; 2 | 3 | /** 4 | * Load the repositories, this action starts the request saga 5 | */ 6 | //export function notify(data) { 7 | // return { 8 | // type: NOTIFY, 9 | // data 10 | // }; 11 | //} -------------------------------------------------------------------------------- /src/components/ListRow/constants.js: -------------------------------------------------------------------------------- 1 | /* 2 | * ListRowConstants 3 | * Each action has a corresponding type, which the reducer knows and picks up on. 4 | * To avoid weird typos between the reducer and the actions, we save them as 5 | * constants here. We prefix them with 'yourproject/YourComponent' so we avoid 6 | * reducers accidentally picking up actions they shouldn't. 7 | * 8 | * Follow this format: 9 | * export const YOUR_ACTION_CONSTANT = 'yourproject/YourContainer/YOUR_ACTION_CONSTANT'; 10 | */ 11 | export const DEFAULT_LOCALE = 'en'; 12 | //export const DEFAULT_LOCALE = 'dataList/listRow/en'; -------------------------------------------------------------------------------- /src/components/ListRow/reducer.js: -------------------------------------------------------------------------------- 1 | import { } from './constants'; 2 | 3 | //@todo find a better place to inject this 4 | import config from '../../../dataListConfig'; 5 | 6 | const initialState = { 7 | config 8 | }; 9 | 10 | function listRowReducer(state = initialState, action) { 11 | let _state = Object.assign({},state), 12 | _data = action.data; 13 | 14 | switch (action.type) { 15 | 16 | default: 17 | return _state; 18 | } 19 | } 20 | 21 | export default listRowReducer; 22 | -------------------------------------------------------------------------------- /src/components/ListRow/sagas.js: -------------------------------------------------------------------------------- 1 | import * as effects from 'redux-saga/effects'; 2 | import {} from './constants'; 3 | import utils,{l,sagaRequest,sagaRequestSetup} from '../../utils'; 4 | 5 | /** 6 | * listRow request/response handler 7 | */ 8 | export function* fetchListRow(args) { 9 | yield* sagaRequest( 10 | listRowsModel.getById, 11 | {entityUUID: args.data.entityUUID}, 12 | GET_APP_SUCCEEDED, 13 | GET_APP_FAILED, 14 | {...effects}, 15 | false 16 | ); 17 | } 18 | 19 | /** 20 | * Root saga manages watcher lifecycle 21 | */ 22 | export function* getListRow() { 23 | yield* sagaRequestSetup(fetchListRow, GET_APP, {...effects}) 24 | } 25 | 26 | // Bootstrap sagas 27 | export default [ 28 | getListRow 29 | ]; 30 | -------------------------------------------------------------------------------- /src/components/ListRow/tests/index.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { shallow } from 'enzyme'; 3 | 4 | import ListRow from '../index'; 5 | 6 | describe('', () => { 7 | it('should render its children', () => { 8 | const children = (

Test

); 9 | const renderedComponent = shallow( 10 | 11 | {children} 12 | 13 | ); 14 | expect(renderedComponent.contains(children)).toBe(true); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/components/Modal/actions.js: -------------------------------------------------------------------------------- 1 | import { 2 | CONTROL_MODAL 3 | } from './constants'; 4 | 5 | export function controlModal(data) { 6 | return { 7 | type: CONTROL_MODAL, 8 | data 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /src/components/Modal/constants.js: -------------------------------------------------------------------------------- 1 | export const CONTROL_MODAL = 'dl/CONTROL_MODAL'; -------------------------------------------------------------------------------- /src/components/Pagination/actions.js: -------------------------------------------------------------------------------- 1 | import {UPDATE_PAGINATION} from './constants'; 2 | 3 | export function updatePagination(data) { 4 | return { 5 | type: UPDATE_PAGINATION, 6 | data 7 | }; 8 | } -------------------------------------------------------------------------------- /src/components/Pagination/constants.js: -------------------------------------------------------------------------------- 1 | export const UPDATE_PAGINATION = 'dl/UPDATE_PAGINATION'; -------------------------------------------------------------------------------- /src/components/Pagination/reducer.js: -------------------------------------------------------------------------------- 1 | import { } from './constants'; 2 | 3 | //@todo find a better place to inject this 4 | import config from '../../../dataListConfig'; 5 | 6 | const initialState = { 7 | config 8 | }; 9 | 10 | function paginationReducer(state = initialState, action) { 11 | let _state = Object.assign({},state), 12 | _data = action.data; 13 | 14 | switch (action.type) { 15 | 16 | default: 17 | return _state; 18 | } 19 | } 20 | 21 | export default paginationReducer; 22 | -------------------------------------------------------------------------------- /src/components/Pagination/sagas.js: -------------------------------------------------------------------------------- 1 | import * as effects from 'redux-saga/effects'; 2 | import {} from './constants'; 3 | import utils,{l,sagaRequest,sagaRequestSetup} from '../../utils'; 4 | 5 | /** 6 | * pagination request/response handler 7 | */ 8 | export function* fetchPagination(args) { 9 | yield* sagaRequest( 10 | paginationsModel.getById, 11 | {entityUUID: args.data.entityUUID}, 12 | GET_APP_SUCCEEDED, 13 | GET_APP_FAILED, 14 | {...effects}, 15 | false 16 | ); 17 | } 18 | 19 | /** 20 | * Root saga manages watcher lifecycle 21 | */ 22 | export function* getPagination() { 23 | yield* sagaRequestSetup(fetchPagination, GET_APP, {...effects}) 24 | } 25 | 26 | // Bootstrap sagas 27 | export default [ 28 | getPagination 29 | ]; 30 | -------------------------------------------------------------------------------- /src/components/Pagination/tests/index.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { shallow } from 'enzyme'; 3 | 4 | import Pagination from '../index'; 5 | 6 | describe('', () => { 7 | it('should render its children', () => { 8 | const children = (

Test

); 9 | const renderedComponent = shallow( 10 | 11 | {children} 12 | 13 | ); 14 | expect(renderedComponent.contains(children)).toBe(true); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/components/SaveFilterset/actions.js: -------------------------------------------------------------------------------- 1 | // import {FILTER_CHANGE} from './constants'; 2 | 3 | // export function filterChange(data) { 4 | // return { 5 | // type: FILTER_CHANGE, 6 | // data 7 | // }; 8 | // } -------------------------------------------------------------------------------- /src/components/SaveFilterset/constants.js: -------------------------------------------------------------------------------- 1 | /* 2 | * FilterItemConstants 3 | * Each action has a corresponding type, which the reducer knows and picks up on. 4 | * To avoid weird typos between the reducer and the actions, we save them as 5 | * constants here. We prefix them with 'yourproject/YourComponent' so we avoid 6 | * reducers accidentally picking up actions they shouldn't. 7 | * 8 | * Follow this format: 9 | * export const YOUR_ACTION_CONSTANT = 'yourproject/YourContainer/YOUR_ACTION_CONSTANT'; 10 | */ 11 | // export const FILTER_CHANGE = 'dl/FILTER_CHANGE'; -------------------------------------------------------------------------------- /src/components/SaveFilterset/messages.js: -------------------------------------------------------------------------------- 1 | /* 2 | * saveFilterset Messages 3 | * 4 | * This contains all the text for the saveFilterset component. 5 | */ 6 | import { defineMessages } from 'react-intl'; 7 | 8 | export default defineMessages({ 9 | inputLabel: { 10 | id: 'containers.saveFilterset.inputLabel', 11 | defaultMessage: 'Save Current Filterset', 12 | }, 13 | inputPlaceholder: { 14 | id: 'containers.saveFilterset.inputPlaceholder', 15 | defaultMessage: 'Name your new filterset', 16 | }, 17 | selectLabel: { 18 | id: 'containers.saveFilterset.selectLabel', 19 | defaultMessage: 'Run previously saved filtersets', 20 | }, 21 | formSubmitValue: { 22 | id: 'containers.saveFilterset.formSubmitValue', 23 | defaultMessage: 'Save', 24 | }, 25 | deleteFilterset: { 26 | id: 'containers.saveFilterset.deleteFilterset', 27 | defaultMessage: 'Delete saved filterset', 28 | }, 29 | 30 | }); 31 | -------------------------------------------------------------------------------- /src/components/SaveFilterset/reducer.js: -------------------------------------------------------------------------------- 1 | import { } from './constants'; 2 | 3 | // //@todo find a better place to inject this 4 | // import config from '../../../dataListConfig'; 5 | 6 | const initialState = { 7 | // config 8 | }; 9 | 10 | function saveFiltersetReducer(state = initialState, action) { 11 | let _state = Object.assign({},state), 12 | _data = action.data; 13 | 14 | switch (action.type) { 15 | 16 | default: 17 | return _state; 18 | } 19 | } 20 | 21 | export default saveFiltersetReducer; 22 | -------------------------------------------------------------------------------- /src/components/SaveFilterset/sagas.js: -------------------------------------------------------------------------------- 1 | import * as effects from 'redux-saga/effects'; 2 | import {} from './constants'; 3 | import utils,{l,sagaRequest,sagaRequestSetup} from '../../utils'; 4 | 5 | /** 6 | * filterItem request/response handler 7 | */ 8 | // export function* fetchFilterItem(args) { 9 | // yield* sagaRequest( 10 | // filterItemsModel.getById, 11 | // {entityUUID: args.data.entityUUID}, 12 | // GET_APP_SUCCEEDED, 13 | // GET_APP_FAILED, 14 | // {...effects}, 15 | // false 16 | // ); 17 | // } 18 | 19 | // /** 20 | // * Root saga manages watcher lifecycle 21 | // */ 22 | // export function* getFilterItem() { 23 | // yield* sagaRequestSetup(fetchFilterItem, GET_APP, {...effects}) 24 | // } 25 | 26 | // Bootstrap sagas 27 | export default [ 28 | // getFilterItem 29 | ]; 30 | -------------------------------------------------------------------------------- /src/components/SaveFilterset/tests/index.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { shallow } from 'enzyme'; 3 | 4 | import FilterItem from '../index'; 5 | 6 | describe('', () => { 7 | it('should render its children', () => { 8 | const children = (

Test

); 9 | const renderedComponent = shallow( 10 | 11 | {children} 12 | 13 | ); 14 | expect(renderedComponent.contains(children)).toBe(true); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/components/Search/actions.js: -------------------------------------------------------------------------------- 1 | import {FILTER_CHANGE,UPDATE_SEARCH_INPUT} from './constants'; 2 | 3 | export function filterChange(data) { 4 | return { 5 | type: FILTER_CHANGE, 6 | data 7 | }; 8 | } 9 | 10 | export function updateSearch(data) { 11 | return { 12 | type: UPDATE_SEARCH_INPUT, 13 | data 14 | }; 15 | } -------------------------------------------------------------------------------- /src/components/Search/constants.js: -------------------------------------------------------------------------------- 1 | export const FILTER_CHANGE = 'dl/FILTER_CHANGE'; 2 | export const UPDATE_SEARCH_INPUT = 'dl/UPDATE_SEARCH_INPUT'; -------------------------------------------------------------------------------- /src/components/Search/reducer.js: -------------------------------------------------------------------------------- 1 | import { } from './constants'; 2 | 3 | //@todo find a better place to inject this 4 | import config from '../../../dataListConfig'; 5 | 6 | const initialState = { 7 | config 8 | }; 9 | 10 | function searchReducer(state = initialState, action) { 11 | let _state = Object.assign({},state), 12 | _data = action.data; 13 | 14 | switch (action.type) { 15 | 16 | default: 17 | return _state; 18 | } 19 | } 20 | 21 | export default searchReducer; 22 | -------------------------------------------------------------------------------- /src/components/Search/sagas.js: -------------------------------------------------------------------------------- 1 | import * as effects from 'redux-saga/effects'; 2 | import {} from './constants'; 3 | import utils,{l,sagaRequest,sagaRequestSetup} from '../../utils'; 4 | 5 | /** 6 | * search request/response handler 7 | */ 8 | export function* fetchSearch(args) { 9 | yield* sagaRequest( 10 | searchsModel.getById, 11 | {entityUUID: args.data.entityUUID}, 12 | GET_APP_SUCCEEDED, 13 | GET_APP_FAILED, 14 | {...effects}, 15 | false 16 | ); 17 | } 18 | 19 | /** 20 | * Root saga manages watcher lifecycle 21 | */ 22 | export function* getSearch() { 23 | yield* sagaRequestSetup(fetchSearch, GET_APP, {...effects}) 24 | } 25 | 26 | // Bootstrap sagas 27 | export default [ 28 | getSearch 29 | ]; 30 | -------------------------------------------------------------------------------- /src/components/Search/tests/index.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { shallow } from 'enzyme'; 3 | 4 | import Search from '../index'; 5 | 6 | describe('', () => { 7 | it('should render its children', () => { 8 | const children = (

Test

); 9 | const renderedComponent = shallow( 10 | 11 | {children} 12 | 13 | ); 14 | expect(renderedComponent.contains(children)).toBe(true); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/components/SortItem/tests/index.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { shallow } from 'enzyme'; 3 | 4 | import ListRow from '../index'; 5 | 6 | describe('', () => { 7 | it('should render its children', () => { 8 | const children = (

Test

); 9 | const renderedComponent = shallow( 10 | 11 | {children} 12 | 13 | ); 14 | expect(renderedComponent.contains(children)).toBe(true); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/components/TextItem/actions.js: -------------------------------------------------------------------------------- 1 | import {UPDATE_WORKSPACE} from './constants'; 2 | 3 | export function updateWorkspace(data) { 4 | return { 5 | type: UPDATE_WORKSPACE, 6 | data 7 | }; 8 | } -------------------------------------------------------------------------------- /src/components/TextItem/constants.js: -------------------------------------------------------------------------------- 1 | export const UPDATE_WORKSPACE = 'dl/UPDATE_WORKSPACE'; -------------------------------------------------------------------------------- /src/components/TextItem/reducer.js: -------------------------------------------------------------------------------- 1 | import { } from './constants'; 2 | 3 | //@todo find a better place to inject this 4 | import config from '../../../dataListConfig'; 5 | 6 | const initialState = { 7 | config 8 | }; 9 | 10 | function textItemReducer(state = initialState, action) { 11 | let _state = Object.assign({},state), 12 | _data = action.data; 13 | 14 | switch (action.type) { 15 | 16 | default: 17 | return _state; 18 | } 19 | } 20 | 21 | export default textItemReducer; 22 | -------------------------------------------------------------------------------- /src/components/TextItem/sagas.js: -------------------------------------------------------------------------------- 1 | import * as effects from 'redux-saga/effects'; 2 | import {} from './constants'; 3 | import utils,{l,sagaRequest,sagaRequestSetup} from '../../utils'; 4 | 5 | /** 6 | * textItem request/response handler 7 | */ 8 | export function* fetchTextItem(args) { 9 | yield* sagaRequest( 10 | textItemsModel.getById, 11 | {entityUUID: args.data.entityUUID}, 12 | GET_APP_SUCCEEDED, 13 | GET_APP_FAILED, 14 | {...effects}, 15 | false 16 | ); 17 | } 18 | 19 | /** 20 | * Root saga manages watcher lifecycle 21 | */ 22 | export function* getTextItem() { 23 | yield* sagaRequestSetup(fetchTextItem, GET_APP, {...effects}) 24 | } 25 | 26 | // Bootstrap sagas 27 | export default [ 28 | getTextItem 29 | ]; 30 | -------------------------------------------------------------------------------- /src/components/TextItem/tests/index.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { shallow } from 'enzyme'; 3 | 4 | import TextItem from '../index'; 5 | 6 | describe('', () => { 7 | it('should render its children', () => { 8 | const children = (

Test

); 9 | const renderedComponent = shallow( 10 | 11 | {children} 12 | 13 | ); 14 | expect(renderedComponent.contains(children)).toBe(true); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/components/View/actions.js: -------------------------------------------------------------------------------- 1 | import {RESET_FILTERS} from './constants'; 2 | 3 | 4 | export function resetFilters(data) { 5 | return { 6 | type: RESET_FILTERS, 7 | data 8 | }; 9 | } -------------------------------------------------------------------------------- /src/components/View/constants.js: -------------------------------------------------------------------------------- 1 | export const RESET_FILTERS = 'dl/RESET_FILTERS'; -------------------------------------------------------------------------------- /src/components/View/reducer.js: -------------------------------------------------------------------------------- 1 | import { } from './constants'; 2 | 3 | //@todo find a better place to inject this 4 | import config from '../../../dataListConfig'; 5 | 6 | const initialState = { 7 | config 8 | }; 9 | 10 | function viewReducer(state = initialState, action) { 11 | let _state = Object.assign({},state), 12 | _data = action.data; 13 | 14 | switch (action.type) { 15 | 16 | default: 17 | return _state; 18 | } 19 | } 20 | 21 | export default viewReducer; 22 | -------------------------------------------------------------------------------- /src/components/View/sagas.js: -------------------------------------------------------------------------------- 1 | import * as effects from 'redux-saga/effects'; 2 | import {} from './constants'; 3 | import utils,{l,sagaRequest,sagaRequestSetup} from '../../utils'; 4 | 5 | /** 6 | * view request/response handler 7 | */ 8 | export function* fetchView(args) { 9 | yield* sagaRequest( 10 | viewsModel.getById, 11 | {entityUUID: args.data.entityUUID}, 12 | GET_APP_SUCCEEDED, 13 | GET_APP_FAILED, 14 | {...effects}, 15 | false 16 | ); 17 | } 18 | 19 | /** 20 | * Root saga manages watcher lifecycle 21 | */ 22 | export function* getView() { 23 | yield* sagaRequestSetup(fetchView, GET_APP, {...effects}) 24 | } 25 | 26 | // Bootstrap sagas 27 | export default [ 28 | getView 29 | ]; 30 | -------------------------------------------------------------------------------- /src/components/View/styles.scss: -------------------------------------------------------------------------------- 1 | .dl__view{ 2 | 3 | &[data-active="true"]{ 4 | // border-top: 1px solid #efefef; 5 | } 6 | } -------------------------------------------------------------------------------- /src/components/ViewInfo/actions.js: -------------------------------------------------------------------------------- 1 | import {FILTER_CHANGE,UPDATE_SEARCH_INPUT, CONTROL_MODAL} from './constants'; 2 | 3 | export function filterChange(data) { 4 | return { 5 | type: FILTER_CHANGE, 6 | data 7 | }; 8 | } 9 | 10 | export function updateSearch(data) { 11 | return { 12 | type: UPDATE_SEARCH_INPUT, 13 | data 14 | }; 15 | } 16 | 17 | export function controlModal(data) { 18 | return { 19 | type: CONTROL_MODAL, 20 | data 21 | }; 22 | } -------------------------------------------------------------------------------- /src/components/ViewInfo/constants.js: -------------------------------------------------------------------------------- 1 | export const FILTER_CHANGE = 'dl/FILTER_CHANGE'; 2 | export const UPDATE_SEARCH_INPUT = 'dl/UPDATE_SEARCH_INPUT'; 3 | export const CONTROL_MODAL = 'dl/CONTROL_MODAL'; -------------------------------------------------------------------------------- /src/components/ViewInfo/reducer.js: -------------------------------------------------------------------------------- 1 | import { } from './constants'; 2 | 3 | //@todo find a better place to inject this 4 | import config from '../../../dataListConfig'; 5 | 6 | const initialState = { 7 | config 8 | }; 9 | 10 | function searchReducer(state = initialState, action) { 11 | let _state = Object.assign({},state), 12 | _data = action.data; 13 | 14 | switch (action.type) { 15 | 16 | default: 17 | return _state; 18 | } 19 | } 20 | 21 | export default searchReducer; 22 | -------------------------------------------------------------------------------- /src/components/ViewInfo/sagas.js: -------------------------------------------------------------------------------- 1 | import * as effects from 'redux-saga/effects'; 2 | import {} from './constants'; 3 | import utils,{l,sagaRequest,sagaRequestSetup} from '../../utils'; 4 | 5 | /** 6 | * search request/response handler 7 | */ 8 | export function* fetchSearch(args) { 9 | yield* sagaRequest( 10 | searchsModel.getById, 11 | {entityUUID: args.data.entityUUID}, 12 | GET_APP_SUCCEEDED, 13 | GET_APP_FAILED, 14 | {...effects}, 15 | false 16 | ); 17 | } 18 | 19 | /** 20 | * Root saga manages watcher lifecycle 21 | */ 22 | export function* getSearch() { 23 | yield* sagaRequestSetup(fetchSearch, GET_APP, {...effects}) 24 | } 25 | 26 | // Bootstrap sagas 27 | export default [ 28 | getSearch 29 | ]; 30 | -------------------------------------------------------------------------------- /src/components/ViewInfo/tests/index.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { shallow } from 'enzyme'; 3 | 4 | import Search from '../index'; 5 | 6 | describe('', () => { 7 | it('should render its children', () => { 8 | const children = (

Test

); 9 | const renderedComponent = shallow( 10 | 11 | {children} 12 | 13 | ); 14 | expect(renderedComponent.contains(children)).toBe(true); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/components/imports.scss: -------------------------------------------------------------------------------- 1 | @import "./Checkbox/styles"; 2 | @import "./CustomItem/styles"; 3 | @import "./DisplayItem/styles"; 4 | @import "./FilterGroup/styles"; 5 | @import "./FilterItem/styles"; 6 | @import "./ListRow/styles"; 7 | @import "./TextItem/styles"; 8 | @import "./View/styles"; 9 | @import "./Search/styles"; 10 | @import "./PropertySearch/styles"; 11 | @import "./Pagination/styles"; 12 | @import "./ListHeader/styles"; 13 | @import "./ListFooter/styles"; 14 | @import "./ColumnSelector/styles"; 15 | @import "./ViewInfo/styles"; 16 | @import "./SaveFilterset/styles"; 17 | @import "./SortItem/styles"; 18 | @import "./Modal/styles"; 19 | @import "./Exports/styles"; 20 | @import "DatePicker/styles"; 21 | @import "Dimensions/styles"; 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/containers/App/actions.js: -------------------------------------------------------------------------------- 1 | import { 2 | UPDATE_ITEMS, 3 | ON_APP_INIT, 4 | FILTER_CHANGE, 5 | UPDATE_PAGINATION 6 | } from './constants'; 7 | 8 | export function updateItems(data) { 9 | return { 10 | type: UPDATE_ITEMS, 11 | data 12 | }; 13 | } 14 | 15 | export function appInit(data) { 16 | return { 17 | type: ON_APP_INIT, 18 | data 19 | }; 20 | } 21 | 22 | export function updatePagination(data) { 23 | return { 24 | type: UPDATE_PAGINATION, 25 | data 26 | }; 27 | } 28 | 29 | export function filterChange(data) { 30 | return { 31 | type: FILTER_CHANGE, 32 | data 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /src/containers/App/sagas.js: -------------------------------------------------------------------------------- 1 | import * as effects from 'redux-saga/effects'; 2 | import {} from './constants'; 3 | import utils,{l,sagaRequest,sagaRequestSetup} from '../../utils'; 4 | 5 | /** 6 | * app request/response handler 7 | */ 8 | export function* fetchApp(args) { 9 | yield* sagaRequest( 10 | appsModel.getById, 11 | {entityUUID: args.data.entityUUID}, 12 | GET_APP_SUCCEEDED, 13 | GET_APP_FAILED, 14 | {...effects}, 15 | false 16 | ); 17 | } 18 | 19 | /** 20 | * Root saga manages watcher lifecycle 21 | */ 22 | export function* getApp() { 23 | yield* sagaRequestSetup(fetchApp, GET_APP, {...effects}) 24 | } 25 | 26 | // Bootstrap sagas 27 | export default [ 28 | getApp 29 | ]; 30 | -------------------------------------------------------------------------------- /src/containers/App/styles.scss: -------------------------------------------------------------------------------- 1 | .dl{ 2 | position: relative; 3 | 4 | &__container{ 5 | @extend .cf; 6 | position: relative; 7 | // overflow-x: hidden; 8 | padding-bottom: 57px; 9 | width: 102%; 10 | } 11 | } -------------------------------------------------------------------------------- /src/containers/App/tests/index.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { shallow } from 'enzyme'; 3 | 4 | import App from '../index'; 5 | 6 | describe('', () => { 7 | it('should render its children', () => { 8 | const children = (

Test

); 9 | const renderedComponent = shallow( 10 | 11 | {children} 12 | 13 | ); 14 | expect(renderedComponent.contains(children)).toBe(true); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/containers/DataList/actions.js: -------------------------------------------------------------------------------- 1 | import {} from './constants'; 2 | 3 | /** 4 | * Load the repositories, this action starts the request saga 5 | */ 6 | //export function notify(data) { 7 | // return { 8 | // type: NOTIFY, 9 | // data 10 | // }; 11 | //} -------------------------------------------------------------------------------- /src/containers/DataList/constants.js: -------------------------------------------------------------------------------- 1 | /* 2 | * DataListConstants 3 | * Each action has a corresponding type, which the reducer knows and picks up on. 4 | * To avoid weird typos between the reducer and the actions, we save them as 5 | * constants here. We prefix them with 'yourproject/YourComponent' so we avoid 6 | * reducers accidentally picking up actions they shouldn't. 7 | * 8 | * Follow this format: 9 | * export const YOUR_ACTION_CONSTANT = 'yourproject/YourContainer/YOUR_ACTION_CONSTANT'; 10 | */ 11 | export const DEFAULT_LOCALE = 'en'; 12 | //export const DEFAULT_LOCALE = 'dataList/dataList/en'; -------------------------------------------------------------------------------- /src/containers/DataList/reducer.js: -------------------------------------------------------------------------------- 1 | import { } from './constants'; 2 | 3 | //@todo find a better place to inject this 4 | import config from '../../../dataListConfig'; 5 | 6 | const initialState = { 7 | config 8 | }; 9 | 10 | function dataListReducer(state = initialState, action) { 11 | let _state = Object.assign({},state), 12 | _data = action.data; 13 | 14 | switch (action.type) { 15 | 16 | default: 17 | return _state; 18 | } 19 | } 20 | 21 | export default dataListReducer; 22 | -------------------------------------------------------------------------------- /src/containers/DataList/sagas.js: -------------------------------------------------------------------------------- 1 | import * as effects from 'redux-saga/effects'; 2 | import {} from './constants'; 3 | import utils,{l,sagaRequest,sagaRequestSetup} from '../../utils'; 4 | 5 | /** 6 | * dataList request/response handler 7 | */ 8 | export function* fetchDataList(args) { 9 | yield* sagaRequest( 10 | dataListsModel.getById, 11 | {entityUUID: args.data.entityUUID}, 12 | GET_APP_SUCCEEDED, 13 | GET_APP_FAILED, 14 | {...effects}, 15 | false 16 | ); 17 | } 18 | 19 | /** 20 | * Root saga manages watcher lifecycle 21 | */ 22 | export function* getDataList() { 23 | yield* sagaRequestSetup(fetchDataList, GET_APP, {...effects}) 24 | } 25 | 26 | // Bootstrap sagas 27 | export default [ 28 | getDataList 29 | ]; 30 | -------------------------------------------------------------------------------- /src/containers/DataList/tests/index.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { shallow } from 'enzyme'; 3 | 4 | import DataList from '../index'; 5 | 6 | describe('', () => { 7 | it('should render its children', () => { 8 | const children = (

Test

); 9 | const renderedComponent = shallow( 10 | 11 | {children} 12 | 13 | ); 14 | expect(renderedComponent.contains(children)).toBe(true); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/containers/Filters/actions.js: -------------------------------------------------------------------------------- 1 | import {UPDATE_CURRENT_TAB} from './constants'; 2 | 3 | /** 4 | * Load the repositories, this action starts the request saga 5 | */ 6 | export function updateCurrentTab(data) { 7 | return { 8 | type: UPDATE_CURRENT_TAB, 9 | data 10 | }; 11 | } -------------------------------------------------------------------------------- /src/containers/Filters/constants.js: -------------------------------------------------------------------------------- 1 | /* 2 | * FiltersConstants 3 | * Each action has a corresponding type, which the reducer knows and picks up on. 4 | * To avoid weird typos between the reducer and the actions, we save them as 5 | * constants here. We prefix them with 'yourproject/YourComponent' so we avoid 6 | * reducers accidentally picking up actions they shouldn't. 7 | * 8 | * Follow this format: 9 | * export const YOUR_ACTION_CONSTANT = 'yourproject/YourContainer/YOUR_ACTION_CONSTANT'; 10 | */ 11 | export const UPDATE_CURRENT_TAB = 'dl/UPDATE_CURRENT_TAB'; -------------------------------------------------------------------------------- /src/containers/Filters/reducer.js: -------------------------------------------------------------------------------- 1 | import { } from './constants'; 2 | 3 | //@todo find a better place to inject this 4 | import config from '../../../dataListConfig'; 5 | 6 | const initialState = { 7 | config 8 | }; 9 | 10 | function filtersReducer(state = initialState, action) { 11 | let _state = Object.assign({},state), 12 | _data = action.data; 13 | 14 | switch (action.type) { 15 | 16 | default: 17 | return _state; 18 | } 19 | } 20 | 21 | export default filtersReducer; 22 | -------------------------------------------------------------------------------- /src/containers/Filters/sagas.js: -------------------------------------------------------------------------------- 1 | import * as effects from 'redux-saga/effects'; 2 | import {} from './constants'; 3 | import utils,{l,sagaRequest,sagaRequestSetup} from '../../utils'; 4 | 5 | /** 6 | * filters request/response handler 7 | */ 8 | export function* fetchFilters(args) { 9 | yield* sagaRequest( 10 | filterssModel.getById, 11 | {entityUUID: args.data.entityUUID}, 12 | GET_APP_SUCCEEDED, 13 | GET_APP_FAILED, 14 | {...effects}, 15 | false 16 | ); 17 | } 18 | 19 | /** 20 | * Root saga manages watcher lifecycle 21 | */ 22 | export function* getFilters() { 23 | yield* sagaRequestSetup(fetchFilters, GET_APP, {...effects}) 24 | } 25 | 26 | // Bootstrap sagas 27 | export default [ 28 | getFilters 29 | ]; 30 | -------------------------------------------------------------------------------- /src/containers/Filters/tests/index.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { shallow } from 'enzyme'; 3 | 4 | import Filters from '../index'; 5 | 6 | describe('', () => { 7 | it('should render its children', () => { 8 | const children = (

Test

); 9 | const renderedComponent = shallow( 10 | 11 | {children} 12 | 13 | ); 14 | expect(renderedComponent.contains(children)).toBe(true); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/containers/Footer/actions.js: -------------------------------------------------------------------------------- 1 | import {} from './constants'; 2 | 3 | /** 4 | * Load the repositories, this action starts the request saga 5 | */ 6 | //export function notify(data) { 7 | // return { 8 | // type: NOTIFY, 9 | // data 10 | // }; 11 | //} -------------------------------------------------------------------------------- /src/containers/Footer/constants.js: -------------------------------------------------------------------------------- 1 | /* 2 | * FooterConstants 3 | * Each action has a corresponding type, which the reducer knows and picks up on. 4 | * To avoid weird typos between the reducer and the actions, we save them as 5 | * constants here. We prefix them with 'yourproject/YourComponent' so we avoid 6 | * reducers accidentally picking up actions they shouldn't. 7 | * 8 | * Follow this format: 9 | * export const YOUR_ACTION_CONSTANT = 'yourproject/YourContainer/YOUR_ACTION_CONSTANT'; 10 | */ 11 | export const DEFAULT_LOCALE = 'en'; 12 | //export const DEFAULT_LOCALE = 'dataList/footer/en'; -------------------------------------------------------------------------------- /src/containers/Footer/index.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { bindActionCreators } from 'redux'; 3 | import { connect } from 'react-redux'; 4 | import * as FooterActions from './actions'; 5 | 6 | class Footer extends Component { // eslint-disable-line react/prefer-stateless-function 7 | constructor(props) { 8 | super(props) 9 | } 10 | 11 | render() { 12 | return ( 13 |
14 |
15 | ); 16 | } 17 | } 18 | 19 | //Which part of the Redux global state does our component want to receive as props? 20 | function mapStateToProps(state,ownProps) { 21 | return { 22 | config:state.app.config, 23 | footer : state.footer 24 | }; 25 | } 26 | 27 | function mapDispatchToProps(dispatch) { 28 | return bindActionCreators(FooterActions, dispatch); 29 | } 30 | 31 | export default connect( 32 | mapStateToProps, 33 | mapDispatchToProps 34 | )(Footer); -------------------------------------------------------------------------------- /src/containers/Footer/reducer.js: -------------------------------------------------------------------------------- 1 | import { } from './constants'; 2 | 3 | //@todo find a better place to inject this 4 | import config from '../../../dataListConfig'; 5 | 6 | const initialState = { 7 | config 8 | }; 9 | 10 | function footerReducer(state = initialState, action) { 11 | let _state = Object.assign({},state), 12 | _data = action.data; 13 | 14 | switch (action.type) { 15 | 16 | default: 17 | return _state; 18 | } 19 | } 20 | 21 | export default footerReducer; 22 | -------------------------------------------------------------------------------- /src/containers/Footer/sagas.js: -------------------------------------------------------------------------------- 1 | import * as effects from 'redux-saga/effects'; 2 | import {} from './constants'; 3 | import utils,{l,sagaRequest,sagaRequestSetup} from '../../utils'; 4 | 5 | /** 6 | * footer request/response handler 7 | */ 8 | export function* fetchFooter(args) { 9 | yield* sagaRequest( 10 | footersModel.getById, 11 | {entityUUID: args.data.entityUUID}, 12 | GET_APP_SUCCEEDED, 13 | GET_APP_FAILED, 14 | {...effects}, 15 | false 16 | ); 17 | } 18 | 19 | /** 20 | * Root saga manages watcher lifecycle 21 | */ 22 | export function* getFooter() { 23 | yield* sagaRequestSetup(fetchFooter, GET_APP, {...effects}) 24 | } 25 | 26 | // Bootstrap sagas 27 | export default [ 28 | getFooter 29 | ]; 30 | -------------------------------------------------------------------------------- /src/containers/Footer/styles.scss: -------------------------------------------------------------------------------- 1 | .dl__footer{ 2 | clear: both; 3 | } -------------------------------------------------------------------------------- /src/containers/Footer/tests/index.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { shallow } from 'enzyme'; 3 | 4 | import Footer from '../index'; 5 | 6 | describe('