@daoyi/nmtl-ui 2.0.1-beta.81 → 2.0.1-beta.82
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/lib/components/{Autocomplete-b9f7ea2b.js → Autocomplete-83a79687.js} +67 -72
- package/lib/components/Autocomplete.js +2 -2
- package/lib/components/BackTop.js +1 -1
- package/lib/components/Carousel.js +1 -1
- package/lib/components/Checkbox.js +1 -1
- package/lib/components/CollapseContent.js +1 -1
- package/lib/components/{ContactModal-a062b92c.js → ContactModal-ab8e5ab2.js} +20 -10
- package/lib/components/ContactModal.js +3 -3
- package/lib/components/{Drawer-6d519e05.js → Drawer-68ffa63e.js} +14 -19
- package/lib/components/Drawer.js +3 -3
- package/lib/components/Dropdown.js +1 -1
- package/lib/components/ExportButton.js +2 -2
- package/lib/components/{ExtraTools-79c9c400.js → ExtraTools-5407d9de.js} +3 -3
- package/lib/components/ExtraTools.js +4 -4
- package/lib/components/Filter.js +1 -1
- package/lib/components/Footer.js +3 -3
- package/lib/components/{ForwardLink-5dd46685.js → ForwardLink-2554a5d9.js} +1 -1
- package/lib/components/ForwardLink.js +2 -2
- package/lib/components/Header.js +5 -5
- package/lib/components/Image.js +1 -1
- package/lib/components/InputMethod.js +1 -1
- package/lib/components/{KeywordSearch-8ee9bf32.js → KeywordSearch-a66db4e4.js} +2 -2
- package/lib/components/KeywordSearch.js +3 -3
- package/lib/components/KeywordTicker.js +2 -2
- package/lib/components/Keywords.js +1 -1
- package/lib/components/MUITheme.js +15 -12
- package/lib/components/Pagination.js +1 -1
- package/lib/components/Radio.js +1 -1
- package/lib/components/SNA.js +4 -4
- package/lib/components/{Select-eb3c067e.js → Select-7c0ef815.js} +1 -1
- package/lib/components/Select.js +2 -2
- package/lib/components/Table.js +1 -1
- package/lib/components/{Tooltip-59ca3c6d.js → Tooltip-21964965.js} +1 -1
- package/lib/components/Tooltip.js +2 -2
- package/lib/components/{_rollupPluginBabelHelpers-7eb4ffba.js → _rollupPluginBabelHelpers-a52356f6.js} +1 -1
- package/lib/components/{dataExport-d55d6fa3.js → dataExport-04b77185.js} +31 -30
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as
|
|
1
|
+
import { _ as _extends$1, a as _slicedToArray, b as _objectSpread2 } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default, { useCallback, useState, useRef, useEffect } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { c as classNames } from './index-cbd6bca9.js';
|
|
@@ -87,23 +87,21 @@ var Box = styled('div')(styleFunction, {
|
|
|
87
87
|
name: 'MuiBox'
|
|
88
88
|
});
|
|
89
89
|
|
|
90
|
-
var useAutocomplete = (
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
return getValue(item) === getValue(value);
|
|
106
|
-
}
|
|
90
|
+
var useAutocomplete = (_ref => {
|
|
91
|
+
let {
|
|
92
|
+
options,
|
|
93
|
+
placeholder,
|
|
94
|
+
loading,
|
|
95
|
+
searchIcon,
|
|
96
|
+
labelInValue,
|
|
97
|
+
onEnter,
|
|
98
|
+
currentResult,
|
|
99
|
+
setCurrentDefaultValue,
|
|
100
|
+
arrowIcon
|
|
101
|
+
} = _ref;
|
|
102
|
+
const getValue = useCallback(data => typeof data === 'object' ? data.value : data, []);
|
|
103
|
+
const getLabel = useCallback(value => {
|
|
104
|
+
const finder = (Array.isArray(options) ? options : []).find(item => getValue(item) === getValue(value)
|
|
107
105
|
// typeof item === 'object' ? item.label === value : item === value
|
|
108
106
|
);
|
|
109
107
|
|
|
@@ -111,30 +109,32 @@ var useAutocomplete = (function (_ref) {
|
|
|
111
109
|
// console.log('value', value);
|
|
112
110
|
// console.log('finder', finder);
|
|
113
111
|
if (finder) {
|
|
114
|
-
return
|
|
112
|
+
return typeof finder === 'object' ? finder.label : finder;
|
|
115
113
|
}
|
|
116
|
-
return
|
|
114
|
+
return typeof value === 'object' ? value.label : value;
|
|
117
115
|
}, [options]);
|
|
118
116
|
|
|
119
117
|
/* 若MUI的Autocomplete下方的options列表要勾選已選的項目 必須從options取出才可 */
|
|
120
|
-
|
|
118
|
+
const getValueFromOptions = useCallback(defaultValue => {
|
|
121
119
|
if (Array.isArray(options)) {
|
|
122
120
|
if (Array.isArray(defaultValue)) {
|
|
123
121
|
return defaultValue.map(
|
|
124
122
|
// item有可能為 object({ label, value }) 或 string(value)
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
123
|
+
item => options.find(_ref2 => {
|
|
124
|
+
let {
|
|
125
|
+
value
|
|
126
|
+
} = _ref2;
|
|
127
|
+
return item === value || item.value === value;
|
|
128
|
+
}) || item
|
|
131
129
|
// if (typeof item === 'object') return options.find(({ value }) => item.value === value) || item;
|
|
132
130
|
// return item;
|
|
133
131
|
);
|
|
134
132
|
}
|
|
135
133
|
|
|
136
|
-
|
|
137
|
-
|
|
134
|
+
const result = options.find(_ref3 => {
|
|
135
|
+
let {
|
|
136
|
+
value
|
|
137
|
+
} = _ref3;
|
|
138
138
|
return defaultValue === value;
|
|
139
139
|
});
|
|
140
140
|
return labelInValue ? defaultValue : result || {
|
|
@@ -144,50 +144,45 @@ var useAutocomplete = (function (_ref) {
|
|
|
144
144
|
}
|
|
145
145
|
return defaultValue;
|
|
146
146
|
}, [options, labelInValue]);
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
}, /*#__PURE__*/React__default.createElement(default_1, null)), params.InputProps.endAdornment)
|
|
183
|
-
})
|
|
184
|
-
}));
|
|
185
|
-
}, [loading, searchIcon, arrowIcon]);
|
|
147
|
+
const defaultTag = useCallback((tagValue, getTagProps) => tagValue.map((option, index) => /*#__PURE__*/React__default.createElement(Chip, _extends$1({
|
|
148
|
+
label: getLabel(option),
|
|
149
|
+
deleteIcon: /*#__PURE__*/React__default.createElement(Close, null)
|
|
150
|
+
}, getTagProps({
|
|
151
|
+
index
|
|
152
|
+
})))), [options]);
|
|
153
|
+
const defaultRenderInput = useCallback(params => /*#__PURE__*/React__default.createElement(TextField, _extends$1({}, params, {
|
|
154
|
+
variant: "outlined",
|
|
155
|
+
placeholder: placeholder,
|
|
156
|
+
InputProps: {
|
|
157
|
+
...params.InputProps,
|
|
158
|
+
endAdornment: /*#__PURE__*/React__default.createElement(React__default.Fragment, null, loading && /*#__PURE__*/React__default.createElement(CircularProgress, {
|
|
159
|
+
className: "autocomplete__icon",
|
|
160
|
+
color: "inherit",
|
|
161
|
+
size: 20
|
|
162
|
+
}), searchIcon && /*#__PURE__*/React__default.createElement(SearchOutlined, {
|
|
163
|
+
className: "autocomplete__icon",
|
|
164
|
+
onClick: event => {
|
|
165
|
+
const tmpObj = {
|
|
166
|
+
labels: currentResult || '',
|
|
167
|
+
value: currentResult || ''
|
|
168
|
+
};
|
|
169
|
+
setCurrentDefaultValue(tmpObj);
|
|
170
|
+
return onEnter(event, tmpObj);
|
|
171
|
+
}
|
|
172
|
+
}), !searchIcon && !loading && arrowIcon && /*#__PURE__*/React__default.createElement(Box, {
|
|
173
|
+
style: {
|
|
174
|
+
top: 'calc(50% - 14px)',
|
|
175
|
+
right: '12px',
|
|
176
|
+
position: 'absolute'
|
|
177
|
+
}
|
|
178
|
+
}, /*#__PURE__*/React__default.createElement(default_1, null)), params.InputProps.endAdornment)
|
|
179
|
+
}
|
|
180
|
+
})), [loading, searchIcon, arrowIcon]);
|
|
186
181
|
return {
|
|
187
|
-
getValue
|
|
188
|
-
getValueFromOptions
|
|
189
|
-
defaultTag
|
|
190
|
-
defaultRenderInput
|
|
182
|
+
getValue,
|
|
183
|
+
getValueFromOptions,
|
|
184
|
+
defaultTag,
|
|
185
|
+
defaultRenderInput
|
|
191
186
|
};
|
|
192
187
|
});
|
|
193
188
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { A as default } from './Autocomplete-
|
|
2
|
-
import './_rollupPluginBabelHelpers-
|
|
1
|
+
export { A as default } from './Autocomplete-83a79687.js';
|
|
2
|
+
import './_rollupPluginBabelHelpers-a52356f6.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'prop-types';
|
|
5
5
|
import './index-cbd6bca9.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default, { useState, useRef, useEffect } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { c as classNames } from './index-cbd6bca9.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _objectWithoutProperties$1, b as _objectSpread2, _ as _extends$3 } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default, { forwardRef, useRef, useImperativeHandle } from 'react';
|
|
3
3
|
import { a as classnames, c as classNames } from './index-cbd6bca9.js';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _objectWithoutProperties, _ as _extends } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { FormControlLabel, Checkbox as Checkbox$1 } from '@material-ui/core';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default, { useState, useRef, useEffect } from 'react';
|
|
3
3
|
import { c as classNames } from './index-cbd6bca9.js';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as _extends$1, a as _slicedToArray$2, b as _objectSpread2, e as _defineProperty$1 } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default, { createContext, forwardRef, createElement, useContext, useRef, useEffect, useReducer, useCallback, useMemo, useLayoutEffect, Component, useState, useImperativeHandle, Fragment } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { h as hoistNonReactStatics_cjs } from './hoist-non-react-statics.cjs-3f408ad2.js';
|
|
@@ -7,7 +7,7 @@ import { M as Modal } from './Modal-c8a92699.js';
|
|
|
7
7
|
import { c as commonjsGlobal, a as getDefaultExportFromCjs } from './_commonjsHelpers-70de2c37.js';
|
|
8
8
|
import { c as classNames } from './index-cbd6bca9.js';
|
|
9
9
|
import { Input, Button, Box, Typography, FormControl, RadioGroup, FormControlLabel, Radio, TextField, TextareaAutosize } from '@material-ui/core';
|
|
10
|
-
import { S as Select } from './Select-
|
|
10
|
+
import { S as Select } from './Select-7c0ef815.js';
|
|
11
11
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
12
12
|
import { r as requireCreateSvgIcon, i as interopRequireDefault, a as interopRequireWildcard } from './createSvgIcon-e95160be.js';
|
|
13
13
|
import { getIntl } from './globalConfig';
|
|
@@ -9992,7 +9992,7 @@ const getConfig = () => ({
|
|
|
9992
9992
|
color: [getRandom(100, 255, 3), getRandom(100, 255, 4), getRandom(100, 255, 3), getRandom(100, 255, 3)]
|
|
9993
9993
|
});
|
|
9994
9994
|
|
|
9995
|
-
var css_248z$2 = ".vcode {\n display: block;\n align-items: center; }\n .vcode__image {\n margin-top: 10px;\n background: rgba(0, 0, 0, 0.8);\n width: 160px;\n overflow: hidden;\n height: 50px;\n text-align: center;\n position: relative; }\n .vcode__image:hover .vcode__mask {\n opacity: 0.8; }\n .vcode__image__mask {\n position: absolute;\n width: 100%;\n top: 0;\n line-height: 50px;\n background-color: rgba(0, 0, 0, 0.95);\n opacity: 0;\n z-index: 1;\n transition: opacity 0.3s ease-in-out;\n cursor: pointer; }\n .vcode__image__itemStr {\n float: left;\n margin-left: 20px; }\n\n#bgi {\n top: 0;\n left: 0;\n position: absolute;\n width: 100%;\n height: 100%; }\n";
|
|
9995
|
+
var css_248z$2 = ".vcode {\n display: block;\n align-items: center; }\n .vcode__image {\n margin-top: 10px;\n background: rgba(0, 0, 0, 0.8);\n width: 160px;\n overflow: hidden;\n height: 50px;\n text-align: center;\n position: relative; }\n .vcode__image:hover .vcode__mask {\n opacity: 0.8; }\n .vcode__image__mask {\n position: absolute;\n width: 100%;\n top: 0;\n line-height: 50px;\n background-color: rgba(0, 0, 0, 0.95);\n opacity: 0;\n z-index: 1;\n transition: opacity 0.3s ease-in-out;\n cursor: pointer; }\n .vcode__image__itemStr {\n float: left;\n margin-left: 20px; }\n .vcode__box {\n display: flex;\n align-items: center; }\n .vcode__error {\n color: #d93333;\n font-weight: bold;\n margin-left: 1rem; }\n\n#bgi {\n top: 0;\n left: 0;\n position: absolute;\n width: 100%;\n height: 100%; }\n";
|
|
9996
9996
|
styleInject(css_248z$2);
|
|
9997
9997
|
|
|
9998
9998
|
const VCode = _ref => {
|
|
@@ -10000,7 +10000,8 @@ const VCode = _ref => {
|
|
|
10000
10000
|
visible,
|
|
10001
10001
|
placeholder,
|
|
10002
10002
|
onChange,
|
|
10003
|
-
formatMessage
|
|
10003
|
+
formatMessage,
|
|
10004
|
+
name
|
|
10004
10005
|
} = _ref;
|
|
10005
10006
|
const [codeConfig, setCodeConfig] = useState(getConfig());
|
|
10006
10007
|
const {
|
|
@@ -10021,8 +10022,10 @@ const VCode = _ref => {
|
|
|
10021
10022
|
className: "vcode"
|
|
10022
10023
|
}, /*#__PURE__*/React__default.createElement(Input, {
|
|
10023
10024
|
placeholder: placeholder,
|
|
10024
|
-
onChange: e => onChange(e.target.value === vcodeNumber)
|
|
10025
|
+
onChange: e => onChange(e.target.value.toUpperCase() === vcodeNumber.toUpperCase())
|
|
10025
10026
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10027
|
+
className: "vcode__box"
|
|
10028
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10026
10029
|
className: "vcode__image"
|
|
10027
10030
|
}, /*#__PURE__*/React__default.createElement("canvas", {
|
|
10028
10031
|
id: "bgi",
|
|
@@ -10041,19 +10044,25 @@ const VCode = _ref => {
|
|
|
10041
10044
|
onClick: refresh
|
|
10042
10045
|
}, formatMessage({
|
|
10043
10046
|
id: 'common.click.refresh'
|
|
10044
|
-
})))
|
|
10047
|
+
}))), /*#__PURE__*/React__default.createElement(ErrorMessage, {
|
|
10048
|
+
className: "vcode__error",
|
|
10049
|
+
name: name,
|
|
10050
|
+
component: "div"
|
|
10051
|
+
})));
|
|
10045
10052
|
};
|
|
10046
10053
|
VCode.defaultProps = {
|
|
10047
10054
|
visible: false,
|
|
10048
10055
|
placeholder: undefined,
|
|
10049
10056
|
onChange: () => {},
|
|
10050
|
-
formatMessage: () => {}
|
|
10057
|
+
formatMessage: () => {},
|
|
10058
|
+
name: undefined
|
|
10051
10059
|
};
|
|
10052
10060
|
VCode.propTypes = {
|
|
10053
10061
|
visible: PropTypes.bool,
|
|
10054
10062
|
placeholder: PropTypes.string,
|
|
10055
10063
|
onChange: PropTypes.func,
|
|
10056
|
-
formatMessage: PropTypes.func
|
|
10064
|
+
formatMessage: PropTypes.func,
|
|
10065
|
+
name: PropTypes.string
|
|
10057
10066
|
};
|
|
10058
10067
|
|
|
10059
10068
|
var facebookLoginWithButton = {exports: {}};
|
|
@@ -11606,7 +11615,8 @@ const FormItem = _ref => {
|
|
|
11606
11615
|
component = /*#__PURE__*/React__default.createElement(VCode, {
|
|
11607
11616
|
placeholder: currentPlaceholder,
|
|
11608
11617
|
onChange: pass => setFieldValue(field.name, pass),
|
|
11609
|
-
formatMessage: formatMessage
|
|
11618
|
+
formatMessage: formatMessage,
|
|
11619
|
+
name: name
|
|
11610
11620
|
});
|
|
11611
11621
|
break;
|
|
11612
11622
|
default:
|
|
@@ -11640,7 +11650,7 @@ const FormItem = _ref => {
|
|
|
11640
11650
|
className: classNames('formItem__operator', {
|
|
11641
11651
|
'formItem__operator--unsupport': !component
|
|
11642
11652
|
})
|
|
11643
|
-
}, component || 'Check component type is support on FormItem'), /*#__PURE__*/React__default.createElement(ErrorMessage, {
|
|
11653
|
+
}, component || 'Check component type is support on FormItem'), field.name === 'vcode' ? null : /*#__PURE__*/React__default.createElement(ErrorMessage, {
|
|
11644
11654
|
className: "formItem__error",
|
|
11645
11655
|
name: name,
|
|
11646
11656
|
component: "div"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { C as default } from './ContactModal-
|
|
2
|
-
import './_rollupPluginBabelHelpers-
|
|
1
|
+
export { C as default } from './ContactModal-ab8e5ab2.js';
|
|
2
|
+
import './_rollupPluginBabelHelpers-a52356f6.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'prop-types';
|
|
5
5
|
import './hoist-non-react-statics.cjs-3f408ad2.js';
|
|
@@ -13,7 +13,7 @@ import './Button-f86bbd40.js';
|
|
|
13
13
|
import './style-inject.es-1f59c1d0.js';
|
|
14
14
|
import './Spin-1762ce9c.js';
|
|
15
15
|
import './_commonjsHelpers-70de2c37.js';
|
|
16
|
-
import './Select-
|
|
16
|
+
import './Select-7c0ef815.js';
|
|
17
17
|
import './Empty-9a192c2a.js';
|
|
18
18
|
import './createSvgIcon-e95160be.js';
|
|
19
19
|
import './defaultTheme-ed7746fe.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default, { useState } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { List, ListItem, ListItemIcon, ListItemText, IconButton, Drawer as Drawer$1, Divider } from '@material-ui/core';
|
|
5
5
|
import { DehazeRounded } from '@material-ui/icons';
|
|
6
|
-
import { S as Select } from './Select-
|
|
6
|
+
import { S as Select } from './Select-7c0ef815.js';
|
|
7
7
|
import { useHistory, useRouteMatch } from 'react-router-dom';
|
|
8
8
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
9
9
|
|
|
@@ -27,32 +27,27 @@ var checkLanguageSupport = function checkLanguageSupport(_ref) {
|
|
|
27
27
|
return isSupport ? language : supportLanguages[0].value;
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const {
|
|
37
|
-
url
|
|
38
|
-
} = useRouteMatch();
|
|
30
|
+
var DrawerList = function DrawerList(_ref) {
|
|
31
|
+
var drawerList = _ref.drawerList,
|
|
32
|
+
setOpen = _ref.setOpen;
|
|
33
|
+
var history = useHistory();
|
|
34
|
+
var _useRouteMatch = useRouteMatch(),
|
|
35
|
+
url = _useRouteMatch.url;
|
|
39
36
|
return /*#__PURE__*/React__default.createElement(List, {
|
|
40
37
|
className: "drawer__list"
|
|
41
|
-
}, Array.isArray(drawerList) && drawerList.map((_ref2, index)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
path
|
|
46
|
-
} = _ref2;
|
|
38
|
+
}, Array.isArray(drawerList) && drawerList.map(function (_ref2, index) {
|
|
39
|
+
var name = _ref2.name,
|
|
40
|
+
icon = _ref2.icon,
|
|
41
|
+
path = _ref2.path;
|
|
47
42
|
return /*#__PURE__*/React__default.createElement(ListItem, {
|
|
48
43
|
button: true,
|
|
49
44
|
key: index.toString(),
|
|
50
|
-
onClick: ()
|
|
45
|
+
onClick: function onClick() {
|
|
51
46
|
if (path.indexOf('http') > -1) {
|
|
52
47
|
window.location = path;
|
|
53
48
|
} else {
|
|
54
49
|
history.push({
|
|
55
|
-
pathname:
|
|
50
|
+
pathname: "".concat(url).concat(path)
|
|
56
51
|
});
|
|
57
52
|
}
|
|
58
53
|
setOpen(false);
|
package/lib/components/Drawer.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { D as default } from './Drawer-
|
|
2
|
-
import './_rollupPluginBabelHelpers-
|
|
1
|
+
export { D as default } from './Drawer-68ffa63e.js';
|
|
2
|
+
import './_rollupPluginBabelHelpers-a52356f6.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'prop-types';
|
|
5
5
|
import '@material-ui/core';
|
|
6
6
|
import '@material-ui/icons';
|
|
7
|
-
import './Select-
|
|
7
|
+
import './Select-7c0ef815.js';
|
|
8
8
|
import './index-cbd6bca9.js';
|
|
9
9
|
import './Empty-9a192c2a.js';
|
|
10
10
|
import './style-inject.es-1f59c1d0.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default, { useRef, useState } from 'react';
|
|
3
3
|
import { c as classNames } from './index-cbd6bca9.js';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default, { useState } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { c as classNames } from './index-cbd6bca9.js';
|
|
5
5
|
import { ExitToApp } from '@material-ui/icons';
|
|
6
6
|
import { Dialog, DialogContent, DialogContentText, DialogActions, Button } from '@material-ui/core';
|
|
7
|
-
import { f as fileDownload, j as jsonTxt, a as jsonExcel } from './dataExport-
|
|
7
|
+
import { f as fileDownload, j as jsonTxt, a as jsonExcel } from './dataExport-04b77185.js';
|
|
8
8
|
import { getIntl } from './globalConfig';
|
|
9
9
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
10
10
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as _extends } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import React__default, { Component, forwardRef, useState } from 'react';
|
|
4
4
|
import { c as classNames } from './index-cbd6bca9.js';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { a as getDefaultExportFromCjs } from './_commonjsHelpers-70de2c37.js';
|
|
7
7
|
import { Menu, MenuItem, useMediaQuery, IconButton } from '@material-ui/core';
|
|
8
|
-
import { T as Tooltip } from './Tooltip-
|
|
9
|
-
import { s as snaToExcel, f as fileDownload$1, a as jsonExcel } from './dataExport-
|
|
8
|
+
import { T as Tooltip } from './Tooltip-21964965.js';
|
|
9
|
+
import { s as snaToExcel, f as fileDownload$1, a as jsonExcel } from './dataExport-04b77185.js';
|
|
10
10
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
11
11
|
|
|
12
12
|
var __assign$3 = (undefined && undefined.__assign) || function () {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { E as default } from './ExtraTools-
|
|
2
|
-
import './_rollupPluginBabelHelpers-
|
|
1
|
+
export { E as default } from './ExtraTools-5407d9de.js';
|
|
2
|
+
import './_rollupPluginBabelHelpers-a52356f6.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import './index-cbd6bca9.js';
|
|
5
5
|
import 'prop-types';
|
|
6
6
|
import './_commonjsHelpers-70de2c37.js';
|
|
7
7
|
import '@material-ui/core';
|
|
8
|
-
import './Tooltip-
|
|
8
|
+
import './Tooltip-21964965.js';
|
|
9
9
|
import './style-inject.es-1f59c1d0.js';
|
|
10
|
-
import './dataExport-
|
|
10
|
+
import './dataExport-04b77185.js';
|
package/lib/components/Filter.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as _taggedTemplateLiteral, e as _defineProperty } from './_rollupPluginBabelHelpers-
|
|
1
|
+
import { f as _taggedTemplateLiteral, e as _defineProperty } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default, { useContext, createElement, useCallback } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { c as classNames } from './index-cbd6bca9.js';
|
package/lib/components/Footer.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as _slicedToArray, d as _typeof } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default, { useState, useEffect } from 'react';
|
|
3
3
|
import { c as classNames } from './index-cbd6bca9.js';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import axios from 'axios';
|
|
6
|
-
import { C as ContactModal } from './ContactModal-
|
|
6
|
+
import { C as ContactModal } from './ContactModal-ab8e5ab2.js';
|
|
7
7
|
import { S as Spin } from './Spin-1762ce9c.js';
|
|
8
8
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
9
9
|
import './hoist-non-react-statics.cjs-3f408ad2.js';
|
|
@@ -13,7 +13,7 @@ import '@material-ui/core';
|
|
|
13
13
|
import '@material-ui/icons';
|
|
14
14
|
import './Button-f86bbd40.js';
|
|
15
15
|
import './_commonjsHelpers-70de2c37.js';
|
|
16
|
-
import './Select-
|
|
16
|
+
import './Select-7c0ef815.js';
|
|
17
17
|
import './Empty-9a192c2a.js';
|
|
18
18
|
import './createSvgIcon-e95160be.js';
|
|
19
19
|
import './defaultTheme-ed7746fe.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _objectWithoutProperties } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default, { useMemo } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { q as queryString } from './index-34fc27f1.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { F as default } from './ForwardLink-
|
|
2
|
-
import './_rollupPluginBabelHelpers-
|
|
1
|
+
export { F as default } from './ForwardLink-2554a5d9.js';
|
|
2
|
+
import './_rollupPluginBabelHelpers-a52356f6.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'prop-types';
|
|
5
5
|
import './index-34fc27f1.js';
|
package/lib/components/Header.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default, { useState, useRef, useEffect } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { c as classNames } from './index-cbd6bca9.js';
|
|
@@ -6,14 +6,14 @@ import { d as debounce_1 } from './debounce-127da66c.js';
|
|
|
6
6
|
import { useHistory, useRouteMatch, NavLink } from 'react-router-dom';
|
|
7
7
|
import { Typography, IconButton } from '@material-ui/core';
|
|
8
8
|
import { SearchOutlined } from '@material-ui/icons';
|
|
9
|
-
import { K as KeywordSearch } from './KeywordSearch-
|
|
10
|
-
import { S as Select } from './Select-
|
|
11
|
-
import { c as checkLanguageSupport, D as Drawer, d as defaultSupportLanguage } from './Drawer-
|
|
9
|
+
import { K as KeywordSearch } from './KeywordSearch-a66db4e4.js';
|
|
10
|
+
import { S as Select } from './Select-7c0ef815.js';
|
|
11
|
+
import { c as checkLanguageSupport, D as Drawer, d as defaultSupportLanguage } from './Drawer-68ffa63e.js';
|
|
12
12
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
13
13
|
import './isObjectLike-e111475d.js';
|
|
14
14
|
import './_commonjsHelpers-70de2c37.js';
|
|
15
15
|
import 'axios';
|
|
16
|
-
import './Autocomplete-
|
|
16
|
+
import './Autocomplete-83a79687.js';
|
|
17
17
|
import '@material-ui/lab';
|
|
18
18
|
import './createSvgIcon-e95160be.js';
|
|
19
19
|
import './defaultTheme-ed7746fe.js';
|
package/lib/components/Image.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default, { useState } from 'react';
|
|
3
3
|
import { c as classNames } from './index-cbd6bca9.js';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default, { useState, useRef, useEffect } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { c as classNames } from './index-cbd6bca9.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default, { useState, useEffect } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { c as classNames } from './index-cbd6bca9.js';
|
|
5
5
|
import axios from 'axios';
|
|
6
6
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
7
|
-
import { A as Autocomplete } from './Autocomplete-
|
|
7
|
+
import { A as Autocomplete } from './Autocomplete-83a79687.js';
|
|
8
8
|
|
|
9
9
|
var css_248z = ".keywordSearch {\n border-radius: 4px;\n width: 100%;\n margin-right: 14px; }\n .keywordSearch--animation .autocomplete {\n transition: max-width 0.3s ease-out;\n max-width: 240px; }\n .keywordSearch--focus {\n flex: 1; }\n .keywordSearch--focus .autocomplete {\n max-width: 100%; }\n .keywordSearch .MuiAutocomplete-hasPopupIcon.MuiAutocomplete-hasClearIcon .MuiAutocomplete-inputRoot[class*='MuiOutlinedInput-root'] {\n border-radius: 10px;\n background-color: #ffffff66; }\n";
|
|
10
10
|
styleInject(css_248z);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { K as default } from './KeywordSearch-
|
|
2
|
-
import './_rollupPluginBabelHelpers-
|
|
1
|
+
export { K as default } from './KeywordSearch-a66db4e4.js';
|
|
2
|
+
import './_rollupPluginBabelHelpers-a52356f6.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'prop-types';
|
|
5
5
|
import './index-cbd6bca9.js';
|
|
6
6
|
import 'axios';
|
|
7
7
|
import './style-inject.es-1f59c1d0.js';
|
|
8
|
-
import './Autocomplete-
|
|
8
|
+
import './Autocomplete-83a79687.js';
|
|
9
9
|
import './debounce-127da66c.js';
|
|
10
10
|
import './isObjectLike-e111475d.js';
|
|
11
11
|
import './_commonjsHelpers-70de2c37.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default, { useState, useRef, useEffect } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { c as classNames } from './index-cbd6bca9.js';
|
|
5
|
-
import { F as ForwardLink } from './ForwardLink-
|
|
5
|
+
import { F as ForwardLink } from './ForwardLink-2554a5d9.js';
|
|
6
6
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
7
7
|
import './index-34fc27f1.js';
|
|
8
8
|
import 'react-router-dom';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default, { useState, useEffect } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { c as classNames } from './index-cbd6bca9.js';
|
|
@@ -2380,20 +2380,23 @@ var fonts = ['Noto Sans TC', 'Microsoft JhengHei', 'sans-serif', '-apple-system'
|
|
|
2380
2380
|
var css_248z = "@import url(\"https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@100;300;400;500;700;900&display=swap\");\n";
|
|
2381
2381
|
styleInject(css_248z);
|
|
2382
2382
|
|
|
2383
|
-
|
|
2383
|
+
const defaultColors = {
|
|
2384
2384
|
primaryColor: '#0087dc',
|
|
2385
2385
|
primaryColorFocus: '#339fe3',
|
|
2386
2386
|
secondaryColor: '#ffc400'
|
|
2387
2387
|
};
|
|
2388
2388
|
|
|
2389
2389
|
// export const commonThemeProps = ({ darkMode, colors }) => {
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2390
|
+
const commonTheme = _ref => {
|
|
2391
|
+
let {
|
|
2392
|
+
darkMode,
|
|
2393
|
+
colors
|
|
2394
|
+
} = _ref;
|
|
2395
|
+
const {
|
|
2396
|
+
primaryColor,
|
|
2397
|
+
secondaryColor
|
|
2398
|
+
} = colors || defaultColors;
|
|
2399
|
+
const borderColor = darkMode ? '#8c8c8c' : '#d9d9d9';
|
|
2397
2400
|
return createTheme({
|
|
2398
2401
|
typography: {
|
|
2399
2402
|
button: {
|
|
@@ -2466,7 +2469,7 @@ var commonTheme = function commonTheme(_ref) {
|
|
|
2466
2469
|
MuiInput: {
|
|
2467
2470
|
root: {
|
|
2468
2471
|
width: '100%',
|
|
2469
|
-
border:
|
|
2472
|
+
border: `1px solid ${borderColor}`,
|
|
2470
2473
|
borderRadius: 3,
|
|
2471
2474
|
padding: '2px 8px 0'
|
|
2472
2475
|
},
|
|
@@ -2505,12 +2508,12 @@ var commonTheme = function commonTheme(_ref) {
|
|
|
2505
2508
|
borderRadius: '2px',
|
|
2506
2509
|
backgroundColor: darkMode ? '#595959' : '#f5f5f5',
|
|
2507
2510
|
border: '1px solid',
|
|
2508
|
-
borderColor
|
|
2511
|
+
borderColor
|
|
2509
2512
|
}
|
|
2510
2513
|
},
|
|
2511
2514
|
MuiOutlinedInput: {
|
|
2512
2515
|
root: {
|
|
2513
|
-
borderColor
|
|
2516
|
+
borderColor,
|
|
2514
2517
|
'&.Mui-focused .MuiOutlinedInput-notchedOutline': {
|
|
2515
2518
|
borderWidth: '1px',
|
|
2516
2519
|
boxShadow: '0 0 0 2px rgb(24 144 255 / 20%)'
|
|
@@ -2566,7 +2569,7 @@ var commonTheme = function commonTheme(_ref) {
|
|
|
2566
2569
|
MuiDialogActions: {
|
|
2567
2570
|
root: {
|
|
2568
2571
|
padding: 12,
|
|
2569
|
-
borderTop:
|
|
2572
|
+
borderTop: `1px solid ${borderColor}`
|
|
2570
2573
|
}
|
|
2571
2574
|
}
|
|
2572
2575
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _objectWithoutProperties$1 } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import * as React$2 from 'react';
|
|
3
3
|
import React__default, { Children, isValidElement, cloneElement } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
package/lib/components/Radio.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as _objectSpread2 } from './_rollupPluginBabelHelpers-
|
|
1
|
+
import { b as _objectSpread2 } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { RadioGroup, FormControlLabel, Radio as Radio$1 } from '@material-ui/core';
|
package/lib/components/SNA.js
CHANGED
|
@@ -2,13 +2,13 @@ import React__default, { useMemo, useEffect } from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { c as classNames } from './index-cbd6bca9.js';
|
|
4
4
|
import { e as event, d as d3Select, a as dispatch, c as customEvent, D as DragEvent, q as quadtree, m as map, t as timer, T as Transform, i as identity, b as interrupt, o as ordinal, f as category10 } from './transform-3a04288b.js';
|
|
5
|
-
import { E as ExtraTools } from './ExtraTools-
|
|
5
|
+
import { E as ExtraTools } from './ExtraTools-5407d9de.js';
|
|
6
6
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
7
|
-
import './_rollupPluginBabelHelpers-
|
|
7
|
+
import './_rollupPluginBabelHelpers-a52356f6.js';
|
|
8
8
|
import './_commonjsHelpers-70de2c37.js';
|
|
9
9
|
import '@material-ui/core';
|
|
10
|
-
import './Tooltip-
|
|
11
|
-
import './dataExport-
|
|
10
|
+
import './Tooltip-21964965.js';
|
|
11
|
+
import './dataExport-04b77185.js';
|
|
12
12
|
|
|
13
13
|
function sourceEvent() {
|
|
14
14
|
var current = event, source;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as _objectSpread2,
|
|
1
|
+
import { b as _objectSpread2, d as _typeof } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { c as classNames } from './index-cbd6bca9.js';
|
package/lib/components/Select.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { S as default } from './Select-
|
|
2
|
-
import './_rollupPluginBabelHelpers-
|
|
1
|
+
export { S as default } from './Select-7c0ef815.js';
|
|
2
|
+
import './_rollupPluginBabelHelpers-a52356f6.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'prop-types';
|
|
5
5
|
import './index-cbd6bca9.js';
|
package/lib/components/Table.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _objectWithoutProperties } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { TableContainer, Paper, Table as Table$1, TableHead, TableRow, TableCell, TableBody } from '@material-ui/core';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { Tooltip as Tooltip$1 } from '@material-ui/core';
|
|
4
|
-
import {
|
|
4
|
+
import { _ as _extends } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
5
5
|
import { c as classNames } from './index-cbd6bca9.js';
|
|
6
6
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { T as default, p as placements } from './Tooltip-
|
|
1
|
+
export { T as default, p as placements } from './Tooltip-21964965.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'prop-types';
|
|
4
4
|
import '@material-ui/core';
|
|
5
|
-
import './_rollupPluginBabelHelpers-
|
|
5
|
+
import './_rollupPluginBabelHelpers-a52356f6.js';
|
|
6
6
|
import './index-cbd6bca9.js';
|
|
7
7
|
import './style-inject.es-1f59c1d0.js';
|
|
@@ -139,4 +139,4 @@ function _nonIterableRest() {
|
|
|
139
139
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
export {
|
|
142
|
+
export { _extends as _, _slicedToArray as a, _objectSpread2 as b, _objectWithoutProperties as c, _typeof as d, _defineProperty as e, _taggedTemplateLiteral as f };
|
|
@@ -34,56 +34,57 @@ var fileDownload = function(data, filename, mime, bom) {
|
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
var jsonExcel = function jsonExcel(json) {
|
|
38
|
+
var output = '';
|
|
39
39
|
if (Array.isArray(json) && json.length > 0) {
|
|
40
|
-
|
|
41
|
-
output +=
|
|
42
|
-
json.forEach(item
|
|
43
|
-
keys.forEach(key
|
|
44
|
-
output +=
|
|
40
|
+
var keys = Object.keys(json[0]);
|
|
41
|
+
output += "".concat(keys.toString(), "\n");
|
|
42
|
+
json.forEach(function (item) {
|
|
43
|
+
keys.forEach(function (key) {
|
|
44
|
+
output += "".concat(item[key], ",");
|
|
45
45
|
});
|
|
46
46
|
output += '\n';
|
|
47
47
|
});
|
|
48
48
|
} else {
|
|
49
|
-
|
|
50
|
-
output +=
|
|
51
|
-
|
|
52
|
-
output +=
|
|
49
|
+
var _keys = Object.keys(json);
|
|
50
|
+
output += "".concat(_keys.toString(), "\n");
|
|
51
|
+
_keys.forEach(function (key) {
|
|
52
|
+
output += "".concat(json[key], ",");
|
|
53
53
|
});
|
|
54
54
|
output += '\n';
|
|
55
55
|
}
|
|
56
56
|
return output;
|
|
57
57
|
};
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
var jsonTxt = function jsonTxt(json) {
|
|
59
|
+
var output = '';
|
|
60
60
|
if (Array.isArray(json) && json.length > 0) {
|
|
61
|
-
|
|
62
|
-
json.forEach((item, index)
|
|
63
|
-
output +=
|
|
64
|
-
keys.forEach(key
|
|
65
|
-
output +=
|
|
61
|
+
var keys = Object.keys(json[0]);
|
|
62
|
+
json.forEach(function (item, index) {
|
|
63
|
+
output += "(".concat(index + 1, ")\n");
|
|
64
|
+
keys.forEach(function (key) {
|
|
65
|
+
output += "".concat(key, ": ").concat(item[key], "\n");
|
|
66
66
|
});
|
|
67
67
|
output += '\n';
|
|
68
68
|
});
|
|
69
69
|
} else {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
output +=
|
|
70
|
+
var _keys2 = Object.keys(json);
|
|
71
|
+
_keys2.forEach(function (key) {
|
|
72
|
+
output += "".concat(key, ": ").concat(json[key], "\n");
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
75
|
return output;
|
|
76
76
|
};
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
links,
|
|
80
|
-
nodes
|
|
81
|
-
} = data || {};
|
|
77
|
+
var snaToExcel = function snaToExcel(data) {
|
|
78
|
+
var _ref = data || {},
|
|
79
|
+
links = _ref.links,
|
|
80
|
+
nodes = _ref.nodes;
|
|
82
81
|
if (links && links.length > 0) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
82
|
+
var result = links.map(function (link) {
|
|
83
|
+
return {
|
|
84
|
+
From: nodes[link.source].name,
|
|
85
|
+
To: nodes[link.target].name
|
|
86
|
+
};
|
|
87
|
+
});
|
|
87
88
|
return result;
|
|
88
89
|
}
|
|
89
90
|
return [];
|
package/package.json
CHANGED