@vtx/cs-map-layer 1.0.21 → 1.0.22

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 CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c)
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,40 +1,40 @@
1
- # @vtx/cs-map-layer
2
-
3
- [![NPM version](https://img.shields.io/npm/v/@vtx/cs-map-layer.svg?style=flat)](https://npmjs.org/package/@vtx/cs-map-layer)
4
- [![NPM downloads](http://img.shields.io/npm/dm/@vtx/cs-map-layer.svg?style=flat)](https://npmjs.org/package/@vtx/cs-map-layer)
5
-
6
- React components for Vortex
7
-
8
- ## Usage
9
-
10
- TODO
11
-
12
- ## Options
13
-
14
- TODO
15
-
16
- ## Development
17
-
18
- ```bash
19
- # install dependencies
20
- $ yarn install
21
-
22
- # develop library by docs demo
23
- $ yarn start
24
-
25
- # build library source code
26
- $ yarn run build
27
-
28
- # build library source code in watch mode
29
- $ yarn run build:watch
30
-
31
- # build docs
32
- $ yarn run docs:build
33
-
34
- # check your project for potential problems
35
- $ yarn run doctor
36
- ```
37
-
38
- ## LICENSE
39
-
40
- MIT
1
+ # @vtx/cs-map-layer
2
+
3
+ [![NPM version](https://img.shields.io/npm/v/@vtx/cs-map-layer.svg?style=flat)](https://npmjs.org/package/@vtx/cs-map-layer)
4
+ [![NPM downloads](http://img.shields.io/npm/dm/@vtx/cs-map-layer.svg?style=flat)](https://npmjs.org/package/@vtx/cs-map-layer)
5
+
6
+ React components for Vortex
7
+
8
+ ## Usage
9
+
10
+ TODO
11
+
12
+ ## Options
13
+
14
+ TODO
15
+
16
+ ## Development
17
+
18
+ ```bash
19
+ # install dependencies
20
+ $ yarn install
21
+
22
+ # develop library by docs demo
23
+ $ yarn start
24
+
25
+ # build library source code
26
+ $ yarn run build
27
+
28
+ # build library source code in watch mode
29
+ $ yarn run build:watch
30
+
31
+ # build docs
32
+ $ yarn run docs:build
33
+
34
+ # check your project for potential problems
35
+ $ yarn run doctor
36
+ ```
37
+
38
+ ## LICENSE
39
+
40
+ MIT
@@ -1,5 +1,5 @@
1
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
- var _excluded = ["code", "params", "styleOption", "showModal", "valueField", "customKeys", "popup"];
2
+ var _excluded = ["code", "params", "styleOption", "showModal", "valueField", "customKeys", "customButton", "popup"];
3
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
  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; }
5
5
  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; }
@@ -25,6 +25,7 @@ var FacilityLayer = function FacilityLayer(props) {
25
25
  valueField = props.valueField,
26
26
  _props$customKeys = props.customKeys,
27
27
  customKeys = _props$customKeys === void 0 ? [] : _props$customKeys,
28
+ customButton = props.customButton,
28
29
  _props$popup = props.popup,
29
30
  popup = _props$popup === void 0 ? {
30
31
  version: '1'
@@ -57,14 +58,16 @@ var FacilityLayer = function FacilityLayer(props) {
57
58
  feature: feature,
58
59
  showModal: showModal,
59
60
  valueField: valueField,
60
- customKeys: customKeys
61
+ customKeys: customKeys,
62
+ customButton: customButton
61
63
  });
62
64
  }
63
65
  return /*#__PURE__*/React.createElement(FacilityTemplate, {
64
66
  feature: feature,
65
67
  showModal: showModal,
66
68
  valueField: valueField,
67
- customKeys: customKeys
69
+ customKeys: customKeys,
70
+ customButton: customButton
68
71
  });
69
72
  }
70
73
  }, otherProps));
@@ -3,8 +3,8 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
3
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
5
  /* eslint-disable @typescript-eslint/no-use-before-define */
6
- /*
7
- * @description: 排水-雨水管线图层
6
+ /*
7
+ * @description: 排水-雨水管线图层
8
8
  */
9
9
  import { FeatureLayer, GroupLayer, ImageLayer } from '@vtx/cs-map';
10
10
  import React from 'react';
@@ -1,9 +1,9 @@
1
- /* type:类型 FacilityLayer-设施 DeviceLayer-设备 排水管点-WaterDrainPointLayer 排水管线-WaterDrainLineLayer 排水窨井-WaterSupplyPointLayer
2
- 视频-VideoLayer 行政区划-DivisionLayer 排水-雨水-管点-RainPointLayer 排水-雨水-管线-RainLineLayer 排水-雨水-窨井-RainManholeLayer
3
- 排水-污水-管点-SewagePointLayer 排水-污水-管线-SewageLineLayer 排水-污水-窨井-SewageManholeLayer 排水-合流-管点-ConfluencePointLayer
4
- 排水-合流-管线-ConfluenceLineLayer 排水-合流-窨井-ConfluenceManholeLayer 供水-管点-WaterSupplyPointLayer 供水-管线-WaterSupplyLineLayer
5
- 原水-管点-RawWaterPointLayer 原水-管线-RawWaterLineLayer
6
- 自定义图层-CustomLayer
1
+ /* type:类型 FacilityLayer-设施 DeviceLayer-设备 排水管点-WaterDrainPointLayer 排水管线-WaterDrainLineLayer 排水窨井-WaterSupplyPointLayer
2
+ 视频-VideoLayer 行政区划-DivisionLayer 排水-雨水-管点-RainPointLayer 排水-雨水-管线-RainLineLayer 排水-雨水-窨井-RainManholeLayer
3
+ 排水-污水-管点-SewagePointLayer 排水-污水-管线-SewageLineLayer 排水-污水-窨井-SewageManholeLayer 排水-合流-管点-ConfluencePointLayer
4
+ 排水-合流-管线-ConfluenceLineLayer 排水-合流-窨井-ConfluenceManholeLayer 供水-管点-WaterSupplyPointLayer 供水-管线-WaterSupplyLineLayer
5
+ 原水-管点-RawWaterPointLayer 原水-管线-RawWaterLineLayer
6
+ 自定义图层-CustomLayer
7
7
  */
8
8
 
9
9
  var layerConfig = [{
@@ -1,5 +1,5 @@
1
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
- var _excluded = ["params", "showModal", "popup"];
2
+ var _excluded = ["params", "showModal", "popup", "customButton"];
3
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
  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; }
5
5
  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; }
@@ -21,6 +21,7 @@ var RainLineLayer = function RainLineLayer(props) {
21
21
  popup = _props$popup === void 0 ? {
22
22
  version: '1'
23
23
  } : _props$popup,
24
+ customButton = props.customButton,
24
25
  otherProps = _objectWithoutProperties(props, _excluded);
25
26
  var tenantId = getTenantId();
26
27
  return /*#__PURE__*/React.createElement(ImageLayer, _extends({
@@ -38,12 +39,14 @@ var RainLineLayer = function RainLineLayer(props) {
38
39
  if (popup.version == '2') {
39
40
  return /*#__PURE__*/React.createElement(FacilityTemplateV2, {
40
41
  feature: feature,
41
- showModal: showModal
42
+ showModal: showModal,
43
+ customButton: customButton
42
44
  });
43
45
  }
44
46
  return /*#__PURE__*/React.createElement(FacilityTemplate, {
45
47
  feature: feature,
46
- showModal: showModal
48
+ showModal: showModal,
49
+ customButton: customButton
47
50
  });
48
51
  }
49
52
  }, otherProps));
@@ -1,5 +1,5 @@
1
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
- var _excluded = ["params", "showModal", "popup"];
2
+ var _excluded = ["params", "showModal", "popup", "customButton"];
3
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
  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; }
5
5
  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; }
@@ -21,6 +21,7 @@ var RainManholeLayer = function RainManholeLayer(props) {
21
21
  popup = _props$popup === void 0 ? {
22
22
  version: '1'
23
23
  } : _props$popup,
24
+ customButton = props.customButton,
24
25
  otherProps = _objectWithoutProperties(props, _excluded);
25
26
  var tenantId = getTenantId();
26
27
  return /*#__PURE__*/React.createElement(ImageLayer, _extends({
@@ -38,12 +39,14 @@ var RainManholeLayer = function RainManholeLayer(props) {
38
39
  if (popup.version == '2') {
39
40
  return /*#__PURE__*/React.createElement(FacilityTemplateV2, {
40
41
  feature: feature,
41
- showModal: showModal
42
+ showModal: showModal,
43
+ customButton: customButton
42
44
  });
43
45
  }
44
46
  return /*#__PURE__*/React.createElement(FacilityTemplate, {
45
47
  feature: feature,
46
- showModal: showModal
48
+ showModal: showModal,
49
+ customButton: customButton
47
50
  });
48
51
  }
49
52
  }, otherProps));
@@ -1,5 +1,5 @@
1
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
- var _excluded = ["params", "showModal", "popup"];
2
+ var _excluded = ["params", "showModal", "popup", "customButton"];
3
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
  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; }
5
5
  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; }
