@vtx/cs-map-layer 1.0.16 → 1.0.18

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.
@@ -114,7 +114,7 @@ var DeviceLayer = function DeviceLayer(props) {
114
114
  return getDeviceStyle(f, icon || '', styleOption);
115
115
  },
116
116
  name: "".concat(_name, "-").concat(deviceStatusNameMap[status]),
117
- labelField: labelField,
117
+ // labelField,
118
118
  valueField: 'id',
119
119
  zIndex: 60,
120
120
  id: "".concat(code, "_").concat(status),
@@ -1,12 +1,14 @@
1
+ import { QuestionCircleOutlined } from '@ant-design/icons';
1
2
  import { getVtxToken } from '@vtx/utils';
2
3
  import classnames from 'classnames';
3
4
  import PropTypes from 'prop-types';
4
5
  import React from 'react';
5
- var _ref = getVtxToken() || {},
6
- token = _ref.token,
7
- tenantId = _ref.tenantId,
8
- userId = _ref.userId;
6
+ import { Tooltip } from "antd";
9
7
  function CustomContent(props) {
8
+ var _ref = getVtxToken() || {},
9
+ token = _ref.token,
10
+ tenantId = _ref.tenantId,
11
+ userId = _ref.userId;
10
12
  var _onClick = props.onClick,
11
13
  deviceDetail = props.deviceDetail,
12
14
  deviceData = props.deviceData,
@@ -16,6 +18,12 @@ function CustomContent(props) {
16
18
  var commonClassnames = "device-layer-custom-content".concat(dark ? '-dark' : '');
17
19
  return str ? "".concat(commonClassnames, "-").concat(str) : commonClassnames;
18
20
  };
21
+ var getLastUpdateTime = function getLastUpdateTime(arr) {
22
+ var _arr$sort;
23
+ return ((_arr$sort = arr.sort(function (a, b) {
24
+ return new Date(b.updateTime).getTime() - new Date(a.updateTime).getTime();
25
+ })) === null || _arr$sort === void 0 || (_arr$sort = _arr$sort[0]) === null || _arr$sort === void 0 ? void 0 : _arr$sort.updateTime) || '';
26
+ };
19
27
  return /*#__PURE__*/React.createElement("div", {
20
28
  className: classnames(handleClassName()),
21
29
  onClick: function onClick() {
@@ -43,7 +51,11 @@ function CustomContent(props) {
43
51
  className: classnames(handleClassName('keyParam-line'))
44
52
  })), deviceData !== null && deviceData !== void 0 && deviceData.length ? /*#__PURE__*/React.createElement("div", {
45
53
  className: classnames(handleClassName('keyIndicators'))
46
- }, deviceData === null || deviceData === void 0 ? void 0 : deviceData.map(function (v) {
54
+ }, /*#__PURE__*/React.createElement("div", {
55
+ className: classnames(handleClassName('keyIndicators-item'))
56
+ }, getLastUpdateTime(deviceData.filter(function (v) {
57
+ return v.updateTime;
58
+ }) || [])), deviceData === null || deviceData === void 0 ? void 0 : deviceData.map(function (v) {
47
59
  return /*#__PURE__*/React.createElement("div", {
48
60
  key: v === null || v === void 0 ? void 0 : v.name,
49
61
  className: classnames(handleClassName('keyIndicators-item'))
@@ -51,11 +63,19 @@ function CustomContent(props) {
51
63
  className: classnames(handleClassName('keyIndicators-item-left'))
52
64
  }, /*#__PURE__*/React.createElement("div", {
53
65
  className: classnames(handleClassName('keyIndicators-item-round'))
54
- }), /*#__PURE__*/React.createElement("span", null, v.name || ''), /*#__PURE__*/React.createElement("span", null, v.unit ? "\uFF08".concat(v.unit, "\uFF09") : '', ":"), /*#__PURE__*/React.createElement("span", {
55
- className: classnames(handleClassName('keyIndicators-item-left-value'))
56
- }, v.value || v.value == 0 ? v.value : '')), /*#__PURE__*/React.createElement("div", {
57
- className: classnames(handleClassName('keyIndicators-item-updateTime'))
58
- }, v.updateTime));
66
+ }), /*#__PURE__*/React.createElement("span", {
67
+ className: classnames(handleClassName('keyIndicators-item-left-name'))
68
+ }, v.name || ''), /*#__PURE__*/React.createElement("span", null, v.unit ? "\uFF08".concat(v.unit, "\uFF09") : '', ":"), /*#__PURE__*/React.createElement("span", {
69
+ className: classnames(handleClassName('keyIndicators-item-left-value'), {
70
+ 'is-alarm': v.onAlarm
71
+ })
72
+ }, v.value || v.value == 0 ? v.value : '', v.onAlarm ? /*#__PURE__*/React.createElement(React.Fragment, null, " (".concat(v.alarmLevel, "\u7EA7\u62A5\u8B66) "), /*#__PURE__*/React.createElement(Tooltip, {
73
+ title: v.alarmDescription
74
+ }, /*#__PURE__*/React.createElement(QuestionCircleOutlined, {
75
+ style: {
76
+ color: '#fff'
77
+ }
78
+ }))) : '')));
59
79
  })) : null));
