@corpsmap/corpsmap 4.0.36 → 4.1.1

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 (337) hide show
  1. package/README.md +33 -0
  2. package/dist/corpsmap.css +1 -0
  3. package/dist/corpsmap.es.js +63856 -0
  4. package/dist/corpsmap.umd.js +384 -0
  5. package/dist/vite.svg +1 -0
  6. package/package.json +74 -32
  7. package/src/App.css +42 -0
  8. package/src/application-bundles/_create-container-bundle.js +102 -0
  9. package/src/application-bundles/api-bundle.js +76 -0
  10. package/src/application-bundles/basic-toolbar-bundle.js +57 -0
  11. package/src/application-bundles/config-bundle.js +38 -0
  12. package/src/application-bundles/create-ol-map-bundle.jsx +278 -0
  13. package/src/application-bundles/export-bundle.js +125 -0
  14. package/src/application-bundles/identify-bundle.js +119 -0
  15. package/src/application-bundles/index.js +53 -0
  16. package/src/application-bundles/map-basemap-bundle.js +73 -0
  17. package/src/application-bundles/map-core-bundle.js +25 -0
  18. package/src/application-bundles/map-drawing-bundle.js +120 -0
  19. package/src/application-bundles/map-interaction-bundle.js +50 -0
  20. package/src/application-bundles/map-layers-bundle.js +816 -0
  21. package/src/application-bundles/map-proj-bundle.js +144 -0
  22. package/src/application-bundles/map-view-bundle.jsx +334 -0
  23. package/src/application-bundles/modal-window-bundle.js +5 -0
  24. package/src/application-bundles/notification-bundle.js +56 -0
  25. package/src/application-bundles/plugin-bundle.js +180 -0
  26. package/src/application-bundles/primary-panel-bundle.js +85 -0
  27. package/src/application-bundles/search-bundle.js +122 -0
  28. package/src/application-bundles/south-region-bundle.js +96 -0
  29. package/src/application-bundles/theme-bundle.js +45 -0
  30. package/src/application-bundles/vertical-layout-bundle.js +88 -0
  31. package/src/application-bundles/viewport-bundle.js +43 -0
  32. package/src/application-bundles/window-location-bundle.js +90 -0
  33. package/src/application-containers/basic-toolbar.jsx +24 -0
  34. package/src/application-containers/corpsmap.jsx +91 -0
  35. package/src/application-containers/left-sidebar.jsx +43 -0
  36. package/src/application-containers/lower-right-toolbar.jsx +29 -0
  37. package/src/application-containers/map.jsx +57 -0
  38. package/src/application-containers/modal-window.jsx +34 -0
  39. package/src/application-containers/north-region.jsx +26 -0
  40. package/src/application-containers/notification-pane.jsx +37 -0
  41. package/src/application-containers/notification-quadrant.jsx +20 -0
  42. package/src/application-containers/notification.jsx +91 -0
  43. package/src/application-containers/primary-panel.jsx +94 -0
  44. package/src/application-containers/right-sidebar.jsx +44 -0
  45. package/src/application-containers/south-region-tab.jsx +60 -0
  46. package/src/application-containers/south-region.jsx +75 -0
  47. package/src/application-containers/upper-right-toolbar.jsx +28 -0
  48. package/src/application-controls/basic-toolbar-button.jsx +124 -0
  49. package/src/application-controls/basic-toolbar-menu-divider.jsx +11 -0
  50. package/src/application-controls/basic-toolbar-menu-item.jsx +91 -0
  51. package/src/application-controls/basic-toolbar-menu-up.jsx +13 -0
  52. package/src/application-controls/basic-toolbar-menu.jsx +13 -0
  53. package/src/application-controls/basic-toolbar-submenu.jsx +14 -0
  54. package/src/application-controls/index.jsx +35 -0
  55. package/src/application-controls/loading-indicator.jsx +19 -0
  56. package/src/application-controls/search-input.jsx +55 -0
  57. package/src/application-controls/search-results-list-item.jsx +50 -0
  58. package/src/application-controls/search-results-list.jsx +19 -0
  59. package/src/application-controls/sidebar-button.jsx +69 -0
  60. package/src/application-controls/sidebar-panel-opener.jsx +63 -0
  61. package/src/application-controls/tree-list-folder.jsx +46 -0
  62. package/src/application-controls/tree-list-item.jsx +83 -0
  63. package/src/application-controls/tree-list.jsx +35 -0
  64. package/src/application-controls/tree-view.jsx +42 -0
  65. package/src/application-exports/map-provider.jsx +122 -0
  66. package/src/assets/react.svg +1 -0
  67. package/src/config/default-config.js +593 -0
  68. package/src/core-plugins/add-data/add-data-button.jsx +34 -0
  69. package/src/core-plugins/add-data/add-geojson.jsx +47 -0
  70. package/src/core-plugins/add-data/add-kmlfile.jsx +46 -0
  71. package/src/core-plugins/add-data/add-shapefile.jsx +47 -0
  72. package/src/core-plugins/add-data/bundle.js +226 -0
  73. package/src/core-plugins/add-data/index.js +15 -0
  74. package/src/core-plugins/basemap-switcher/basemap-switcher-button.jsx +18 -0
  75. package/src/core-plugins/basemap-switcher/basemap-switcher-list-item.jsx +48 -0
  76. package/src/core-plugins/basemap-switcher/basemap-switcher-list.jsx +37 -0
  77. package/src/core-plugins/basemap-switcher/index.js +13 -0
  78. package/src/core-plugins/bookmarks/bookmark-button.jsx +18 -0
  79. package/src/core-plugins/bookmarks/bookmark-list-item.jsx +79 -0
  80. package/src/core-plugins/bookmarks/bookmark-list.jsx +31 -0
  81. package/src/core-plugins/bookmarks/bookmark-panel.jsx +191 -0
  82. package/src/core-plugins/bookmarks/bundle.js +92 -0
  83. package/src/core-plugins/bookmarks/index.js +15 -0
  84. package/src/core-plugins/catalog/bundle.js +109 -0
  85. package/src/core-plugins/catalog/catalog-button.jsx +33 -0
  86. package/src/core-plugins/catalog/catalog-error-item.jsx +14 -0
  87. package/src/core-plugins/catalog/catalog-list-item-loader.jsx +12 -0
  88. package/src/core-plugins/catalog/catalog-list-item.jsx +118 -0
  89. package/src/core-plugins/catalog/catalog-list.jsx +78 -0
  90. package/src/core-plugins/catalog/catalog-modal-window.jsx +100 -0
  91. package/src/core-plugins/catalog/index.js +15 -0
  92. package/src/core-plugins/change-log/bundle.js +180 -0
  93. package/src/core-plugins/change-log/change-log-button.jsx +40 -0
  94. package/src/core-plugins/change-log/change-log-modal.jsx +190 -0
  95. package/src/core-plugins/change-log/index.js +15 -0
  96. package/src/core-plugins/change-log/select-district.jsx +73 -0
  97. package/src/core-plugins/contact-form/bundle.js +239 -0
  98. package/src/core-plugins/contact-form/index.js +17 -0
  99. package/src/core-plugins/contact-form/question-button.jsx +36 -0
  100. package/src/core-plugins/contact-form/question-modal.jsx +215 -0
  101. package/src/core-plugins/coordinate-display/bundle.jsx +269 -0
  102. package/src/core-plugins/coordinate-display/coordinate-display-bar.jsx +66 -0
  103. package/src/core-plugins/coordinate-display/coordinate-display-proj-item.jsx +60 -0
  104. package/src/core-plugins/coordinate-display/coordinate-display-settings.jsx +173 -0
  105. package/src/core-plugins/coordinate-display/coordinate-interaction-bar.jsx +60 -0
  106. package/src/core-plugins/coordinate-display/coordinate-lat-lon-input.jsx +35 -0
  107. package/src/core-plugins/coordinate-display/coordinate-popup.jsx +27 -0
  108. package/src/core-plugins/coordinate-display/index.js +20 -0
  109. package/src/core-plugins/draw-tools/create-draw-bundle.js +242 -0
  110. package/src/core-plugins/draw-tools/draw-button.jsx +204 -0
  111. package/src/core-plugins/draw-tools/draw-label-bundle.js +116 -0
  112. package/src/core-plugins/draw-tools/draw-modify-bundle.js +156 -0
  113. package/src/core-plugins/draw-tools/draw-save-bundle.jsx +181 -0
  114. package/src/core-plugins/draw-tools/draw-styles.js +110 -0
  115. package/src/core-plugins/draw-tools/draw-tool-item.jsx +67 -0
  116. package/src/core-plugins/draw-tools/index.js +34 -0
  117. package/src/core-plugins/editor/bundle.js +472 -0
  118. package/src/core-plugins/editor/date-editor.js +63 -0
  119. package/src/core-plugins/editor/date-formatter.js +17 -0
  120. package/src/core-plugins/editor/editor-base.js +29 -0
  121. package/src/core-plugins/editor/editor-button.js +224 -0
  122. package/src/core-plugins/editor/editor-table.js +151 -0
  123. package/src/core-plugins/editor/index.js +15 -0
  124. package/src/core-plugins/editor/number-editor.js +57 -0
  125. package/src/core-plugins/editor/string-editor.js +42 -0
  126. package/src/core-plugins/geocoder/bundle.jsx +186 -0
  127. package/src/core-plugins/geocoder/index.js +15 -0
  128. package/src/core-plugins/geocoder/overlay.jsx +30 -0
  129. package/src/core-plugins/geocoder/search-bar.js copy.save +123 -0
  130. package/src/core-plugins/geocoder/search-bar.jsx +121 -0
  131. package/src/core-plugins/identify/bundle.jsx +709 -0
  132. package/src/core-plugins/identify/identify-buffer-section.jsx +52 -0
  133. package/src/core-plugins/identify/identify-buffer-settings.jsx +48 -0
  134. package/src/core-plugins/identify/identify-button.jsx +100 -0
  135. package/src/core-plugins/identify/identify-details-table.jsx +121 -0
  136. package/src/core-plugins/identify/identify-details.js +69 -0
  137. package/src/core-plugins/identify/identify-popup.jsx +136 -0
  138. package/src/core-plugins/identify/identify-sidebar-list-item.jsx +106 -0
  139. package/src/core-plugins/identify/identify-sidebar-list.jsx +63 -0
  140. package/src/core-plugins/identify/identify-sidebar.jsx +103 -0
  141. package/src/core-plugins/identify/identify-table-cell.jsx +49 -0
  142. package/src/core-plugins/identify/identify-table.jsx +319 -0
  143. package/src/core-plugins/identify/index.js +27 -0
  144. package/src/core-plugins/identify/listeners/arcgis.js +158 -0
  145. package/src/core-plugins/identify/listeners/geojson.jsx +164 -0
  146. package/src/core-plugins/identify/listeners/raster.js +89 -0
  147. package/src/core-plugins/identify/listeners/vector.jsx +106 -0
  148. package/src/core-plugins/identify-arcgis-rest/bundle.js +169 -0
  149. package/src/core-plugins/identify-arcgis-rest/index.js +10 -0
  150. package/src/core-plugins/identify-cm/bundle.js +82 -0
  151. package/src/core-plugins/identify-cm/index.js +10 -0
  152. package/src/core-plugins/identify-geojson/bundle.js +164 -0
  153. package/src/core-plugins/identify-geojson/index.js +10 -0
  154. package/src/core-plugins/identify-raster/bundle.js +89 -0
  155. package/src/core-plugins/identify-raster/index.js +10 -0
  156. package/src/core-plugins/identify-vector/bundle.jsx +135 -0
  157. package/src/core-plugins/identify-vector/index.js +10 -0
  158. package/src/core-plugins/identify-wms/bundle.js +138 -0
  159. package/src/core-plugins/identify-wms/index.js +10 -0
  160. package/src/core-plugins/legend/bundle.js +1044 -0
  161. package/src/core-plugins/legend/index.js +17 -0
  162. package/src/core-plugins/legend/legend-button.jsx +18 -0
  163. package/src/core-plugins/legend/legend-header.jsx +43 -0
  164. package/src/core-plugins/legend/legend-item-multiple.jsx +32 -0
  165. package/src/core-plugins/legend/legend-item.jsx +20 -0
  166. package/src/core-plugins/legend/legend-panel.jsx +73 -0
  167. package/src/core-plugins/login/index.js +13 -0
  168. package/src/core-plugins/login/login-button.jsx +49 -0
  169. package/src/core-plugins/map-loading-indicator/bundle.js +31 -0
  170. package/src/core-plugins/map-loading-indicator/index.js +17 -0
  171. package/src/core-plugins/map-loading-indicator/loading-indicator.jsx +30 -0
  172. package/src/core-plugins/measure-tools/bundle.js +286 -0
  173. package/src/core-plugins/measure-tools/index.js +15 -0
  174. package/src/core-plugins/measure-tools/measure-options.jsx +89 -0
  175. package/src/core-plugins/measure-tools/measure-tools-button.jsx +129 -0
  176. package/src/core-plugins/measure-tools/measure-utils.js +76 -0
  177. package/src/core-plugins/permalink/bundle.js +57 -0
  178. package/src/core-plugins/permalink/index.js +15 -0
  179. package/src/core-plugins/permalink/permalink-button.jsx +38 -0
  180. package/src/core-plugins/permalink/permalink-modal.jsx +67 -0
  181. package/src/core-plugins/print-map/bundle.jsx +316 -0
  182. package/src/core-plugins/print-map/button.jsx +17 -0
  183. package/src/core-plugins/print-map/index.js +17 -0
  184. package/src/core-plugins/resources/bundle.js +96 -0
  185. package/src/core-plugins/resources/index.js +15 -0
  186. package/src/core-plugins/resources/resources-button.jsx +40 -0
  187. package/src/core-plugins/resources/resources-modal.jsx +151 -0
  188. package/src/core-plugins/rotate-north/index.js +13 -0
  189. package/src/core-plugins/rotate-north/rotate-north-button.jsx +38 -0
  190. package/src/core-plugins/theme-switcher/bundle.js +16 -0
  191. package/src/core-plugins/theme-switcher/index.js +15 -0
  192. package/src/core-plugins/theme-switcher/theme-list-item.jsx +25 -0
  193. package/src/core-plugins/theme-switcher/theme-list.jsx +28 -0
  194. package/src/core-plugins/theme-switcher/theme-switcher-button.jsx +18 -0
  195. package/src/core-plugins/theme-switcher/themes.js +121 -0
  196. package/src/core-plugins/three-d/index.js +13 -0
  197. package/src/core-plugins/three-d/three-d-button.jsx +44 -0
  198. package/src/core-plugins/tree-view/boundary-drop-target.jsx +42 -0
  199. package/src/core-plugins/tree-view/bundle.js +513 -0
  200. package/src/core-plugins/tree-view/dataset-info-modal.jsx +141 -0
  201. package/src/core-plugins/tree-view/dataset-legend.jsx +122 -0
  202. package/src/core-plugins/tree-view/defaults-container.jsx +27 -0
  203. package/src/core-plugins/tree-view/download-bundle.js +156 -0
  204. package/src/core-plugins/tree-view/favorites-container.jsx +27 -0
  205. package/src/core-plugins/tree-view/index.js +25 -0
  206. package/src/core-plugins/tree-view/layer-subpanel/defaults-toggle.jsx +28 -0
  207. package/src/core-plugins/tree-view/layer-subpanel/download-layer.jsx +54 -0
  208. package/src/core-plugins/tree-view/layer-subpanel/favorites-toggle.jsx +28 -0
  209. package/src/core-plugins/tree-view/layer-subpanel/label-toggle.jsx +39 -0
  210. package/src/core-plugins/tree-view/layer-subpanel/layer-subpanel.jsx +179 -0
  211. package/src/core-plugins/tree-view/layer-subpanel/natick-rgb-options.jsx +66 -0
  212. package/src/core-plugins/tree-view/layer-subpanel/natick-rgb.jsx +112 -0
  213. package/src/core-plugins/tree-view/layer-subpanel/opacity-slider.jsx +51 -0
  214. package/src/core-plugins/tree-view/layer-subpanel/remove-layer.jsx +75 -0
  215. package/src/core-plugins/tree-view/tree-list-container.jsx +22 -0
  216. package/src/core-plugins/tree-view/tree-list-item-dataset.jsx +174 -0
  217. package/src/core-plugins/tree-view/tree-list-item-folder.jsx +161 -0
  218. package/src/core-plugins/tree-view/tree-list-item.jsx +35 -0
  219. package/src/core-plugins/tree-view/tree-list.jsx +37 -0
  220. package/src/core-plugins/tree-view/tree-view-button.jsx +18 -0
  221. package/src/core-plugins/tree-view/tree-view-panel.jsx +139 -0
  222. package/src/core-plugins/tree-view/tree-view-toolbar/add-all.jsx +28 -0
  223. package/src/core-plugins/tree-view/tree-view-toolbar/defaults.jsx +40 -0
  224. package/src/core-plugins/tree-view/tree-view-toolbar/favorites.jsx +40 -0
  225. package/src/core-plugins/tree-view/tree-view-toolbar/remove-all.jsx +28 -0
  226. package/src/core-plugins/tree-view/tree-view-toolbar/toggle-expand.jsx +47 -0
  227. package/src/core-plugins/tree-view/tree-view-toolbar/toggle-filter.jsx +39 -0
  228. package/src/core-plugins/vector-search/bundle.js +96 -0
  229. package/src/core-plugins/vector-search/index.js +10 -0
  230. package/src/core-plugins/zoom-home/bundle.js +77 -0
  231. package/src/core-plugins/zoom-home/index.js +19 -0
  232. package/src/core-plugins/zoom-home/zoom-home-button.jsx +57 -0
  233. package/src/core-plugins/zoom-in-out/index.js +23 -0
  234. package/src/core-plugins/zoom-in-out/zoom-in-button.jsx +28 -0
  235. package/src/core-plugins/zoom-in-out/zoom-out-button.jsx +28 -0
  236. package/src/core-plugins/zoom-level/bundle.js +35 -0
  237. package/src/core-plugins/zoom-level/index.js +17 -0
  238. package/src/core-plugins/zoom-level/zoom-indicator.jsx +34 -0
  239. package/src/core-plugins/zoom-to-box/bundle.js +80 -0
  240. package/src/core-plugins/zoom-to-box/index.jsx +15 -0
  241. package/src/core-plugins/zoom-to-box/zoom-to-box-button.jsx +53 -0
  242. package/src/css/_deprecated_maki/css/maki.css +304 -0
  243. package/src/css/_deprecated_maki/fonts/maki.eot +0 -0
  244. package/src/css/_deprecated_maki/fonts/maki.svg +98 -0
  245. package/src/css/_deprecated_maki/fonts/maki.ttf +0 -0
  246. package/src/css/_deprecated_maki/fonts/maki.woff +0 -0
  247. package/src/css/bg-colors.css +121 -0
  248. package/src/css/cm-icons/css/cm-icons.css +90 -0
  249. package/src/css/cm-icons/fonts/cm.eot +0 -0
  250. package/src/css/cm-icons/fonts/cm.svg +27 -0
  251. package/src/css/cm-icons/fonts/cm.ttf +0 -0
  252. package/src/css/cm-icons/fonts/cm.woff +0 -0
  253. package/src/css/corpsmap-namespaced.css +9505 -0
  254. package/src/css/corpsmap.css +10178 -0
  255. package/src/css/loading-indicator.css +109 -0
  256. package/src/css/mapskin/OFL.txt +94 -0
  257. package/src/css/mapskin/css/mapskin.css +815 -0
  258. package/src/css/mapskin/css/mapskin.min.css +8 -0
  259. package/src/css/mapskin/fonts/mapskin.eot +0 -0
  260. package/src/css/mapskin/fonts/mapskin.svg +282 -0
  261. package/src/css/mapskin/fonts/mapskin.ttf +0 -0
  262. package/src/css/mapskin/fonts/mapskin.woff +0 -0
  263. package/src/css/mdi/.github/ISSUE_TEMPLATE.md +3 -0
  264. package/src/css/mdi/README.md +24 -0
  265. package/src/css/mdi/bower.json +22 -0
  266. package/src/css/mdi/css/materialdesignicons.css +18654 -0
  267. package/src/css/mdi/css/materialdesignicons.css.map +16 -0
  268. package/src/css/mdi/css/materialdesignicons.min.css +3 -0
  269. package/src/css/mdi/css/materialdesignicons.min.css.map +16 -0
  270. package/src/css/mdi/fonts/materialdesignicons-webfont.eot +0 -0
  271. package/src/css/mdi/fonts/materialdesignicons-webfont.ttf +0 -0
  272. package/src/css/mdi/fonts/materialdesignicons-webfont.woff +0 -0
  273. package/src/css/mdi/fonts/materialdesignicons-webfont.woff2 +0 -0
  274. package/src/css/mdi/license.md +97 -0
  275. package/src/css/mdi/package.json +37 -0
  276. package/src/css/mdi/preview.html +717 -0
  277. package/src/css/mdi/scss/_animated.scss +27 -0
  278. package/src/css/mdi/scss/_core.scss +10 -0
  279. package/src/css/mdi/scss/_extras.scss +65 -0
  280. package/src/css/mdi/scss/_functions.scss +20 -0
  281. package/src/css/mdi/scss/_icons.scss +10 -0
  282. package/src/css/mdi/scss/_path.scss +10 -0
  283. package/src/css/mdi/scss/_variables.scss +4606 -0
  284. package/src/css/mdi/scss/materialdesignicons.scss +8 -0
  285. package/src/css/navigation.css +174 -0
  286. package/src/css/parse-css.js +26 -0
  287. package/src/css/reset.css +48 -0
  288. package/src/index.css +68 -0
  289. package/src/index.jsx +113 -0
  290. package/src/main.jsx +3 -0
  291. package/src/openlayers-utils/format-utilities.js +178 -0
  292. package/src/openlayers-utils/interaction-creator.js +31 -0
  293. package/src/openlayers-utils/layer-utilities.js +309 -0
  294. package/src/openlayers-utils/map-utils.js +25 -0
  295. package/src/openlayers-utils/resource-utilities.js +38 -0
  296. package/src/openlayers-utils/vector-style.js +131 -0
  297. package/src/utils/cache.js +6 -0
  298. package/src/utils/check-webgl.js +6 -0
  299. package/src/utils/error-boundary.js +26 -0
  300. package/src/utils/load-plugins.js +32 -0
  301. package/src/utils/load-plugins.test.js +36 -0
  302. package/src/utils/plugin-region.jsx +26 -0
  303. package/src/utils/redux-bundler-react.jsx +69 -0
  304. package/src/utils/scale-to-zoom-level.js +37 -0
  305. package/src/utils/vector-styles.js +7 -0
  306. package/.babelrc +0 -7
  307. package/config/basemaps.js +0 -22
  308. package/css/corpsmap.css +0 -7982
  309. package/index.js +0 -5
  310. package/lib/dev.js +0 -41440
  311. package/lib/prod.js +0 -41406
  312. package/rollup.config.js +0 -30
  313. package/src/bundles/DEPRECATE_map-view-bundle.js +0 -34
  314. package/src/bundles/_template-bundle-creator.js +0 -49
  315. package/src/bundles/create-basemap-bundle-old.js +0 -107
  316. package/src/bundles/create-basemap-bundle.js +0 -133
  317. package/src/bundles/create-ol-map-bundle.js +0 -166
  318. package/src/bundles/create-ol-view-bundle.js +0 -79
  319. package/src/bundles/map-basemap-bundle.js +0 -42
  320. package/src/bundles/map-bundle.js +0 -90
  321. package/src/bundles/map-interaction-bundle.js +0 -57
  322. package/src/bundles/map-measure-bundle.js +0 -61
  323. package/src/components/BasemapSwitcherLight/BasemapMenu.js +0 -26
  324. package/src/components/BasemapSwitcherLight/BasemapMenuItem.js +0 -31
  325. package/src/components/BasemapSwitcherLight/index.js +0 -25
  326. package/src/components/Control-Regions/BtnContainer.js +0 -20
  327. package/src/components/Control-Regions/Right.js +0 -30
  328. package/src/components/Control-Regions/Top.js +0 -19
  329. package/src/components/Control-Regions/index.js +0 -4
  330. package/src/components/LayerTree/index.js +0 -10
  331. package/src/components/Map.js +0 -56
  332. package/src/components/MeasureTool/Content.js +0 -53
  333. package/src/components/MeasureTool/index.js +0 -169
  334. package/src/components/MeasureTool/measure-utils.js +0 -69
  335. package/src/components/Zoom/index.js +0 -48
  336. package/src/components/index.js +0 -3
  337. package/src/index.js +0 -10