@@ -21,6 +21,7 @@ var RainPointLayer = function RainPointLayer(props) {
21
21
  popup = _props$popup === void 0 ? {
22
22
  version: '1'
23
23
  } : _props$popup,
24
+ customButton = props.customButton,
24
25
  otherProps = _objectWithoutProperties(props, _excluded);
25
26
  var tenantId = getTenantId();
26
27
  return /*#__PURE__*/React.createElement(ImageLayer, _extends({
@@ -38,12 +39,14 @@ var RainPointLayer = function RainPointLayer(props) {
38
39
  if (popup.version == '2') {
39
40
  return /*#__PURE__*/React.createElement(FacilityTemplateV2, {
40
41
  feature: feature,
41
- showModal: showModal
42
+ showModal: showModal,
43
+ customButton: customButton
42
44
  });
43
45
  }
44
46
  return /*#__PURE__*/React.createElement(FacilityTemplate, {
45
47
  feature: feature,
46
- showModal: showModal
48
+ showModal: showModal,
49
+ customButton: customButton
47
50
  });
48
51
  }
49
52
  }, otherProps));
@@ -1,5 +1,5 @@
1
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
- var _excluded = ["params", "showModal", "popup"];
2
+ var _excluded = ["params", "showModal", "popup", "customButton"];
3
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
  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; }
