@corpsmap/corpsmap 3.2.83 → 3.2.84

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corpsmap/corpsmap",
3
- "version": "3.2.83",
3
+ "version": "3.2.84",
4
4
  "description": "CorpsMap as React Components",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -25,15 +25,14 @@
25
25
  "cross-env": "^5.2.0",
26
26
  "react": "^16.9.0",
27
27
  "react-dom": "^16.9.0",
28
- "rollup": "^2.0.0",
29
- "@rollup/plugin-babel": "^5.0.0",
30
- "@rollup/plugin-commonjs": "^24.1.0",
31
- "rollup-plugin-css-only": "^2.0.0",
32
- "@rollup/plugin-json": "^6.0.0",
33
- "@rollup/plugin-node-resolve": "^15.0.2",
28
+ "rollup": "^1.20.2",
29
+ "rollup-plugin-babel": "^4.3.3",
30
+ "rollup-plugin-commonjs": "^10.1.0",
31
+ "rollup-plugin-css-only": "^1.0.0",
32
+ "rollup-plugin-json": "^4.0.0",
33
+ "rollup-plugin-node-resolve": "^5.2.0",
34
34
  "rollup-plugin-postcss": "^2.0.3",
35
35
  "rollup-plugin-replace": "^2.2.0",
36
- "rollup-plugin-peer-deps-external": "^2.0.0",
37
36
  "styled-jsx": "^3.2.1",
38
37
  "wait-on": "^5.2.1"
39
38
  },
@@ -43,17 +42,17 @@
43
42
  },
44
43
  "dependencies": {
45
44
  "@mapbox/togeojson": "^0.16.0",
46
- "@turf/bbox": "^6.5.0",
45
+ "@turf/bbox": "^6.0.1",
47
46
  "@turf/bbox-polygon": "^6.0.1",
48
47
  "@turf/boolean-crosses": "^6.0.1",
49
- "@turf/boolean-disjoint": "^6.5.0",
48
+ "@turf/boolean-disjoint": "^6.0.2",
50
49
  "@turf/boolean-point-in-polygon": "^6.0.1",
51
50
  "@turf/buffer": "^5.1.5",
52
- "@turf/center-of-mass": "^6.5.0",
51
+ "@turf/center-of-mass": "^6.0.1",
53
52
  "@turf/centroid": "^6.0.2",
54
53
  "@turf/distance": "^6.0.1",
55
54
  "@turf/flatten": "^5.1.5",
56
- "@turf/helpers": "^6.5.0",
55
+ "@turf/helpers": "^6.1.4",
57
56
  "@turf/length": "^6.0.2",
58
57
  "@turf/line-slice": "^5.1.5",
59
58
  "async": "^2.6.1",
package/rollup.config.js CHANGED
@@ -1,11 +1,12 @@
1
- import babel from "@rollup/plugin-babel";
2
- import commonjs from "@rollup/plugin-commonjs";
3
- import resolve from "@rollup/plugin-node-resolve";
1
+ import babel from "rollup-plugin-babel";
2
+ import commonjs from "rollup-plugin-commonjs";
3
+ import resolve from "rollup-plugin-node-resolve";
4
4
  import replace from "rollup-plugin-replace";
5
5
  import css from "rollup-plugin-css-only";
6
- import postcss from "rollup-plugin-postcss";
7
- import json from "@rollup/plugin-json";
8
- import pkg from "./package.json";
6
+ import postcss from 'rollup-plugin-postcss';
7
+ import json from 'rollup-plugin-json';
8
+ import pkg from './package.json';
9
+
9
10
 
10
11
  const NODE_ENV = process.env.NODE_ENV || "development";
11
12
  const outputFile = NODE_ENV === "production" ? "./lib/prod.js" : "./lib/dev.js";
@@ -14,38 +15,36 @@ export default {
14
15
  input: "./src/index.js",
15
16
  output: {
16
17
  file: outputFile,
17
- format: "cjs",
18
+ format: "cjs"
18
19
  },
19
20
  plugins: [
20
21
  replace({
21
- "process.env.NODE_ENV": JSON.stringify(NODE_ENV),
22
+ "process.env.NODE_ENV": JSON.stringify(NODE_ENV)
22
23
  }),
23
24
  babel({
24
- plugins: [["import", { libraryName: "antd", style: true }]],
25
- extensions: [".js", ".jsx", ".ts", ".tsx"],
26
- exclude: "node_modules/**",
27
- babelHelpers: "bundled",
28
- // presets: ['@babel/preset-env'] This may be needed
25
+ plugins:[['import', { libraryName: 'antd', style: true }]],
26
+ extensions: ['.js', '.jsx', '.ts', '.tsx'],
27
+ exclude: "node_modules/**"
29
28
  }),
30
29
  css({
31
- output: "./css/corpsmap.css",
30
+ output: "./css/corpsmap.css"
32
31
  }),
33
32
  resolve({
34
33
  module: true,
35
34
  jsnext: true,
36
35
  customResolveOptions: {
37
- moduleDirectory: "node_modules",
38
- },
36
+ moduleDirectory: 'node_modules'
37
+ }
39
38
  }),
40
39
  json(),
41
40
  commonjs(),
42
41
  postcss({
43
- extensions: [".css", ".scss", ".less"],
44
- use: ["sass", ["less", { javascriptEnabled: true }]],
45
- }),
42
+ extensions: ['.css', '.scss', '.less'],
43
+ use: ['sass', ['less', { javascriptEnabled: true }]],
44
+ })
46
45
  ],