60
80
  }
61
81
  CustomContent.propTypes = {
@@ -1,3 +1,9 @@
1
+ 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); }
2
+ 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; }
3
+ 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; }
4
+ 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; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ 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); }
1
7
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
2
8
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
9
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
@@ -96,13 +102,12 @@ var DeviceTemplate = function DeviceTemplate(props) {
96
102
  res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 || _res$data2.map(function (item) {
97
103
  var _item$factorValues;
98
104
  item === null || item === void 0 || (_item$factorValues = item.factorValues) === null || _item$factorValues === void 0 || _item$factorValues.map(function (v) {
99
- data.push({
100
- // name: v?.factorName,
105
+ data.push(_objectSpread(_objectSpread({}, v), {}, {
101
106
  name: v === null || v === void 0 ? void 0 : v.monitorItemName,
102
107
  unit: v === null || v === void 0 ? void 0 : v.unit,
103
108
  value: v === null || v === void 0 ? void 0 : v.formatValue,
104
109
  updateTime: v === null || v === void 0 ? void 0 : v.timeDesc
105
- });
110
+ }));
106
111
  });
107
112
  });
108
113
  }
@@ -1,6 +1,12 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1
7
  import { getVtxToken } from '@vtx/utils';
2
8
  import classnames from 'classnames';
3
- import React, { useEffect } from 'react';
9
+ import React, { useEffect, useState } from 'react';
4
10
  import http from "../../_util/http";
5
11
  import { facilityPopup } from "../../_util/layerConfig";
6
12
  // import address from '../../assets/address.png';
@@ -16,7 +22,11 @@ function CustomContent(props) {
16
22
  var _onClick = props.onClick,
17
23
  facilityDetail = props.facilityDetail,
18
24
  dark = props.dark;
19
- // console.log(showModal, valueField, customButton, popup, otherProps, 'CustomContent');
25
+ // !-解决因子不能及时更新问题
26
+ var _useState = useState(0),
27
+ _useState2 = _slicedToArray(_useState, 2),
28
+ _refresh = _useState2[0],
29
+ setRefresh = _useState2[1];
20
30
  var handleClassName = function handleClassName(str) {
21
31
  var commonClassnames = "facility-layer-custom-content".concat(dark ? '-dark' : '');
22
32
  return str ? "".concat(commonClassnames, "-").concat(str) : commonClassnames;
@@ -71,12 +81,19 @@ function CustomContent(props) {
71
81
  }
72
82
  // console.log(list, item, '配置因子列表');
73
83
  item.factorValuesList = _.cloneDeep(list);
84
+ setRefresh(Math.random());
74
85
  }
75
86
  }).catch(function () {
76
87
  return {};
77
88
  });
