datastake-daf 0.6.706 → 0.6.707
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/dist/hooks/index.js
CHANGED
|
@@ -8,7 +8,6 @@ var g2plot = require('@antv/g2plot');
|
|
|
8
8
|
require('country-city-location');
|
|
9
9
|
var L = require('leaflet');
|
|
10
10
|
var axios = require('axios');
|
|
11
|
-
require('react/jsx-runtime');
|
|
12
11
|
require('antd');
|
|
13
12
|
var lodash = require('lodash');
|
|
14
13
|
var PropTypes = require('prop-types');
|
package/dist/services/index.js
CHANGED
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var axios = require('axios');
|
|
6
|
-
require('react');
|
|
7
|
-
require('react/jsx-runtime');
|
|
8
6
|
require('antd');
|
|
9
7
|
|
|
10
8
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
package/package.json
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
1
|
export const capitalize = string =>
|
|
4
2
|
string && string.charAt(0).toUpperCase() + string.slice(1);
|
|
5
3
|
|
|
@@ -55,35 +53,6 @@ export const getOptionAsObject = (value, options) => {
|
|
|
55
53
|
export const isEmptyOrSpaces = (str) => typeof str === 'string' ?
|
|
56
54
|
str === null || str.match(/^ *$/) !== null : true;
|
|
57
55
|
|
|
58
|
-
export function getSourceString(author, item) {
|
|
59
|
-
return item.children ?
|
|
60
|
-
<span
|
|
61
|
-
className="ant-btn-link"
|
|
62
|
-
style={{ cursor: "pointer" }}
|
|
63
|
-
onClick={() => {
|
|
64
|
-
const iconOne = document.querySelector(`.show-row-${item.id}`);
|
|
65
|
-
const iconTwo = document.querySelector(`.hide-row-${item.id}`);
|
|
66
|
-
if (iconOne) {
|
|
67
|
-
iconOne.click();
|
|
68
|
-
} else if (iconTwo) {
|
|
69
|
-
iconTwo.click();
|
|
70
|
-
}
|
|
71
|
-
}}> {`${item.sourcesLen} Source${item.sourcesLen > 1 ? "(s)" : ""}`} </span> : author;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export const getDivergenceOrEqual = (data, keys) => {
|
|
75
|
-
if (data.children && Array.isArray(data.children) && data.children.length) {
|
|
76
|
-
keys.forEach(key => {
|
|
77
|
-
const firstValue = data[key];
|
|
78
|
-
const areSameData = data.children.every(i => i[key] === firstValue);
|
|
79
|
-
if (!areSameData) {
|
|
80
|
-
data[key] = <span className="ant-typography ant-typography-danger">Divergence</span>;
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
return data
|
|
85
|
-
}
|
|
86
|
-
|
|
87
56
|
export const selectFilterSearch = (input = '', option = {}) => {
|
|
88
57
|
if (option) {
|
|
89
58
|
const { children } = option;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export function getSourceString(author, item) {
|
|
2
|
+
return item.children ?
|
|
3
|
+
<span
|
|
4
|
+
className="ant-btn-link"
|
|
5
|
+
style={{ cursor: "pointer" }}
|
|
6
|
+
onClick={() => {
|
|
7
|
+
const iconOne = document.querySelector(`.show-row-${item.id}`);
|
|
8
|
+
const iconTwo = document.querySelector(`.hide-row-${item.id}`);
|
|
9
|
+
if (iconOne) {
|
|
10
|
+
iconOne.click();
|
|
11
|
+
} else if (iconTwo) {
|
|
12
|
+
iconTwo.click();
|
|
13
|
+
}
|
|
14
|
+
}}> {`${item.sourcesLen} Source${item.sourcesLen > 1 ? "(s)" : ""}`} </span> : author;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const getDivergenceOrEqual = (data, keys) => {
|
|
18
|
+
if (data.children && Array.isArray(data.children) && data.children.length) {
|
|
19
|
+
keys.forEach(key => {
|
|
20
|
+
const firstValue = data[key];
|
|
21
|
+
const areSameData = data.children.every(i => i[key] === firstValue);
|
|
22
|
+
if (!areSameData) {
|
|
23
|
+
data[key] = <span className="ant-typography ant-typography-danger">Divergence</span>;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return data
|
|
28
|
+
}
|