47
46
  external: [
48
47
  ...Object.keys(pkg.devDependencies || {}),
49
- ...Object.keys(pkg.peerDependencies || {}),
50
- ],
48
+ ...Object.keys(pkg.peerDependencies || {})
49
+ ]
51
50
  };
@@ -12,78 +12,109 @@ class ResourcesModal extends React.Component {
12
12
  const { doModalClose } = this.props;
13
13
  doModalClose();
14
14
  }
15
-
15
+
16
16
  render() {
17
17
  function filterResourceItems(resourceItems, groupId) {
18
- let items = resourceItems.filter(item => item.resource_group_id !== null && item.resource_group_id === groupId);
19
- items = items.sort((a,b) => a.resource_sort - b.resource_sort);
18
+ let items = resourceItems.filter(
19
+ (item) =>
20
+ item.resource_group_id !== null && item.resource_group_id === groupId
21
+ );
22
+ items = items.sort((a, b) => a.resource_sort - b.resource_sort);
20
23
  return items;
21
24
  }
22
- const { theme, doGetResourceData, resourceItems, resourceGroups} = this.props;
25
+ const { theme, doGetResourceData, resourceItems, resourceGroups } =
26
+ this.props;
23
27
  let groups = [];
24
-
25
- groups = resourceGroups.map(item => {
26
- let url = `${process.env.REACT_APP_FUDS_RESOURCE_GROUP_IMAGE_URL}` + item.groupId;
28
+
29
+ groups = resourceGroups.map((item) => {
30
+ let url =
31
+ `${process.env.REACT_APP_FUDS_RESOURCE_GROUP_IMAGE_URL}` + item.groupId;
27
32
  let documentURL = `${process.env.REACT_APP_FUDS_RESOURCE_DOCUMENT_URL}`;
28
33
 
29
34
  return (
30
- <div key={"image"+item.groupId} style={{ paddingLeft: "25px", fontSize: "20px", fontWeight: "bold" }}>
31
- <span key={"span"+item.groupId}>
32
- <img key={"imageID"+item.groupId} src={url} width="50px" height="50px" onError={({ currentTarget}) => { currentTarget.onerror = null; currentTarget.style.display = "none";}}/>
35
+ <div
36
+ key={"image" + item.groupId}
37
+ style={{ paddingLeft: "25px", fontSize: "20px", fontWeight: "bold" }}
38
+ >
39
+ <span key={"span" + item.groupId}>
40
+ <img
41
+ key={"imageID" + item.groupId}
42
+ src={url}
43
+ width="50px"
44
+ height="50px"
45
+ onError={({ currentTarget }) => {
46
+ currentTarget.onerror = null;
47
+ currentTarget.style.display = "none";
48
+ }}
49
+ />
33
50
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
34
51
  {item.groupName}
35
52
  </span>
36
53
  <br></br>
37
- <div key={"itemDivID"+item.groupId} style={{paddingLeft: "25px", fontSize: "16px"}}>
38
- <table className="table" key={"tableID"+item.groupId} >
39
- <thead>
40
- <tr key={item.groupId + 7777777777}>
41
- <th className>
42
- Description
43
- </th>
44
- <th className>
45
- URL
46
- </th>
47
- </tr>
48
- </thead>
49
- <tbody>
50
- {filterResourceItems(resourceItems, item.groupId).map((item) => (
51
- <tr key={item.resource_id}>
52
- <td className="col-sm-4">{item.description}</td>
53
- <td className="col-sm-4">
54
- <a href={item.url} target="_blank" rel="noreferrer nofollow noopener" download="TEST_FILE">{item.name}</a>
55
- </td>
56
- {/* <td className="col-sm-4">
54
+ <div
55
+ key={"itemDivID" + item.groupId}
56
+ style={{ paddingLeft: "25px", fontSize: "16px" }}
57
+ >
58
+ <table className="table" key={"tableID" + item.groupId}>
59
+ <thead>
60
+ <tr key={item.groupId + 7777777777}>
61
+ <th className="col-md-6" style={{ paddingRight: "40px" }}>
62
+ Description
63
+ </th>
64
+ <th className="col-md-6">URL</th>
65
+ </tr>
66
+ </thead>
67
+ <tbody>
68
+ {filterResourceItems(resourceItems, item.groupId).map(
69
+ (item) => (
70
+ <tr key={item.resource_id}>
71
+ <td className="col-md-6" style={{ paddingRight: "40px" }}>
72
+ {item.description}
73
+ </td>
74
+ <td className="col-md-6">
75
+ <a
76
+ href={item.url}
77
+ target="_blank"
78
+ rel="noreferrer nofollow noopener"
79
+ download="TEST_FILE"
80
+ >
81
+ {item.name}
82
+ </a>
83
+ </td>
84
+ {/* <td className="col-sm-4">
57
85
  <a href={documentURL+item.resource_id} target="_blank" rel="noreferrer nofollow noopener" >{item.document_name}</a>
58
86
  </td> */}
59
- </tr>
60
- ))}
61
- </tbody>
62
- </table>
63
-
87
+ </tr>
88
+ )
89
+ )}
90
+ </tbody>
91
+ </table>
64
92
  </div>
65
93
  <br></br>
66
94
  </div>
67
-
68
- )
95
+ );
69
96
  });