78
89
  }
79
90
  }, [JSON.stringify(facilityDetail)]);
91
+ var getLastUpdateTime = function getLastUpdateTime(arr) {
92
+ var _arr$sort;
93
+ return ((_arr$sort = arr.sort(function (a, b) {
94
+ return new Date(b.updateTime).getTime() - new Date(a.updateTime).getTime();
95
+ })) === null || _arr$sort === void 0 || (_arr$sort = _arr$sort[0]) === null || _arr$sort === void 0 ? void 0 : _arr$sort.updateTime) || '';
96
+ };
80
97
  return /*#__PURE__*/React.createElement("div", {
81
98
  className: classnames(handleClassName()),
82
99
  onClick: function onClick() {
@@ -110,7 +127,11 @@ function CustomContent(props) {
110
127
  className: classnames(handleClassName('keyParam-line'))
111
128
  }) : null), item !== null && item !== void 0 && (_item$factorValuesLis = item.factorValuesList) !== null && _item$factorValuesLis !== void 0 && _item$factorValuesLis.length ? /*#__PURE__*/React.createElement("div", {
112
129
  className: classnames(handleClassName('keyIndicators'))
113
- }, item === null || item === void 0 || (_item$factorValuesLis2 = item.factorValuesList) === null || _item$factorValuesLis2 === void 0 ? void 0 : _item$factorValuesLis2.map(function (v) {
130
+ }, /*#__PURE__*/React.createElement("div", {
131
+ className: classnames(handleClassName('keyIndicators-item'))
132
+ }, getLastUpdateTime((item === null || item === void 0 ? void 0 : item.factorValuesList.filter(function (v) {
133
+ return v.updateTime;
134
+ })) || [])), item === null || item === void 0 || (_item$factorValuesLis2 = item.factorValuesList) === null || _item$factorValuesLis2 === void 0 ? void 0 : _item$factorValuesLis2.map(function (v) {
114
135
  return /*#__PURE__*/React.createElement("div", {
115
136
  key: v === null || v === void 0 ? void 0 : v.name,
116
137
  className: classnames(handleClassName('keyIndicators-item'))
@@ -118,11 +139,11 @@ function CustomContent(props) {
118
139
  className: classnames(handleClassName('keyIndicators-item-left'))
119
140
  }, /*#__PURE__*/React.createElement("div", {
120
141
  className: classnames(handleClassName('keyIndicators-item-round'))
121
- }), /*#__PURE__*/React.createElement("span", null, v.name || ''), /*#__PURE__*/React.createElement("span", null, v.unit ? "\uFF08".concat(v.unit, "\uFF09") : '', ":"), /*#__PURE__*/React.createElement("span", {
142
+ }), /*#__PURE__*/React.createElement("span", {
143
+ className: classnames(handleClassName('keyIndicators-item-left-name'))
144
+ }, v.name || ''), /*#__PURE__*/React.createElement("span", null, v.unit ? "\uFF08".concat(v.unit, "\uFF09") : '', ":"), /*#__PURE__*/React.createElement("span", {
122
145
  className: classnames(handleClassName('keyIndicators-item-left-value'))
123
- }, v.value || v.value == 0 ? v.value : '')), /*#__PURE__*/React.createElement("div", {
124
- className: classnames(handleClassName('keyIndicators-item-updateTime'))
125
- }, v.updateTime));
146
+ }, v.value || v.value == 0 ? v.value : '')));
126
147
  })) : null));
127
148
  }
