@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,371 @@
|
|
|
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 = visualizationSaga;
|
|
8
|
+
exports.deleteVisualization = deleteVisualization;
|
|
9
|
+
exports.loadDatasetReferences = loadDatasetReferences;
|
|
10
|
+
exports.loadVisualizationSaga = loadVisualizationSaga;
|
|
11
|
+
exports.saveVisualization = saveVisualization;
|
|
12
|
+
var _effects = require("redux-saga/effects");
|
|
13
|
+
var _actions = require("../actions");
|
|
14
|
+
var _httpClients = require("../../utils/http-clients");
|
|
15
|
+
var _visualizationSelectors = require("../visualization-selectors");
|
|
16
|
+
var _excluded = ["id"];
|
|
17
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
18
|
+
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; } }
|
|
19
|
+
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; }
|
|
20
|
+
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; }
|
|
21
|
+
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; }
|
|
22
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
25
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
26
|
+
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); }
|
|
27
|
+
function _regeneratorRuntime() { "use strict"; var r = _regenerator(), e = r.m(_regeneratorRuntime), t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; function n(r) { var e = "function" == typeof r && r.constructor; return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); } var o = { throw: 1, return: 2, break: 3, continue: 3 }; function a(r) { var e, t; return function (n) { e || (e = { stop: function stop() { return t(n.a, 2); }, catch: function _catch() { return n.v; }, abrupt: function abrupt(r, e) { return t(n.a, o[r], e); }, delegateYield: function delegateYield(r, o, a) { return e.resultName = o, t(n.d, _regeneratorValues(r), a); }, finish: function finish(r) { return t(n.f, r); } }, t = function t(r, _t, o) { n.p = e.prev, n.n = e.next; try { return r(_t, o); } finally { e.next = n.n; } }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; try { return r.call(this, e); } finally { n.p = e.prev, n.n = e.next; } }; } return (_regeneratorRuntime = function _regeneratorRuntime() { return { wrap: function wrap(e, t, n, o) { return r.w(a(e), t, n, o && o.reverse()); }, isGeneratorFunction: n, mark: r.m, awrap: function awrap(r, e) { return new _OverloadYield(r, e); }, AsyncIterator: _regeneratorAsyncIterator, async: function async(r, e, t, o, u) { return (n(e) ? _regeneratorAsyncGen : _regeneratorAsync)(a(r), e, t, o, u); }, keys: _regeneratorKeys, values: _regeneratorValues }; })(); }
|
|
28
|
+
function _regeneratorValues(e) { if (null != e) { var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], r = 0; if (t) return t.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) return { next: function next() { return e && r >= e.length && (e = void 0), { value: e && e[r++], done: !e }; } }; } throw new TypeError(_typeof(e) + " is not iterable"); }
|
|
29
|
+
function _regeneratorKeys(e) { var n = Object(e), r = []; for (var t in n) r.unshift(t); return function e() { for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; return e.done = !0, e; }; }
|
|
30
|
+
function _regeneratorAsync(n, e, r, t, o) { var a = _regeneratorAsyncGen(n, e, r, t, o); return a.next().then(function (n) { return n.done ? n.value : a.next(); }); }
|
|
31
|
+
function _regeneratorAsyncGen(r, e, t, o, n) { return new _regeneratorAsyncIterator(_regenerator().w(r, e, t, o), n || Promise); }
|
|
32
|
+
function _regeneratorAsyncIterator(t, e) { function n(r, o, i, f) { try { var c = t[r](o), u = c.value; return u instanceof _OverloadYield ? e.resolve(u.v).then(function (t) { n("next", t, i, f); }, function (t) { n("throw", t, i, f); }) : e.resolve(u).then(function (t) { c.value = t, i(c); }, function (t) { return n("throw", t, i, f); }); } catch (t) { f(t); } } var r; this.next || (_regeneratorDefine2(_regeneratorAsyncIterator.prototype), _regeneratorDefine2(_regeneratorAsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () { return this; })), _regeneratorDefine2(this, "_invoke", function (t, o, i) { function f() { return new e(function (e, r) { n(t, i, e, r); }); } return r = r ? r.then(f, f) : f(); }, !0); }
|
|
33
|
+
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
34
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
35
|
+
function _OverloadYield(e, d) { this.v = e, this.k = d; }
|
|
36
|
+
var _marked = /*#__PURE__*/_regeneratorRuntime().mark(loadVisualizationSaga),
|
|
37
|
+
_marked2 = /*#__PURE__*/_regeneratorRuntime().mark(loadUserVisualizationsSaga),
|
|
38
|
+
_marked3 = /*#__PURE__*/_regeneratorRuntime().mark(loadUserVisualizations),
|
|
39
|
+
_marked4 = /*#__PURE__*/_regeneratorRuntime().mark(saveVisualizationSaga),
|
|
40
|
+
_marked5 = /*#__PURE__*/_regeneratorRuntime().mark(deleteVisualizationSaga),
|
|
41
|
+
_marked6 = /*#__PURE__*/_regeneratorRuntime().mark(handleSaveResponse),
|
|
42
|
+
_marked7 = /*#__PURE__*/_regeneratorRuntime().mark(handleDeleteResponse),
|
|
43
|
+
_marked8 = /*#__PURE__*/_regeneratorRuntime().mark(visualizationSaga);
|
|
44
|
+
function loadVisualizationSaga() {
|
|
45
|
+
return _regeneratorRuntime().wrap(function loadVisualizationSaga$(_context) {
|
|
46
|
+
while (1) switch (_context.prev = _context.next) {
|
|
47
|
+
case 0:
|
|
48
|
+
_context.next = 2;
|
|
49
|
+
return (0, _effects.takeEvery)(_actions.VISUALIZATION_LOAD, loadVisualization);
|
|
50
|
+
case 2:
|
|
51
|
+
_context.next = 4;
|
|
52
|
+
return (0, _effects.takeEvery)(_actions.VISUALIZATION_LOAD_SUCCESS, loadDatasetReferences);
|
|
53
|
+
case 4:
|
|
54
|
+
case "end":
|
|
55
|
+
return _context.stop();
|
|
56
|
+
}
|
|
57
|
+
}, _marked);
|
|
58
|
+
}
|
|
59
|
+
function loadVisualization(_ref) {
|
|
60
|
+
var id = _ref.value;
|
|
61
|
+
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
62
|
+
var response;
|
|
63
|
+
return _regeneratorRuntime().wrap(function _callee$(_context2) {
|
|
64
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
65
|
+
case 0:
|
|
66
|
+
_context2.prev = 0;
|
|
67
|
+
_context2.next = 3;
|
|
68
|
+
return (0, _effects.call)(_httpClients.AuthenticatedHTTPClient.get, "/api/v1/visualization/".concat(id));
|
|
69
|
+
case 3:
|
|
70
|
+
response = _context2.sent;
|
|
71
|
+
if (!(response.status < 400)) {
|
|
72
|
+
_context2.next = 15;
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
_context2.next = 7;
|
|
76
|
+
return (0, _effects.put)((0, _actions.setChartInformation)(response.data.chart));
|
|
77
|
+
case 7:
|
|
78
|
+
_context2.next = 9;
|
|
79
|
+
return (0, _effects.put)((0, _actions.setQueryText)(response.data.query));
|
|
80
|
+
case 9:
|
|
81
|
+
_context2.next = 11;
|
|
82
|
+
return (0, _effects.put)((0, _actions.executeFreestyleQuery)(response.data.query));
|
|
83
|
+
case 11:
|
|
84
|
+
_context2.next = 13;
|
|
85
|
+
return (0, _effects.put)((0, _actions.visualizationLoadSuccess)(response.data));
|
|
86
|
+
case 13:
|
|
87
|
+
_context2.next = 17;
|
|
88
|
+
break;
|
|
89
|
+
case 15:
|
|
90
|
+
_context2.next = 17;
|
|
91
|
+
return (0, _effects.put)((0, _actions.visualizationLoadFailure)(response.status));
|
|
92
|
+
case 17:
|
|
93
|
+
_context2.next = 23;
|
|
94
|
+
break;
|
|
95
|
+
case 19:
|
|
96
|
+
_context2.prev = 19;
|
|
97
|
+
_context2.t0 = _context2["catch"](0);
|
|
98
|
+
_context2.next = 23;
|
|
99
|
+
return (0, _effects.put)((0, _actions.visualizationLoadFailure)(_context2.t0.message));
|
|
100
|
+
case 23:
|
|
101
|
+
case "end":
|
|
102
|
+
return _context2.stop();
|
|
103
|
+
}
|
|
104
|
+
}, _callee, null, [[0, 19]]);
|
|
105
|
+
})();
|
|
106
|
+
}
|
|
107
|
+
function loadUserVisualizationsSaga() {
|
|
108
|
+
return _regeneratorRuntime().wrap(function loadUserVisualizationsSaga$(_context3) {
|
|
109
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
110
|
+
case 0:
|
|
111
|
+
_context3.next = 2;
|
|
112
|
+
return (0, _effects.takeEvery)(_actions.VISUALIZATIONS_LOAD_ALL, loadUserVisualizations);
|
|
113
|
+
case 2:
|
|
114
|
+
case "end":
|
|
115
|
+
return _context3.stop();
|
|
116
|
+
}
|
|
117
|
+
}, _marked2);
|
|
118
|
+
}
|
|
119
|
+
function loadUserVisualizations() {
|
|
120
|
+
var response;
|
|
121
|
+
return _regeneratorRuntime().wrap(function loadUserVisualizations$(_context4) {
|
|
122
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
123
|
+
case 0:
|
|
124
|
+
_context4.prev = 0;
|
|
125
|
+
_context4.next = 3;
|
|
126
|
+
return (0, _effects.call)(_httpClients.AuthenticatedHTTPClient.get, '/api/v1/visualization');
|
|
127
|
+
case 3:
|
|
128
|
+
response = _context4.sent;
|
|
129
|
+
if (!(response.status < 400)) {
|
|
130
|
+
_context4.next = 9;
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
_context4.next = 7;
|
|
134
|
+
return (0, _effects.put)((0, _actions.visualizationsLoadAllSuccess)(response.data));
|
|
135
|
+
case 7:
|
|
136
|
+
_context4.next = 11;
|
|
137
|
+
break;
|
|
138
|
+
case 9:
|
|
139
|
+
_context4.next = 11;
|
|
140
|
+
return (0, _effects.put)((0, _actions.visualizationsLoadAllFailure)(response.status));
|
|
141
|
+
case 11:
|
|
142
|
+
_context4.next = 17;
|
|
143
|
+
break;
|
|
144
|
+
case 13:
|
|
145
|
+
_context4.prev = 13;
|
|
146
|
+
_context4.t0 = _context4["catch"](0);
|
|
147
|
+
_context4.next = 17;
|
|
148
|
+
return (0, _effects.put)((0, _actions.visualizationsLoadAllFailure)(_context4.t0.message));
|
|
149
|
+
case 17:
|
|
150
|
+
case "end":
|
|
151
|
+
return _context4.stop();
|
|
152
|
+
}
|
|
153
|
+
}, _marked3, null, [[0, 13]]);
|
|
154
|
+
}
|
|
155
|
+
function saveVisualizationSaga() {
|
|
156
|
+
return _regeneratorRuntime().wrap(function saveVisualizationSaga$(_context5) {
|
|
157
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
158
|
+
case 0:
|
|
159
|
+
_context5.next = 2;
|
|
160
|
+
return (0, _effects.takeEvery)(_actions.VISUALIZATION_SAVE, saveVisualization);
|
|
161
|
+
case 2:
|
|
162
|
+
_context5.next = 4;
|
|
163
|
+
return (0, _effects.takeEvery)(_actions.VISUALIZATION_SAVE_SUCCESS, loadDatasetReferences);
|
|
164
|
+
case 4:
|
|
165
|
+
case "end":
|
|
166
|
+
return _context5.stop();
|
|
167
|
+
}
|
|
168
|
+
}, _marked4);
|
|
169
|
+
}
|
|
170
|
+
function saveVisualization(_ref2) {
|
|
171
|
+
var visualization = _ref2.value,
|
|
172
|
+
shouldCreateCopy = _ref2.shouldCreateCopy;
|
|
173
|
+
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
174
|
+
var chart;
|
|
175
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context6) {
|
|
176
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
177
|
+
case 0:
|
|
178
|
+
_context6.next = 2;
|
|
179
|
+
return (0, _effects.select)(_visualizationSelectors.dereferencedChart);
|
|
180
|
+
case 2:
|
|
181
|
+
chart = _context6.sent;
|
|
182
|
+
if (shouldCreateCopy) {
|
|
183
|
+
visualization = removeId(visualization);
|
|
184
|
+
}
|
|
185
|
+
if (!visualization.id) {
|
|
186
|
+
_context6.next = 9;
|
|
187
|
+
break;
|
|
188
|
+
}
|
|
189
|
+
_context6.next = 7;
|
|
190
|
+
return handleSaveResponse(function () {
|
|
191
|
+
return _httpClients.AuthenticatedHTTPClient.put("/api/v1/visualization/".concat(visualization.id), _objectSpread(_objectSpread({}, visualization), {}, {
|
|
192
|
+
chart: chart
|
|
193
|
+
}));
|
|
194
|
+
});
|
|
195
|
+
case 7:
|
|
196
|
+
_context6.next = 11;
|
|
197
|
+
break;
|
|
198
|
+
case 9:
|
|
199
|
+
_context6.next = 11;
|
|
200
|
+
return handleSaveResponse(function () {
|
|
201
|
+
return _httpClients.AuthenticatedHTTPClient.post('/api/v1/visualization', _objectSpread(_objectSpread({}, visualization), {}, {
|
|
202
|
+
chart: chart
|
|
203
|
+
}));
|
|
204
|
+
});
|
|
205
|
+
case 11:
|
|
206
|
+
case "end":
|
|
207
|
+
return _context6.stop();
|
|
208
|
+
}
|
|
209
|
+
}, _callee2);
|
|
210
|
+
})();
|
|
211
|
+
}
|
|
212
|
+
function deleteVisualizationSaga() {
|
|
213
|
+
return _regeneratorRuntime().wrap(function deleteVisualizationSaga$(_context7) {
|
|
214
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
215
|
+
case 0:
|
|
216
|
+
_context7.next = 2;
|
|
217
|
+
return (0, _effects.takeEvery)(_actions.VISUALIZATION_DELETE, deleteVisualization);
|
|
218
|
+
case 2:
|
|
219
|
+
case "end":
|
|
220
|
+
return _context7.stop();
|
|
221
|
+
}
|
|
222
|
+
}, _marked5);
|
|
223
|
+
}
|
|
224
|
+
function deleteVisualization(_ref3) {
|
|
225
|
+
var value = _ref3.value;
|
|
226
|
+
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
227
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context8) {
|
|
228
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
229
|
+
case 0:
|
|
230
|
+
_context8.next = 2;
|
|
231
|
+
return handleDeleteResponse(function () {
|
|
232
|
+
return _httpClients.AuthenticatedHTTPClient.delete("/api/v1/visualization/".concat(value.id));
|
|
233
|
+
});
|
|
234
|
+
case 2:
|
|
235
|
+
case "end":
|
|
236
|
+
return _context8.stop();
|
|
237
|
+
}
|
|
238
|
+
}, _callee3);
|
|
239
|
+
})();
|
|
240
|
+
}
|
|
241
|
+
function removeId(visualization) {
|
|
242
|
+
var id = visualization.id,
|
|
243
|
+
withoutId = _objectWithoutProperties(visualization, _excluded);
|
|
244
|
+
return withoutId;
|
|
245
|
+
}
|
|
246
|
+
function handleSaveResponse(clientFunction) {
|
|
247
|
+
var response;
|
|
248
|
+
return _regeneratorRuntime().wrap(function handleSaveResponse$(_context9) {
|
|
249
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
250
|
+
case 0:
|
|
251
|
+
_context9.prev = 0;
|
|
252
|
+
_context9.next = 3;
|
|
253
|
+
return (0, _effects.call)(clientFunction);
|
|
254
|
+
case 3:
|
|
255
|
+
response = _context9.sent;
|
|
256
|
+
if (!(response.status < 400)) {
|
|
257
|
+
_context9.next = 9;
|
|
258
|
+
break;
|
|
259
|
+
}
|
|
260
|
+
_context9.next = 7;
|
|
261
|
+
return (0, _effects.put)((0, _actions.visualizationSaveSuccess)(response.data));
|
|
262
|
+
case 7:
|
|
263
|
+
_context9.next = 11;
|
|
264
|
+
break;
|
|
265
|
+
case 9:
|
|
266
|
+
_context9.next = 11;
|
|
267
|
+
return (0, _effects.put)((0, _actions.visualizationSaveFailure)(response.status));
|
|
268
|
+
case 11:
|
|
269
|
+
_context9.next = 17;
|
|
270
|
+
break;
|
|
271
|
+
case 13:
|
|
272
|
+
_context9.prev = 13;
|
|
273
|
+
_context9.t0 = _context9["catch"](0);
|
|
274
|
+
_context9.next = 17;
|
|
275
|
+
return (0, _effects.put)((0, _actions.visualizationSaveFailure)(_context9.t0.message));
|
|
276
|
+
case 17:
|
|
277
|
+
case "end":
|
|
278
|
+
return _context9.stop();
|
|
279
|
+
}
|
|
280
|
+
}, _marked6, null, [[0, 13]]);
|
|
281
|
+
}
|
|
282
|
+
function handleDeleteResponse(clientFunction) {
|
|
283
|
+
var response;
|
|
284
|
+
return _regeneratorRuntime().wrap(function handleDeleteResponse$(_context10) {
|
|
285
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
286
|
+
case 0:
|
|
287
|
+
_context10.prev = 0;
|
|
288
|
+
_context10.next = 3;
|
|
289
|
+
return (0, _effects.call)(clientFunction);
|
|
290
|
+
case 3:
|
|
291
|
+
response = _context10.sent;
|
|
292
|
+
if (!(response.status < 400)) {
|
|
293
|
+
_context10.next = 9;
|
|
294
|
+
break;
|
|
295
|
+
}
|
|
296
|
+
_context10.next = 7;
|
|
297
|
+
return (0, _effects.put)((0, _actions.visualizationDeleteSuccess)());
|
|
298
|
+
case 7:
|
|
299
|
+
_context10.next = 11;
|
|
300
|
+
break;
|
|
301
|
+
case 9:
|
|
302
|
+
_context10.next = 11;
|
|
303
|
+
return (0, _effects.put)((0, _actions.visualizationDeleteFailure)(response.status));
|
|
304
|
+
case 11:
|
|
305
|
+
_context10.next = 17;
|
|
306
|
+
break;
|
|
307
|
+
case 13:
|
|
308
|
+
_context10.prev = 13;
|
|
309
|
+
_context10.t0 = _context10["catch"](0);
|
|
310
|
+
_context10.next = 17;
|
|
311
|
+
return (0, _effects.put)((0, _actions.visualizationDeleteFailure)(_context10.t0.message));
|
|
312
|
+
case 17:
|
|
313
|
+
_context10.next = 19;
|
|
314
|
+
return (0, _effects.put)((0, _actions.visualizationsLoadAll)());
|
|
315
|
+
case 19:
|
|
316
|
+
case "end":
|
|
317
|
+
return _context10.stop();
|
|
318
|
+
}
|
|
319
|
+
}, _marked7, null, [[0, 13]]);
|
|
320
|
+
}
|
|
321
|
+
function loadDatasetReferences(_ref4) {
|
|
322
|
+
var value = _ref4.value;
|
|
323
|
+
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
324
|
+
var _iterator, _step, datasetId;
|
|
325
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context11) {
|
|
326
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
327
|
+
case 0:
|
|
328
|
+
_iterator = _createForOfIteratorHelper(value.usedDatasets);
|
|
329
|
+
_context11.prev = 1;
|
|
330
|
+
_iterator.s();
|
|
331
|
+
case 3:
|
|
332
|
+
if ((_step = _iterator.n()).done) {
|
|
333
|
+
_context11.next = 9;
|
|
334
|
+
break;
|
|
335
|
+
}
|
|
336
|
+
datasetId = _step.value;
|
|
337
|
+
_context11.next = 7;
|
|
338
|
+
return (0, _effects.put)((0, _actions.retrieveDatasetReference)(datasetId));
|
|
339
|
+
case 7:
|
|
340
|
+
_context11.next = 3;
|
|
341
|
+
break;
|
|
342
|
+
case 9:
|
|
343
|
+
_context11.next = 14;
|
|
344
|
+
break;
|
|
345
|
+
case 11:
|
|
346
|
+
_context11.prev = 11;
|
|
347
|
+
_context11.t0 = _context11["catch"](1);
|
|
348
|
+
_iterator.e(_context11.t0);
|
|
349
|
+
case 14:
|
|
350
|
+
_context11.prev = 14;
|
|
351
|
+
_iterator.f();
|
|
352
|
+
return _context11.finish(14);
|
|
353
|
+
case 17:
|
|
354
|
+
case "end":
|
|
355
|
+
return _context11.stop();
|
|
356
|
+
}
|
|
357
|
+
}, _callee4, null, [[1, 11, 14, 17]]);
|
|
358
|
+
})();
|
|
359
|
+
}
|
|
360
|
+
function visualizationSaga() {
|
|
361
|
+
return _regeneratorRuntime().wrap(function visualizationSaga$(_context12) {
|
|
362
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
363
|
+
case 0:
|
|
364
|
+
_context12.next = 2;
|
|
365
|
+
return (0, _effects.all)([(0, _effects.fork)(loadVisualizationSaga), (0, _effects.fork)(saveVisualizationSaga), (0, _effects.fork)(loadUserVisualizationsSaga), (0, _effects.fork)(deleteVisualizationSaga)]);
|
|
366
|
+
case 2:
|
|
367
|
+
case "end":
|
|
368
|
+
return _context12.stop();
|
|
369
|
+
}
|
|
370
|
+
}, _marked8);
|
|
371
|
+
}
|