@corpsmap/corpsmap 3.2.96 → 3.2.99

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.
Files changed (333) hide show
  1. package/dist/corpsmap.css +1 -1
  2. package/dist/corpsmap.es.js +34427 -61219
  3. package/dist/corpsmap.umd.js +139 -156
  4. package/package.json +38 -16
  5. package/src/App.css +42 -0
  6. package/src/App.jsx +12 -0
  7. package/src/application-bundles/_create-container-bundle.js +102 -0
  8. package/src/application-bundles/api-bundle.js +76 -0
  9. package/src/application-bundles/basic-toolbar-bundle.js +57 -0
  10. package/src/application-bundles/config-bundle.js +38 -0
  11. package/src/application-bundles/create-ol-map-bundle.jsx +278 -0
  12. package/src/application-bundles/export-bundle.js +125 -0
  13. package/src/application-bundles/identify-bundle.js +119 -0
  14. package/src/application-bundles/index.js +53 -0
  15. package/src/application-bundles/map-basemap-bundle.js +73 -0
  16. package/src/application-bundles/map-core-bundle.js +25 -0
  17. package/src/application-bundles/map-drawing-bundle.js +120 -0
  18. package/src/application-bundles/map-interaction-bundle.js +50 -0
  19. package/src/application-bundles/map-layers-bundle.js +816 -0
  20. package/src/application-bundles/map-proj-bundle.js +144 -0
  21. package/src/application-bundles/map-view-bundle.jsx +334 -0
  22. package/src/application-bundles/modal-window-bundle.js +5 -0
  23. package/src/application-bundles/notification-bundle.js +56 -0
  24. package/src/application-bundles/plugin-bundle.js +180 -0
  25. package/src/application-bundles/primary-panel-bundle.js +85 -0
  26. package/src/application-bundles/search-bundle.js +122 -0
  27. package/src/application-bundles/south-region-bundle.js +96 -0
  28. package/src/application-bundles/theme-bundle.js +45 -0
  29. package/src/application-bundles/vertical-layout-bundle.js +88 -0
  30. package/src/application-bundles/viewport-bundle.js +43 -0
  31. package/src/application-bundles/window-location-bundle.js +90 -0
  32. package/src/application-bundles-old/auth-bundle.js +130 -0
  33. package/src/application-bundles-old/config-bundle.js +29 -0
  34. package/src/application-bundles-old/ui-bundle.js +406 -0
  35. package/src/application-containers/basic-toolbar.jsx +24 -0
  36. package/src/application-containers/corpsmap.jsx +91 -0
  37. package/src/application-containers/left-sidebar.jsx +43 -0
  38. package/src/application-containers/lower-right-toolbar.jsx +29 -0
  39. package/src/application-containers/map.jsx +57 -0
  40. package/src/application-containers/modal-window.jsx +34 -0
  41. package/src/application-containers/north-region.jsx +26 -0
  42. package/src/application-containers/notification-pane.jsx +37 -0
  43. package/src/application-containers/notification-quadrant.jsx +20 -0
  44. package/src/application-containers/notification.jsx +91 -0
  45. package/src/application-containers/primary-panel.jsx +94 -0
  46. package/src/application-containers/right-sidebar.jsx +44 -0
  47. package/src/application-containers/south-region-tab.jsx +60 -0
  48. package/src/application-containers/south-region.jsx +75 -0
  49. package/src/application-containers/upper-right-toolbar.jsx +28 -0
  50. package/src/application-controls/basic-toolbar-button.jsx +124 -0
  51. package/src/application-controls/basic-toolbar-menu-divider.jsx +11 -0
  52. package/src/application-controls/basic-toolbar-menu-item.jsx +91 -0
  53. package/src/application-controls/basic-toolbar-menu-up.jsx +13 -0
  54. package/src/application-controls/basic-toolbar-menu.jsx +13 -0
  55. package/src/application-controls/basic-toolbar-submenu.jsx +14 -0
  56. package/src/application-controls/index.jsx +35 -0
  57. package/src/application-controls/loading-indicator.jsx +19 -0
  58. package/src/application-controls/search-input.jsx +55 -0
  59. package/src/application-controls/search-results-list-item.jsx +50 -0
  60. package/src/application-controls/search-results-list.jsx +19 -0
  61. package/src/application-controls/sidebar-button.jsx +69 -0
  62. package/src/application-controls/sidebar-panel-opener.jsx +63 -0
  63. package/src/application-controls/tree-list-folder.jsx +46 -0
  64. package/src/application-controls/tree-list-item.jsx +83 -0
  65. package/src/application-controls/tree-list.jsx +35 -0
  66. package/src/application-controls/tree-view.jsx +42 -0
  67. package/src/application-exports/map-provider.jsx +122 -0
  68. package/src/assets/react.svg +1 -0
  69. package/src/config/default-config.js +593 -0
  70. package/src/core-plugins/add-data/add-data-button.jsx +34 -0
  71. package/src/core-plugins/add-data/add-geojson.jsx +47 -0
  72. package/src/core-plugins/add-data/add-kmlfile.jsx +46 -0
  73. package/src/core-plugins/add-data/add-shapefile.jsx +47 -0
  74. package/src/core-plugins/add-data/bundle.js +226 -0
  75. package/src/core-plugins/add-data/index.js +15 -0
  76. package/src/core-plugins/basemap-switcher/basemap-switcher-button.jsx +18 -0
  77. package/src/core-plugins/basemap-switcher/basemap-switcher-list-item.jsx +48 -0
  78. package/src/core-plugins/basemap-switcher/basemap-switcher-list.jsx +37 -0
  79. package/src/core-plugins/basemap-switcher/index.js +13 -0
  80. package/src/core-plugins/bookmarks/bookmark-button.jsx +18 -0
  81. package/src/core-plugins/bookmarks/bookmark-list-item.jsx +79 -0
  82. package/src/core-plugins/bookmarks/bookmark-list.jsx +31 -0
  83. package/src/core-plugins/bookmarks/bookmark-panel.jsx +191 -0
  84. package/src/core-plugins/bookmarks/bundle.js +92 -0
  85. package/src/core-plugins/bookmarks/index.js +15 -0
  86. package/src/core-plugins/catalog/bundle.js +109 -0
  87. package/src/core-plugins/catalog/catalog-button.jsx +33 -0
  88. package/src/core-plugins/catalog/catalog-error-item.jsx +14 -0
  89. package/src/core-plugins/catalog/catalog-list-item-loader.jsx +12 -0
  90. package/src/core-plugins/catalog/catalog-list-item.jsx +118 -0
  91. package/src/core-plugins/catalog/catalog-list.jsx +78 -0
  92. package/src/core-plugins/catalog/catalog-modal-window.jsx +100 -0
  93. package/src/core-plugins/catalog/index.js +15 -0
  94. package/src/core-plugins/change-log/bundle.js +180 -0
  95. package/src/core-plugins/change-log/change-log-button.jsx +40 -0
  96. package/src/core-plugins/change-log/change-log-modal.jsx +190 -0
  97. package/src/core-plugins/change-log/index.js +15 -0
  98. package/src/core-plugins/change-log/select-district.jsx +73 -0
  99. package/src/core-plugins/contact-form/bundle.js +239 -0
  100. package/src/core-plugins/contact-form/index.js +17 -0
  101. package/src/core-plugins/contact-form/question-button.jsx +36 -0
  102. package/src/core-plugins/contact-form/question-modal.jsx +215 -0
  103. package/src/core-plugins/coordinate-display/bundle.jsx +269 -0
  104. package/src/core-plugins/coordinate-display/coordinate-display-bar.jsx +66 -0
  105. package/src/core-plugins/coordinate-display/coordinate-display-proj-item.jsx +60 -0
  106. package/src/core-plugins/coordinate-display/coordinate-display-settings.jsx +173 -0
  107. package/src/core-plugins/coordinate-display/coordinate-interaction-bar.jsx +60 -0
  108. package/src/core-plugins/coordinate-display/coordinate-lat-lon-input.jsx +35 -0
  109. package/src/core-plugins/coordinate-display/coordinate-popup.jsx +27 -0
  110. package/src/core-plugins/coordinate-display/index.js +20 -0
  111. package/src/core-plugins/draw-tools/create-draw-bundle.js +242 -0
  112. package/src/core-plugins/draw-tools/draw-button.jsx +204 -0
  113. package/src/core-plugins/draw-tools/draw-label-bundle.js +116 -0
  114. package/src/core-plugins/draw-tools/draw-modify-bundle.js +156 -0
  115. package/src/core-plugins/draw-tools/draw-save-bundle.jsx +181 -0
  116. package/src/core-plugins/draw-tools/draw-styles.js +110 -0
  117. package/src/core-plugins/draw-tools/draw-tool-item.jsx +67 -0
  118. package/src/core-plugins/draw-tools/index.js +34 -0
  119. package/src/core-plugins/draw-tools-old/create-draw-bundle.js +222 -0
  120. package/src/core-plugins/draw-tools-old/draw-button.js +189 -0
  121. package/src/core-plugins/draw-tools-old/draw-label-bundle.js +116 -0
  122. package/src/core-plugins/draw-tools-old/draw-modify-bundle.js +156 -0
  123. package/src/core-plugins/draw-tools-old/draw-styles.js +110 -0
  124. package/src/core-plugins/draw-tools-old/draw-tool-item.js +67 -0
  125. package/src/core-plugins/draw-tools-old/index.js +32 -0
  126. package/src/core-plugins/editor/bundle.js +472 -0
  127. package/src/core-plugins/editor/date-editor.js +63 -0
  128. package/src/core-plugins/editor/date-formatter.js +17 -0
  129. package/src/core-plugins/editor/editor-base.js +29 -0
  130. package/src/core-plugins/editor/editor-button.js +224 -0
  131. package/src/core-plugins/editor/editor-table.js +151 -0
  132. package/src/core-plugins/editor/index.js +15 -0
  133. package/src/core-plugins/editor/number-editor.js +57 -0
  134. package/src/core-plugins/editor/string-editor.js +42 -0
  135. package/src/core-plugins/geocoder/bundle.jsx +186 -0
  136. package/src/core-plugins/geocoder/index.js +15 -0
  137. package/src/core-plugins/geocoder/overlay.jsx +30 -0
  138. package/src/core-plugins/geocoder/search-bar.js copy.save +123 -0
  139. package/src/core-plugins/geocoder/search-bar.jsx +121 -0
  140. package/src/core-plugins/identify/bundle.jsx +709 -0
  141. package/src/core-plugins/identify/identify-buffer-section.jsx +52 -0
  142. package/src/core-plugins/identify/identify-buffer-settings.jsx +48 -0
  143. package/src/core-plugins/identify/identify-button.jsx +100 -0
  144. package/src/core-plugins/identify/identify-details-table.jsx +121 -0
  145. package/src/core-plugins/identify/identify-details.js +69 -0
  146. package/src/core-plugins/identify/identify-popup.jsx +136 -0
  147. package/src/core-plugins/identify/identify-sidebar-list-item.jsx +106 -0
  148. package/src/core-plugins/identify/identify-sidebar-list.jsx +63 -0
  149. package/src/core-plugins/identify/identify-sidebar.jsx +103 -0
  150. package/src/core-plugins/identify/identify-table-cell.jsx +49 -0
  151. package/src/core-plugins/identify/identify-table.jsx +319 -0
  152. package/src/core-plugins/identify/index.js +27 -0
  153. package/src/core-plugins/identify/listeners/arcgis.js +158 -0
  154. package/src/core-plugins/identify/listeners/geojson.jsx +164 -0
  155. package/src/core-plugins/identify/listeners/raster.js +89 -0
  156. package/src/core-plugins/identify/listeners/vector.jsx +106 -0
  157. package/src/core-plugins/identify-arcgis-rest/bundle.js +169 -0
  158. package/src/core-plugins/identify-arcgis-rest/index.js +10 -0
  159. package/src/core-plugins/identify-cm/bundle.js +82 -0
  160. package/src/core-plugins/identify-cm/index.js +10 -0
  161. package/src/core-plugins/identify-geojson/bundle.js +164 -0
  162. package/src/core-plugins/identify-geojson/index.js +10 -0
  163. package/src/core-plugins/identify-raster/bundle.js +89 -0
  164. package/src/core-plugins/identify-raster/index.js +10 -0
  165. package/src/core-plugins/identify-vector/bundle.jsx +135 -0
  166. package/src/core-plugins/identify-vector/index.js +10 -0
  167. package/src/core-plugins/identify-wms/bundle.js +138 -0
  168. package/src/core-plugins/identify-wms/index.js +10 -0
  169. package/src/core-plugins/legend/bundle.js +1044 -0
  170. package/src/core-plugins/legend/index.js +17 -0
  171. package/src/core-plugins/legend/legend-button.jsx +18 -0
  172. package/src/core-plugins/legend/legend-header.jsx +43 -0
  173. package/src/core-plugins/legend/legend-item-multiple.jsx +32 -0
  174. package/src/core-plugins/legend/legend-item.jsx +20 -0
  175. package/src/core-plugins/legend/legend-panel.jsx +73 -0
  176. package/src/core-plugins/login/index.js +13 -0
  177. package/src/core-plugins/login/login-button.jsx +49 -0
  178. package/src/core-plugins/map-loading-indicator/bundle.js +31 -0
  179. package/src/core-plugins/map-loading-indicator/index.js +17 -0
  180. package/src/core-plugins/map-loading-indicator/loading-indicator.jsx +30 -0
  181. package/src/core-plugins/measure-tools/bundle.js +286 -0
  182. package/src/core-plugins/measure-tools/index.js +15 -0
  183. package/src/core-plugins/measure-tools/measure-options.jsx +89 -0
  184. package/src/core-plugins/measure-tools/measure-tools-button.jsx +129 -0
  185. package/src/core-plugins/measure-tools/measure-utils.js +76 -0
  186. package/src/core-plugins/permalink/bundle.js +57 -0
  187. package/src/core-plugins/permalink/index.js +15 -0
  188. package/src/core-plugins/permalink/permalink-button.jsx +38 -0
  189. package/src/core-plugins/permalink/permalink-modal.jsx +67 -0
  190. package/src/core-plugins/print-map/bundle.jsx +316 -0
  191. package/src/core-plugins/print-map/button.jsx +17 -0
  192. package/src/core-plugins/print-map/index.js +17 -0
  193. package/src/core-plugins/resources/bundle.js +96 -0
  194. package/src/core-plugins/resources/index.js +15 -0
  195. package/src/core-plugins/resources/resources-button.jsx +40 -0
  196. package/src/core-plugins/resources/resources-modal.jsx +151 -0
  197. package/src/core-plugins/rotate-north/index.js +13 -0
  198. package/src/core-plugins/rotate-north/rotate-north-button.jsx +38 -0
  199. package/src/core-plugins/theme-switcher/bundle.js +16 -0
  200. package/src/core-plugins/theme-switcher/index.js +15 -0
  201. package/src/core-plugins/theme-switcher/theme-list-item.jsx +25 -0
  202. package/src/core-plugins/theme-switcher/theme-list.jsx +28 -0
  203. package/src/core-plugins/theme-switcher/theme-switcher-button.jsx +18 -0
  204. package/src/core-plugins/theme-switcher/themes.js +121 -0
  205. package/src/core-plugins/three-d/index.js +13 -0
  206. package/src/core-plugins/three-d/three-d-button.jsx +44 -0
  207. package/src/core-plugins/tree-view/boundary-drop-target.jsx +42 -0
  208. package/src/core-plugins/tree-view/bundle.js +513 -0
  209. package/src/core-plugins/tree-view/dataset-info-modal.jsx +141 -0
  210. package/src/core-plugins/tree-view/dataset-legend.jsx +122 -0
  211. package/src/core-plugins/tree-view/defaults-container.jsx +27 -0
  212. package/src/core-plugins/tree-view/download-bundle.js +156 -0
  213. package/src/core-plugins/tree-view/favorites-container.jsx +27 -0
  214. package/src/core-plugins/tree-view/index.js +25 -0
  215. package/src/core-plugins/tree-view/layer-subpanel/defaults-toggle.jsx +28 -0
  216. package/src/core-plugins/tree-view/layer-subpanel/download-layer.jsx +54 -0
  217. package/src/core-plugins/tree-view/layer-subpanel/favorites-toggle.jsx +28 -0
  218. package/src/core-plugins/tree-view/layer-subpanel/label-toggle.jsx +39 -0
  219. package/src/core-plugins/tree-view/layer-subpanel/layer-subpanel.jsx +179 -0
  220. package/src/core-plugins/tree-view/layer-subpanel/natick-rgb-options.jsx +66 -0
  221. package/src/core-plugins/tree-view/layer-subpanel/natick-rgb.jsx +112 -0
  222. package/src/core-plugins/tree-view/layer-subpanel/opacity-slider.jsx +51 -0
  223. package/src/core-plugins/tree-view/layer-subpanel/remove-layer.jsx +75 -0
  224. package/src/core-plugins/tree-view/tree-list-container.jsx +22 -0
  225. package/src/core-plugins/tree-view/tree-list-item-dataset.jsx +174 -0
  226. package/src/core-plugins/tree-view/tree-list-item-folder.jsx +161 -0
  227. package/src/core-plugins/tree-view/tree-list-item.jsx +35 -0
  228. package/src/core-plugins/tree-view/tree-list.jsx +37 -0
  229. package/src/core-plugins/tree-view/tree-view-button.jsx +18 -0
  230. package/src/core-plugins/tree-view/tree-view-panel.jsx +139 -0
  231. package/src/core-plugins/tree-view/tree-view-toolbar/add-all.jsx +28 -0
  232. package/src/core-plugins/tree-view/tree-view-toolbar/defaults.jsx +40 -0
  233. package/src/core-plugins/tree-view/tree-view-toolbar/favorites.jsx +40 -0
  234. package/src/core-plugins/tree-view/tree-view-toolbar/remove-all.jsx +28 -0
  235. package/src/core-plugins/tree-view/tree-view-toolbar/toggle-expand.jsx +47 -0
  236. package/src/core-plugins/tree-view/tree-view-toolbar/toggle-filter.jsx +39 -0
  237. package/src/core-plugins/vector-search/bundle.js +96 -0
  238. package/src/core-plugins/vector-search/index.js +10 -0
  239. package/src/core-plugins/zoom-home/bundle.js +77 -0
  240. package/src/core-plugins/zoom-home/index.js +19 -0
  241. package/src/core-plugins/zoom-home/zoom-home-button.jsx +57 -0
  242. package/src/core-plugins/zoom-in-out/index.js +23 -0
  243. package/src/core-plugins/zoom-in-out/zoom-in-button.jsx +28 -0
  244. package/src/core-plugins/zoom-in-out/zoom-out-button.jsx +28 -0
  245. package/src/core-plugins/zoom-level/bundle.js +35 -0
  246. package/src/core-plugins/zoom-level/index.js +17 -0
  247. package/src/core-plugins/zoom-level/zoom-indicator.jsx +34 -0
  248. package/src/core-plugins/zoom-to-box/bundle.js +80 -0
  249. package/src/core-plugins/zoom-to-box/index.jsx +15 -0
  250. package/src/core-plugins/zoom-to-box/zoom-to-box-button.jsx +53 -0
  251. package/src/css/_deprecated_bootstrap/css/bootstrap-paper.css +7606 -0
  252. package/src/css/_deprecated_bootstrap/css/bootstrap-paper.min.css +8083 -0
  253. package/src/css/_deprecated_bootstrap/css/bootstrap-simplex.min.css +7328 -0
  254. package/src/css/_deprecated_bootstrap/css/bootstrap-theme.css +587 -0
  255. package/src/css/_deprecated_bootstrap/css/bootstrap-theme.css.map +1 -0
  256. package/src/css/_deprecated_bootstrap/css/bootstrap-theme.min.css +6 -0
  257. package/src/css/_deprecated_bootstrap/css/bootstrap-theme.min.css.map +1 -0
  258. package/src/css/_deprecated_bootstrap/css/bootstrap.css +7137 -0
  259. package/src/css/_deprecated_bootstrap/css/bootstrap.css.map +142 -0
  260. package/src/css/_deprecated_bootstrap/css/bootstrap.min.css +7132 -0
  261. package/src/css/_deprecated_bootstrap/css/bootstrap.min.css.map +143 -0
  262. package/src/css/_deprecated_bootstrap/fonts/glyphicons-halflings-regular.eot +0 -0
  263. package/src/css/_deprecated_bootstrap/fonts/glyphicons-halflings-regular.svg +288 -0
  264. package/src/css/_deprecated_bootstrap/fonts/glyphicons-halflings-regular.ttf +0 -0
  265. package/src/css/_deprecated_bootstrap/fonts/glyphicons-halflings-regular.woff +0 -0
  266. package/src/css/_deprecated_bootstrap/fonts/glyphicons-halflings-regular.woff2 +0 -0
  267. package/src/css/_deprecated_bootstrap/js/bootstrap.js +2377 -0
  268. package/src/css/_deprecated_bootstrap/js/bootstrap.min.js +7 -0
  269. package/src/css/_deprecated_bootstrap/js/npm.js +13 -0
  270. package/src/css/_deprecated_maki/css/maki.css +304 -0
  271. package/src/css/_deprecated_maki/fonts/maki.eot +0 -0
  272. package/src/css/_deprecated_maki/fonts/maki.svg +98 -0
  273. package/src/css/_deprecated_maki/fonts/maki.ttf +0 -0
  274. package/src/css/_deprecated_maki/fonts/maki.woff +0 -0
  275. package/src/css/bg-colors.css +121 -0
  276. package/src/css/cm-icons/css/cm-icons.css +90 -0
  277. package/src/css/cm-icons/fonts/cm.eot +0 -0
  278. package/src/css/cm-icons/fonts/cm.svg +27 -0
  279. package/src/css/cm-icons/fonts/cm.ttf +0 -0
  280. package/src/css/cm-icons/fonts/cm.woff +0 -0
  281. package/src/css/corpsmap-namespaced.css +9505 -0
  282. package/src/css/corpsmap.css +10178 -0
  283. package/src/css/loading-indicator.css +109 -0
  284. package/src/css/mapskin/OFL.txt +94 -0
  285. package/src/css/mapskin/css/mapskin.css +815 -0
  286. package/src/css/mapskin/css/mapskin.min.css +8 -0
  287. package/src/css/mapskin/fonts/mapskin.eot +0 -0
  288. package/src/css/mapskin/fonts/mapskin.svg +282 -0
  289. package/src/css/mapskin/fonts/mapskin.ttf +0 -0
  290. package/src/css/mapskin/fonts/mapskin.woff +0 -0
  291. package/src/css/mdi/.github/ISSUE_TEMPLATE.md +3 -0
  292. package/src/css/mdi/README.md +24 -0
  293. package/src/css/mdi/bower.json +22 -0
  294. package/src/css/mdi/css/materialdesignicons.css +18654 -0
  295. package/src/css/mdi/css/materialdesignicons.css.map +16 -0
  296. package/src/css/mdi/css/materialdesignicons.min.css +3 -0
  297. package/src/css/mdi/css/materialdesignicons.min.css.map +16 -0
  298. package/src/css/mdi/fonts/materialdesignicons-webfont.eot +0 -0
  299. package/src/css/mdi/fonts/materialdesignicons-webfont.ttf +0 -0
  300. package/src/css/mdi/fonts/materialdesignicons-webfont.woff +0 -0
  301. package/src/css/mdi/fonts/materialdesignicons-webfont.woff2 +0 -0
  302. package/src/css/mdi/license.md +97 -0
  303. package/src/css/mdi/package.json +37 -0
  304. package/src/css/mdi/preview.html +717 -0
  305. package/src/css/mdi/scss/_animated.scss +27 -0
  306. package/src/css/mdi/scss/_core.scss +10 -0
  307. package/src/css/mdi/scss/_extras.scss +65 -0
  308. package/src/css/mdi/scss/_functions.scss +20 -0
  309. package/src/css/mdi/scss/_icons.scss +10 -0
  310. package/src/css/mdi/scss/_path.scss +10 -0
  311. package/src/css/mdi/scss/_variables.scss +4606 -0
  312. package/src/css/mdi/scss/materialdesignicons.scss +8 -0
  313. package/src/css/navigation.css +174 -0
  314. package/src/css/parse-css.js +26 -0
  315. package/src/css/reset.css +48 -0
  316. package/src/index.css +68 -0
  317. package/src/index.jsx +113 -0
  318. package/src/main.jsx +3 -0
  319. package/src/openlayers-utils/format-utilities.js +178 -0
  320. package/src/openlayers-utils/interaction-creator.js +31 -0
  321. package/src/openlayers-utils/layer-utilities.js +309 -0
  322. package/src/openlayers-utils/map-utils.js +25 -0
  323. package/src/openlayers-utils/resource-utilities.js +38 -0
  324. package/src/openlayers-utils/vector-style.js +131 -0
  325. package/src/utils/cache.js +6 -0
  326. package/src/utils/check-webgl.js +6 -0
  327. package/src/utils/error-boundary.js +26 -0
  328. package/src/utils/load-plugins.js +32 -0
  329. package/src/utils/load-plugins.test.js +36 -0
  330. package/src/utils/plugin-region.jsx +26 -0
  331. package/src/utils/redux-bundler-react.jsx +69 -0
  332. package/src/utils/scale-to-zoom-level.js +37 -0
  333. package/src/utils/vector-styles.js +7 -0