@@ -0,0 +1,85 @@
1
+ import createContainerBundle from "./_create-container-bundle";
2
+ import { createSelector } from "redux-bundler";
3
+
4
+ export default createContainerBundle({
5
+ name: "primaryPanel",
6
+ additionalState: {
7
+ width: 300,
8
+ showClose: false,
9
+ showFavoritesBtn: false,
10
+ favoritesDB: null,
11
+ showUserDefaultLayersBtn: false,
12
+ userDefaultLayersDB: null,
13
+ },
14
+ additionalActions: [
15
+ "PRIMARY_PANEL_RESIZED",
16
+ "PRIMARY_PANEL_SHOW_CLOSE",
17
+ "PRIMARY_PANEL_SET_WIDTH",
18
+ "PRIMARY_PANEL_SHOW_FAVORITES_BTN",
19
+ "PRIMARY_PANEL_SHOW_USER_DEFAULT_LAYERS_BTN",
20
+ ],
21
+ addons: {
22
+ doPrimaryPanelResize:
23
+ ({ width }) =>
24
+ ({ dispatch }) => {
25
+ dispatch({ type: "PRIMARY_PANEL_RESIZED", payload: { width: width } });
26
+ },
27
+ doPrimaryPanelSetWidth:
28
+ (width) =>
29
+ ({ dispatch }) => {
30
+ dispatch({
31
+ type: "PRIMARY_PANEL_SET_WIDTH",
32
+ payload: { width: width },
33
+ });
34
+ },
35
+ doShowPrimaryPanelCloseBtn:
36
+ () =>
37
+ ({ dispatch }) => {
38
+ dispatch({
39
+ type: "PRIMARY_PANEL_SHOW_CLOSE",
40
+ payload: { showClose: true },
41
+ });
42
+ },
43
+ doShowFavoritesBtn:
44
+ (favoritesDB) =>
45
+ ({ dispatch }) => {
46
+ dispatch({
47
+ type: "PRIMARY_PANEL_SHOW_FAVORITES_BTN",
48
+ payload: { showFavoritesBtn: true, favoritesDB: favoritesDB },
49
+ });
50
+ },
51
+ doShowUserDefaultLayersBtn:
52
+ (userDefaultLayersDB) =>
53
+ ({ dispatch }) => {
54
+ dispatch({
55
+ type: "PRIMARY_PANEL_SHOW_USER_DEFAULT_LAYERS_BTN",
56
+ payload: { showUserDefaultLayersBtn: true, userDefaultLayersDB: userDefaultLayersDB },
57
+ });
58
+ },
59
+ selectPrimaryPanelWidth: (state) => {
60
+ return state.primaryPanel.width;
61
+ },
62
+ selectPrimaryPanelShowClose: (state) => {
63
+ return state.primaryPanel.showClose;
64
+ },
65
+ selectPrimaryPanelShowFavoritesBtn: (state) => {
66
+ return state.primaryPanel.showFavoritesBtn;
67
+ },
68
+ selectPrimaryPanelFavoritesDB: (state) => {
69
+ return state.primaryPanel.favoritesDB;
70
+ },
71
+ selectPrimaryPanelShowUserDefaultLayersBtn: (state) => {
72
+ return state.primaryPanel.showUserDefaultLayersBtn;
73
+ },
74
+ selectPrimaryPanelUserDefaultLayersDB: (state) => {
75
+ return state.primaryPanel.userDefaultLayersDB;
76
+ },
77
+ selectPrimaryPanelTop: createSelector(
78
+ "selectComponentsBasicToolbarCount",
79
+ (cnt) => {
80
+ if (cnt > 0) return 42;
81
+ return 0;
82
+ }
83
+ ),
84
+ },
85
+ });
@@ -0,0 +1,122 @@
1
+ import async from "async";
2
+ import _ from "lodash";
3
+
4
+ export default {
5
+ name: "search",
6
+
7
+ getReducer() {
8
+ const initialData = {
9
+ shouldFireSearch: false,
10
+ q: "",
11
+ selected: null,
12
+ onFireSearchListeners: [],
13
+ results: [],
14
+ };
15
+
16
+ return (state = initialData, { type, payload }) => {
17
+ if (type.indexOf("SEARCH_") !== -1) {
18
+ return Object.assign({}, state, payload);
19
+ }
20
+ return state;
21
+ };
22
+ },
23
+
24
+ doSearchAddCollection:
25
+ (options) =>
26
+ ({ dispatch, store }) => {
27
+ const listeners = store.selectSearchOnFireSearchListeners();
28
+ if (options.onFireSearch) listeners.push(options.onFireSearch);
29
+ dispatch({
30
+ type: "SEARCH_COLLECTION_ADDED",
31
+ payload: {
32
+ onFireSearchListeners: listeners,
33
+ },
34
+ });
35
+ },
36
+
37
+ doSearchShouldFire:
38
+ () =>
39
+ ({ dispatch }) => {
40
+ dispatch({ type: "SEARCH_SHOULD_FIRE", payload: { shouldFire: true } });
41
+ },
42
+
43
+ doSearchSetQuery:
44
+ (q) =>
45
+ ({ dispatch, store }) => {
46
+ dispatch({ type: "SEARCH_SET_QUERY", payload: { q: q, results: [] } });
47
+ },
48
+
49
+ doSearchSelectItem:
50
+ (item) =>
51
+ ({ dispatch }) => {
52
+ dispatch({ type: "SEARCH_ITEM_SELECTED", payload: { selected: item } });
53
+ },
54
+
55
+ doSearchFire:
56
+ () =>
57
+ ({ dispatch, store }) => {
58
+ dispatch({ type: "SEARCH_START", payload: { shouldFire: false } });
59
+ const listeners = store.selectSearchOnFireSearchListeners();
60
+
61
+ async.parallel(listeners, (err, r) => {
62
+ if (err)
63
+ return dispatch({
64
+ type: "SEARCH_ERROR",
65
+ payload: { err: err, results: [] },
66
+ });
67
+ const results = _.flatten(r);
68
+
69
+ const sortedResultsGeo = [];
70
+ const sortedResultsWMS = [];
71
+ results.forEach((result) => {
72
+ if (result.provider !== "geocoder") {
73
+ sortedResultsWMS.push(result);
74
+ }
75
+ if (result.provider === "geocoder") {
76
+ sortedResultsGeo.push(result);
77
+ }
78
+ });
79
+
80
+ const sortedResults = [...sortedResultsWMS, ...sortedResultsGeo];
81
+
82
+ dispatch({
83
+ type: "SEARCH_SUCCESS",
84
+ payload: { results: sortedResults },
85
+ });
86
+ });
87
+ },
88
+
89
+ selectSearchOnFireSearchListeners: (state) => {
90
+ return state.search.onFireSearchListeners;
91
+ },
92
+
93
+ selectSearchQueryString: (state) => {
94
+ return state.search.q;
95
+ },
96
+
97
+ selectSearchResults: (state) => {
98
+ return state.search.results;
99
+ },
100
+
101
+ reactSearchShouldFire: (state) => {
102
+ if (state.search.shouldFire) return { actionCreator: "doSearchFire" };
103
+ },
104
+ };
105
+
106
+ // => add collection, should have a name and implement the following api:
107
+
108
+ // .onFireSearch = function(callback(err, results)) => return results as an array
109
+ // each bundle contributing to search can listen for the following action types:
110
+ // 'SEARCH_SET_QUERY' => fired when user types into search bar
111
+ // 'SEARCH_ITEM_SELECTED' => fired when user selects a search result
112
+
113
+ // each result should fit the following schema, but can be extended by adding additional keys
114
+
115
+ // {
116
+ // type: 'Feature', // geojson feature
117
+ // provider: <string>, // optional provider of information, makes it easy to distinguish
118
+ // displayName: <string>,
119
+ // iconClass: <string>,
120
+ // geometry: <object>, // geojson geometry
121
+ // properties: <object> // geojson properties
122
+ // }
@@ -0,0 +1,96 @@
1
+ // import v4 from "uuid/v4";
2
+ import { v4 as uuidv4 } from "uuid";
3
+ import { createSelector } from "redux-bundler";
4
+
5
+ export default {
6
+ name: "southRegion",
7
+
8
+ getReducer: () => {
9
+ const initialData = {
10
+ children: {},
11
+ _shouldTryToCloseRegion: false,
12
+ };
13
+
14
+ return (state = initialData, { type, payload }) => {
15
+ switch (type) {
16
+ case "SOUTH_REGION_OPENED":
17
+ case "SOUTH_REGION_CLOSED":
18
+ case "SOUTH_REGION_TAB_CLOSED":
19
+ case "SOUTH_REGION_TRY_CLOSE":
20
+ return Object.assign({}, state, payload);
21
+ default:
22
+ return state;
23
+ }
24
+ };
25
+ },
26
+
27
+ doSouthRegionOpen:
28
+ (options) =>
29
+ ({ dispatch, store }) => {
30
+ const children = store.selectSouthRegionChildrenObj();
31
+ const uid = uuidv4();
32
+ options.uid = uid;
33
+ dispatch({
34
+ type: "SOUTH_REGION_OPENED",
35
+ payload: {
36
+ children: { ...children, [uid]: options },
37
+ },
38
+ });
39
+ },
40
+ doSouthRegionClose:
41
+ () =>
42
+ ({ dispatch, store }) => {
43
+ dispatch({
44
+ type: "SOUTH_REGION_CLOSED",
45
+ payload: {
46
+ children: {},
47
+ },
48
+ });
49
+ },
50
+
51
+ doSouthRegionCloseTab:
52
+ (uid) =>
53
+ ({ dispatch, store }) => {
54
+ const children = store.selectSouthRegionChildrenObj();
55
+ delete children[uid];
56
+ dispatch({
57
+ type: "SOUTH_REGION_TAB_CLOSED",
58
+ payload: {
59
+ children: { ...children },
60
+ _shouldTryToCloseRegion: true,
61
+ },
62
+ });
63
+ },
64
+
65
+ doSouthRegionTryClose:
66
+ () =>
67
+ ({ dispatch, store }) => {
68
+ dispatch({
69
+ type: "SOUTH_REGION_TRY_CLOSE",
70
+ payload: { _shouldTryToCloseRegion: false },
71
+ });
72
+ const children = store.selectSouthRegionChildren();
73
+ if (!children.length) store.doSouthRegionClose();
74
+ },
75
+
76
+ selectSouthRegionChildrenObj: (state) => {
77
+ return state.southRegion.children;
78
+ },
79
+
80
+ selectSouthRegionChildren: createSelector(
81
+ "selectSouthRegionChildrenObj",
82
+ (children) => {
83
+ const out = [];
84
+ for (var key in children) {
85
+ out.push(children[key]);
86
+ out.unshift(out.pop());
87
+ }
88
+ return out;
89
+ }
90
+ ),
91
+
92
+ reactSouthRegionTryToCloseRegion: (state) => {
93
+ if (state.southRegion._shouldTryToCloseRegion)
94
+ return { actionCreator: "doSouthRegionTryClose" };
95
+ },
96
+ };
@@ -0,0 +1,45 @@
1
+ export default {
2
+ name: "theme",
3
+
4
+ getReducer: () => {
5
+ const initialData = {
6
+ theme: "bg-blue-chambray",
7
+ iconSize: "default",
8
+ };
9
+ return (state = initialData, { type, payload }) => {
10
+ switch (type) {
11
+ case "THEME_CHANGED":
12
+ case "THEME_SET_LARGER_ICONS":
13
+ return Object.assign({}, state, payload);
14
+ default:
15
+ return state;
16
+ }
17
+ };
18
+ },
19
+
20
+ doThemeSet: (theme) => ({ dispatch }) => {
21
+ dispatch({
22
+ type: "THEME_CHANGED",
23
+ payload: {
24
+ theme: theme,
25
+ },
26
+ });
27
+ },
28
+
29
+ doThemeSetLargeIcons: () => ({ dispatch }) => {
30
+ dispatch({
31
+ type: "THEME_SET_LARGER_ICONS",
32
+ payload: {
33
+ iconSize: "large",
34
+ },
35
+ });
36
+ },
37
+
38
+ selectTheme: (state) => {
39
+ return state.theme.theme;
40
+ },
41
+
42
+ selectThemeIconSize: (state) => {
43
+ return state.theme.iconSize;
44
+ },
45
+ };
@@ -0,0 +1,88 @@
1
+ export default {
2
+ name: "vLayout",
3
+
4
+ getReducer: () => {
5
+ const initialData = {
6
+ height: window.innerHeight - 20,
7
+ hNorth: 1,
8
+ hSouth: 0,
9
+ _shouldUpdateMap: false,
10
+ };
11
+
12
+ return (state = initialData, { type, payload }) => {
13
+ switch (type) {
14
+ case "VLAYOUT_UPDATE_HEIGHT":
15
+ case "VLAYOUT_MAP_UPDATE_START":
16
+ return Object.assign({}, state, payload);
17
+ case "SOUTH_REGION_OPENED":
18
+ return Object.assign({}, state, {
19
+ hNorth: 0.5,
20
+ hSouth: 0.5,
21
+ _shouldUpdateMap: true,
22
+ });
23
+ case "SOUTH_REGION_CLOSED":
24
+ return Object.assign({}, state, {
25
+ hNorth: 1,
26
+ hSouth: 0,
27
+ _shouldUpdateMap: true,
28
+ });
29
+ default:
30
+ return state;
31
+ }
32
+ };
33
+ },
34
+
35
+ doVLayoutResize:
36
+ (hNorth, hSouth) =>
37
+ ({ dispatch }) => {
38
+ dispatch({
39
+ type: "VLAYOUT_UPDATE_HEIGHT",
40
+ payload: {
41
+ hNorth: hNorth,
42
+ hSouth: hSouth,
43
+ _shouldUpdateMap: true,
44
+ },
45
+ });
46
+ },
47
+
48
+ doVLayoutSetHeight:
49
+ (height) =>
50
+ ({ dispatch }) => {
51
+ dispatch({
52
+ type: "VLAYOUT_UPDATE_HEIGHT",
53
+ payload: {
54
+ height: height,
55
+ },
56
+ });
57
+ },
58
+
59
+ doVLayoutUpdateMap:
60
+ () =>
61
+ ({ dispatch, store }) => {
62
+ dispatch({
63
+ type: "VLAYOUT_MAP_UPDATE_START",
64
+ payload: {
65
+ _shouldUpdateMap: false,
66
+ },
67
+ });
68
+ const map = store.selectMap();
69
+ map.updateSize();
70
+ },
71
+
72
+ selectVLayoutHeight: (state) => {
73
+ return state.vLayout.height;
74
+ },
75
+
76
+ selectNorthHeight: (state) => {
77
+ return state.vLayout.height * state.vLayout.hNorth;
78
+ },
79
+
80
+ selectSouthHeight: (state) => {
81
+ return state.vLayout.height * state.vLayout.hSouth;
82
+ },
83
+
84
+ reactVLayoutShouldUpdateMap: (state) => {
85
+ if (state.vLayout._shouldUpdateMap)
86
+ return { actionCreator: "doVLayoutUpdateMap" };
87
+ },
88
+ };
@@ -0,0 +1,43 @@
1
+ import _ from "lodash";
2
+
3
+ export default {
4
+ name: "viewport",
5
+
6
+ getReducer() {
7
+ const initialData = {
8
+ h: window.innerHeight,
9
+ w: window.innerWidth,
10
+ };
11
+
12
+ return (state = initialData, { type, payload }) => {
13
+ if (type === "WINDOW_RESIZE") {
14
+ return Object.assign({}, state, {
15
+ h: window.innerHeight,
16
+ w: window.innerWidth,
17
+ });
18
+ }
19
+
20
+ return state;
21
+ };
22
+ },
23
+
24
+ doHandleResize:
25
+ () =>
26
+ ({ dispatch, store }) => {
27
+ const map = store.selectMap();
28
+ map.updateSize();
29
+ dispatch({ type: "WINDOW_RESIZE" });
30
+ },
31
+
32
+ selectViewportHeight: (state) => {
33
+ return state.viewport.h;
34
+ },
35
+
36
+ selectViewportWidth: (state) => {
37
+ return state.viewport.w;
38
+ },
39
+
40
+ init: (store) => {
41
+ window.addEventListener("resize", _.debounce(store.doHandleResize, 300));
42
+ },
43
+ };
@@ -0,0 +1,90 @@
1
+ function QueryStringToJSON(search) {
2
+ const pairs = search.slice(1).split('&');
3
+ const result = {};
4
+ pairs.forEach(function(pair) {
5
+ pair = pair.split('=');
6
+ result[pair[0]] = decodeURIComponent(pair[1] || '');
7
+ });
8
+ return JSON.parse(JSON.stringify(result));
9
+ }
10
+
11
+ export default {
12
+ name: 'windowLocation',
13
+
14
+ getReducer(){
15
+ const initialData = {
16
+ shouldParse: true,
17
+ host: null,
18
+ href: null,
19
+ origin: null,
20
+ pathname: null,
21
+ search: null,
22
+ params: null
23
+ }
24
+
25
+ return (state = initialData, { type, payload }) => {
26
+ switch(type){
27
+ case 'WINDOW_LOCATION_PARSE_START':
28
+ case 'WINDOW_LOCATION_PARSED':
29
+ return Object.assign({}, state, payload);
30
+ default:
31
+ return state;
32
+ }
33
+ }
34
+ },
35
+
36
+ doWindowLocationParse: () => ({ dispatch, store }) => {
37
+ dispatch({
38
+ type: 'WINDOW_LOCATION_PARSE_START',
39
+ payload:{
40
+ shouldParse: false
41
+ }
42
+ })
43
+
44
+ const location = window.location;
45
+ const host = location.host;
46
+ const href = location.href;
47
+ const origin = location.origin;
48
+ const pathname = location.pathname;
49
+ const search = location.search;
50
+ let params = QueryStringToJSON(search);
51
+
52
+ dispatch({ type: 'WINDOW_LOCATION_PARSED', payload: {
53
+ host: host,
54
+ href: href,
55
+ origin: origin,
56
+ pathname: pathname,
57
+ search: search,
58
+ params: params
59
+ }})
60
+ },
61
+
62
+ selectWindowLocationHost: (state) => {
63
+ return state.windowLocation.host;
64
+ },
65
+
66
+ selectWindowLocationHref: (state) => {
67
+ return state.windowLocation.Href;
68
+ },
69
+
70
+ selectWindowLocationOrigin: (state) => {
71
+ return state.windowLocation.origin;
72
+ },
73
+
74
+ selectWindowLocationPathname: (state) => {
75
+ return state.windowLocation.pathname;
76
+ },
77
+
78
+ selectWindowLocationSearch: (state) => {
79
+ return state.windowLocation.search;
80
+ },
81
+
82
+ selectWindowLocationParams: (state) => {
83
+ return state.windowLocation.params;
84
+ },
85
+
86
+ reactWindowShouldParseLocation: (state) => {
87
+ if(state.windowLocation.shouldParse) return { actionCreator: 'doWindowLocationParse' };
88
+ }
89
+
90
+ }
@@ -0,0 +1,24 @@
1
+ import React from "react";
2
+ import { connect } from "../utils/redux-bundler-react";
3
+ import PluginRegion from "../utils/plugin-region";
4
+
5
+ class BasicToolbar extends React.Component {
6
+ render() {
7
+ const { theme, componentsBasicToolbar } = this.props;
8
+ return (
9
+ <div className={"toolbar toolbar-top-left " + theme} style={{ left: 49 }}>
10
+ <PluginRegion
11
+ className="toolbar-horizontal"
12
+ components={componentsBasicToolbar}
13
+ styleOverride={{}}
14
+ />
15
+ </div>
16
+ );
17
+ }
18
+ }
19
+
20
+ export default connect(
21
+ "selectTheme",
22
+ "selectComponentsBasicToolbar",
23
+ BasicToolbar
24
+ );
@@ -0,0 +1,91 @@
1
+ import React from "react";
2
+ import { connect } from "../utils/redux-bundler-react";
3
+ import NorthRegion from "./north-region";
4
+ import SouthRegion from "./south-region";
5
+ import ModalWindow from "./modal-window";
6
+ import NotificationPane from "./notification-pane";
7
+ import debounce from "lodash/debounce";
8
+
9
+ class Corpsmap extends React.Component {
10
+ constructor(props) {
11
+ super(props);
12
+ this.renderSouthRegion = this.renderSouthRegion.bind(this);
13
+ this.setHeight = this.setHeight.bind(this);
14
+ this.resize = this.resize.bind(this);
15
+
16
+ this.setHeightDebounced = debounce(this.setHeight, 10);
17
+ }
18
+
19
+ componentDidMount() {
20
+ this._isMounted = true;
21
+ const { doVLayoutSetHeight } = this.props;
22
+ doVLayoutSetHeight(this.el.offsetHeight);
23
+ }
24
+
25
+ componentWillUnmount() {
26
+ this._isMounted = false;
27
+ }
28
+
29
+ setHeight(clientY) {
30
+ const { doVLayoutResize, vLayoutHeight } = this.props;
31
+ if (clientY > 45 && clientY < vLayoutHeight) {
32
+ const hNorth = clientY / vLayoutHeight;
33
+ const hSouth = 1 - hNorth;
34
+ doVLayoutResize(hNorth, hSouth);
35
+ }
36
+ }
37
+
38
+ resize(e) {
39
+ e.preventDefault();
40
+ const clientY = e.clientY;
41
+ this.setHeightDebounced(clientY);
42
+ }
43
+
44
+ renderSouthRegion() {
45
+ const { doSouthRegionClose, theme, southHeight } = this.props;
46
+ if (!southHeight) return null;
47
+ return (
48
+ <div>
49
+ <div
50
+ draggable="true"
51
+ onDrag={this.resize}
52
+ className={theme + " n-s-drag-handle"}
53
+ >
54
+ <span onClick={doSouthRegionClose} className="pull-right">
55
+ <i className="mdi mdi-close"></i>
56
+ </span>
57
+ </div>
58
+ <SouthRegion height={southHeight - 5} />
59
+ </div>
60
+ );
61
+ }
62
+
63
+ render() {
64
+ const { northHeight } = this.props;
65
+ return (
66
+ <div
67
+ className="corpsmap cm-container-fluid"
68
+ style={{ padding: 0 }}
69
+ ref={(el) => {
70
+ this.el = el;
71
+ }}
72
+ >
73
+ <NorthRegion height={northHeight} />
74
+ {this.renderSouthRegion()}
75
+ <ModalWindow />
76
+ <NotificationPane />
77
+ </div>
78
+ );
79
+ }
80
+ }
81
+
82
+ export default connect(
83
+ "selectTheme",
84
+ "selectNorthHeight",
85
+ "selectSouthHeight",
86
+ "selectVLayoutHeight",
87
+ "doSouthRegionClose",
88
+ "doVLayoutResize",
89
+ "doVLayoutSetHeight",
90
+ Corpsmap
91
+ );