70
97
 
71
98
  return (
72
99
  <div>
73
- <div className={"cm-modal-header " + theme}>Resources</div>
100
+ <div className={"cm-modal-header " + theme}>Resources</div>
74
101
  <div>
75
- <div><br></br></div>
76
- <div>
77
- <div style={{
78
- overflow: "auto scroll",
79
- width: "875px",
80
- height: "390px",
81
- whiteSpace: "pre-wrap",
82
- paddingLeft: "25px"}}>
102
+ <div>
103
+ <br></br>
104
+ </div>
105
+ <div>
106
+ <div
107
+ style={{
108
+ overflow: "auto scroll",
109
+ width: "875px",
110
+ height: "390px",
111
+ whiteSpace: "pre-wrap",
112
+ paddingLeft: "25px",
113
+ }}
114
+ >
83
115
  {groups}
84
116
  </div>
85
117
  </div>
86
-
87
118
  </div>
88
119
 
89
120
  <div className="cm-modal-footer">
@@ -100,7 +131,6 @@ class ResourcesModal extends React.Component {
100
131
  </button>
101
132
  </div>
102
133
  </div>
103
-
104
134
  );
105
135
  }
106
136
  }
@@ -112,4 +142,4 @@ export default connect(
112
142
  "doModalClose",
113
143
  "doGetResourceData",
114
144
  ResourcesModal
115
- );
145
+ );