5
5
  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; }
@@ -14,6 +14,7 @@ import FacilityTemplate from "../_components/Template/FacilityTemplate";
14
14
  import FacilityTemplateV2 from "../_components/Template/FacilityTemplateV2";
15
15
  import { FACILITY_CODE } from "../_util/interface";
16
16
  import { facilityCodeMap } from "../_util/layerConfig";
17
+ import { getTenantId } from "../_util/util";
17
18
  var RawWaterLineLayer = function RawWaterLineLayer(props) {
18
19
  var _props$params = props.params,
19
20
  params = _props$params === void 0 ? {} : _props$params,
@@ -22,14 +23,17 @@ var RawWaterLineLayer = function RawWaterLineLayer(props) {
22
23
  popup = _props$popup === void 0 ? {
23
24
  version: '1'
24
25
  } : _props$popup,
26
+ customButton = props.customButton,
25
27
  otherProps = _objectWithoutProperties(props, _excluded);
26
28
  var code = FACILITY_CODE.RAW_WATER_LINE;
27
29
  var _facilityCodeMap$code = facilityCodeMap[code],
28
30
  name = _facilityCodeMap$code.name,
29
31
  labelField = _facilityCodeMap$code.labelField;
32
+ var tenantId = getTenantId();
30
33
  return /*#__PURE__*/React.createElement(ImageLayer, _extends({
31
34
  url: "/geoserver/zhsw/wms",
32
35
  params: _objectSpread({
36
+ viewparams: "tenantId:".concat(tenantId),
33
37
  typeName: 'zhsw:zhsw_raw_water_line'
34
38
  }, params),
35
39
  name: name,
@@ -44,12 +48,14 @@ var RawWaterLineLayer = function RawWaterLineLayer(props) {
44
48
  if (popup.version == '2') {
45
49
  return /*#__PURE__*/React.createElement(FacilityTemplateV2, {
46
50
  feature: feature,
47
- showModal: showModal
51
+ showModal: showModal,
52
+ customButton: customButton
48
53
  });
49
54
  }
50
55
  return /*#__PURE__*/React.createElement(FacilityTemplate, {
51
56
  feature: feature,
52
- showModal: showModal
57
+ showModal: showModal,
58
+ customButton: customButton
53
59
  });
54
60
  }
55
61
  }, otherProps));
@@ -1,5 +1,5 @@
1
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
- var _excluded = ["params", "showModal", "popup"];
2
+ var _excluded = ["params", "showModal", "popup", "customButton"];
3
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
  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; }
5
5
  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; }