128
149
  CustomContent.propTypes = {
@@ -1,11 +1,11 @@
1
- .cs-map-container .cesium-popup{
2
- max-width: 360px;
1
+ .cs-map-container .cesium-popup {
2
+ max-width: 360px;
3
3
 
4
- .cesium-popup-close{
4
+ .cesium-popup-close {
5
5
  z-index: 99;
6
6
  }
7
7
 
8
- .cesium-popup-v2{
8
+ .cesium-popup-v2 {
9
9
  position: relative;
10
10
  max-width: 360px;
11
11
  width: 360px;
@@ -13,6 +13,12 @@
13
13
  }
14
14
  }
15
15
 
16
+ .cesium-popup-no-title+.cesium-popup-content {
17
+ .cesium-popup-v2 {
18
+ margin: -10px -12px;
19
+ }
20
+ }
21
+
16
22
  .close-btn {
17
23
  position: absolute;
18
24
  top: 12px;
@@ -58,7 +64,7 @@
58
64
 
59
65
  &-title {
60
66
  height: 35px;
61
- background: rgba(24, 144, 255, 0.1);
67
+ background: rgba(24, 144, 255, .1);
62
68
  border-radius: 8px 8px 0 0;
63
69
  display: flex;
64
70
  align-items: center;
@@ -79,7 +85,7 @@
79
85
 
80
86
  &-right {
81
87
  padding: 2px 4px;
82
- background: rgba(24, 144, 255, 0.2);
88
+ background: rgba(24, 144, 255, .2);
83
89
  border-radius: 2px;
84
90
  border: 1px solid #1890ff;
85
91
  font-size: 12px;
@@ -116,16 +122,16 @@
116
122
  &-line {
117
123
  width: 100%;
118
124
  height: 1px;
119
- background-color: #e8e8e8;
125
+ background-color: #355184;
120
126
  }
121
127
 
122
128
  &-item {
123
129
  display: flex;
124
130
  align-items: center;
125
- margin-bottom: 6px;
126
131
  font-weight: 500;
127
132
  font-size: 14px;
128
- color: rgba(0, 0, 0, 0.85);
133
+ color: rgba(0, 0, 0, .85);
134
+ line-height: 2.0;
129
135
 
130
136
  &-address {
131
137
  margin-left: 8px;
@@ -138,7 +144,7 @@
138
144
  }
139
145
 
140
146
  &-keyIndicators {
141
- padding: 7px 9px 0;
147
+ padding: 7px 10px;
142
148
 
143
149
  &-item {
144
150
  display: flex;
@@ -147,15 +153,17 @@
147
153
  font-weight: 400;
148
154
  font-size: 14px;
149
155
  color: #595959;
150
- margin-bottom: 6px;
151
-
152
- &:last-child {
153
- margin-bottom: 0;
154
- }
156
+ line-height: 2.0;
155
157
 
156
158
  &-left {
159
+ word-break: break-all;
160
+ flex-wrap: nowrap;
161
+ align-items: baseline;
157
162
  display: flex;
158
- align-items: center;
163
+
164
+ &-name {
165
+ white-space: nowrap;
166
+ }
159
167
 
160
168
  &-value {
161
169
  margin-left: 8px;
@@ -167,12 +175,7 @@
167
175
  height: 5px;
168
176
  background-color: rgba(89, 89, 89, 1);
169
177
  border-radius: 50%;
170
- margin-right: 2px;
171
- }
172
-
173
- &-updateTime {
174
- font-size: 12px;
175
- color: #8c8c8c;
178
+ margin-right: 4px;
176
179
  }
177
180
  }
178
181
  }
@@ -186,12 +189,11 @@
186
189
  &-title {
187
190
  height: 35px;
188
191
  background: #135694;
189
- border-radius: 8px 8px 0px 0px;
192
+ border-radius: 8px 8px 0 0;
190
193
  display: flex;
191
194
  align-items: center;
192
195
  font-weight: 500;
193
- padding-left: 8px;
194
- // padding-right: 33px;
196
+ padding-left: 10px;
195
197
  padding-right: 50px;
196
198
 
197
199
  &-left {
@@ -221,7 +223,7 @@
221
223
 
222
224
  &-keyParam {
223
225
  width: 339px;
224
- margin-left: 9px;
226
+ margin-left: 10px;
225
227
  padding-top: 7px;
226
228
 
227
229
  &-deviceDetail {
@@ -268,7 +270,7 @@
268
270
  }
269
271
 
270
272
  &-keyIndicators {
271
- padding: 7px 9px 0;
273
+ padding: 7px 10px;
272
274
 
273
275
  &-item {
274
276
  display: flex;
@@ -351,8 +353,6 @@
351
353
  }
352
354
  }
353
355
 
354
- &-contentBox {}
355
-
356
356
  &-keyParam {
357
357
  width: 339px;
358
358
  margin-left: 9px;
@@ -379,16 +379,16 @@
379
379
  &-line {
380
380
  width: 100%;
381
381
  height: 1px;
382
- background-color: #e8e8e8;
382
+ background-color: #355184;
383
383
  }
384
384
 
385
385
  &-item {
386
386
  display: flex;
387
387
  align-items: center;
388
- margin-bottom: 6px;
389
388
  font-weight: 500;
390
389
  font-size: 14px;
391
390
  color: rgba(0, 0, 0, .85);
391
+ line-height: 2.0;
392
392
 
393
393
  &-address {
394
394
  margin-left: 8px;
@@ -401,7 +401,7 @@
401
401
  }
402
402
 
403
403
  &-keyIndicators {
404
- padding: 7px 9px 0;
404
+ padding: 7px 10px;
405
405
 
406
406
  &-item {
407
407
  display: flex;
@@ -410,11 +410,7 @@
410
410
  font-weight: 400;
411
411
  font-size: 14px;
412
412
  color: #595959;
413
- margin-bottom: 6px;
414
-
415
- &:last-child {
416
- margin-bottom: 0;
417
- }
413
+ line-height: 2.0;
418
414
 
419
415
  &-left {
420
416
  display: flex;
@@ -449,12 +445,11 @@
449
445
  &-title {
450
446
  height: 35px;
451
447
  background: #135694;
452
- border-radius: 8px 8px 0px 0px;
448
+ border-radius: 8px 8px 0 0;
453
449
  display: flex;
454
450
  align-items: center;
455
451
  font-weight: 500;
456
- padding-left: 8px;
457
- // padding-right: 33px;
452
+ padding-left: 10px;
458
453
  padding-right: 50px;
459
454
 
460
455
  &-left {
@@ -481,13 +476,9 @@
481
476
  }
482
477
  }
483
478
 
484
- &-contentBox {
485
- // background-color: red;
486
- }
487
-
488
479
  &-keyParam {
489
480
  width: 339px;
490
- margin-left: 9px;
481
+ margin-left: 10px;
491
482
  padding-top: 7px;
492
483
 
493
484
  &-deviceDetail {
@@ -533,7 +524,7 @@
533
524
  }
534
525
 
535
526
  &-keyIndicators {
536
- padding: 7px 9px 0;
527
+ padding: 7px 10px;
537
528
 
538
529
  &-item {
539
530
  display: flex;
@@ -541,18 +532,25 @@
541
532
  align-items: center;
542
533
  font-weight: 400;
543
534
  font-size: 14px;
544
- margin-bottom: 6px;
545
-
546
- &:last-child {
547
- margin-bottom: 0;
548
- }
535
+ line-height: 2.0;
549
536
 
550
537
  &-left {
538
+ word-break: break-all;
539
+ flex-wrap: nowrap;
540
+ align-items: baseline;
551
541
  display: flex;
552
- align-items: center;
542
+
543
+ &-name {
544
+ white-space: nowrap;
545
+ }
553
546
 
554
547
  &-value {
555
548
  margin-left: 8px;
549
+
550
+ &.is-alarm {
551
+ color: #FF2F2F;
552
+ flex: 1;
553
+ }
556
554
  }
557
555
  }
558
556
 
@@ -561,14 +559,9 @@
561
559
  height: 5px;
562
560
  background-color: #fff;
563
561
  border-radius: 50%;
564
- margin-right: 2px;
565
- }
566
-
567
- &-updateTime {
568
- font-size: 12px;
569
- color: rgba(255, 255, 255, .6);
562
+ margin-right: 4px;
570
563
  }
571
564
  }
572
565
  }
573
566
  }
574
- }
567
+ }
package/package.json CHANGED
@@ -1,102 +1,102 @@
1
- {
2
- "name": "@vtx/cs-map-layer",
3
- "version": "1.0.16",
4
- "description": "React components for Vortex",
5
- "license": "MIT",
6
- "module": "lib/index.js",
7
- "types": "lib/index.d.ts",
8
- "files": [
9
- "lib"
10
- ],
11
- "scripts": {
12
- "build": "father build",
13
- "build:watch": "father dev",
14
- "cesium:fix": "node ./scripts/cesium-fix.js",
15
- "dev": "npm run cesium:fix && dumi dev",
16
- "docs:build": "npm run cesium:fix && dumi build",
17
- "doctor": "father doctor",
18
- "lint": "npm run lint:es && npm run lint:css",
19
- "lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
20
- "lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
21
- "prepublishOnly": "father doctor && npm run build",
22
- "start": "npm run dev"
23
- },
24
- "husky": {
25
- "hooks": {
26
- "pre-commit": "lint-staged",
27
- "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
28
- }
29
- },
30
- "commitlint": {
31
- "extends": [
32
- "@commitlint/config-conventional"
33
- ]
34
- },
35
- "lint-staged": {
36
- "*.{md,json}": [
37
- "prettier --write --no-error-on-unmatched-pattern"
38
- ],
39
- "*.{css,less}": [
40
- "stylelint --fix",
41
- "prettier --write"
42
- ],
43
- "*.{js,jsx}": [
44
- "eslint --fix",
45
- "prettier --write"
46
- ],
47
- "*.{ts,tsx}": [
48
- "eslint --fix",
49
- "prettier --parser=typescript --write"
50
- ]
51
- },
52
- "dependencies": {
53
- "@vtx/utils": "latest",
54
- "cesium": "1.90.0",
55
- "lodash": "^4.17.21",
56
- "moment": "^2.29.1",
57
- "qs": "^6.0.0",
58
- "ahooks": "^3.1.5"
59
- },
60
- "devDependencies": {
61
- "@ant-design/icons": "4.7.0",
62
- "@babel/runtime": "^7.6.3",
63
- "@commitlint/cli": "^17.1.2",
64
- "@commitlint/config-conventional": "^17.1.0",
65
- "@turf/turf": "^6.5.0",
66
- "@types/lodash": "^4.14.202",
67
- "@types/qs": "^6.9.11",
68
- "@types/react": "^18.0.0",
69
- "@types/react-dom": "^18.0.0",
70
- "@umijs/lint": "^4.0.0",
71
- "@vtx/cs-map": "latest",
72
- "@vtx/map-icon": "^2.0.16",
73
- "antd": "4.20.5",
74
- "axios": "^0.21.1",
75
- "babel-plugin-import": "^1.13.8",
76
- "dumi": "^2.2.13",
77
- "eslint": "^8.23.0",
78
- "father": "^4.1.0",
79
- "husky": "^8.0.1",
80
- "lint-staged": "^13.0.3",
81
- "prettier": "^2.7.1",
82
- "prettier-plugin-organize-imports": "^3.0.0",
83
- "prettier-plugin-packagejson": "^2.2.18",
84
- "react": "^18.0.0",
85
- "react-dom": "^18.0.0",
86
- "stylelint": "^14.9.1"
87
- },
88
- "peerDependencies": {
89
- "@ant-design/icons": ">=4.0.0",
90
- "@vtx/cs-map": ">=1.0.40",
91
- "@vtx/map-icon": ">=2.0.0",
92
- "antd": ">4.0.0",
93
- "axios": ">=0.21.1",
94
- "react": ">=16.9.0",
95
- "react-dom": ">=16.9.0"
96
- },
97
- "publishConfig": {
98
- "access": "public"
99
- },
100
- "authors": [],
101
- "slideEffects": false
102
- }
1
+ {
2
+ "name": "@vtx/cs-map-layer",
3
+ "version": "1.0.18",
4
+ "description": "React components for Vortex",
5
+ "license": "MIT",
6
+ "module": "lib/index.js",
7
+ "types": "lib/index.d.ts",
8
+ "files": [
9
+ "lib"
10
+ ],
11
+ "scripts": {
12
+ "build": "father build",
13
+ "build:watch": "father dev",
14
+ "cesium:fix": "node ./scripts/cesium-fix.js",
15
+ "dev": "npm run cesium:fix && dumi dev",
16
+ "docs:build": "npm run cesium:fix && dumi build",
17
+ "doctor": "father doctor",
18
+ "lint": "npm run lint:es && npm run lint:css",
19
+ "lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
20
+ "lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
21
+ "prepublishOnly": "father doctor && npm run build",
22
+ "start": "npm run dev"
23
+ },
24
+ "husky": {
25
+ "hooks": {
26
+ "pre-commit": "lint-staged",
27
+ "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
28
+ }
29
+ },
30
+ "commitlint": {
31
+ "extends": [
32
+ "@commitlint/config-conventional"
33
+ ]
34
+ },
35
+ "lint-staged": {
36
+ "*.{md,json}": [
37
+ "prettier --write --no-error-on-unmatched-pattern"
38
+ ],
39
+ "*.{css,less}": [
40
+ "stylelint --fix",
41
+ "prettier --write"
42
+ ],
43
+ "*.{js,jsx}": [
44
+ "eslint --fix",
45
+ "prettier --write"
46
+ ],
47
+ "*.{ts,tsx}": [
48
+ "eslint --fix",
49
+ "prettier --parser=typescript --write"
50
+ ]
51
+ },
52
+ "dependencies": {
53
+ "@vtx/utils": "latest",
54
+ "cesium": "1.90.0",
55
+ "lodash": "^4.17.21",
56
+ "moment": "^2.29.1",
57
+ "qs": "^6.0.0",
58
+ "ahooks": "^3.1.5"
59
+ },
60
+ "devDependencies": {
61
+ "@ant-design/icons": "4.7.0",
62
+ "@babel/runtime": "^7.6.3",
63
+ "@commitlint/cli": "^17.1.2",
64
+ "@commitlint/config-conventional": "^17.1.0",
65
+ "@turf/turf": "^6.5.0",
66
+ "@types/lodash": "^4.14.202",
67
+ "@types/qs": "^6.9.11",
68
+ "@types/react": "^18.0.0",
69
+ "@types/react-dom": "^18.0.0",
70
+ "@umijs/lint": "^4.0.0",
71
+ "@vtx/cs-map": "latest",
72
+ "@vtx/map-icon": "^2.0.16",
73
+ "antd": "4.20.5",
74
+ "axios": "^0.21.1",
75
+ "babel-plugin-import": "^1.13.8",
76
+ "dumi": "^2.2.13",
77
+ "eslint": "^8.23.0",
78
+ "father": "^4.1.0",
79
+ "husky": "^8.0.1",
80
+ "lint-staged": "^13.0.3",
81
+ "prettier": "^2.7.1",
82
+ "prettier-plugin-organize-imports": "^3.0.0",
83
+ "prettier-plugin-packagejson": "^2.2.18",
84
+ "react": "^18.0.0",
85
+ "react-dom": "^18.0.0",
86
+ "stylelint": "^14.9.1"
87
+ },
88
+ "peerDependencies": {
89
+ "@ant-design/icons": ">=4.0.0",
90
+ "@vtx/cs-map": ">=1.0.40",
91
+ "@vtx/map-icon": ">=2.0.0",
92
+ "antd": ">4.0.0",
93
+ "axios": ">=0.21.1",
94
+ "react": ">=16.9.0",
95
+ "react-dom": ">=16.9.0"
96
+ },
97
+ "publishConfig": {
98
+ "access": "public"
99
+ },
100
+ "authors": [],
101
+ "slideEffects": false
102
+ }