@hisptz/dhis2-analytics 1.0.33 → 1.0.35

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 ADDED
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2022, HISP Tanzania
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ 3. Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -6,22 +6,13 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.EarthEngine = void 0;
7
7
  var _utils = require("../utils");
8
8
  var _lodash = require("lodash");
9
+ var _api = _interopRequireDefault(require("./api"));
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
11
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
10
12
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
11
13
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
12
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
- async function importEEModule() {
15
- // @ts-ignore
16
- if (import.meta.env.STORYBOOK_BUILD === "true") {
17
- return await Promise.resolve().then(() => _interopRequireWildcard(require("@google/earthengine")));
18
- }
19
- return await Promise.resolve().then(() => _interopRequireWildcard(require("./api")));
20
- }
21
- const EE = await importEEModule();
22
- // import EE from "./api"
23
14
  // @ts-ignore
24
- const ee = EE;
15
+ const ee = _api.default;
25
16
  // @ts-ignore
26
17
  window.ee = ee;
27
18
  const FEATURE_STYLE = {
@@ -3,15 +3,16 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typ
3
3
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
4
4
  import { combineReducers, getFeatureCollectionProperties, getHistogramStatistics, getInfo, getScale, hasClasses } from "../utils";
5
5
  import { find, head, isEmpty } from "lodash";
6
- async function importEEModule() {
7
- // @ts-ignore
8
- if (import.meta.env.STORYBOOK_BUILD === "true") {
9
- return await import("@google/earthengine");
10
- }
11
- return await import("./api");
12
- }
13
- const EE = await importEEModule();
14
- // import EE from "./api"
6
+
7
+ // async function importEEModule(): Promise<any> {
8
+ // // @ts-ignore
9
+ // if (import.meta.env.STORYBOOK_BUILD === "true") {
10
+ // return await import("@google/earthengine")
11
+ // }
12
+ // return await import("./api")
13
+ // }
14
+ // const EE = await importEEModule();
15
+ import EE from "./api";
15
16
  // @ts-ignore
16
17
  const ee = EE;
17
18
  // @ts-ignore
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hisptz/dhis2-analytics",
3
- "version": "1.0.33",
3
+ "version": "1.0.35",
4
4
  "description": "A collection of reusable react components for visualizing analytics data from DHIS2",
5
5
  "license": "BSD-3-Clause",
6
6
  "scripts": {
@@ -31,7 +31,7 @@
31
31
  "dependencies": {
32
32
  "@dhis2/analytics": "^24.4.2",
33
33
  "@dhis2/app-runtime": "^3.7.0",
34
- "@hisptz/dhis2-ui": "^1.0.33",
34
+ "@hisptz/dhis2-ui": "^1.0.34",
35
35
  "@hisptz/dhis2-utils": "^1.0.32",
36
36
  "async-es": "^3.2.4",
37
37
  "d3-color": "^3.1.0",
@@ -76,5 +76,6 @@
76
76
  },
77
77
  "peerDependencies": {
78
78
  "lodash": "^4"
79
- }
79
+ },
80
+ "gitHead": "a3a385f9d815a636b9b3175f672e6b2921c96f39"
80
81
  }