@urbanos/react-discovery-ui 2.1.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +118 -0
- package/lib/ReactDiscoveryUI.js +103 -0
- package/lib/ReactDiscoveryUI.scss +13 -0
- package/lib/assets/arrow.svg +6 -0
- package/lib/assets/blk-database.svg +48 -0
- package/lib/assets/chart.svg +1 -0
- package/lib/assets/down.png +0 -0
- package/lib/assets/down.svg +1 -0
- package/lib/assets/folder_icon.png +0 -0
- package/lib/assets/folder_icon.svg +1 -0
- package/lib/assets/ic_arrow.svg +15 -0
- package/lib/assets/loadingicon.svg +57 -0
- package/lib/assets/no_image.png +0 -0
- package/lib/assets/plus.png +0 -0
- package/lib/assets/plus.svg +1 -0
- package/lib/assets/user.svg +1 -0
- package/lib/auth/auth0-client-provider.js +37 -0
- package/lib/auth/auth0-client-provider.test.js +33 -0
- package/lib/auth/auth0-wrapper.js +155 -0
- package/lib/auth/auth0-wrapper.test.js +100 -0
- package/lib/components/auth0-login-zone/auth0-login-zone.js +147 -0
- package/lib/components/auth0-login-zone/auth0-login-zone.test.js +177 -0
- package/lib/components/auth0-login-zone/index.js +9 -0
- package/lib/components/code-editor/code-editor.css +173 -0
- package/lib/components/code-editor/code-editor.js +64 -0
- package/lib/components/code-editor/index.js +9 -0
- package/lib/components/collapsable-box/collapsable-box.js +81 -0
- package/lib/components/collapsable-box/collapsable-box.scss +39 -0
- package/lib/components/collapsable-box/collapsable-box.test.js +87 -0
- package/lib/components/collapsable-box/index.js +9 -0
- package/lib/components/data-card/data-card.js +63 -0
- package/lib/components/data-card/data-card.scss +93 -0
- package/lib/components/data-card/data-card.test.js +74 -0
- package/lib/components/data-card/index.js +9 -0
- package/lib/components/data-view/data-view.js +194 -0
- package/lib/components/data-view/data-view.scss +39 -0
- package/lib/components/data-view/data-view.test.js +155 -0
- package/lib/components/data-view/index.js +9 -0
- package/lib/components/dataset-api-doc/api-example.js +120 -0
- package/lib/components/dataset-api-doc/api-example.scss +84 -0
- package/lib/components/dataset-api-doc/api-example.test.js +88 -0
- package/lib/components/dataset-api-doc/dataset-api-doc.js +117 -0
- package/lib/components/dataset-api-doc/dataset-api-doc.scss +8 -0
- package/lib/components/dataset-api-doc/dataset-api-doc.test.js +42 -0
- package/lib/components/dataset-api-doc/index.js +9 -0
- package/lib/components/dataset-details/dataset-details.js +64 -0
- package/lib/components/dataset-details/dataset-details.scss +58 -0
- package/lib/components/dataset-details/dataset-details.test.js +38 -0
- package/lib/components/dataset-details/index.js +9 -0
- package/lib/components/dataset-dictionary/dataset-dictionary.js +127 -0
- package/lib/components/dataset-dictionary/dataset-dictionary.scss +42 -0
- package/lib/components/dataset-dictionary/dataset-dictionary.test.js +286 -0
- package/lib/components/dataset-dictionary/index.js +9 -0
- package/lib/components/dataset-list/dataset-list.js +22 -0
- package/lib/components/dataset-list/dataset-list.scss +9 -0
- package/lib/components/dataset-list/dataset-list.test.js +16 -0
- package/lib/components/dataset-list/index.js +9 -0
- package/lib/components/dataset-metadata/dataset-metadata.js +169 -0
- package/lib/components/dataset-metadata/dataset-metadata.scss +34 -0
- package/lib/components/dataset-metadata/dataset-metadata.test.js +24 -0
- package/lib/components/dataset-metadata/index.js +9 -0
- package/lib/components/dataset-preview/connector.js +26 -0
- package/lib/components/dataset-preview/dataset-preview.js +58 -0
- package/lib/components/dataset-preview/dataset-preview.scss +24 -0
- package/lib/components/dataset-preview/dataset-preview.test.js +34 -0
- package/lib/components/dataset-preview/index.js +9 -0
- package/lib/components/dataset-quality/dataset-quality.js +56 -0
- package/lib/components/dataset-quality/dataset-quality.scss +24 -0
- package/lib/components/dataset-quality/dataset-quality.test.js +34 -0
- package/lib/components/dataset-quality/index.js +9 -0
- package/lib/components/dataset-recommendations/connector.js +24 -0
- package/lib/components/dataset-recommendations/dataset-recommendations.js +47 -0
- package/lib/components/dataset-recommendations/dataset-recommendations.scss +17 -0
- package/lib/components/dataset-recommendations/dataset-recommendations.test.js +37 -0
- package/lib/components/dataset-recommendations/index.js +9 -0
- package/lib/components/detail-toggle-icon/detail-toggle-icon.js +41 -0
- package/lib/components/detail-toggle-icon/detail-toggle-icon.scss +13 -0
- package/lib/components/detail-toggle-icon/detail-toggle-icon.test.js +20 -0
- package/lib/components/detail-toggle-icon/index.js +9 -0
- package/lib/components/facet-list/facet-list.js +47 -0
- package/lib/components/facet-list/facet-list.scss +19 -0
- package/lib/components/facet-list/facet-list.test.js +94 -0
- package/lib/components/facet-list/index.js +9 -0
- package/lib/components/facet-sidebar/facet-sidebar.js +101 -0
- package/lib/components/facet-sidebar/facet-sidebar.scss +129 -0
- package/lib/components/facet-sidebar/facet-sidebar.test.js +93 -0
- package/lib/components/facet-sidebar/index.js +9 -0
- package/lib/components/generic-elements/alert-component/alert-component.js +51 -0
- package/lib/components/generic-elements/alert-component/alert-component.scss +26 -0
- package/lib/components/generic-elements/alert-component/alert-component.test.js +26 -0
- package/lib/components/generic-elements/alert-component/index.js +9 -0
- package/lib/components/generic-elements/arrow-button/arrow-button.js +30 -0
- package/lib/components/generic-elements/arrow-button/index.js +9 -0
- package/lib/components/generic-elements/auto-anchoring-popover/index.js +61 -0
- package/lib/components/generic-elements/back-button/back-button.js +14 -0
- package/lib/components/generic-elements/back-button/back-button.scss +14 -0
- package/lib/components/generic-elements/back-button/index.js +9 -0
- package/lib/components/generic-elements/call-to-action-button/call-to-action-button.js +118 -0
- package/lib/components/generic-elements/call-to-action-button/call-to-action-button.scss +19 -0
- package/lib/components/generic-elements/call-to-action-button/call-to-action-button.test.js +68 -0
- package/lib/components/generic-elements/call-to-action-button/index.js +9 -0
- package/lib/components/generic-elements/chart-icon/index.js +23 -0
- package/lib/components/generic-elements/checkbox/checkbox.js +50 -0
- package/lib/components/generic-elements/checkbox/checkbox.scss +44 -0
- package/lib/components/generic-elements/checkbox/checkbox.test.js +71 -0
- package/lib/components/generic-elements/checkbox/index.js +9 -0
- package/lib/components/generic-elements/error-component/error-component.js +21 -0
- package/lib/components/generic-elements/error-component/error-component.scss +16 -0
- package/lib/components/generic-elements/error-component/error-component.test.js +12 -0
- package/lib/components/generic-elements/error-component/index.js +9 -0
- package/lib/components/generic-elements/folder-icon/index.js +23 -0
- package/lib/components/generic-elements/generated-link/generated-link.js +25 -0
- package/lib/components/generic-elements/generated-link/index.js +13 -0
- package/lib/components/generic-elements/loading-element/index.js +9 -0
- package/lib/components/generic-elements/loading-element/loading-element.js +22 -0
- package/lib/components/generic-elements/loading-element/loading-element.scss +6 -0
- package/lib/components/generic-elements/loading-element/loading-element.test.js +11 -0
- package/lib/components/generic-elements/paginator/index.js +9 -0
- package/lib/components/generic-elements/paginator/paginator.js +84 -0
- package/lib/components/generic-elements/paginator/paginator.scss +38 -0
- package/lib/components/generic-elements/paginator/paginator.test.js +140 -0
- package/lib/components/generic-elements/plus-icon/index.js +21 -0
- package/lib/components/generic-elements/save-indicator/index.js +9 -0
- package/lib/components/generic-elements/save-indicator/save-indicator.js +39 -0
- package/lib/components/generic-elements/save-indicator/save-indicator.scss +31 -0
- package/lib/components/generic-elements/save-indicator/save-indicator.test.js +89 -0
- package/lib/components/generic-elements/search/index.js +9 -0
- package/lib/components/generic-elements/search/search.js +93 -0
- package/lib/components/generic-elements/search/search.scss +90 -0
- package/lib/components/generic-elements/search/search.test.js +41 -0
- package/lib/components/generic-elements/select/index.js +9 -0
- package/lib/components/generic-elements/select/select.js +44 -0
- package/lib/components/generic-elements/select/select.scss +22 -0
- package/lib/components/generic-elements/select/select.test.js +34 -0
- package/lib/components/generic-elements/share-link/index.js +9 -0
- package/lib/components/generic-elements/share-link/share-link.js +23 -0
- package/lib/components/generic-elements/share-link/share-link.scss +17 -0
- package/lib/components/generic-elements/share-link/share-link.test.js +28 -0
- package/lib/components/generic-elements/sql-icon/index.js +20 -0
- package/lib/components/generic-elements/tab-button/index.js +9 -0
- package/lib/components/generic-elements/tab-button/tab-button.js +25 -0
- package/lib/components/generic-elements/tab-button/tab-button.scss +27 -0
- package/lib/components/generic-elements/visualize-button/index.js +9 -0
- package/lib/components/generic-elements/visualize-button/visualize-button.js +37 -0
- package/lib/components/generic-elements/visualize-button/visualize-button.scss +14 -0
- package/lib/components/login-zone/connector.js +25 -0
- package/lib/components/login-zone/index.js +9 -0
- package/lib/components/login-zone/login-svgs-and-text.js +39 -0
- package/lib/components/login-zone/login-zone.js +21 -0
- package/lib/components/login-zone/login-zone.scss +115 -0
- package/lib/components/login-zone/login-zone.test.js +17 -0
- package/lib/components/login-zone/login.js +48 -0
- package/lib/components/login-zone/logout.js +39 -0
- package/lib/components/network-loading-element/connector.js +17 -0
- package/lib/components/network-loading-element/index.js +9 -0
- package/lib/components/network-loading-element/network-loading-element.js +23 -0
- package/lib/components/network-loading-element/network-loading-element.scss +21 -0
- package/lib/components/network-loading-element/network-loading-element.test.js +34 -0
- package/lib/components/organization/index.js +9 -0
- package/lib/components/organization/organization.js +27 -0
- package/lib/components/organization/organization.scss +32 -0
- package/lib/components/protected-route/protected-route.js +101 -0
- package/lib/components/protected-route/protected-route.scss +4 -0
- package/lib/components/protected-route/protected-route.test.js +63 -0
- package/lib/components/query-form/index.js +9 -0
- package/lib/components/query-form/query-form.js +262 -0
- package/lib/components/query-form/query-form.scss +167 -0
- package/lib/components/query-form/query-form.test.js +248 -0
- package/lib/components/recommendation-list/index.js +9 -0
- package/lib/components/recommendation-list/recommendation-list.js +72 -0
- package/lib/components/recommendation-list/recommendation-list.scss +61 -0
- package/lib/components/recommendation-list/recommendation-list.test.js +38 -0
- package/lib/components/remote-toggle/__snapshots__/remote-toggle.test.js.snap +3 -0
- package/lib/components/remote-toggle/index.js +13 -0
- package/lib/components/remote-toggle/remote-toggle.js +35 -0
- package/lib/components/remote-toggle/remote-toggle.scss +0 -0
- package/lib/components/remote-toggle/remote-toggle.test.js +10 -0
- package/lib/components/share/index.js +9 -0
- package/lib/components/share/share.js +109 -0
- package/lib/components/share/share.scss +66 -0
- package/lib/components/streaming-api-doc/index.js +9 -0
- package/lib/components/streaming-api-doc/streaming-api-doc.js +76 -0
- package/lib/components/streaming-api-doc/streaming-api-doc.scss +23 -0
- package/lib/components/streaming-api-doc/streaming-api-doc.test.js +24 -0
- package/lib/components/tooltip/index.js +9 -0
- package/lib/components/tooltip/tooltip.js +17 -0
- package/lib/components/tooltip/tooltip.scss +16 -0
- package/lib/components/tooltip/tooltip.test.js +19 -0
- package/lib/components/visualization-list-menu-item/index.js +9 -0
- package/lib/components/visualization-list-menu-item/visualization-list-menu-item.js +53 -0
- package/lib/components/visualization-list-menu-item/visualization-list-menu-item.scss +21 -0
- package/lib/components/visualization-list-menu-item/visualization-list-menu-item.test.js +42 -0
- package/lib/components/visualization-save-menu-item/index.js +9 -0
- package/lib/components/visualization-save-menu-item/visualization-save-menu-item.js +101 -0
- package/lib/components/visualization-save-menu-item/visualization-save-menu-item.scss +37 -0
- package/lib/components/visualization-save-menu-item/visualization-save-menu-item.test.js +185 -0
- package/lib/components/visualizations/geojson/connector.js +29 -0
- package/lib/components/visualizations/geojson/geojson-visualization.js +151 -0
- package/lib/components/visualizations/geojson/geojson-visualization.scss +24 -0
- package/lib/components/visualizations/geojson/geojson-visualization.test.js +238 -0
- package/lib/components/visualizations/geojson/index.js +9 -0
- package/lib/pages/apikey-view/apiKey-view.test.js +204 -0
- package/lib/pages/apikey-view/apikey-view.js +166 -0
- package/lib/pages/apikey-view/apikey-view.scss +340 -0
- package/lib/pages/apikey-view/connector.js +31 -0
- package/lib/pages/apikey-view/index.js +9 -0
- package/lib/pages/chart-view/chart-view.js +92 -0
- package/lib/pages/chart-view/chart-view.scss +35 -0
- package/lib/pages/chart-view/chart-view.test.js +206 -0
- package/lib/pages/chart-view/connector.js +30 -0
- package/lib/pages/chart-view/index.js +9 -0
- package/lib/pages/dataset-detail-view/connector.js +38 -0
- package/lib/pages/dataset-detail-view/dataset-detail-view-connector.test.js +42 -0
- package/lib/pages/dataset-detail-view/dataset-detail-view.js +99 -0
- package/lib/pages/dataset-detail-view/dataset-detail-view.scss +190 -0
- package/lib/pages/dataset-detail-view/dataset-detail-view.test.js +305 -0
- package/lib/pages/dataset-detail-view/index.js +9 -0
- package/lib/pages/dataset-list-view/connector.js +30 -0
- package/lib/pages/dataset-list-view/dataset-list-view.js +132 -0
- package/lib/pages/dataset-list-view/dataset-list-view.scss +242 -0
- package/lib/pages/dataset-list-view/dataset-list-view.test.js +162 -0
- package/lib/pages/dataset-list-view/index.js +9 -0
- package/lib/pages/dataset-view/connector.js +55 -0
- package/lib/pages/dataset-view/dataset-view-connector.test.js +78 -0
- package/lib/pages/dataset-view/dataset-view.js +175 -0
- package/lib/pages/dataset-view/dataset-view.scss +95 -0
- package/lib/pages/dataset-view/dataset-view.test.js +157 -0
- package/lib/pages/dataset-view/index.js +9 -0
- package/lib/pages/login-view/connector.js +25 -0
- package/lib/pages/login-view/index.js +9 -0
- package/lib/pages/login-view/login-view.js +83 -0
- package/lib/pages/login-view/login-view.scss +62 -0
- package/lib/pages/login-view/login-view.test.js +23 -0
- package/lib/pages/oauth-error-view/index.js +9 -0
- package/lib/pages/oauth-error-view/oauth-error-view.js +25 -0
- package/lib/pages/oauth-error-view/oauth-error-view.scss +13 -0
- package/lib/pages/oauth-error-view/oauth-error-view.test.js +13 -0
- package/lib/pages/oauth-view/connector.js +22 -0
- package/lib/pages/oauth-view/index.js +9 -0
- package/lib/pages/oauth-view/oauth-view.js +124 -0
- package/lib/pages/oauth-view/oauth-view.scss +7 -0
- package/lib/pages/oauth-view/oauth-view.test.js +195 -0
- package/lib/pages/query-view/connector.js +40 -0
- package/lib/pages/query-view/index.js +9 -0
- package/lib/pages/query-view/query-view.js +80 -0
- package/lib/pages/query-view/query-view.scss +39 -0
- package/lib/pages/query-view/query-view.test.js +104 -0
- package/lib/pages/user-profile-view/connector.js +39 -0
- package/lib/pages/user-profile-view/index.js +9 -0
- package/lib/pages/user-profile-view/user-profile-view.js +154 -0
- package/lib/pages/user-profile-view/user-profile-view.scss +81 -0
- package/lib/pages/user-profile-view/user-profile-view.test.js +129 -0
- package/lib/pages/visualization-view/connector.js +52 -0
- package/lib/pages/visualization-view/index.js +9 -0
- package/lib/pages/visualization-view/visualization-view-connector.test.js +62 -0
- package/lib/pages/visualization-view/visualization-view.js +128 -0
- package/lib/pages/visualization-view/visualization-view.scss +115 -0
- package/lib/pages/visualization-view/visualization-view.test.js +188 -0
- package/lib/routes.js +18 -0
- package/lib/search-params/search-params-manager.js +171 -0
- package/lib/search-params/search-params-manager.test.js +490 -0
- package/lib/store/actions.js +428 -0
- package/lib/store/dataset-selectors.js +47 -0
- package/lib/store/dataset-selectors.test.js +154 -0
- package/lib/store/query-selectors.js +53 -0
- package/lib/store/query-selectors.test.js +153 -0
- package/lib/store/reducers/index.js +20 -0
- package/lib/store/reducers/query-reducer.js +52 -0
- package/lib/store/reducers/query-reducer.test.js +89 -0
- package/lib/store/reducers/reducers.js +196 -0
- package/lib/store/reducers/reducers.test.js +309 -0
- package/lib/store/reducers/visualization-reducer.js +167 -0
- package/lib/store/reducers/visualization-reducer.test.js +426 -0
- package/lib/store/sagas/api-invoker.js +79 -0
- package/lib/store/sagas/api-invoker.test.js +139 -0
- package/lib/store/sagas/apiKey-saga.js +81 -0
- package/lib/store/sagas/apiKey-saga.test.js +57 -0
- package/lib/store/sagas/dataset-download-saga.js +43 -0
- package/lib/store/sagas/dataset-list-saga.js +49 -0
- package/lib/store/sagas/dataset-list-saga.test.js +72 -0
- package/lib/store/sagas/dataset-preview-saga.js +44 -0
- package/lib/store/sagas/dataset-query-saga.js +43 -0
- package/lib/store/sagas/dataset-recommendation-saga.js +40 -0
- package/lib/store/sagas/dataset-saga.js +50 -0
- package/lib/store/sagas/freestyle-query-saga.js +127 -0
- package/lib/store/sagas/freestyle-query-saga.test.js +145 -0
- package/lib/store/sagas/index.js +44 -0
- package/lib/store/sagas/login-saga.js +85 -0
- package/lib/store/sagas/login-saga.test.js +84 -0
- package/lib/store/sagas/logout-saga.js +96 -0
- package/lib/store/sagas/oauth-saga.js +78 -0
- package/lib/store/sagas/oauth-saga.test.js +51 -0
- package/lib/store/sagas/process-login-saga.js +62 -0
- package/lib/store/sagas/process-login-saga.test.js +83 -0
- package/lib/store/sagas/visualization-saga.js +371 -0
- package/lib/store/sagas/visualization-saga.test.js +388 -0
- package/lib/store/selectors.js +83 -0
- package/lib/store/visualization-selectors.js +85 -0
- package/lib/store/visualization-selectors.test.js +195 -0
- package/lib/styles/mixins.scss +117 -0
- package/lib/styles/variables.scss +41 -0
- package/lib/utils/file-type-utils.js +18 -0
- package/lib/utils/file-type-utils.test.js +29 -0
- package/lib/utils/geojson-utils.js +70 -0
- package/lib/utils/geojson-utils.test.js +129 -0
- package/lib/utils/http-clients.js +218 -0
- package/lib/utils/http-clients.test.js +88 -0
- package/lib/utils/index.js +34 -0
- package/lib/utils/modified-date-string-builder.js +29 -0
- package/lib/utils/modified-date-string-builder.test.js +93 -0
- package/lib/utils/query-string-builder.js +38 -0
- package/lib/utils/query-string-builder.test.js +33 -0
- package/lib/utils/recommendation-utils.js +12 -0
- package/lib/utils/recommendation-utils.test.js +9 -0
- package/package.json +172 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _facetList = _interopRequireDefault(require("./facet-list"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
var _default = exports.default = _facetList.default;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _facetList = _interopRequireDefault(require("../facet-list"));
|
|
9
|
+
var _lodash = _interopRequireDefault(require("lodash"));
|
|
10
|
+
require("./facet-sidebar.scss");
|
|
11
|
+
var _react = require("react");
|
|
12
|
+
var _core = require("@material-ui/core");
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
15
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
16
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
19
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
20
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
21
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
22
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
23
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
24
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
25
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
26
|
+
var _default = exports.default = /*#__PURE__*/function (_Component) {
|
|
27
|
+
function _default(props) {
|
|
28
|
+
var _this;
|
|
29
|
+
_classCallCheck(this, _default);
|
|
30
|
+
_this = _callSuper(this, _default, [props]);
|
|
31
|
+
_this.state = {
|
|
32
|
+
dialogFacets: [],
|
|
33
|
+
dialogTitle: '',
|
|
34
|
+
showDialog: false
|
|
35
|
+
};
|
|
36
|
+
return _this;
|
|
37
|
+
}
|
|
38
|
+
_inherits(_default, _Component);
|
|
39
|
+
return _createClass(_default, [{
|
|
40
|
+
key: "render",
|
|
41
|
+
value: function render() {
|
|
42
|
+
var _this2 = this;
|
|
43
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
"data-testid": "facet-sidebar",
|
|
45
|
+
className: "facet-sidebar"
|
|
46
|
+
}, _lodash.default.map(this.props.availableFacets, function (rawFacets, title) {
|
|
47
|
+
var facets = rawFacets.map(function (facet) {
|
|
48
|
+
var selected = _lodash.default.get(_this2.props, "appliedFacets.".concat(title), []).includes(facet.name);
|
|
49
|
+
return Object.assign({}, facet, {
|
|
50
|
+
selected: selected
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
return /*#__PURE__*/React.createElement(_facetList.default, {
|
|
54
|
+
facets: facets,
|
|
55
|
+
title: title,
|
|
56
|
+
clickHandler: function clickHandler(name) {
|
|
57
|
+
return _this2.clickHandler(title, name);
|
|
58
|
+
},
|
|
59
|
+
showMoreHandler: function showMoreHandler(title, facets) {
|
|
60
|
+
return _this2.showMoreHandler(title, facets);
|
|
61
|
+
},
|
|
62
|
+
limit: 10,
|
|
63
|
+
key: title
|
|
64
|
+
});
|
|
65
|
+
}), /*#__PURE__*/React.createElement(_core.Dialog, {
|
|
66
|
+
open: this.state.showDialog,
|
|
67
|
+
onClose: function onClose() {
|
|
68
|
+
_this2.setState({
|
|
69
|
+
showDialog: false
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
73
|
+
"data-testid": "dialog-content",
|
|
74
|
+
className: "dialog-content"
|
|
75
|
+
}, /*#__PURE__*/React.createElement(_facetList.default, {
|
|
76
|
+
facets: this.state.dialogFacets,
|
|
77
|
+
title: this.state.dialogTitle,
|
|
78
|
+
clickHandler: function clickHandler(name) {
|
|
79
|
+
return _this2.clickHandler(_this2.state.dialogTitle, name);
|
|
80
|
+
}
|
|
81
|
+
}))));
|
|
82
|
+
}
|
|
83
|
+
}, {
|
|
84
|
+
key: "showMoreHandler",
|
|
85
|
+
value: function showMoreHandler(title, facets) {
|
|
86
|
+
this.setState({
|
|
87
|
+
dialogTitle: title,
|
|
88
|
+
dialogFacets: facets,
|
|
89
|
+
showDialog: true
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}, {
|
|
93
|
+
key: "clickHandler",
|
|
94
|
+
value: function clickHandler(title, name) {
|
|
95
|
+
this.props.clickHandler(title, name);
|
|
96
|
+
this.setState({
|
|
97
|
+
showDialog: false
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}]);
|
|
101
|
+
}(_react.Component);
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
@import '../../styles/variables.scss';
|
|
2
|
+
@import '../../styles/mixins.scss';
|
|
3
|
+
|
|
4
|
+
.facet-sidebar {
|
|
5
|
+
display: block;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
padding: 0 2em 0 0;
|
|
8
|
+
float: left;
|
|
9
|
+
margin-top: 20px;
|
|
10
|
+
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.checkbox-label {
|
|
14
|
+
font-size: 12px;
|
|
15
|
+
line-height: 1;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.dialog-content {
|
|
19
|
+
padding: 2rem;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.facet-list .show-more {
|
|
23
|
+
padding: 5px 0 1em 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.facet-list .section-header {
|
|
27
|
+
font-size: 1rem;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@media only screen and (max-width: 600px) {
|
|
31
|
+
.checkbox {
|
|
32
|
+
float: right;
|
|
33
|
+
text-align: left;
|
|
34
|
+
display: block;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.checkbox-indicator {
|
|
38
|
+
display: block;
|
|
39
|
+
float: left;
|
|
40
|
+
margin: 0 7px 0 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.checkbox-indicator .checkmark {
|
|
44
|
+
margin-left: 6px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.checkbox-label {
|
|
48
|
+
margin: 0px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.facet-sidebar {
|
|
52
|
+
margin-top: 10px;
|
|
53
|
+
clear: both;
|
|
54
|
+
width: 100%;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.facet-sidebar .checkbox.selected {
|
|
58
|
+
display: block;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.facet-list {
|
|
62
|
+
border: 1px solid #d2d4d6;
|
|
63
|
+
padding: 0px 15px;
|
|
64
|
+
margin-bottom: 10px;
|
|
65
|
+
border-radius: 4px;
|
|
66
|
+
position: relative;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.dialog-content .facet-list {
|
|
70
|
+
border: none;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.dialog-content .checkbox {
|
|
74
|
+
width: 100%;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.facet-list .section-header {
|
|
78
|
+
border: none;
|
|
79
|
+
font-weight: normal;
|
|
80
|
+
padding: .75rem 0 .5rem 0;
|
|
81
|
+
color: $dark-gray;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.facet-list .show-more {
|
|
85
|
+
z-index: 100;
|
|
86
|
+
width: 100%;
|
|
87
|
+
height: 100%;
|
|
88
|
+
position: absolute;
|
|
89
|
+
display: block;
|
|
90
|
+
left: 0px;
|
|
91
|
+
top: 0px;
|
|
92
|
+
text-align: right;
|
|
93
|
+
color: #999999;
|
|
94
|
+
font-size: 1px;
|
|
95
|
+
background-image: url(../../assets/plus.png);
|
|
96
|
+
background-repeat: no-repeat;
|
|
97
|
+
background-position: 98% 10px;
|
|
98
|
+
background-size: 28px 28px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
login-zone login-svgs-and-text span {
|
|
102
|
+
display: none;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
login-zone login-svgs-and-text .MuiSvgIcon-root {
|
|
106
|
+
font-size: 2.4rem;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
login-zone .login-arrow {
|
|
110
|
+
display: none;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
search-box .search-bar {
|
|
114
|
+
box-shadow: none;
|
|
115
|
+
border-radius: 30px;
|
|
116
|
+
padding: 10px 3.5rem;
|
|
117
|
+
font-size: 130%;
|
|
118
|
+
background: #edf1f5;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
search-box .search .MuiSvgIcon-root {
|
|
122
|
+
width: 2rem;
|
|
123
|
+
height: 2rem;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
search-box .clear {
|
|
127
|
+
margin: 10px 0
|
|
128
|
+
}
|
|
129
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import FacetSidebar from './facet-sidebar'
|
|
2
|
+
import { shallow } from 'enzyme'
|
|
3
|
+
|
|
4
|
+
describe('facet sidebar', () => {
|
|
5
|
+
let subject, mockClickHandler
|
|
6
|
+
const availableFacets = {
|
|
7
|
+
organization: [
|
|
8
|
+
{ name: 'neat COTA', count: 1 },
|
|
9
|
+
{ name: 'Apple', count: 1 },
|
|
10
|
+
{ name: 'Massive Data', count: 5 },
|
|
11
|
+
{ name: 'Interesting Things', count: 3 },
|
|
12
|
+
{ name: 'Conduent', count: 2 }
|
|
13
|
+
],
|
|
14
|
+
tags: [
|
|
15
|
+
{ name: 'foo', count: 5 },
|
|
16
|
+
{ name: 'dilbert', count: 10 },
|
|
17
|
+
{ name: 'jimmy', count: 1 },
|
|
18
|
+
{ name: 'bar', count: 2 },
|
|
19
|
+
{ name: 'Zoo', count: 2 }
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
const appliedFacets = {
|
|
23
|
+
tags: [
|
|
24
|
+
'foo', 'dilbert'
|
|
25
|
+
],
|
|
26
|
+
organization: [
|
|
27
|
+
'Apple', 'Massive Data', 'Conduent'
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
beforeEach(() => {
|
|
32
|
+
mockClickHandler = jest.fn()
|
|
33
|
+
subject = shallow(
|
|
34
|
+
<FacetSidebar
|
|
35
|
+
availableFacets={availableFacets}
|
|
36
|
+
appliedFacets={appliedFacets}
|
|
37
|
+
clickHandler={mockClickHandler}
|
|
38
|
+
/>
|
|
39
|
+
)
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
it('has two facet lists and dialog when given two types of facets', () => {
|
|
43
|
+
expect(subject.children()).toHaveLength(3)
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
it('sets the selected facets based on the applied facets', () => {
|
|
47
|
+
const expectedSelectedTags = [
|
|
48
|
+
{ name: 'foo', count: 5, selected: true },
|
|
49
|
+
{ name: 'dilbert', count: 10, selected: true },
|
|
50
|
+
{ name: 'jimmy', count: 1, selected: false },
|
|
51
|
+
{ name: 'bar', count: 2, selected: false },
|
|
52
|
+
{ name: 'Zoo', count: 2, selected: false }
|
|
53
|
+
]
|
|
54
|
+
|
|
55
|
+
const expectedSelectedOrgs = [
|
|
56
|
+
{ name: 'neat COTA', count: 1, selected: false },
|
|
57
|
+
{ name: 'Apple', count: 1, selected: true },
|
|
58
|
+
{ name: 'Massive Data', count: 5, selected: true },
|
|
59
|
+
{ name: 'Interesting Things', count: 3, selected: false },
|
|
60
|
+
{ name: 'Conduent', count: 2, selected: true }
|
|
61
|
+
]
|
|
62
|
+
|
|
63
|
+
expect(subject.childAt(0).prop('facets')).toEqual(expectedSelectedOrgs)
|
|
64
|
+
expect(subject.childAt(1).prop('facets')).toEqual(expectedSelectedTags)
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
it('sets the dialog state variables when showMoreHandler is called', () => {
|
|
68
|
+
const facets = [
|
|
69
|
+
{ name: 'foo', count: 5, selected: true },
|
|
70
|
+
{ name: 'dilbert', count: 10, selected: true },
|
|
71
|
+
{ name: 'jimmy', count: 1, selected: false }
|
|
72
|
+
]
|
|
73
|
+
|
|
74
|
+
subject.childAt(0).prop('showMoreHandler')('title', facets)
|
|
75
|
+
expect(subject.state('showDialog')).toBeTruthy()
|
|
76
|
+
expect(subject.state('dialogFacets')).toEqual(facets)
|
|
77
|
+
expect(subject.state('dialogTitle')).toEqual('title')
|
|
78
|
+
})
|
|
79
|
+
|
|
80
|
+
it('sets show dialog to false when the clickHander is invoked', () => {
|
|
81
|
+
subject.childAt(0).prop('clickHandler')('name')
|
|
82
|
+
|
|
83
|
+
expect(subject.state('showDialog')).toEqual(false)
|
|
84
|
+
expect(mockClickHandler).toBeCalledWith('organization', 'name')
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
it('sets showDialog to false when dialog is closed', () => {
|
|
88
|
+
subject.setState({ showDialog: true })
|
|
89
|
+
subject.childAt(2).prop('onClose')()
|
|
90
|
+
|
|
91
|
+
expect(subject.state('showDialog')).toEqual(false)
|
|
92
|
+
})
|
|
93
|
+
})
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _facetSidebar = _interopRequireDefault(require("./facet-sidebar"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
var _default = exports.default = _facetSidebar.default;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
require("./alert-component.scss");
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _Snackbar = _interopRequireDefault(require("@material-ui/core/Snackbar"));
|
|
10
|
+
var _IconButton = _interopRequireDefault(require("@material-ui/core/IconButton"));
|
|
11
|
+
var _Error = _interopRequireDefault(require("@material-ui/icons/Error"));
|
|
12
|
+
var _Close = _interopRequireDefault(require("@material-ui/icons/Close"));
|
|
13
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
|
+
var _core = require("@material-ui/core");
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
+
var AlertComponent = function AlertComponent(props) {
|
|
17
|
+
var errorMessage = props.errorMessage,
|
|
18
|
+
showAlert = props.showAlert,
|
|
19
|
+
closeFunction = props.closeFunction;
|
|
20
|
+
return /*#__PURE__*/_react.default.createElement("alert-component", null, showAlert && /*#__PURE__*/_react.default.createElement(_Snackbar.default, {
|
|
21
|
+
anchorOrigin: {
|
|
22
|
+
vertical: 'bottom',
|
|
23
|
+
horizontal: 'right'
|
|
24
|
+
},
|
|
25
|
+
open: showAlert,
|
|
26
|
+
onClose: closeFunction
|
|
27
|
+
}, /*#__PURE__*/_react.default.createElement(_core.SnackbarContent, {
|
|
28
|
+
className: "error",
|
|
29
|
+
"aria-describedby": "client-snackbar",
|
|
30
|
+
message: /*#__PURE__*/_react.default.createElement("span", {
|
|
31
|
+
id: "client-snackbar",
|
|
32
|
+
className: "errorMessage"
|
|
33
|
+
}, /*#__PURE__*/_react.default.createElement(_Error.default, {
|
|
34
|
+
className: "errorIcon"
|
|
35
|
+
}), errorMessage),
|
|
36
|
+
action: [/*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
37
|
+
key: "close",
|
|
38
|
+
"aria-label": "close",
|
|
39
|
+
color: "inherit",
|
|
40
|
+
onClick: closeFunction
|
|
41
|
+
}, /*#__PURE__*/_react.default.createElement(_Close.default, {
|
|
42
|
+
className: "icon"
|
|
43
|
+
}))]
|
|
44
|
+
})));
|
|
45
|
+
};
|
|
46
|
+
AlertComponent.propTypes = {
|
|
47
|
+
errorMessage: _propTypes.default.string,
|
|
48
|
+
showAlert: _propTypes.default.bool,
|
|
49
|
+
closeFunction: _propTypes.default.func.isRequired
|
|
50
|
+
};
|
|
51
|
+
var _default = exports.default = AlertComponent;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
@import '../../../styles/variables.scss';
|
|
2
|
+
@import '../../../styles/mixins.scss';
|
|
3
|
+
|
|
4
|
+
alert-component {
|
|
5
|
+
.close {
|
|
6
|
+
padding: 0.5rem;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.error {
|
|
10
|
+
background-color: $error-color;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.icon {
|
|
14
|
+
font-size: 20;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.errorIcon {
|
|
18
|
+
opacity: 0.9;
|
|
19
|
+
margin-right: 0.9rem;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.errorMessage {
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { mount } from 'enzyme'
|
|
2
|
+
import AlertComponent from './alert-component'
|
|
3
|
+
import Snackbar from '@material-ui/core/Snackbar'
|
|
4
|
+
|
|
5
|
+
describe('alert-component', () => {
|
|
6
|
+
let subject
|
|
7
|
+
const fakeText = 'help there is an error and its your fault'
|
|
8
|
+
const closeFunction = jest.fn()
|
|
9
|
+
|
|
10
|
+
test('renders text based on props', () => {
|
|
11
|
+
subject = mount(<AlertComponent errorMessage={fakeText} showAlert closeFunction={closeFunction} />)
|
|
12
|
+
expect(subject.find('.errorMessage').text()).toEqual(fakeText)
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
test('hides based on props', () => {
|
|
16
|
+
subject = mount(<AlertComponent errorMessage={fakeText} showAlert={false} closeFunction={closeFunction} />)
|
|
17
|
+
expect(subject.find('.errorMessage').exists()).toBe(false)
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
test('fires closeFunction on close', () => {
|
|
21
|
+
const mockClickHandler = jest.fn()
|
|
22
|
+
subject = mount(<AlertComponent errorMessage={fakeText} showAlert closeFunction={mockClickHandler} />)
|
|
23
|
+
subject.find(Snackbar).prop('onClose')()
|
|
24
|
+
expect(mockClickHandler).toHaveBeenCalledTimes(1)
|
|
25
|
+
})
|
|
26
|
+
})
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _alertComponent = _interopRequireDefault(require("./alert-component"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
var _default = exports.default = _alertComponent.default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _reactSvgInline = _interopRequireDefault(require("react-svg-inline"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
var arrow = "<svg viewBox=\"0 0 8 12\" xmlns=\"http://www.w3.org/2000/svg\"><g id=\"arrow-designs\" stroke=\"none\" stroke-width=\"1\" transform=\"rotate(90 4 4)\"><path id=\"arrow-path-1\" d=\"M1.41.59L6 5.17 10.59.59 12 2 6 8 0 2z\"/></g></svg>";
|
|
10
|
+
var ENABLED_COLOR = '#000000';
|
|
11
|
+
var DISABLED_COLOR = '#595959';
|
|
12
|
+
var _default = exports.default = function _default(_ref) {
|
|
13
|
+
var className = _ref.className,
|
|
14
|
+
_ref$disabled = _ref.disabled,
|
|
15
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
16
|
+
_ref$onClick = _ref.onClick,
|
|
17
|
+
onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
|
|
18
|
+
innerClass = _ref.innerClass;
|
|
19
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
20
|
+
disabled: disabled,
|
|
21
|
+
className: "".concat(className, " ").concat(disabled ? 'disabled' : ''),
|
|
22
|
+
onClick: onClick
|
|
23
|
+
}, /*#__PURE__*/React.createElement(_reactSvgInline.default, {
|
|
24
|
+
className: innerClass,
|
|
25
|
+
svg: arrow,
|
|
26
|
+
height: "inherit",
|
|
27
|
+
fill: disabled ? DISABLED_COLOR : ENABLED_COLOR,
|
|
28
|
+
accessibilityDesc: "Arrow"
|
|
29
|
+
}));
|
|
30
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _arrowButton = _interopRequireDefault(require("./arrow-button"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
var _default = exports.default = _arrowButton.default;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _core = require("@material-ui/core");
|
|
10
|
+
var _excluded = ["children", "className"];
|
|
11
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
12
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
13
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
14
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
15
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
16
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
17
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
18
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
19
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
20
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
21
|
+
var AutoAnchoringPopover = function AutoAnchoringPopover(_ref) {
|
|
22
|
+
var children = _ref.children,
|
|
23
|
+
_ref$className = _ref.className,
|
|
24
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
25
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
26
|
+
var _useState = (0, _react.useState)({
|
|
27
|
+
current: null
|
|
28
|
+
}),
|
|
29
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
30
|
+
popoverAnchorRef = _useState2[0],
|
|
31
|
+
setPopoverAnchorRef = _useState2[1];
|
|
32
|
+
_react.default.useEffect(function () {
|
|
33
|
+
setPopoverAnchorRef(/*#__PURE__*/_react.default.createRef());
|
|
34
|
+
}, []);
|
|
35
|
+
var popoverActions = _react.default.useRef();
|
|
36
|
+
_react.default.useEffect(function () {
|
|
37
|
+
if (popoverActions.current) popoverActions.current.updatePosition();
|
|
38
|
+
}, [children]);
|
|
39
|
+
var currentPopoverAnchorElement = function currentPopoverAnchorElement() {
|
|
40
|
+
return popoverAnchorRef.current ? popoverAnchorRef.current : null;
|
|
41
|
+
};
|
|
42
|
+
return /*#__PURE__*/_react.default.createElement("auto-anchoring-popover", {
|
|
43
|
+
class: className,
|
|
44
|
+
ref: popoverAnchorRef
|
|
45
|
+
}, /*#__PURE__*/_react.default.createElement(_core.Popover, _extends({}, props, {
|
|
46
|
+
anchorEl: currentPopoverAnchorElement,
|
|
47
|
+
container: currentPopoverAnchorElement,
|
|
48
|
+
transformOrigin: {
|
|
49
|
+
vertical: 'top',
|
|
50
|
+
horizontal: 'right'
|
|
51
|
+
},
|
|
52
|
+
anchorOrigin: {
|
|
53
|
+
vertical: 'bottom',
|
|
54
|
+
horizontal: 'right'
|
|
55
|
+
},
|
|
56
|
+
marginThreshold: 0,
|
|
57
|
+
transitionDuration: 0,
|
|
58
|
+
action: popoverActions
|
|
59
|
+
}), children));
|
|
60
|
+
};
|
|
61
|
+
var _default = exports.default = AutoAnchoringPopover;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
require("./back-button.scss");
|
|
8
|
+
var _generatedLink = require("../generated-link");
|
|
9
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
10
|
+
var _default = exports.default = function _default(props) {
|
|
11
|
+
return /*#__PURE__*/React.createElement(_generatedLink.GeneratedLink, _extends({
|
|
12
|
+
className: "back-button"
|
|
13
|
+
}, props), props.children);
|
|
14
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
@import '../../../styles/variables.scss';
|
|
2
|
+
@import '../../../styles/mixins.scss';
|
|
3
|
+
|
|
4
|
+
.back-button {
|
|
5
|
+
@include button();
|
|
6
|
+
padding: 1.0rem;
|
|
7
|
+
width: auto;
|
|
8
|
+
background-color: $light-blue;
|
|
9
|
+
color: white;
|
|
10
|
+
letter-spacing: 0.05rem;
|
|
11
|
+
margin: 1rem;
|
|
12
|
+
align-self: flex-end;
|
|
13
|
+
float: right;
|
|
14
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _backButton = _interopRequireDefault(require("./back-button"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
var _default = exports.default = _backButton.default;
|