@vtx/cs-map-layer 1.0.22 → 1.0.23

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.
@@ -13,7 +13,7 @@ declare namespace CustomContent {
13
13
  deviceDetail: PropTypes.Requireable<object>;
14
14
  deviceData: PropTypes.Requireable<object>;
15
15
  valueField: PropTypes.Requireable<string>;
16
- customButton: PropTypes.Requireable<NonNullable<PropTypes.ReactElementLike | ((...args: any[]) => any) | null | undefined>>;
16
+ customButton: PropTypes.Requireable<NonNullable<((...args: any[]) => any) | PropTypes.ReactElementLike | null | undefined>>;
17
17
  popup: PropTypes.Requireable<object>;
18
18
  detail: PropTypes.Requireable<object>;
19
19
  };
@@ -12,10 +12,11 @@ declare namespace CustomContent {
12
12
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
13
13
  facilityDetail: PropTypes.Requireable<object>;
14
14
  valueField: PropTypes.Requireable<string>;
15
- customButton: PropTypes.Requireable<NonNullable<PropTypes.ReactElementLike | ((...args: any[]) => any) | null | undefined>>;
15
+ customButton: PropTypes.Requireable<NonNullable<((...args: any[]) => any) | PropTypes.ReactElementLike | null | undefined>>;
16
16
  popup: PropTypes.Requireable<object>;
17
17
  detail: PropTypes.Requireable<object>;
18
18
  extraKeyParamList: PropTypes.Requireable<any[]>;
19
+ customFactorValuesList: PropTypes.Requireable<any[]>;
19
20
  };
20
21
  }
21
22
  export default CustomContent;
@@ -23,7 +23,9 @@ function CustomContent(props) {
23
23
  facilityDetail = props.facilityDetail,
24
24
  dark = props.dark,
25
25
  _props$extraKeyParamL = props.extraKeyParamList,
26
- extraKeyParamList = _props$extraKeyParamL === void 0 ? [] : _props$extraKeyParamL;
26
+ extraKeyParamList = _props$extraKeyParamL === void 0 ? [] : _props$extraKeyParamL,
27
+ _props$customFactorVa = props.customFactorValuesList,
28
+ customFactorValuesList = _props$customFactorVa === void 0 ? [] : _props$customFactorVa;
27
29
  // !-解决因子不能及时更新问题
28
30
  var _useState = useState(0),
29
31
  _useState2 = _slicedToArray(_useState, 2),
@@ -127,7 +129,22 @@ function CustomContent(props) {
127
129
  }, v.label || '', "\xA0: \xA0", v.label == '所属河道' ? (facilityDetail === null || facilityDetail === void 0 || (_facilityDetail$dataJ = facilityDetail.dataJson) === null || _facilityDetail$dataJ === void 0 ? void 0 : _facilityDetail$dataJ.regionTypeValue) == '河道' ? (facilityDetail === null || facilityDetail === void 0 || (_facilityDetail$dataJ2 = facilityDetail.dataJson) === null || _facilityDetail$dataJ2 === void 0 ? void 0 : _facilityDetail$dataJ2.regionObjectName) || '' : '' : (facilityDetail === null || facilityDetail === void 0 || (_facilityDetail$dataJ3 = facilityDetail.dataJson) === null || _facilityDetail$dataJ3 === void 0 ? void 0 : _facilityDetail$dataJ3[v.value]) || '');