@@ -14,6 +14,7 @@ import FacilityTemplate from "../_components/Template/FacilityTemplate";
14
14
  import FacilityTemplateV2 from "../_components/Template/FacilityTemplateV2";
15
15
  import { FACILITY_CODE } from "../_util/interface";
16
16
  import { facilityCodeMap } from "../_util/layerConfig";
17
+ import { getTenantId } from "../_util/util";
17
18
  var RawWaterPointLayer = function RawWaterPointLayer(props) {
18
19
  var _props$params = props.params,
19
20
  params = _props$params === void 0 ? {} : _props$params,
@@ -22,15 +23,18 @@ var RawWaterPointLayer = function RawWaterPointLayer(props) {
22
23
  popup = _props$popup === void 0 ? {
23
24
  version: '1'
24
25
  } : _props$popup,
26
+ customButton = props.customButton,
25
27
  otherProps = _objectWithoutProperties(props, _excluded);
26
28
  var code = FACILITY_CODE.RAW_WATER_POINT;
27
29
  var _facilityCodeMap$code = facilityCodeMap[code],
28
30
  name = _facilityCodeMap$code.name,
29
31
  labelField = _facilityCodeMap$code.labelField;
32
+ var tenantId = getTenantId();
30
33
  return /*#__PURE__*/React.createElement(ImageLayer, _extends({
31
34
  url: "/geoserver/zhsw/wms",
32
35
  params: _objectSpread({
33
- typeName: 'zhsw:zhsw_raw_water_point'
36
+ typeName: 'zhsw:zhsw_raw_water_point',
37
+ viewparams: "tenantId:".concat(tenantId)
34
38
  }, params),
35
39
  name: name,
36
40
  labelField: labelField,
@@ -44,12 +48,14 @@ var RawWaterPointLayer = function RawWaterPointLayer(props) {
44
48
  if (popup.version == '2') {
45
49
  return /*#__PURE__*/React.createElement(FacilityTemplateV2, {
46
50
  feature: feature,
47
- showModal: showModal
51
+ showModal: showModal,
52
+ customButton: customButton
48
53
  });
49
54
  }
50
55
  return /*#__PURE__*/React.createElement(FacilityTemplate, {
51
56
  feature: feature,
52
- showModal: showModal
57
+ showModal: showModal,
58
+ customButton: customButton
53
59
  });
54
60
  }
55
61
  }, otherProps));
@@ -1,5 +1,5 @@
1
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
- var _excluded = ["params", "showModal", "customKeys", "popup"];
2
+ var _excluded = ["params", "showModal", "customKeys", "popup", "customButton"];
3
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
  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; }
5
5
  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; }
@@ -14,6 +14,7 @@ import FacilityTemplate from "../_components/Template/FacilityTemplate";
14
14
  import FacilityTemplateV2 from "../_components/Template/FacilityTemplateV2";
15
15
  import { FACILITY_CODE } from "../_util/interface";
16
16
  import { facilityCodeMap } from "../_util/layerConfig";