@@ -0,0 +1,17 @@
1
+ import LegendButton from "./legend-button";
2
+ import bundle from "./bundle";
3
+
4
+ const plugin = {
5
+ pluginName: "Legend",
6
+ enabled: true,
7
+ bundle: bundle,
8
+ components: [
9
+ {
10
+ component: LegendButton,
11
+ region: "left-sidebar-top",
12
+ sortOrder: 50,
13
+ },
14
+ ],
15
+ };
16
+
17
+ export default plugin;
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+ import { SidebarPanelOpenerButton } from "../../application-controls/index";
3
+ import LegendPanel from "./legend-panel";
4
+
5
+ class LegendButton extends React.Component {
6
+ render() {
7
+ return (
8
+ <SidebarPanelOpenerButton
9
+ iconClass="mdi mdi-format-list-bulleted-type"
10
+ label="Legend"
11
+ title="Legend"
12
+ panelComponent={LegendPanel}
13
+ />
14
+ );
15
+ }
16
+ }
17
+
18
+ export default LegendButton;
@@ -0,0 +1,43 @@
1
+ import React from "react";
2
+ import { connect } from "../../utils/redux-bundler-react";
3
+ import treeViewPanel from "../tree-view/tree-view-panel";
4
+
5
+ class LegendHeader extends React.Component {
6
+ constructor(props) {
7
+ super(props);
8
+
9
+ this.doViewLayerInTree = this.doViewLayerInTree.bind(this);
10
+ }
11
+ doViewLayerInTree() {
12
+ this.props.doPrimaryPanelOpen({
13
+ openedBy: "Legend",
14
+ options: null,
15
+ children: [treeViewPanel],
16
+ });
17
+ }
18
+ render() {
19
+ const { layer } = this.props;
20
+ const headerContainer = {
21
+ display: "flex",
22
+ justifyContent: "space-between",
23
+ };
24
+
25
+ return (
26
+ <div style={headerContainer}>
27
+ <div className="overflow-ellipsis" title={layer.displayName}>
28
+ <strong>{layer.displayName}</strong>
29
+ </div>
30
+ <button
31
+ type="button"
32
+ title="View Layer"
33
+ style={{ marginLeft: "5px" }}
34
+ className="cm-btn cm-btn-default cm-btn-xs"
35
+ onClick={this.doViewLayerInTree}
36
+ >
37
+ <i className="mdi mdi-layers" />
38
+ </button>
39
+ </div>
40
+ );
41
+ }
42
+ }
43
+ export default connect("doPrimaryPanelOpen", LegendHeader);
@@ -0,0 +1,32 @@
1
+ import React from "react";
2
+ import Header from "./legend-header";
3
+
4
+ class LegendItemMultiple extends React.Component {
5
+ render() {
6
+ const { layer, images } = this.props;
7
+
8
+ return (
9
+ <div>
10
+ <li className="cm-list-group-item corpsmap-legend-item-multiple">
11
+ <Header layer={layer} />
12
+ {images.map((image, i) => {
13
+ return (
14
+ <div key={i}>
15
+ {typeof image === "string" ? (
16
+ image
17
+ ) : (
18
+ <img alt={image.alt} src={image.src}></img>
19
+ )}
20
+ {layer.type === "WMS" ? null : image.title}
21
+ <br></br>
22
+ {layer.attributions ? <div><label><strong>Credits: {layer.attributions}</strong> </label></div> : null}
23
+ </div>
24
+ );
25
+ })}
26
+ </li>
27
+
28
+ </div>
29
+ );
30
+ }
31
+ }
32
+ export default LegendItemMultiple;
@@ -0,0 +1,20 @@
1
+ import React from "react";
2
+ import Header from "./legend-header";
3
+
4
+ class LegendItem extends React.Component {
5
+ render() {
6
+ const { layer, image } = this.props;
7
+
8
+ return (
9
+ <li className="cm-list-group-item corpsmap-legend-item">
10
+ <Header layer={layer} />
11
+ {typeof image === "string" ? (
12
+ image
13
+ ) : (
14
+ <img alt={image.alt} src={image.src}></img>
15
+ )}
16
+ </li>
17
+ );
18
+ }
19
+ }
20
+ export default LegendItem;
@@ -0,0 +1,73 @@
1
+ import React from "react";
2
+ import { connect } from "../../utils/redux-bundler-react";
3
+ import sortBy from "lodash/sortBy";
4
+ import LegendItem from "./legend-item";
5
+ import LegendItemMultiple from "./legend-item-multiple";
6
+ import LoadingIndicator from "../../application-controls/loading-indicator";
7
+ import classnames from "classnames";
8
+
9
+ class LegendPanel extends React.Component {
10
+ constructor(props) {
11
+ super(props);
12
+ this.renderItems = this.renderItems.bind(this);
13
+ }
14
+ renderItems() {
15
+ const { visibleLayers, legendLayers } = this.props;
16
+ const sortedLayers = sortBy(visibleLayers, ["sortOrder"]).reverse();
17
+
18
+ return sortedLayers.map((layer) => {
19
+ if (legendLayers.hasOwnProperty(layer.uid)) {
20
+ switch (layer.type) {
21
+ case "ArcGIS":
22
+ case "ArcGISImage":
23
+ case "EsriFeatureService":
24
+ case "WMS":
25
+ return (
26
+ <LegendItemMultiple
27
+ key={layer.uid}
28
+ layer={layer}
29
+ images={legendLayers[layer.uid]}
30
+ />
31
+ );
32
+ case "LocalVector":
33
+ default:
34
+ return (
35
+ <LegendItem
36
+ key={layer.uid}
37
+ layer={layer}
38
+ image={legendLayers[layer.uid][0]}
39
+ />
40
+ );
41
+ }
42
+ }
43
+ });
44
+ }
45
+
46
+ render() {
47
+ const { legendLoading, primaryPanelShowClose } = this.props;
48
+ const listClass = classnames({
49
+ "corpsmap-legend": true,
50
+ "cm-list-group": true,
51
+ "sidebar-list": !primaryPanelShowClose,
52
+ "thin-scrollbar": true,
53
+ "sidebar-list-show-close-btn": primaryPanelShowClose,
54
+ });
55
+
56
+ if (legendLoading) {
57
+ return (
58
+ <ul className={listClass}>
59
+ <LoadingIndicator />
60
+ </ul>
61
+ );
62
+ } else {
63
+ return <ul className={listClass}>{this.renderItems()}</ul>;
64
+ }
65
+ }
66
+ }
67
+ export default connect(
68
+ "selectVisibleLayers",
69
+ "selectLegendLayers",
70
+ "selectLegendLoading",
71
+ "selectPrimaryPanelShowClose",
72
+ LegendPanel
73
+ );
@@ -0,0 +1,13 @@
1
+ import LoginButton from './login-button';
2
+
3
+ const plugin = {
4
+ pluginName: 'LoginButton',
5
+ enabled: true,
6
+ components:[{
7
+ component: LoginButton,
8
+ region: 'right-sidebar-top',
9
+ sortOrder: 10
10
+ }]
11
+ }
12
+
13
+ export default plugin;
@@ -0,0 +1,49 @@
1
+ import React from "react";
2
+ import { connect } from "../../utils/redux-bundler-react";
3
+ import { SidebarButton } from "../../application-controls/index";
4
+ import classnames from "classnames";
5
+
6
+ class LoginButton extends React.Component {
7
+ constructor(props) {
8
+ super(props);
9
+ this.handleClick = this.handleClick.bind(this);
10
+ }
11
+
12
+ handleClick() {
13
+ const { doLogin, doLogout, isLoggedIn } = this.props;
14
+ if (isLoggedIn) {
15
+ doLogout();
16
+ } else {
17
+ doLogin();
18
+ }
19
+ }
20
+
21
+ render() {
22
+ const { isLoggedIn } = this.props;
23
+
24
+ const btnClass = classnames({
25
+ mdi: true,
26
+ "mdi-login-variant": !isLoggedIn,
27
+ "mdi-account-check": isLoggedIn,
28
+ });
29
+
30
+ const title = isLoggedIn ? "Log Out" : "Log Into CorpsMap";
31
+
32
+ return (
33
+ <SidebarButton
34
+ iconClass={btnClass}
35
+ label={title}
36
+ title={title}
37
+ onClick={this.handleClick}
38
+ />
39
+ );
40
+ }
41
+ }
42
+
43
+ export default connect(
44
+ "doLogin",
45
+ "doLogout",
46
+ "selectIsLoggedIn",
47
+ "selectTokenPayload",
48
+ LoginButton
49
+ );
@@ -0,0 +1,31 @@
1
+ export default {
2
+ name: "mapLoading",
3
+
4
+ getReducer() {
5
+ const initialData = {
6
+ loading: false,
7
+ };
8
+
9
+ return (state = initialData, { type, payload }) => {
10
+ switch (type) {
11
+ case "MAP_UPDATED_VIEW_STATE_STARTED":
12
+ case "MAP_LOADING":
13
+ return Object.assign({}, state, {
14
+ loading: true,
15
+ });
16
+ case "MAP_UPDATED_VIEW_STATE_FINISHED":
17
+ case "MAP_LOADED":
18
+ case "LEGEND_LAYERS_UPDATE_ERROR":
19
+ return Object.assign({}, state, {
20
+ loading: false,
21
+ });
22
+ default:
23
+ return state;
24
+ }
25
+ };
26
+ },
27
+
28
+ selectMapLoading: (state) => {
29
+ return state.mapLoading.loading;
30
+ },
31
+ };
@@ -0,0 +1,17 @@
1
+ import MapLoadingIndicator from "./loading-indicator";
2
+ import bundle from "./bundle";
3
+
4
+ const plugin = {
5
+ pluginName: "MapLoadingIndicator",
6
+ enabled: true,
7
+ bundle: bundle,
8
+ components: [
9
+ {
10
+ component: MapLoadingIndicator,
11
+ region: "lower-right-toolbar",
12
+ sortOrder: 1,
13
+ },
14
+ ],
15
+ };
16
+
17
+ export default plugin;
@@ -0,0 +1,30 @@
1
+ import React from "react";
2
+ import { connect } from "../../utils/redux-bundler-react";
3
+
4
+ class MapLoadingIndicator extends React.Component {
5
+ render() {
6
+ const { mapLoading } = this.props;
7
+
8
+ if (mapLoading) {
9
+ return (
10
+ <div className="cm-map-loading-container">
11
+ <div className="cm-loading-indicator" title="Map Layers Loading" />
12
+ </div>
13
+ );
14
+ } else {
15
+ return (
16
+ <div className="cm-map-loading-container">
17
+ <div className="cm-map-ready">
18
+ <i
19
+ className="mdi mdi-check-bold"
20
+ style={{ color: "#4BB543" }}
21
+ title="Map Layers Loaded"
22
+ />
23
+ </div>
24
+ </div>
25
+ );
26
+ }
27
+ }
28
+ }
29
+
30
+ export default connect("selectMapLoading", MapLoadingIndicator);
@@ -0,0 +1,286 @@
1
+ import { createSelector } from "redux-bundler";
2
+ import { convertArea, convertDistance } from "./measure-utils";
3
+ import { getArea, getDistance } from "ol/sphere";
4
+ import { getLayer } from "../../openlayers-utils/layer-utilities";
5
+ import createInteraction from "../../openlayers-utils/interaction-creator";
6
+ import { Style, Fill, Stroke, Circle } from "ol/style";
7
+ import Point from "ol/geom/Point";
8
+ import _ from "lodash";
9
+
10
+ // SET UP DISTANCE STUFF
11
+ const distanceLayer = getLayer({
12
+ serviceType: "LocalVector",
13
+ visible: true,
14
+ geometryType: "LineString",
15
+ style: function (feature) {
16
+ const geom = feature.getGeometry();
17
+ const styles = [
18
+ new Style({
19
+ stroke: new Stroke({
20
+ color: "rgba(255, 255, 255, 0.9)",
21
+ width: 4,
22
+ }),
23
+ }),
24
+ new Style({
25
+ stroke: new Stroke({
26
+ color: "rgba(0, 0, 0, 0.8)",
27
+ lineDash: [4, 4],
28
+ width: 2,
29
+ }),
30
+ }),
31
+ ];
32
+ const start = geom.getFirstCoordinate();
33
+ styles.push(
34
+ new Style({
35
+ geometry: new Point(start),
36
+ image: new Circle({
37
+ radius: 4,
38
+ stroke: new Stroke({
39
+ color: "rgba(0, 0, 0, 0.8)",
40
+ width: 2,
41
+ }),
42
+ fill: new Fill({
43
+ color: "rgba(255, 255, 255, 1)",
44
+ }),
45
+ }),
46
+ })
47
+ );
48
+ const end = geom.getLastCoordinate();
49
+ styles.push(
50
+ new Style({
51
+ geometry: new Point(end),
52
+ image: new Circle({
53
+ radius: 4,
54
+ stroke: new Stroke({
55
+ color: "rgba(0, 0, 0, 0.8)",
56
+ width: 2,
57
+ }),
58
+ fill: new Fill({
59
+ color: "rgba(255, 255, 255, 1)",
60
+ }),
61
+ }),
62
+ })
63
+ );
64
+ return styles;
65
+ },
66
+ });
67
+
68
+ const drawDistance = createInteraction({
69
+ interaction: "draw",
70
+ source: distanceLayer.getSource(),
71
+ type: "LineString",
72
+ });
73
+
74
+ const modifyDistance = createInteraction({
75
+ interaction: "modify",
76
+ source: distanceLayer.getSource(),
77
+ });
78
+
79
+ // SET UP AREA STUFF
80
+ const areaLayer = getLayer({
81
+ serviceType: "LocalVector",
82
+ visible: true,
83
+ geometryType: "Polygon",
84
+ style: [
85
+ new Style({
86
+ stroke: new Stroke({
87
+ color: "rgba(255, 255, 255, 0.9)",
88
+ width: 4,
89
+ }),
90
+ fill: new Fill({
91
+ color: "rgba(255, 255, 255, 0.2)",
92
+ }),
93
+ }),
94
+ new Style({
95
+ stroke: new Stroke({
96
+ color: "rgba(0, 0, 0, 0.8)",
97
+ lineDash: [4, 4],
98
+ width: 2,
99
+ }),
100
+ }),
101
+ ],
102
+ });
103
+
104
+ const drawArea = createInteraction({
105
+ interaction: "draw",
106
+ source: areaLayer.getSource(),
107
+ type: "Polygon",
108
+ });
109
+
110
+ const modifyArea = createInteraction({
111
+ interaction: "modify",
112
+ source: areaLayer.getSource(),
113
+ });
114
+
115
+ // START BUNDLE
116
+ export default {
117
+ name: "measure",
118
+
119
+ getReducer() {
120
+ const initialData = {
121
+ active: false,
122
+ type: null,
123
+ geom: null,
124
+ areaUnits: "ft/mi",
125
+ distanceUnits: "ft/mi",
126
+ };
127
+ return (state = initialData, { type, payload }) => {
128
+ switch (type) {
129
+ case "MEASURE_STARTED":
130
+ case "MEASURE_DRAW_STARTED":
131
+ case "MEASURE_STOPPED":
132
+ case "MEASURE_UNITS_UPDATED":
133
+ return Object.assign({}, state, payload);
134
+ default:
135
+ return state;
136
+ }
137
+ };
138
+ },
139
+
140
+ doStartMeasure: (type) => ({ dispatch, store }) => {
141
+ store.doSetCursor("crosshair");
142
+ if (type === "distance") {
143
+ store.doStartMeasureDistance();
144
+ } else {
145
+ store.doStartMeasureArea();
146
+ }
147
+ dispatch({
148
+ type: "MEASURE_STARTED",
149
+ payload: { type: type, active: true },
150
+ });
151
+ },
152
+
153
+ doStartMeasureDistance: () => ({ dispatch, store }) => {
154
+ const map = store.selectMap();
155
+ store.doStopMeasureArea();
156
+ map.addInteraction(drawDistance);
157
+ map.addInteraction(modifyDistance);
158
+ drawDistance.on("drawstart", store.doStartMeasureDraw);
159
+ drawDistance.on("drawend", store.doStopMeasureDraw);
160
+ map.addLayer(distanceLayer);
161
+ },
162
+
163
+ doStartMeasureArea: () => ({ dispatch, store }) => {
164
+ const map = store.selectMap();
165
+ store.doStopMeasureDistance();
166
+ map.addInteraction(drawArea);
167
+ map.addInteraction(modifyArea);
168
+ drawArea.on("drawstart", store.doStartMeasureDraw);
169
+ drawArea.on("drawend", store.doStopMeasureDraw);
170
+ map.addLayer(areaLayer);
171
+ },
172
+
173
+ doStartMeasureDraw: (e) => ({ dispatch, store }) => {
174
+ store.doClearMeasureFeatures();
175
+ const geom = e.feature.getGeometry();
176
+ if (geom) geom.on("change", _.throttle(store.doUpdateDrawing, 50));
177
+ dispatch({ type: "MEASURE_DRAW_STARTED", payload: { geom: geom } });
178
+ },
179
+
180
+ doStopMeasureDraw: (e) => ({ dispatch, store }) => {
181
+ dispatch({ type: "MEASURE_DRAW_STOPPED" });
182
+ },
183
+
184
+ doUpdateDrawing: (e) => ({ dispatch, store }) => {
185
+ dispatch({ type: "MEASURE_DRAW_UPDATED" });
186
+ },
187
+
188
+ doPauseMeasure: () => ({ dispatch, store }) => {
189
+ store.doSetCursor();
190
+ const map = store.selectMap();
191
+ const type = store.selectMeasureType();
192
+ const draw = type === "distance" ? drawDistance : drawArea;
193
+ const modify = type === "distance" ? modifyDistance : modifyArea;
194
+
195
+ map.removeInteraction(draw);
196
+ map.removeInteraction(modify);
197
+ },
198
+
199
+ doClearMeasureFeatures: () => ({ dispatch, store }) => {
200
+ distanceLayer.getSource().clear();
201
+ areaLayer.getSource().clear();
202
+ },
203
+
204
+ doStopMeasure: () => ({ dispatch, store }) => {
205
+ store.doSetCursor();
206
+ store.doStopMeasureArea();
207
+ store.doStopMeasureDistance();
208
+ dispatch({
209
+ type: "MEASURE_STOPPED",
210
+ payload: { active: false, type: null, geom: null },
211
+ });
212
+ },
213
+
214
+ doStopMeasureDistance: () => ({ dispatch, store }) => {
215
+ const map = store.selectMap();
216
+ map.removeInteraction(drawDistance);
217
+ map.removeInteraction(modifyDistance);
218
+ map.removeLayer(distanceLayer);
219
+ distanceLayer.getSource().clear();
220
+ },
221
+
222
+ doStopMeasureArea: () => ({ dispatch, store }) => {
223
+ const map = store.selectMap();
224
+ map.removeInteraction(drawArea);
225
+ map.removeInteraction(modifyArea);
226
+ map.removeLayer(areaLayer);
227
+ areaLayer.getSource().clear();
228
+ },
229
+
230
+ doUpdateMeasureUnits: ({ areaUnits, distanceUnits }) => ({ dispatch }) => {
231
+ dispatch({
232
+ type: "MEASURE_UNITS_UPDATED",
233
+ payload: { areaUnits, distanceUnits },
234
+ });
235
+ },
236
+ doMeasureConvertArea: (geom, units) => () => {
237
+ return convertArea(getArea(geom), units);
238
+ },
239
+ doMeasureConvertDistance: (length, units) => () => {
240
+ return convertDistance(length, units);
241
+ },
242
+ selectMeasureType: (state) => {
243
+ return state.measure.type;
244
+ },
245
+
246
+ selectMeasureAreaUnits: (state) => {
247
+ return state.measure.areaUnits;
248
+ },
249
+
250
+ selectMeasureDistanceUnits: (state) => {
251
+ return state.measure.distanceUnits;
252
+ },
253
+
254
+ selectMeasureGeom: (state) => {
255
+ return state.measure.geom;
256
+ },
257
+
258
+ selectMeasureOutput: createSelector(
259
+ "selectMeasureGeom",
260
+ "selectMeasureType",
261
+ "selectMapProjection",
262
+ "selectMeasureAreaUnits",
263
+ "selectMeasureDistanceUnits",
264
+ "selectAppTime",
265
+ (geom, type, mapProjection, areaUnits, distanceUnits, appTime) => {
266
+ if (!geom) return { output: "...", value: 0 };
267
+ const projected = geom.clone().transform(mapProjection, "EPSG:4326");
268
+ if (type === "distance") {
269
+ const coords = projected.getCoordinates();
270
+ let length = 0;
271
+ for (var i = 0; i < coords.length - 1; i++) {
272
+ length += getDistance(coords[i], coords[i + 1]);
273
+ }
274
+ return convertDistance(length, distanceUnits);
275
+ } else {
276
+ const coords = projected.getLinearRing(0).getCoordinates();
277
+ if (coords.length > 3) return convertArea(getArea(geom), areaUnits);
278
+ return { output: "...", value: 0 };
279
+ }
280
+ }
281
+ ),
282
+
283
+ selectMeasureSettings: (state) => {
284
+ return state.measure;
285
+ },
286
+ };
@@ -0,0 +1,15 @@
1
+ import MeasureToolsButton from './measure-tools-button';
2
+ import bundle from './bundle';
3
+
4
+ const plugin = {
5
+ pluginName: 'MeasureArea',
6
+ enabled: true,
7
+ bundle: bundle,
8
+ components:[{
9
+ component: MeasureToolsButton,
10
+ region: 'basic-toolbar',
11
+ sortOrder: 50
12
+ }]
13
+ }
14
+
15
+ export default plugin;