128
130
  }), item !== null && item !== void 0 && (_item$keyParamList2 = item.keyParamList) !== null && _item$keyParamList2 !== void 0 && _item$keyParamList2.length ? /*#__PURE__*/React.createElement("div", {
129
131
  className: classnames(handleClassName('keyParam-line'))
130
- }) : null), item !== null && item !== void 0 && (_item$factorValuesLis = item.factorValuesList) !== null && _item$factorValuesLis !== void 0 && _item$factorValuesLis.length ? /*#__PURE__*/React.createElement("div", {
132
+ }) : null), customFactorValuesList !== null && customFactorValuesList !== void 0 && customFactorValuesList.length ? /*#__PURE__*/React.createElement("div", {
133
+ className: classnames(handleClassName('keyIndicators'))
134
+ }, customFactorValuesList === null || customFactorValuesList === void 0 ? void 0 : customFactorValuesList.map(function (v) {
135
+ return /*#__PURE__*/React.createElement("div", {
136
+ key: v === null || v === void 0 ? void 0 : v.name,
137
+ className: classnames(handleClassName('keyIndicators-item'))
138
+ }, /*#__PURE__*/React.createElement("div", {
139
+ className: classnames(handleClassName('keyIndicators-item-left'))
140
+ }, /*#__PURE__*/React.createElement("div", {
141
+ className: classnames(handleClassName('keyIndicators-item-round'))
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", {
145
+ className: classnames(handleClassName('keyIndicators-item-left-value'))
146
+ }, v.value || v.value == 0 ? v.value : '')));
147
+ })) : item !== null && item !== void 0 && (_item$factorValuesLis = item.factorValuesList) !== null && _item$factorValuesLis !== void 0 && _item$factorValuesLis.length ? /*#__PURE__*/React.createElement("div", {
131
148
  className: classnames(handleClassName('keyIndicators'))
132
149
  }, /*#__PURE__*/React.createElement("div", {
133
150
  className: classnames(handleClassName('keyIndicators-item'))
@@ -166,6 +183,7 @@ CustomContent.propTypes = {
166
183
  customButton: PropTypes.oneOfType([PropTypes.func, PropTypes.element]),
167
184
  popup: PropTypes.object,
168
185
  detail: PropTypes.object,
169
- extraKeyParamList: PropTypes.array
186
+ extraKeyParamList: PropTypes.array,
187
+ customFactorValuesList: PropTypes.array
170
188
  };
171
189
  export default CustomContent;
@@ -10,5 +10,6 @@ declare const FacilityTemplate: FC<{
10
10
  */
11
11
  customKeys?: any;
12
12
  extraKeyParamList?: any[];
13
+ customFactorValuesList?: any[];
13
14
  }>;
14
15
  export default FacilityTemplate;
@@ -17,7 +17,9 @@ var FacilityTemplate = function FacilityTemplate(props) {
17
17
  customKeys = props.customKeys,
18
18
  customButton = props.customButton,
19
19
  _props$extraKeyParamL = props.extraKeyParamList,
20
- extraKeyParamList = _props$extraKeyParamL === void 0 ? [] : _props$extraKeyParamL;
20
+ extraKeyParamList = _props$extraKeyParamL === void 0 ? [] : _props$extraKeyParamL,
21
+ _props$customFactorVa = props.customFactorValuesList,
22
+ customFactorValuesList = _props$customFactorVa === void 0 ? [] : _props$customFactorVa;
21
23
  var _useState = useState([]),
22
24
  _useState2 = _slicedToArray(_useState, 2),
23
25
  list = _useState2[0],
@@ -91,6 +93,7 @@ var FacilityTemplate = function FacilityTemplate(props) {
91
93
  className: customButton ? 'facility-layer-custom-panel facility-layer-custom-panel-has-button' : 'facility-layer-custom-panel'
92
94
  }, /*#__PURE__*/React.createElement(CustomContent, {
93
95
  extraKeyParamList: extraKeyParamList,
96
+ customFactorValuesList: customFactorValuesList,
94
97
  dark: true,
95
98
  facilityDetail: facilityDetail,
96
99
  onClick: function onClick() {
package/package.json CHANGED
@@ -1,106 +1,106 @@
1
- {
2
- "name": "@vtx/cs-map-layer",
3
- "version": "1.0.22",
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": "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
- "@ant-design/icons-svg": "^4.4.2",
54
- "@vtx/utils": "latest",
55
- "ahooks": "^3.1.5",
56
- "cesium": "1.90.0",
57
- "classnames": "^2.5.1",
58
- "lodash": "^4.17.21",
59
- "moment": "^2.29.1",
60
- "prop-types": "^15.8.1",
61
- "qs": "^6.0.0"
62
- },
63
- "devDependencies": {
64
- "@ant-design/icons": "4.7.0",
65
- "@babel/runtime": "^7.6.3",
66
- "@commitlint/cli": "^17.1.2",
67
- "@commitlint/config-conventional": "^17.1.0",
68
- "@turf/turf": "^6.5.0",
69
- "@types/lodash": "^4.14.202",
70
- "@types/prop-types": "^15.7.15",
71
- "@types/qs": "^6.9.11",
72
- "@types/react": "^18.0.0",
73
- "@types/react-dom": "^18.0.0",
74
- "@umijs/lint": "^4.0.0",
75
- "@vtx/cs-map": "latest",
76
- "@vtx/map-icon": "^2.0.16",
77
- "antd": "4.20.5",
78
- "axios": "^0.21.1",
79
- "babel-plugin-import": "^1.13.8",
80
- "dumi": "^2.2.13",
81
- "eslint": "^8.23.0",
82
- "father": "^4.1.0",
83
- "husky": "^8.0.1",
84
- "lint-staged": "^13.0.3",
85
- "prettier": "^2.7.1",
86
- "prettier-plugin-organize-imports": "^3.0.0",
87
- "prettier-plugin-packagejson": "^2.2.18",
88
- "react": "^18.0.0",
89
- "react-dom": "^18.0.0",
90
- "stylelint": "^14.9.1"
91
- },
92
- "peerDependencies": {
93
- "@ant-design/icons": ">=4.0.0",
94
- "@vtx/cs-map": ">=1.0.40",
95
- "@vtx/map-icon": ">=2.0.0",
96
- "antd": ">4.0.0",
97
- "axios": ">=0.21.1",
98
- "react": ">=16.9.0",
99
- "react-dom": ">=16.9.0"
100
- },
101
- "publishConfig": {
102
- "access": "public"
103
- },
104
- "authors": [],
105
- "slideEffects": false
106
- }
1
+ {
2
+ "name": "@vtx/cs-map-layer",
3
+ "version": "1.0.23",
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": "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
+ "@ant-design/icons-svg": "^4.4.2",
54
+ "@vtx/utils": "latest",
55
+ "ahooks": "^3.1.5",
56
+ "cesium": "1.90.0",
57
+ "classnames": "^2.5.1",
58
+ "lodash": "^4.17.21",
59
+ "moment": "^2.29.1",
60
+ "prop-types": "^15.8.1",
61
+ "qs": "^6.0.0"
62
+ },
63
+ "devDependencies": {
64
+ "@ant-design/icons": "4.7.0",
65
+ "@babel/runtime": "^7.6.3",
66
+ "@commitlint/cli": "^17.1.2",
67
+ "@commitlint/config-conventional": "^17.1.0",
68
+ "@turf/turf": "^6.5.0",
69
+ "@types/lodash": "^4.14.202",
70
+ "@types/prop-types": "^15.7.15",
71
+ "@types/qs": "^6.9.11",
72
+ "@types/react": "^18.0.0",
73
+ "@types/react-dom": "^18.0.0",
74
+ "@umijs/lint": "^4.0.0",
75
+ "@vtx/cs-map": "latest",
76
+ "@vtx/map-icon": "^2.0.16",
77
+ "antd": "4.20.5",
78
+ "axios": "^0.21.1",
79
+ "babel-plugin-import": "^1.13.8",
80
+ "dumi": "^2.2.13",
81
+ "eslint": "^8.23.0",
82
+ "father": "^4.1.0",
83
+ "husky": "^8.0.1",
84
+ "lint-staged": "^13.0.3",
85
+ "prettier": "^2.7.1",
86
+ "prettier-plugin-organize-imports": "^3.0.0",
87
+ "prettier-plugin-packagejson": "^2.2.18",
88
+ "react": "^18.0.0",
89
+ "react-dom": "^18.0.0",
90
+ "stylelint": "^14.9.1"
91
+ },
92
+ "peerDependencies": {
93
+ "@ant-design/icons": ">=4.0.0",
94
+ "@vtx/cs-map": ">=1.0.40",
95
+ "@vtx/map-icon": ">=2.0.0",
96
+ "antd": ">4.0.0",
97
+ "axios": ">=0.21.1",
98
+ "react": ">=16.9.0",
99
+ "react-dom": ">=16.9.0"
100
+ },
101
+ "publishConfig": {
102
+ "access": "public"
103
+ },
104
+ "authors": [],
105
+ "slideEffects": false
106
+ }