17
+ import { getTenantId } from "../_util/util";
17
18
  var WaterSupplyLineLayer = function WaterSupplyLineLayer(props) {
18
19
  var _props$params = props.params,
19
20
  params = _props$params === void 0 ? {} : _props$params,
@@ -24,14 +25,17 @@ var WaterSupplyLineLayer = function WaterSupplyLineLayer(props) {
24
25
  popup = _props$popup === void 0 ? {
25
26
  version: '1'
26
27
  } : _props$popup,
28
+ customButton = props.customButton,
27
29
  otherProps = _objectWithoutProperties(props, _excluded);
28
30
  var code = FACILITY_CODE.WATER_SUPPLY_LINE;
29
31
  var _facilityCodeMap$code = facilityCodeMap[code],
30
32
  name = _facilityCodeMap$code.name,
31
33
  labelField = _facilityCodeMap$code.labelField;
34
+ var tenantId = getTenantId();
32
35
  return /*#__PURE__*/React.createElement(ImageLayer, _extends({
33
36
  url: "/geoserver/zhsw/wms",
34
37
  params: _objectSpread({
38
+ viewparams: "tenantId:".concat(tenantId),
35
39
  typeName: 'zhsw:zhsw_water_supply_line'
36
40
  }, params),
37
41
  name: name,
@@ -44,13 +48,15 @@ var WaterSupplyLineLayer = function WaterSupplyLineLayer(props) {
44
48
  return /*#__PURE__*/React.createElement(FacilityTemplateV2, {
45
49
  feature: feature,
46
50
  showModal: showModal,
47
- customKeys: customKeys
51
+ customKeys: customKeys,
52
+ customButton: customButton
48
53
  });
49
54
  }
50
55
  return /*#__PURE__*/React.createElement(FacilityTemplate, {
51
56
  feature: feature,
52
57
  showModal: showModal,
53
- customKeys: customKeys
58
+ customKeys: customKeys,
59
+ customButton: customButton
54
60
  });
55
61
  },
56
62
  group: [{
@@ -1,5 +1,5 @@
1
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
- var _excluded = ["params", "showModal", "groupKey", "customKeys", "popup"];
2
+ var _excluded = ["params", "showModal", "groupKey", "customKeys", "popup", "customButton"];
3
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
  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; }
5
5
  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; }
@@ -8,8 +8,8 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
8
8
  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); }
9
9
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
10
10
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
11
- /**
12
- *供水管点
11
+ /**
12
+ *供水管点
13
13
  */
14
14
  import { ImageLayer } from '@vtx/cs-map';
15
15
  import { isArray, isEmpty } from 'lodash';
@@ -18,6 +18,7 @@ import FacilityTemplate from "../_components/Template/FacilityTemplate";
18
18
  import FacilityTemplateV2 from "../_components/Template/FacilityTemplateV2";
19
19
  import { FACILITY_CODE, POINT_CHARACTERISTICS, POINT_CHARACTERISTICS_STR } from "../_util/interface";
20
20
  import { facilityCodeMap } from "../_util/layerConfig";
21
+ import { getTenantId } from "../_util/util";
21
22
  var WaterSupplyPointLayer = function WaterSupplyPointLayer(props) {
22
23
  var _props$params = props.params,
23
24
  params = _props$params === void 0 ? {} : _props$params,
@@ -29,11 +30,13 @@ var WaterSupplyPointLayer = function WaterSupplyPointLayer(props) {
29
30
  popup = _props$popup === void 0 ? {
30
31
  version: '1'
31
32
  } : _props$popup,
33
+ customButton = props.customButton,
32
34
  otherProps = _objectWithoutProperties(props, _excluded);
33
35
  var code = FACILITY_CODE.WATER_SUPPLY_POINT;
34
36
  var _facilityCodeMap$code = facilityCodeMap[code],
35
37
  name = _facilityCodeMap$code.name,
36
38
  labelField = _facilityCodeMap$code.labelField;
39
+ var tenantId = getTenantId();
37
40
  var newGroupKey = [POINT_CHARACTERISTICS.GD_BZ, POINT_CHARACTERISTICS.GD_CSK, POINT_CHARACTERISTICS.GD_BJG, POINT_CHARACTERISTICS.GD_FM, POINT_CHARACTERISTICS.GD_JCJ, POINT_CHARACTERISTICS.GD_PQF, POINT_CHARACTERISTICS.GD_PSF, POINT_CHARACTERISTICS.GD_SB, POINT_CHARACTERISTICS.GD_XFS, POINT_CHARACTERISTICS.GD_YLD, POINT_CHARACTERISTICS.GD_PNJ, POINT_CHARACTERISTICS.GD_PXJ, POINT_CHARACTERISTICS.GD_XSJ, POINT_CHARACTERISTICS.GD_DTFB];
38
41
  if (groupKey === false) {
39
42
  newGroupKey = [];
@@ -52,6 +55,7 @@ var WaterSupplyPointLayer = function WaterSupplyPointLayer(props) {
52
55
  return /*#__PURE__*/React.createElement(ImageLayer, _extends({
53
56
  url: "/geoserver/zhsw/wms",
54
57
  params: _objectSpread({
58
+ viewparams: "tenantId:".concat(tenantId),
55
59
  typeName: 'zhsw:zhsw_water_supply_point'
56
60
  }, params),
57
61
  name: name,
@@ -64,13 +68,15 @@ var WaterSupplyPointLayer = function WaterSupplyPointLayer(props) {
64
68
  return /*#__PURE__*/React.createElement(FacilityTemplateV2, {
65
69
  feature: feature,
66
70
  showModal: showModal,
67
- customKeys: customKeys
71
+ customKeys: customKeys,
72
+ customButton: customButton
68
73
  });
69
74
  }
70
75
  return /*#__PURE__*/React.createElement(FacilityTemplate, {
71
76
  feature: feature,
72
77
  showModal: showModal,
73
- customKeys: customKeys
78
+ customKeys: customKeys,
79
+ customButton: customButton
74
80
  });
75
81
  },
76
82
  group: group
@@ -1,7 +1,7 @@
1
1
  import { ExclamationCircleOutlined } from "@ant-design/icons";
2
- import React from "react";
3
2
  import "./index.less";
4
3
  import { useProps } from '@vtx/cs-map';
4
+ import React from 'react';
5
5
  var CloseBtn = function CloseBtn(props) {
6
6
  var feature = props.feature,
7
7
  type = props.type;
@@ -4,6 +4,7 @@ declare const FacilityTemplate: FC<{
4
4
  feature: any;
5
5
  valueField?: string;
6
6
  showModal?: any;
7
+ customButton?: any;
7
8
  /**
8
9
  * 接收自定义字段显示
9
10
  */
@@ -18,7 +18,8 @@ var FacilityTemplate = function FacilityTemplate(props) {
18
18
  var feature = props.feature,
19
19
  showModal = props.showModal,
20
20
  valueField = props.valueField,
21
- customKeys = props.customKeys;
21
+ customKeys = props.customKeys,
22
+ customButton = props.customButton;
22
23
  var _useState = useState([]),
23
24
  _useState2 = _slicedToArray(_useState, 2),
24
25
  list = _useState2[0],
@@ -27,6 +28,10 @@ var FacilityTemplate = function FacilityTemplate(props) {
27
28
  _useState4 = _slicedToArray(_useState3, 2),
28
29
  loading = _useState4[0],
29
30
  setLoading = _useState4[1];
31
+ var _useState5 = useState({}),
32
+ _useState6 = _slicedToArray(_useState5, 2),
33
+ facilityDetail = _useState6[0],
34
+ setFacilityDetail = _useState6[1];
30
35
  var properties = (feature === null || feature === void 0 ? void 0 : feature.values_) || {};
31
36
 
32
37
  // valueField-传入的设施id取值字段 facility_id:默认图层中设施id字段 facilityId:默认设施列表接口中设施id字段
@@ -70,6 +75,7 @@ var FacilityTemplate = function FacilityTemplate(props) {
70
75
  if (!res.result && res.data) {
71
76
  var _data;
72
77
  data = res.data;
78
+ setFacilityDetail(data);
73
79
  getFacilityField((_data = data) === null || _data === void 0 ? void 0 : _data.typeCode, data);
74
80
  }
75
81
  }).catch(function () {
@@ -91,7 +97,16 @@ var FacilityTemplate = function FacilityTemplate(props) {
91
97
  span: 24,
92
98
  key: index
93
99
  }, item.label, "\uFF1A", item.value || String(item.value) === '0' ? item.value : '--');
94
- })) : null), /*#__PURE__*/React.createElement(CloseBtn, {
100
+ })) : null), customButton ? /*#__PURE__*/React.createElement("div", {
101
+ className: "facility-layer-custom-button",
102
+ onClick: function onClick(e) {
103
+ return e.stopPropagation();
104
+ }
105
+ }, typeof customButton === 'function' ? customButton({
106
+ feature: feature,
107
+ facilityDetail: facilityDetail,
108
+ list: list
109
+ }) : customButton) : null, /*#__PURE__*/React.createElement(CloseBtn, {
95
110
  showModal: showModal,
96
111
  feature: feature,
97
112
  type: "1"
@@ -4,6 +4,7 @@ declare const FacilityTemplate: FC<{
4
4
  feature: any;
5
5
  valueField?: string;
6
6
  showModal?: any;
7
+ customButton?: any;
7
8
  /**
8
9
  * 接收自定义字段显示
9
10
  */
@@ -15,6 +15,7 @@ var FacilityTemplate = function FacilityTemplate(props) {
15
15
  showModal = props.showModal,
16
16
  valueField = props.valueField,
17
17
  customKeys = props.customKeys,
18
+ customButton = props.customButton,
18
19
  _props$extraKeyParamL = props.extraKeyParamList,
19
20
  extraKeyParamList = _props$extraKeyParamL === void 0 ? [] : _props$extraKeyParamL;
20
21
  var _useState = useState([]),
@@ -86,6 +87,8 @@ var FacilityTemplate = function FacilityTemplate(props) {
86
87
  }, /*#__PURE__*/React.createElement(Spin, {
87
88
  spinning: loading,
88
89
  size: "small"
90
+ }, /*#__PURE__*/React.createElement("div", {
91
+ className: customButton ? 'facility-layer-custom-panel facility-layer-custom-panel-has-button' : 'facility-layer-custom-panel'
89
92
  }, /*#__PURE__*/React.createElement(CustomContent, {
90
93
  extraKeyParamList: extraKeyParamList,
91
94
  dark: true,
@@ -97,7 +100,16 @@ var FacilityTemplate = function FacilityTemplate(props) {
97
100
  // showModal && showModal(feature, map, '1');
98
101
  // }
99
102
  }
100
- })), /*#__PURE__*/React.createElement(CloseBtn, {
103
+ }), customButton ? /*#__PURE__*/React.createElement("div", {
104
+ className: "facility-layer-custom-button",
105
+ onClick: function onClick(e) {
106
+ return e.stopPropagation();
107
+ }
108
+ }, typeof customButton === 'function' ? customButton({
109
+ feature: feature,
110
+ facilityDetail: facilityDetail,
111
+ list: list
112
+ }) : customButton) : null)), /*#__PURE__*/React.createElement(CloseBtn, {
101
113
  showModal: showModal,
102
114
  feature: feature,
103
115
  facilityDetail: facilityDetail,
@@ -1,10 +1,15 @@
1
- .close-btn {
2
- position: absolute;
3
- top: 12px;
4
- right: 30px;
5
- cursor: pointer;
6
- }
7
-
8
- .cesium-popup-v1{
9
- width: 300px;
10
- }
1
+ .close-btn {
2
+ position: absolute;
3
+ top: 12px;
4
+ right: 30px;
5
+ cursor: pointer;
6
+ }
7
+
8
+ .cesium-popup-v1{
9
+ width: 300px;
10
+ }
11
+
12
+ .facility-layer-custom-button {
13
+ padding: 8px 10px 0;
14
+ text-align: right;
15
+ }
@@ -42,6 +42,28 @@
42
42
  cursor: pointer;
43
43
  }
44
44
 
45
+ .facility-layer-custom-button {
46
+ padding: 8px 10px 10px;
47
+ text-align: right;
48
+ }
49
+
50
+ .facility-layer-custom-panel-has-button {
51
+ overflow: hidden;
52
+ background: #162d56;
53
+ box-shadow: inset 0 4px 16px 0 #1d7ad0;
54
+ border-radius: 8px;
55
+
56
+ .facility-layer-custom-content-dark {
57
+ background: transparent;
58
+ box-shadow: none;
59
+ border-radius: 8px 8px 0 0;
60
+ }
61
+
62
+ .facility-layer-custom-button {
63
+ padding: 2px 10px 10px;
64
+ }
65
+ }
66
+
45
67
  .map-empty {
46
68
  display: flex;
47
69
  flex-direction: column;
@@ -549,7 +571,7 @@
549
571
 
550
572
  &.is-alarm {
551
573
  color: #FF2F2F;
552
- flex: 1;
574
+ flex: 1;
553
575
  }
554
576
  }
555
577
  }
package/lib/_util/http.js CHANGED
@@ -19,10 +19,10 @@ import { getVtxToken } from "@vtx/utils";
19
19
  // 默认30秒超时
20
20
  var SECOND = 30;
21
21
  var MILL_SECOND = 1000;
22
- /**
23
- * 基于 axios 封装的请求封装
24
- * axios文档 http://www.axios-js.com/zh-cn/docs/
25
- * 支持 Get 和 Post 请求
22
+ /**
23
+ * 基于 axios 封装的请求封装
24
+ * axios文档 http://www.axios-js.com/zh-cn/docs/
25
+ * 支持 Get 和 Post 请求
26
26
  */
27
27
  var Http = /*#__PURE__*/function () {
28
28
  function Http(options) {
@@ -57,10 +57,10 @@ var Http = /*#__PURE__*/function () {
57
57
  return instance;
58
58
  }
59
59
 
60
- /**
61
- * get 请求
62
- * @param {*} url
63
- * @param {*} options {body}
60
+ /**
61
+ * get 请求
62
+ * @param {*} url
63
+ * @param {*} options {body}
64
64
  */
65
65
  }, {
66
66
  key: "get",
@@ -78,10 +78,10 @@ var Http = /*#__PURE__*/function () {
78
78
  });
79
79
  }
80
80
 
81
- /**
82
- * post 请求
83
- * @param {*} url
84
- * @param {*} options
81
+ /**
82
+ * post 请求
83
+ * @param {*} url
84
+ * @param {*} options
85
85
  */
86
86
  }, {
87
87
  key: "post",
@@ -99,9 +99,9 @@ var Http = /*#__PURE__*/function () {
99
99
  });
100
100
  }
101
101
 
102
- /**
103
- * 响应数据的处理
104
- * @param {*} response
102
+ /**
103
+ * 响应数据的处理
104
+ * @param {*} response
105
105
  */
106
106
  }, {
107
107
  key: "_responseHandler",
@@ -122,9 +122,9 @@ var Http = /*#__PURE__*/function () {
122
122
  throw error;
123
123
  }
124
124
 
125
- /**
126
- * 请求错误处理
127
- * @param {*} error
125
+ /**
126
+ * 请求错误处理
127
+ * @param {*} error
128
128
  */
129
129
  }, {
130
130
  key: "_errorHandler",
@@ -1,3 +1,4 @@
1
+ import type { ReactNode } from 'react';
1
2
  export declare enum TYPE {
2
3
  FACILITY = "1",
3
4
  DEVICE = "2"
@@ -373,6 +374,11 @@ export interface CommonPropsI {
373
374
  params?: object;
374
375
  showModal?: (feature: any) => any;
375
376
  customKeys?: any;
377
+ customButton?: ReactNode | ((args: {
378
+ feature: any;
379
+ facilityDetail?: any;
380
+ list?: any[];
381
+ }) => any);
376
382
  popup?: {
377
383
  version: string;
378
384
  fields?: {
@@ -71,8 +71,8 @@ export var DEVICE_CODE = /*#__PURE__*/function (DEVICE_CODE) {
71
71
  return DEVICE_CODE;
72
72
  }({});
73
73
 
74
- /**
75
- * 管点特征枚举
74
+ /**
75
+ * 管点特征枚举
76
76
  */
77
77
  export var POINT_CHARACTERISTICS = /*#__PURE__*/function (POINT_CHARACTERISTICS) {
78
78
  POINT_CHARACTERISTICS[POINT_CHARACTERISTICS["GD_BZ"] = 1] = "GD_BZ";
package/lib/typings.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- declare module '@vtx/cs-map'
2
- declare module '@vtx/utils'
3
- declare module '@vtx/map-icon'
4
- declare module '@ant-design/icons'
1
+ declare module '@vtx/cs-map'
2
+ declare module '@vtx/utils'
3
+ declare module '@vtx/map-icon'
4
+ declare module '@ant-design/icons'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtx/cs-map-layer",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "React components for Vortex",
5
5
  "license": "MIT",
6
6
  "module": "lib/index.js",
@@ -18,6 +18,7 @@
18
18
  "lint": "npm run lint:es && npm run lint:css",
19
19
  "lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
20
20
  "lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
21
+ "prepublishOnly": "npm run build",
21
22
  "start": "npm run dev"
22
23
  },
23
24
  "husky": {