@longline/aqua-ui 1.0.0 → 1.0.8

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 (408) hide show
  1. package/main.js +1 -1
  2. package/package.json +5 -7
  3. package/Types.d.ts +0 -6
  4. package/Types.js +0 -5
  5. package/containers/Anchor/Anchor.d.ts +0 -63
  6. package/containers/Anchor/Anchor.js +0 -113
  7. package/containers/Anchor/index.d.ts +0 -1
  8. package/containers/Anchor/index.js +0 -1
  9. package/containers/Dock/Dock.d.ts +0 -45
  10. package/containers/Dock/Dock.js +0 -61
  11. package/containers/Dock/Dockable.d.ts +0 -60
  12. package/containers/Dock/Dockable.js +0 -98
  13. package/containers/Dock/index.d.ts +0 -2
  14. package/containers/Dock/index.js +0 -2
  15. package/containers/Form/Field.d.ts +0 -104
  16. package/containers/Form/Field.js +0 -168
  17. package/containers/Form/Form.d.ts +0 -51
  18. package/containers/Form/Form.js +0 -89
  19. package/containers/Form/Validation.d.ts +0 -212
  20. package/containers/Form/Validation.js +0 -232
  21. package/containers/Form/context/FormContext.d.ts +0 -10
  22. package/containers/Form/context/FormContext.js +0 -3
  23. package/containers/Form/context/useForm.d.ts +0 -5
  24. package/containers/Form/context/useForm.js +0 -9
  25. package/containers/Form/elements/BoxWrapper.d.ts +0 -15
  26. package/containers/Form/elements/BoxWrapper.js +0 -35
  27. package/containers/Form/elements/Hint.d.ts +0 -21
  28. package/containers/Form/elements/Hint.js +0 -15
  29. package/containers/Form/elements/Label.d.ts +0 -22
  30. package/containers/Form/elements/Label.js +0 -15
  31. package/containers/Form/elements/SimpleWrapper.d.ts +0 -15
  32. package/containers/Form/elements/SimpleWrapper.js +0 -17
  33. package/containers/GlassPane/GlassPane.d.ts +0 -36
  34. package/containers/GlassPane/GlassPane.js +0 -66
  35. package/containers/GlassPane/index.d.ts +0 -1
  36. package/containers/GlassPane/index.js +0 -1
  37. package/containers/InfoBox/InfoBox.d.ts +0 -34
  38. package/containers/InfoBox/InfoBox.js +0 -45
  39. package/containers/InfoBox/elements/Content.d.ts +0 -23
  40. package/containers/InfoBox/elements/Content.js +0 -37
  41. package/containers/InfoBox/elements/Footer.d.ts +0 -9
  42. package/containers/InfoBox/elements/Footer.js +0 -24
  43. package/containers/InfoBox/elements/Header.d.ts +0 -9
  44. package/containers/InfoBox/elements/Header.js +0 -24
  45. package/containers/List/List.d.ts +0 -45
  46. package/containers/List/List.js +0 -47
  47. package/containers/List/ListCell.d.ts +0 -13
  48. package/containers/List/ListCell.js +0 -24
  49. package/containers/List/ListRow.d.ts +0 -15
  50. package/containers/List/ListRow.js +0 -24
  51. package/containers/List/index.d.ts +0 -3
  52. package/containers/List/index.js +0 -3
  53. package/containers/Tabs/Pane.d.ts +0 -29
  54. package/containers/Tabs/Pane.js +0 -45
  55. package/containers/Tabs/Tabs.d.ts +0 -66
  56. package/containers/Tabs/Tabs.js +0 -144
  57. package/controls/Chip/Chip.d.ts +0 -35
  58. package/controls/Chip/Chip.js +0 -83
  59. package/controls/Fab/Fab.d.ts +0 -73
  60. package/controls/Fab/Fab.js +0 -94
  61. package/controls/Icon/Icon.d.ts +0 -98
  62. package/controls/Icon/Icon.js +0 -79
  63. package/controls/Icon/index.d.ts +0 -1
  64. package/controls/Icon/index.js +0 -1
  65. package/controls/Key/Key.d.ts +0 -22
  66. package/controls/Key/Key.js +0 -74
  67. package/controls/Key/index.d.ts +0 -1
  68. package/controls/Key/index.js +0 -1
  69. package/controls/LinearChart/LinearChart.d.ts +0 -31
  70. package/controls/LinearChart/LinearChart.js +0 -58
  71. package/controls/ListView/Body.d.ts +0 -8
  72. package/controls/ListView/Body.js +0 -24
  73. package/controls/ListView/Column.d.ts +0 -55
  74. package/controls/ListView/Column.js +0 -8
  75. package/controls/ListView/ColumnsManager/ColumnDraggable.d.ts +0 -11
  76. package/controls/ListView/ColumnsManager/ColumnDraggable.js +0 -83
  77. package/controls/ListView/ColumnsManager/ColumnsManager.d.ts +0 -12
  78. package/controls/ListView/ColumnsManager/ColumnsManager.js +0 -63
  79. package/controls/ListView/ColumnsManager/OrderColumns.d.ts +0 -11
  80. package/controls/ListView/ColumnsManager/OrderColumns.js +0 -62
  81. package/controls/ListView/ColumnsManager/SourceColumns.d.ts +0 -10
  82. package/controls/ListView/ColumnsManager/SourceColumns.js +0 -45
  83. package/controls/ListView/Ghost.d.ts +0 -9
  84. package/controls/ListView/Ghost.js +0 -52
  85. package/controls/ListView/Header.d.ts +0 -12
  86. package/controls/ListView/Header.js +0 -35
  87. package/controls/ListView/HeaderButton.d.ts +0 -8
  88. package/controls/ListView/HeaderButton.js +0 -8
  89. package/controls/ListView/HeaderCell.d.ts +0 -20
  90. package/controls/ListView/HeaderCell.js +0 -47
  91. package/controls/ListView/IListViewProps.d.ts +0 -105
  92. package/controls/ListView/IListViewProps.js +0 -1
  93. package/controls/ListView/ListView.d.ts +0 -20
  94. package/controls/ListView/ListView.js +0 -97
  95. package/controls/ListView/NoData.d.ts +0 -19
  96. package/controls/ListView/NoData.js +0 -30
  97. package/controls/ListView/SortButton.d.ts +0 -16
  98. package/controls/ListView/SortButton.js +0 -26
  99. package/controls/ListView/Table.d.ts +0 -18
  100. package/controls/ListView/Table.js +0 -99
  101. package/controls/ListView/Total.d.ts +0 -9
  102. package/controls/ListView/Total.js +0 -28
  103. package/controls/ListView/sortItems.d.ts +0 -6
  104. package/controls/ListView/sortItems.js +0 -35
  105. package/controls/Mouse/Mouse.d.ts +0 -38
  106. package/controls/Mouse/Mouse.js +0 -51
  107. package/controls/Mouse/index.d.ts +0 -1
  108. package/controls/Mouse/index.js +0 -1
  109. package/controls/PrimaryButton/PrimaryButton.d.ts +0 -63
  110. package/controls/PrimaryButton/PrimaryButton.js +0 -83
  111. package/controls/PrimaryButton/index.d.ts +0 -1
  112. package/controls/PrimaryButton/index.js +0 -1
  113. package/controls/Progress/Progress.d.ts +0 -35
  114. package/controls/Progress/Progress.js +0 -49
  115. package/controls/SecondaryButton/SecondaryButton.d.ts +0 -58
  116. package/controls/SecondaryButton/SecondaryButton.js +0 -73
  117. package/controls/SecondaryButton/index.d.ts +0 -1
  118. package/controls/SecondaryButton/index.js +0 -1
  119. package/controls/TabBar/Tab.d.ts +0 -21
  120. package/controls/TabBar/Tab.js +0 -25
  121. package/controls/TabBar/TabBar.d.ts +0 -34
  122. package/controls/TabBar/TabBar.js +0 -134
  123. package/controls/TabBar/Underliner.d.ts +0 -7
  124. package/controls/TabBar/Underliner.js +0 -27
  125. package/controls/TabBar/index.d.ts +0 -1
  126. package/controls/TabBar/index.js +0 -1
  127. package/controls/TertiaryButton/TertiaryButton.d.ts +0 -28
  128. package/controls/TertiaryButton/TertiaryButton.js +0 -65
  129. package/controls/TertiaryButton/index.d.ts +0 -1
  130. package/controls/TertiaryButton/index.js +0 -1
  131. package/controls/View/View.d.ts +0 -35
  132. package/controls/View/View.js +0 -58
  133. package/formatters/Date/DateTime.d.ts +0 -45
  134. package/formatters/Date/DateTime.js +0 -64
  135. package/formatters/Date/elements/Custom.d.ts +0 -18
  136. package/formatters/Date/elements/Custom.js +0 -22
  137. package/formatters/Date/elements/Distance.d.ts +0 -24
  138. package/formatters/Date/elements/Distance.js +0 -45
  139. package/formatters/Date/elements/LongDate.d.ts +0 -17
  140. package/formatters/Date/elements/LongDate.js +0 -11
  141. package/formatters/Date/elements/LongDateTime.d.ts +0 -14
  142. package/formatters/Date/elements/LongDateTime.js +0 -10
  143. package/formatters/Date/elements/LongTime.d.ts +0 -14
  144. package/formatters/Date/elements/LongTime.js +0 -10
  145. package/formatters/Date/elements/ShortDate.d.ts +0 -14
  146. package/formatters/Date/elements/ShortDate.js +0 -10
  147. package/formatters/Date/elements/ShortDateTime.d.ts +0 -14
  148. package/formatters/Date/elements/ShortDateTime.js +0 -10
  149. package/formatters/Date/elements/ShortTime.d.ts +0 -18
  150. package/formatters/Date/elements/ShortTime.js +0 -10
  151. package/formatters/Date/elements/toDate.d.ts +0 -2
  152. package/formatters/Date/elements/toDate.js +0 -13
  153. package/formatters/Filesize/Filesize.d.ts +0 -29
  154. package/formatters/Filesize/Filesize.js +0 -54
  155. package/formatters/GIS/Latitude.d.ts +0 -23
  156. package/formatters/GIS/Latitude.js +0 -13
  157. package/formatters/GIS/Longitude.d.ts +0 -23
  158. package/formatters/GIS/Longitude.js +0 -13
  159. package/formatters/GIS/index.d.ts +0 -2
  160. package/formatters/GIS/index.js +0 -2
  161. package/formatters/GIS/toDMS.d.ts +0 -2
  162. package/formatters/GIS/toDMS.js +0 -16
  163. package/formatters/Highlight/Highlight.d.ts +0 -22
  164. package/formatters/Highlight/Highlight.js +0 -32
  165. package/formatters/Highlight/index.d.ts +0 -1
  166. package/formatters/Highlight/index.js +0 -1
  167. package/formatters/Human/Human.d.ts +0 -18
  168. package/formatters/Human/Human.js +0 -34
  169. package/formatters/Human/index.d.ts +0 -1
  170. package/formatters/Human/index.js +0 -1
  171. package/formatters/Number/Number.d.ts +0 -24
  172. package/formatters/Number/Number.js +0 -36
  173. package/formatters/Number/index.d.ts +0 -1
  174. package/formatters/Number/index.js +0 -1
  175. package/helper/DMS.d.ts +0 -22
  176. package/helper/DMS.js +0 -46
  177. package/helper/HslColor.d.ts +0 -11
  178. package/helper/HslColor.js +0 -47
  179. package/helper/RgbColor.d.ts +0 -43
  180. package/helper/RgbColor.js +0 -162
  181. package/helper/SizeHelper.d.ts +0 -10
  182. package/helper/SizeHelper.js +0 -56
  183. package/helper/darken.d.ts +0 -8
  184. package/helper/darken.js +0 -18
  185. package/helper/guard.d.ts +0 -5
  186. package/helper/guard.js +0 -7
  187. package/helper/lighten.d.ts +0 -8
  188. package/helper/lighten.js +0 -11
  189. package/helper/nameToHex.d.ts +0 -6
  190. package/helper/nameToHex.js +0 -163
  191. package/inputs/DateInput/Body.d.ts +0 -34
  192. package/inputs/DateInput/Body.js +0 -50
  193. package/inputs/DateInput/Calendar.d.ts +0 -15
  194. package/inputs/DateInput/Calendar.js +0 -60
  195. package/inputs/DateInput/DateInput.d.ts +0 -73
  196. package/inputs/DateInput/DateInput.js +0 -143
  197. package/inputs/DateInput/Day.d.ts +0 -32
  198. package/inputs/DateInput/Day.js +0 -33
  199. package/inputs/DateInput/InfiniteList.d.ts +0 -26
  200. package/inputs/DateInput/InfiniteList.js +0 -87
  201. package/inputs/DateInput/Nav.d.ts +0 -11
  202. package/inputs/DateInput/Nav.js +0 -24
  203. package/inputs/DateInput/Navbar.d.ts +0 -16
  204. package/inputs/DateInput/Navbar.js +0 -33
  205. package/inputs/DateInput/NumericInput.d.ts +0 -14
  206. package/inputs/DateInput/NumericInput.js +0 -48
  207. package/inputs/DateInput/Selector.d.ts +0 -47
  208. package/inputs/DateInput/Selector.js +0 -55
  209. package/inputs/DateInput/SimpleList.d.ts +0 -19
  210. package/inputs/DateInput/SimpleList.js +0 -31
  211. package/inputs/Dropdown/Body.d.ts +0 -25
  212. package/inputs/Dropdown/Body.js +0 -14
  213. package/inputs/Dropdown/Column.d.ts +0 -21
  214. package/inputs/Dropdown/Column.js +0 -6
  215. package/inputs/Dropdown/Dropdown.d.ts +0 -136
  216. package/inputs/Dropdown/Dropdown.js +0 -446
  217. package/inputs/Dropdown/Selection.d.ts +0 -11
  218. package/inputs/Dropdown/Selection.js +0 -23
  219. package/inputs/Dropdown/Selector.d.ts +0 -29
  220. package/inputs/Dropdown/Selector.js +0 -16
  221. package/inputs/Editor/Editor.d.ts +0 -45
  222. package/inputs/Editor/Editor.js +0 -60
  223. package/inputs/Editor/buttons/BoldButton.d.ts +0 -7
  224. package/inputs/Editor/buttons/BoldButton.js +0 -7
  225. package/inputs/Editor/buttons/BulletListButton.d.ts +0 -7
  226. package/inputs/Editor/buttons/BulletListButton.js +0 -7
  227. package/inputs/Editor/buttons/CodeBlockButton.d.ts +0 -7
  228. package/inputs/Editor/buttons/CodeBlockButton.js +0 -7
  229. package/inputs/Editor/buttons/CodeButton.d.ts +0 -7
  230. package/inputs/Editor/buttons/CodeButton.js +0 -7
  231. package/inputs/Editor/buttons/ItalicButton.d.ts +0 -7
  232. package/inputs/Editor/buttons/ItalicButton.js +0 -7
  233. package/inputs/Editor/buttons/OrderedListButton.d.ts +0 -7
  234. package/inputs/Editor/buttons/OrderedListButton.js +0 -7
  235. package/inputs/Editor/buttons/StrikethroughButton.d.ts +0 -7
  236. package/inputs/Editor/buttons/StrikethroughButton.js +0 -7
  237. package/inputs/Editor/menu/MenuBar.d.ts +0 -9
  238. package/inputs/Editor/menu/MenuBar.js +0 -44
  239. package/inputs/Editor/menu/MenuButton.d.ts +0 -35
  240. package/inputs/Editor/menu/MenuButton.js +0 -34
  241. package/inputs/Editor/menu/MenuSeparator.d.ts +0 -7
  242. package/inputs/Editor/menu/MenuSeparator.js +0 -24
  243. package/inputs/Input/Clear.d.ts +0 -7
  244. package/inputs/Input/Clear.js +0 -14
  245. package/inputs/Input/Input.d.ts +0 -133
  246. package/inputs/Input/Input.js +0 -64
  247. package/inputs/Input/InputWrapper.d.ts +0 -23
  248. package/inputs/Input/InputWrapper.js +0 -57
  249. package/inputs/Input/index.d.ts +0 -1
  250. package/inputs/Input/index.js +0 -1
  251. package/inputs/Selector/ISelectorProps.d.ts +0 -29
  252. package/inputs/Selector/ISelectorProps.js +0 -1
  253. package/inputs/Selector/Selector.d.ts +0 -29
  254. package/inputs/Selector/Selector.js +0 -77
  255. package/inputs/Selector/index.d.ts +0 -1
  256. package/inputs/Selector/index.js +0 -1
  257. package/inputs/Selector/widgets/Checkbox.d.ts +0 -6
  258. package/inputs/Selector/widgets/Checkbox.js +0 -29
  259. package/inputs/Selector/widgets/Toggle.d.ts +0 -6
  260. package/inputs/Selector/widgets/Toggle.js +0 -24
  261. package/inputs/Slider/Slider.d.ts +0 -63
  262. package/inputs/Slider/Slider.js +0 -198
  263. package/inputs/Textarea/Textarea.d.ts +0 -79
  264. package/inputs/Textarea/Textarea.js +0 -65
  265. package/map/Map/Map.d.ts +0 -47
  266. package/map/Map/Map.js +0 -221
  267. package/map/Map/index.d.ts +0 -1
  268. package/map/Map/index.js +0 -1
  269. package/map/PositionsManager/PositionBox.d.ts +0 -14
  270. package/map/PositionsManager/PositionBox.js +0 -86
  271. package/map/PositionsManager/PositionsManager.d.ts +0 -27
  272. package/map/PositionsManager/PositionsManager.js +0 -99
  273. package/map/controls/CompassButton/CompassButton.d.ts +0 -33
  274. package/map/controls/CompassButton/CompassButton.js +0 -88
  275. package/map/controls/FullscreenButton/FullscreenButton.d.ts +0 -21
  276. package/map/controls/FullscreenButton/FullscreenButton.js +0 -62
  277. package/map/controls/Geocoder/Geocoder.d.ts +0 -49
  278. package/map/controls/Geocoder/Geocoder.js +0 -179
  279. package/map/controls/Geocoder/GeocoderApi.d.ts +0 -59
  280. package/map/controls/Geocoder/GeocoderApi.js +0 -68
  281. package/map/controls/Geocoder/GeocoderEntry.d.ts +0 -15
  282. package/map/controls/Geocoder/GeocoderEntry.js +0 -18
  283. package/map/controls/Geocoder/GeocoderList.d.ts +0 -10
  284. package/map/controls/Geocoder/GeocoderList.js +0 -18
  285. package/map/controls/Geocoder/GeocoderSelector.d.ts +0 -16
  286. package/map/controls/Geocoder/GeocoderSelector.js +0 -25
  287. package/map/controls/Graticule/Graticule.d.ts +0 -35
  288. package/map/controls/Graticule/Graticule.js +0 -142
  289. package/map/controls/MapLoader/MapLoader.d.ts +0 -33
  290. package/map/controls/MapLoader/MapLoader.js +0 -73
  291. package/map/controls/ScaleControl/ScaleControl.d.ts +0 -24
  292. package/map/controls/ScaleControl/ScaleControl.js +0 -107
  293. package/map/controls/ZoomInButton/ZoomInButton.d.ts +0 -19
  294. package/map/controls/ZoomInButton/ZoomInButton.js +0 -56
  295. package/map/controls/ZoomOutButton/ZoomOutButton.d.ts +0 -19
  296. package/map/controls/ZoomOutButton/ZoomOutButton.js +0 -56
  297. package/map/controls/base/MapButton/Hint.d.ts +0 -17
  298. package/map/controls/base/MapButton/Hint.js +0 -34
  299. package/map/controls/base/MapButton/MapButton.d.ts +0 -46
  300. package/map/controls/base/MapButton/MapButton.js +0 -71
  301. package/map/controls/base/MapButton/index.d.ts +0 -1
  302. package/map/controls/base/MapButton/index.js +0 -1
  303. package/map/controls/base/MapButtonGroup/MapButtonGroup.d.ts +0 -17
  304. package/map/controls/base/MapButtonGroup/MapButtonGroup.js +0 -24
  305. package/map/controls/base/MapControl/MapControl.d.ts +0 -36
  306. package/map/controls/base/MapControl/MapControl.js +0 -77
  307. package/map/controls/base/MapControl/index.d.ts +0 -1
  308. package/map/controls/base/MapControl/index.js +0 -1
  309. package/map/layers/ClusterLayer/ClusterLayer.d.ts +0 -79
  310. package/map/layers/ClusterLayer/ClusterLayer.js +0 -118
  311. package/map/layers/HtmlMarkerLayer/HtmlMarkerLayer.d.ts +0 -51
  312. package/map/layers/HtmlMarkerLayer/HtmlMarkerLayer.js +0 -151
  313. package/map/layers/InterpolationLayer/ContoursFragmentShader.d.ts +0 -2
  314. package/map/layers/InterpolationLayer/ContoursFragmentShader.js +0 -2
  315. package/map/layers/InterpolationLayer/ContoursVertexShader.d.ts +0 -2
  316. package/map/layers/InterpolationLayer/ContoursVertexShader.js +0 -2
  317. package/map/layers/InterpolationLayer/IGradientStop.d.ts +0 -5
  318. package/map/layers/InterpolationLayer/IGradientStop.js +0 -1
  319. package/map/layers/InterpolationLayer/InterpolationLayer.d.ts +0 -35
  320. package/map/layers/InterpolationLayer/InterpolationLayer.js +0 -256
  321. package/map/layers/InterpolationLayer/LevelsFragmentShader.d.ts +0 -2
  322. package/map/layers/InterpolationLayer/LevelsFragmentShader.js +0 -2
  323. package/map/layers/InterpolationLayer/LevelsVertexShader.d.ts +0 -2
  324. package/map/layers/InterpolationLayer/LevelsVertexShader.js +0 -2
  325. package/map/layers/ParticlesLayer/ParticlesFragmentShader.d.ts +0 -2
  326. package/map/layers/ParticlesLayer/ParticlesFragmentShader.js +0 -2
  327. package/map/layers/ParticlesLayer/ParticlesLayer.d.ts +0 -40
  328. package/map/layers/ParticlesLayer/ParticlesLayer.js +0 -337
  329. package/map/layers/ParticlesLayer/ParticlesVertexShader.d.ts +0 -2
  330. package/map/layers/ParticlesLayer/ParticlesVertexShader.js +0 -2
  331. package/map/layers/ParticlesLayer/UVFragmentShader.d.ts +0 -2
  332. package/map/layers/ParticlesLayer/UVFragmentShader.js +0 -2
  333. package/map/layers/ParticlesLayer/UVVertexShader.d.ts +0 -2
  334. package/map/layers/ParticlesLayer/UVVertexShader.js +0 -2
  335. package/map/markers/ClusterMarker/ClusterMarker.d.ts +0 -36
  336. package/map/markers/ClusterMarker/ClusterMarker.js +0 -99
  337. package/map/markers/ClusterMarker/index.d.ts +0 -1
  338. package/map/markers/ClusterMarker/index.js +0 -1
  339. package/map/markers/RiskMarker/RiskMarker.d.ts +0 -22
  340. package/map/markers/RiskMarker/RiskMarker.js +0 -61
  341. package/modules/MainMenu/Item.d.ts +0 -42
  342. package/modules/MainMenu/Item.js +0 -94
  343. package/modules/MainMenu/MainMenu.d.ts +0 -20
  344. package/modules/MainMenu/MainMenu.js +0 -41
  345. package/modules/MainMenu/index.d.ts +0 -1
  346. package/modules/MainMenu/index.js +0 -1
  347. package/modules/Root/Content.d.ts +0 -16
  348. package/modules/Root/Content.js +0 -25
  349. package/modules/Root/Overlay.d.ts +0 -23
  350. package/modules/Root/Overlay.js +0 -33
  351. package/modules/Root/Root.d.ts +0 -7
  352. package/modules/Root/Root.js +0 -45
  353. package/modules/Root/Shader.d.ts +0 -15
  354. package/modules/Root/Shader.js +0 -24
  355. package/modules/Root/Sidebar.d.ts +0 -13
  356. package/modules/Root/Sidebar.js +0 -24
  357. package/modules/Root/stories/SampleContent.d.ts +0 -7
  358. package/modules/Root/stories/SampleContent.js +0 -44
  359. package/services/Dialog/AlertDialog.d.ts +0 -31
  360. package/services/Dialog/AlertDialog.js +0 -29
  361. package/services/Dialog/ConfirmDialog.d.ts +0 -34
  362. package/services/Dialog/ConfirmDialog.js +0 -30
  363. package/services/Dialog/Dialog.d.ts +0 -91
  364. package/services/Dialog/Dialog.js +0 -92
  365. package/services/Dialog/DialogBackground.d.ts +0 -7
  366. package/services/Dialog/DialogBackground.js +0 -12
  367. package/services/Dialog/DialogContent.d.ts +0 -25
  368. package/services/Dialog/DialogContent.js +0 -38
  369. package/services/Dialog/DialogFooter.d.ts +0 -24
  370. package/services/Dialog/DialogFooter.js +0 -50
  371. package/services/Dialog/DialogHeader.d.ts +0 -18
  372. package/services/Dialog/DialogHeader.js +0 -36
  373. package/services/Dialog/DialogWindow.d.ts +0 -13
  374. package/services/Dialog/DialogWindow.js +0 -12
  375. package/services/Dialog/XhrDialog.d.ts +0 -34
  376. package/services/Dialog/XhrDialog.js +0 -321
  377. package/services/Toast/IToastMessage.d.ts +0 -10
  378. package/services/Toast/IToastMessage.js +0 -1
  379. package/services/Toast/IToastProps.d.ts +0 -23
  380. package/services/Toast/IToastProps.js +0 -1
  381. package/services/Toast/Toast.d.ts +0 -21
  382. package/services/Toast/Toast.js +0 -79
  383. package/services/Toast/ToastContainer.d.ts +0 -40
  384. package/services/Toast/ToastContainer.js +0 -65
  385. package/services/Toast/ToastContext.d.ts +0 -22
  386. package/services/Toast/ToastContext.js +0 -7
  387. package/services/Toast/ToastProvider.d.ts +0 -19
  388. package/services/Toast/ToastProvider.js +0 -67
  389. package/services/Toast/index.d.ts +0 -2
  390. package/services/Toast/index.js +0 -2
  391. package/services/Toast/useToast.d.ts +0 -5
  392. package/services/Toast/useToast.js +0 -9
  393. package/styles/NormalTheme.d.ts +0 -3
  394. package/styles/NormalTheme.js +0 -65
  395. package/styles/StyleBase.d.ts +0 -2
  396. package/styles/StyleBase.js +0 -8
  397. package/styles/StyleReset.d.ts +0 -2
  398. package/styles/StyleReset.js +0 -8
  399. package/svg/editor/index.d.ts +0 -10
  400. package/svg/editor/index.js +0 -11
  401. package/svg/file/index.d.ts +0 -5
  402. package/svg/file/index.js +0 -6
  403. package/svg/icons/index.d.ts +0 -36
  404. package/svg/icons/index.js +0 -37
  405. package/svg/index.d.ts +0 -11
  406. package/svg/index.js +0 -5
  407. package/svg/menu/index.d.ts +0 -8
  408. package/svg/menu/index.js +0 -9
package/map/Map/Map.d.ts DELETED
@@ -1,47 +0,0 @@
1
- import * as React from 'react';
2
- import { ViewState } from 'react-map-gl';
3
- interface IProps {
4
- /** @ignore */
5
- children?: React.ReactNode;
6
- /**
7
- * Map access token.
8
- */
9
- token: string;
10
- /**
11
- * MapStudio style.
12
- */
13
- style: string;
14
- /**
15
- * Initial longitude.
16
- * @default -64.6
17
- */
18
- longitude?: number;
19
- /**
20
- * Initial latitude.
21
- * @default 44.02
22
- */
23
- latitude?: number;
24
- /**
25
- * Initial zoom.
26
- * @default 11
27
- */
28
- zoom?: number;
29
- /**
30
- * Initial pitch.
31
- * @default 0
32
- */
33
- pitch?: number;
34
- /**
35
- * Initial bearing.
36
- * @default 0
37
- */
38
- bearing?: number;
39
- /**
40
- * Is water clipped?
41
- * @default false
42
- */
43
- clipped?: boolean;
44
- }
45
- declare const useViewState: () => ViewState;
46
- declare const Map: ({ longitude, latitude, zoom, pitch, bearing, clipped, ...props }: IProps) => React.JSX.Element;
47
- export { Map, useViewState };
package/map/Map/Map.js DELETED
@@ -1,221 +0,0 @@
1
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
- return cooked;
4
- };
5
- var __assign = (this && this.__assign) || function () {
6
- __assign = Object.assign || function(t) {
7
- for (var s, i = 1, n = arguments.length; i < n; i++) {
8
- s = arguments[i];
9
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
- t[p] = s[p];
11
- }
12
- return t;
13
- };
14
- return __assign.apply(this, arguments);
15
- };
16
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
17
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
18
- return new (P || (P = Promise))(function (resolve, reject) {
19
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
20
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
21
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
22
- step((generator = generator.apply(thisArg, _arguments || [])).next());
23
- });
24
- };
25
- var __generator = (this && this.__generator) || function (thisArg, body) {
26
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
27
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
28
- function verb(n) { return function (v) { return step([n, v]); }; }
29
- function step(op) {
30
- if (f) throw new TypeError("Generator is already executing.");
31
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
32
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
33
- if (y = 0, t) op = [op[0] & 2, t.value];
34
- switch (op[0]) {
35
- case 0: case 1: t = op; break;
36
- case 4: _.label++; return { value: op[1], done: false };
37
- case 5: _.label++; y = op[1]; op = [0]; continue;
38
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
39
- default:
40
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
41
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
42
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
43
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
44
- if (t[2]) _.ops.pop();
45
- _.trys.pop(); continue;
46
- }
47
- op = body.call(thisArg, _);
48
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
49
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
50
- }
51
- };
52
- var __rest = (this && this.__rest) || function (s, e) {
53
- var t = {};
54
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
55
- t[p] = s[p];
56
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
57
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
58
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
59
- t[p[i]] = s[p[i]];
60
- }
61
- return t;
62
- };
63
- import * as React from 'react';
64
- import styled, { useTheme } from "styled-components";
65
- import { Map as GLMap, Layer, Source } from 'react-map-gl';
66
- var ViewStateContext = React.createContext(null);
67
- var useViewState = function () {
68
- return React.useContext(ViewStateContext);
69
- };
70
- /**
71
- * `Map` creates a react-mapbox-gl map instance. The map stretches to fill its
72
- * container.
73
- *
74
- * The map's current ViewState is tracked in local state, and fed into a context provider.
75
- * The ViewState can be retrieved by child components using `useViewState()`.
76
- */
77
- var MapBase = function (props) {
78
- var theme = useTheme();
79
- var _a = React.useState({
80
- longitude: props.longitude,
81
- latitude: props.latitude,
82
- zoom: props.zoom,
83
- pitch: props.pitch,
84
- bearing: props.bearing,
85
- padding: { top: 0, bottom: 0, left: 0, right: 0 }
86
- }), viewState = _a[0], setViewState = _a[1];
87
- React.useEffect(function () {
88
- // TODO: REMOVE THIS!
89
- // Clears entire Mapbox tile cache for testing of clipping strategy.
90
- // MapboxGL.clearStorage();
91
- }, []);
92
- var loadImage = function (url) {
93
- return new Promise(function (res, rej) {
94
- var img = new Image();
95
- img.crossOrigin = 'anonymous';
96
- img.src = url;
97
- img.onload = function (e) { return res(img); };
98
- img.onerror = rej;
99
- });
100
- };
101
- var get2DContext = function (width, height) {
102
- if (width === void 0) { width = 512; }
103
- if (height === void 0) { height = 512; }
104
- return Object.assign(document.createElement('canvas'), { width: width, height: height }).getContext('2d');
105
- };
106
- // https://stackoverflow.com/questions/55892083/javascript-load-image-into-offscreen-canvas-perform-webp-conversion
107
- var urlToCanvas = function (url) { return __awaiter(void 0, void 0, void 0, function () {
108
- var img, bmp, ctx;
109
- return __generator(this, function (_a) {
110
- switch (_a.label) {
111
- case 0: return [4 /*yield*/, loadImage(url)];
112
- case 1:
113
- img = _a.sent();
114
- return [4 /*yield*/, createImageBitmap(img)];
115
- case 2:
116
- bmp = _a.sent();
117
- ctx = get2DContext(512, 512);
118
- ctx.drawImage(bmp, 0, 0);
119
- return [2 /*return*/, ctx];
120
- }
121
- });
122
- }); };
123
- /**
124
- * Request clipped tile at z,x,y. The tokens are Mapbox's SKU and access
125
- * token.
126
- */
127
- var requestClippedSatellite = function (z, x, y, tokens) { return __awaiter(void 0, void 0, void 0, function () {
128
- var demUrl, imgUrl, ctx_dem, ctx_satellite, demImageData, satImageData, p, r, g, b, a, elevation, blob;
129
- return __generator(this, function (_a) {
130
- switch (_a.label) {
131
- case 0:
132
- demUrl = "https://api.mapbox.com/raster/v1/mapbox.mapbox-terrain-dem-v1/".concat(z, "/").concat(x, "/").concat(y, ".webp?").concat(tokens);
133
- imgUrl = "https://api.mapbox.com/v4/mapbox.satellite/".concat(z, "/").concat(x, "/").concat(y, "@2x.webp?").concat(tokens);
134
- return [4 /*yield*/, urlToCanvas(demUrl)];
135
- case 1:
136
- ctx_dem = _a.sent();
137
- return [4 /*yield*/, urlToCanvas(imgUrl)];
138
- case 2:
139
- ctx_satellite = _a.sent();
140
- demImageData = ctx_dem.getImageData(0, 0, 512, 512);
141
- satImageData = ctx_satellite.getImageData(0, 0, 512, 512);
142
- for (p = 0; p < 512 * 512 * 4; p += 4) {
143
- r = demImageData.data[p];
144
- g = demImageData.data[p + 1];
145
- b = demImageData.data[p + 2];
146
- a = demImageData.data[p + 3];
147
- elevation = -10000 + ((r * 256 * 256 + g * 256 + b) * 0.1);
148
- // Pixels with no elevation (i.e. water) will be transparent:
149
- if (elevation < 1) {
150
- satImageData.data[p] = 0;
151
- satImageData.data[p + 1] = 0;
152
- satImageData.data[p + 2] = 0;
153
- satImageData.data[p + 3] = 0;
154
- }
155
- }
156
- ctx_satellite.putImageData(satImageData, 0, 0);
157
- return [4 /*yield*/, new Promise(function (resolve) { return ctx_satellite.canvas.toBlob(resolve); })];
158
- case 3:
159
- blob = _a.sent();
160
- // Create reponse from blob:
161
- return [2 /*return*/, new Response(blob)];
162
- }
163
- });
164
- }); };
165
- var requestNormalSatellite = function (originalFetch, config, z, x, y, tokens) {
166
- return originalFetch("https://api.mapbox.com/v4/mapbox.satellite/".concat(z, "/").concat(x, "/").concat(y, "@2x.webp?").concat(tokens), config);
167
- };
168
- React.useEffect(function () {
169
- if (!props.clipped)
170
- return;
171
- var originalFetch = window.fetch;
172
- window.fetch = function () {
173
- var args = [];
174
- for (var _i = 0; _i < arguments.length; _i++) {
175
- args[_i] = arguments[_i];
176
- }
177
- return __awaiter(void 0, void 0, void 0, function () {
178
- var resource, config, url, regexp, m;
179
- return __generator(this, function (_a) {
180
- resource = args[0];
181
- config = args[1];
182
- url = resource.url;
183
- if (!url)
184
- return [2 /*return*/, originalFetch(resource, config)];
185
- regexp = /https:\/\/api\.mapbox\.com\/v4\/mapbox\.satellite\/(\d+)\/(\d+)\/(\d+)@2x.webp\?(.*)/;
186
- m = url.match(regexp);
187
- if (m) {
188
- return [2 /*return*/, requestNormalSatellite(originalFetch, config, m[1], m[2], m[3], m[4])];
189
- }
190
- // Is this a clipped satellite layer request? This is the one that looks like
191
- // a DEM request (to fool Mapbox's internal cache), but will result in
192
- // both a DEM and a satellite request.
193
- regexp = /https:\/\/api\.mapbox\.com\/raster\/v1\/mapbox\.mapbox\-terrain\-dem\-v1\/(\d+)\/(\d+)\/(\d+).webp\?(.*)/;
194
- m = url.match(regexp);
195
- if (m) {
196
- return [2 /*return*/, requestClippedSatellite(m[1], m[2], m[3], m[4])];
197
- }
198
- return [2 /*return*/, originalFetch(resource, config)];
199
- });
200
- });
201
- };
202
- }, []);
203
- var handleMove = function (e) {
204
- setViewState(e.viewState);
205
- };
206
- return (React.createElement(GLMap, __assign({}, viewState, { mapboxAccessToken: props.token, style: { width: '100%', height: '100%', minHeight: '300px', font: theme.font.bodyMedium }, logoPosition: "top-right", mapStyle: props.style, minZoom: 1, maxZoom: 20, doubleClickZoom: true, onMove: handleMove }),
207
- props.clipped && React.createElement(React.Fragment, null,
208
- React.createElement(Source, { type: "raster", tiles: ["https://api.mapbox.com/raster/v1/mapbox.mapbox-terrain-dem-v1/{z}/{x}/{y}.webp?access_token=".concat(props.token)] },
209
- React.createElement(Layer, { id: "overlay", type: "raster" })),
210
- React.createElement(Source, { type: "raster", tiles: ["https://api.mapbox.com/v4/mapbox.satellite/{z}/{x}/{y}@2x.webp?access_token=".concat(props.token)] },
211
- React.createElement(Layer, { beforeId: "overlay", type: "raster" }))),
212
- React.createElement(ViewStateContext.Provider, { value: __assign({}, viewState) },
213
- React.createElement(Controls, null, props.children))));
214
- };
215
- var Controls = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n & > * {\n pointer-events: all;\n }\n\n ", ";\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n & > * {\n pointer-events: all;\n }\n\n ", ";\n"])), function (p) { return p.theme.font.bodyMedium; });
216
- var Map = function (_a) {
217
- var _b = _a.longitude, longitude = _b === void 0 ? -64.6 : _b, _c = _a.latitude, latitude = _c === void 0 ? 44.02 : _c, _d = _a.zoom, zoom = _d === void 0 ? 11 : _d, _e = _a.pitch, pitch = _e === void 0 ? 0 : _e, _f = _a.bearing, bearing = _f === void 0 ? 0 : _f, _g = _a.clipped, clipped = _g === void 0 ? false : _g, props = __rest(_a, ["longitude", "latitude", "zoom", "pitch", "bearing", "clipped"]);
218
- return React.createElement(MapBase, __assign({ longitude: longitude, latitude: latitude, zoom: zoom, pitch: pitch, bearing: bearing, clipped: clipped }, props));
219
- };
220
- export { Map, useViewState };
221
- var templateObject_1;
@@ -1 +0,0 @@
1
- export * from './Map';
package/map/Map/index.js DELETED
@@ -1 +0,0 @@
1
- export * from './Map';
@@ -1,14 +0,0 @@
1
- import * as React from 'react';
2
- interface IPosition {
3
- lng: number;
4
- lat: number;
5
- zoom: number;
6
- }
7
- interface IProps {
8
- coord: IPosition;
9
- onMove: (x: number, y: number) => void;
10
- onDelete: () => void;
11
- onFocus: () => void;
12
- }
13
- declare const PositionBox: (props: IProps) => React.JSX.Element;
14
- export { PositionBox, IPosition };
@@ -1,86 +0,0 @@
1
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
- return cooked;
4
- };
5
- import * as React from 'react';
6
- import styled from 'styled-components';
7
- import { useToast } from '../../services/Toast';
8
- import { Dockable } from '../../containers/Dock';
9
- import { SVG } from '../../svg';
10
- import { TertiaryButton } from '../../controls/TertiaryButton';
11
- import { Latitude, Longitude } from '../../formatters/GIS';
12
- import { GlassPane } from '../../containers/GlassPane';
13
- var PositionBox = function (props) {
14
- var toaster = useToast();
15
- var wrapperRef = React.useRef(null);
16
- var dragOffset = React.useRef(null);
17
- var _a = React.useState(false), dragging = _a[0], setDragging = _a[1];
18
- React.useEffect(function () {
19
- document.addEventListener('mousemove', handleMouseMove);
20
- document.addEventListener('mouseup', handleMouseUp);
21
- return function () {
22
- document.removeEventListener('mousemove', handleMouseMove);
23
- document.removeEventListener('mouseup', handleMouseUp);
24
- };
25
- });
26
- var handleMouseMove = function (ev) {
27
- if (dragging)
28
- props.onMove(ev.clientX - dragOffset.current[0], ev.clientY - dragOffset.current[1]);
29
- };
30
- var handleMouseUp = function () {
31
- setDragging(false);
32
- };
33
- var handleStartDrag = function (ev) {
34
- var x = wrapperRef.current.parentElement.offsetLeft;
35
- var y = wrapperRef.current.parentElement.offsetTop;
36
- dragOffset.current = [ev.clientX - x - 9, ev.clientY - y - 38];
37
- setDragging(true);
38
- };
39
- var setClipboard = function (text) {
40
- var _a;
41
- var type = "text/plain";
42
- var blob = new Blob([text], { type: type });
43
- var data = [new ClipboardItem((_a = {}, _a[type] = blob, _a))];
44
- navigator.clipboard.write(data);
45
- };
46
- var handleCopy = function () {
47
- if (window.isSecureContext) {
48
- setClipboard("".concat(props.coord.lng, ", ").concat(props.coord.lat));
49
- toaster.toast("Coordinates copied to clipboard.", {});
50
- }
51
- else {
52
- console.error("Could not write to clipboard: context not secure.");
53
- }
54
- };
55
- return (React.createElement(Dockable, { latitude: props.coord.lat, longitude: props.coord.lng, offsetX: -9, offsetY: -38 },
56
- React.createElement(Wrapper, { ref: wrapperRef },
57
- React.createElement(Icon, { onClick: props.onDelete },
58
- React.createElement(Target, null,
59
- React.createElement("use", { xlinkHref: SVG.Icons.Circle })),
60
- React.createElement(Delete, null,
61
- React.createElement("use", { xlinkHref: SVG.Icons.Cross }))),
62
- React.createElement(GlassPane, { bordered: true },
63
- React.createElement(Content, null,
64
- React.createElement(Buttons, null,
65
- React.createElement(TertiaryButton, { onClick: props.onFocus }, "FOCUS")),
66
- React.createElement(Coords, null,
67
- React.createElement(Coord, null,
68
- React.createElement(Latitude, { value: props.coord.lat })),
69
- React.createElement(Coord, null,
70
- React.createElement(Longitude, { value: props.coord.lng }))),
71
- React.createElement(Copy, { onClick: handleCopy },
72
- React.createElement("use", { xlinkHref: SVG.Icons.Copy })),
73
- React.createElement(Handle, { onMouseDown: handleStartDrag }))))));
74
- };
75
- var Target = styled.svg(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n fill: ", ";\n"], ["\n width: 100%;\n height: 100%;\n fill: ", ";\n"])), function (p) { return p.theme.colors.neutral[100]; });
76
- var Delete = styled.svg(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n fill: ", ";\n"], ["\n width: 100%;\n height: 100%;\n fill: ", ";\n"])), function (p) { return p.theme.colors.negative; });
77
- var Icon = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n left: 0;\n top: 28px;\n width: 20px;\n height: 20px;\n cursor: pointer;\n pointer-events: all;\n ", " { display: none };\n &:hover {\n ", " { display: none; }\n ", " { display: block; }\n }\n // If control is offscreen, then only \"Delete\" is shown.\n .offscreen & {\n ", " { display: none; }\n ", " { display: block; }\n }\n"], ["\n position: absolute;\n left: 0;\n top: 28px;\n width: 20px;\n height: 20px;\n cursor: pointer;\n pointer-events: all;\n ", " { display: none };\n &:hover {\n ", " { display: none; }\n ", " { display: block; }\n }\n // If control is offscreen, then only \"Delete\" is shown.\n .offscreen & {\n ", " { display: none; }\n ", " { display: block; }\n }\n"])), Delete, Target, Delete, Target, Delete);
78
- var Copy = styled.svg(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n position: absolute;\n top: 26px;\n right: 40px;\n width: 20px;\n height: 20px;\n padding: 4px;\n border-radius: 4px;\n fill: ", ";\n pointer-events: all;\n cursor: pointer;\n &:hover {\n background-color: ", ";\n }\n"], ["\n position: absolute;\n top: 26px;\n right: 40px;\n width: 20px;\n height: 20px;\n padding: 4px;\n border-radius: 4px;\n fill: ", ";\n pointer-events: all;\n cursor: pointer;\n &:hover {\n background-color: ", ";\n }\n"])), function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.theme.colors.primary[1]; });
79
- var Handle = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n position: absolute;\n right: 1px;\n top: 1px;\n bottom: 1px;\n width: 30px;\n background-color: ", ";\n pointer-events: all;\n border-top-right-radius: ", "px;\n border-bottom-right-radius: ", "px;\n cursor: pointer;\n &:after {\n content: '';\n position: absolute;\n background-image: radial-gradient(circle at center, ", " 1px, transparent 1px, transparent 4px);\n background-size: 6px 6px;\n top: 15px;\n left: 6px;\n right: 6px;\n bottom: 15px;\n }\n .offscreen & { \n display: none;\n }\n"], ["\n position: absolute;\n right: 1px;\n top: 1px;\n bottom: 1px;\n width: 30px;\n background-color: ", ";\n pointer-events: all;\n border-top-right-radius: ", "px;\n border-bottom-right-radius: ", "px;\n cursor: pointer;\n &:after {\n content: '';\n position: absolute;\n background-image: radial-gradient(circle at center, ", " 1px, transparent 1px, transparent 4px);\n background-size: 6px 6px;\n top: 15px;\n left: 6px;\n right: 6px;\n bottom: 15px;\n }\n .offscreen & { \n display: none;\n }\n"])), function (p) { return p.theme.colors.neutral[10]; }, function (p) { return p.theme.radius.normal; }, function (p) { return p.theme.radius.normal; }, function (p) { return p.theme.colors.neutral[80]; });
80
- var Buttons = styled.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n width: 120px;\n display: none;\n .offscreen & {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items:start;\n }\n"], ["\n width: 120px;\n display: none;\n .offscreen & {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items:start;\n }\n"])));
81
- var Coord = styled.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n height: 12px;\n font: ", ";\n display: flex;\n flex-direction: row;\n justify-content: start;\n align-items: center;\n margin-top: 2px;\n"], ["\n height: 12px;\n font: ", ";\n display: flex;\n flex-direction: row;\n justify-content: start;\n align-items: center;\n margin-top: 2px;\n"])), function (p) { return p.theme.font.dataSmall; });
82
- var Coords = styled.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: end; \n gap: 12px;\n justify-content: center;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: end; \n gap: 12px;\n justify-content: center;\n"])));
83
- var Content = styled.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n position: relative;\n width: 100%;\n height: 100%;\n padding: 16px 16px;\n box-sizing: border-box;\n display: flex;\n flex-direction: row;\n align-items: stretch;\n"], ["\n position: relative;\n width: 100%;\n height: 100%;\n padding: 16px 16px;\n box-sizing: border-box;\n display: flex;\n flex-direction: row;\n align-items: stretch;\n"])));
84
- var Wrapper = styled.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n position: relative;\n background-color: transparent;\n width: 200px;\n .offscreen & {\n width: 320px;\n }\n height: 78px;\n padding-left: 28px;\n user-select: none;\n outline: none;\n"], ["\n position: relative;\n background-color: transparent;\n width: 200px;\n .offscreen & {\n width: 320px;\n }\n height: 78px;\n padding-left: 28px;\n user-select: none;\n outline: none;\n"])));
85
- export { PositionBox };
86
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10;
@@ -1,27 +0,0 @@
1
- import * as React from 'react';
2
- interface IProps {
3
- /**
4
- * Maximum number of positions that may be saved
5
- * @default 3
6
- */
7
- maxPositions?: number;
8
- /**
9
- * Is the data persisted across sessions (`local`) or only for the duration
10
- * of a `session`?
11
- * @default local
12
- */
13
- storage?: 'local' | 'session';
14
- }
15
- /**
16
- * A `PositionManager` must be placed inside a `Map`. It registers a right-click
17
- * event that will add the current coordinates to a list, and pins them on the map.
18
- *
19
- * Positions are saved in browser local storage or session storage (defaults to local).
20
- *
21
- * It is recommended that the `PositionManager` be placed inside a `Dock`.
22
- *
23
- * Each position offers a button to copy coordinates to clipboard. This generates
24
- * a `Toast`, for which a `ToastProvider` and `ToastContainer` must be present.
25
- */
26
- declare const PositionsManager: ({ maxPositions, storage, ...props }: IProps) => React.JSX.Element;
27
- export { PositionsManager };
@@ -1,99 +0,0 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
13
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
14
- if (ar || !(i in from)) {
15
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
16
- ar[i] = from[i];
17
- }
18
- }
19
- return to.concat(ar || Array.prototype.slice.call(from));
20
- };
21
- import * as React from 'react';
22
- import { useMap } from 'react-map-gl';
23
- import { PositionBox } from './PositionBox';
24
- // Storage key for saving and restoring positions.
25
- var STORAGE_KEY = 'positions';
26
- /**
27
- * A `PositionManager` must be placed inside a `Map`. It registers a right-click
28
- * event that will add the current coordinates to a list, and pins them on the map.
29
- *
30
- * Positions are saved in browser local storage or session storage (defaults to local).
31
- *
32
- * It is recommended that the `PositionManager` be placed inside a `Dock`.
33
- *
34
- * Each position offers a button to copy coordinates to clipboard. This generates
35
- * a `Toast`, for which a `ToastProvider` and `ToastContainer` must be present.
36
- */
37
- var PositionsManager = function (_a) {
38
- var _b = _a.maxPositions, maxPositions = _b === void 0 ? 3 : _b, _c = _a.storage, storage = _c === void 0 ? 'local' : _c, props = __rest(_a, ["maxPositions", "storage"]);
39
- var map = useMap();
40
- var store = storage == 'session' ? sessionStorage : localStorage;
41
- // Retrieve positions from storage. Returns [] if no data in store.
42
- var loadPositionsFromStorage = function () {
43
- var json = store.getItem(STORAGE_KEY);
44
- if (json == null)
45
- return [];
46
- return JSON.parse(json);
47
- };
48
- // Save positions to store.
49
- var savePositionsToStorage = function (positions) {
50
- store.setItem(STORAGE_KEY, JSON.stringify(positions));
51
- };
52
- // Positions are restored from storage, if any were saved.
53
- var _d = React.useState(loadPositionsFromStorage()), positions = _d[0], setPositions = _d[1];
54
- var handleRegisterCoordinate = function (ev) {
55
- // Add click coordinates to positions list.
56
- setPositions(function (positions) {
57
- // Allow no more than 3 saved positions.
58
- if (positions.length >= maxPositions)
59
- return positions;
60
- // Add new position to positions list.
61
- var position = { lng: ev.lngLat.lng, lat: ev.lngLat.lat, zoom: map.current.getZoom() };
62
- var newPositions = __spreadArray([position], positions, true);
63
- // Store new positions list in store.
64
- savePositionsToStorage(newPositions);
65
- return newPositions;
66
- });
67
- };
68
- // Add a context menu (right-click) handler to the map, and removes
69
- // it on unmount.
70
- React.useEffect(function () {
71
- map.current.on('contextmenu', handleRegisterCoordinate);
72
- return function () { map.current.off('contextmenu', handleRegisterCoordinate); };
73
- }, []);
74
- var handleMovePosition = function (idx, x, y) {
75
- var _a = map.current.unproject([x, y]), lng = _a.lng, lat = _a.lat;
76
- var position = { lng: lng, lat: lat, zoom: map.current.getZoom() };
77
- var head = positions.slice(0, idx);
78
- var tail = positions.slice(idx + 1);
79
- var newPositions = __spreadArray(__spreadArray(__spreadArray([], head, true), [position], false), tail, true);
80
- setPositions(newPositions);
81
- savePositionsToStorage(positions);
82
- };
83
- var handleDeletePosition = function (idx) {
84
- positions.splice(idx, 1);
85
- setPositions(__spreadArray([], positions, true));
86
- savePositionsToStorage(positions);
87
- };
88
- var handleFocus = function (idx) {
89
- var position = positions[idx];
90
- map.current.easeTo({
91
- center: [position.lng, position.lat],
92
- zoom: position.zoom
93
- });
94
- };
95
- return (React.createElement(React.Fragment, null, positions.reverse().map(function (position, idx) {
96
- return React.createElement(PositionBox, { key: idx, coord: position, onMove: function (x, y) { return handleMovePosition(idx, x, y); }, onDelete: function () { return handleDeletePosition(idx); }, onFocus: function () { return handleFocus(idx); } });
97
- })));
98
- };
99
- export { PositionsManager };
@@ -1,33 +0,0 @@
1
- import * as React from 'react';
2
- import { IMapButtonProps } from '../base/MapButton';
3
- interface IProps {
4
- /**
5
- * Should pitch be visualized why tilting the arrow along the z-axis,
6
- * i.e. away from the viewer?
7
- */
8
- visualizePitch?: boolean;
9
- /**
10
- * Should the tip of the compass arrow be highlighted in a different color?
11
- * This value can either be true for a default red, or a custom color value.
12
- */
13
- contrastTip?: boolean | string;
14
- }
15
- /**
16
- * The `CompassButton` shows a bearing arrow which points to the north.
17
- * It optionally tilts the arrow to reflect the current pitch.
18
- *
19
- * The current map ViewState must be passed to this control, which is done
20
- * automatically when the control is hosted inside a `Map` instance. The ViewState
21
- * is then passed down through a context and can be accessed using `useViewState`.
22
- *
23
- * A default _hint_ is provided, but can be overridden using `hint`. The hint can
24
- * be removed entirely by setting `hint={null}`.
25
- *
26
- * ```tsx
27
- * <CompassButton
28
- * x={40} y={50} visualizePitch contrastTip
29
- * />
30
- * ```
31
- */
32
- declare const CompassButton: ({ hint, ...props }: IMapButtonProps & IProps) => React.JSX.Element;
33
- export { CompassButton, IProps };
@@ -1,88 +0,0 @@
1
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
- return cooked;
4
- };
5
- var __assign = (this && this.__assign) || function () {
6
- __assign = Object.assign || function(t) {
7
- for (var s, i = 1, n = arguments.length; i < n; i++) {
8
- s = arguments[i];
9
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
- t[p] = s[p];
11
- }
12
- return t;
13
- };
14
- return __assign.apply(this, arguments);
15
- };
16
- var __rest = (this && this.__rest) || function (s, e) {
17
- var t = {};
18
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
19
- t[p] = s[p];
20
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
21
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
22
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
23
- t[p[i]] = s[p[i]];
24
- }
25
- return t;
26
- };
27
- import * as React from 'react';
28
- import { useMap } from 'react-map-gl';
29
- import styled, { css } from 'styled-components';
30
- import { MapButton } from '../base/MapButton';
31
- import { useViewState } from '../../Map';
32
- import { Mouse } from '../../../controls/Mouse';
33
- import { Key } from '../../../controls/Key';
34
- var CompassButtonBase = function (p) {
35
- var viewState = useViewState();
36
- var map = useMap().current;
37
- return (React.createElement(MapButton, __assign({ onClick: function () { map.rotateTo(0); map.resetNorthPitch(); } }, p),
38
- React.createElement("div", { style: { transform: "rotateX(".concat(p.visualizePitch ? viewState.pitch : 0, "deg)") } },
39
- React.createElement("svg", { style: { transform: "rotateZ(".concat(-viewState.bearing, "deg)") }, xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", viewBox: "0 0 1000 1000" },
40
- React.createElement("polygon", { className: "tip", points: "100,1000 500,0 900,1000 500,700 " }),
41
- React.createElement("polygon", { className: "arrow", points: "500,0 423,192.6 500,351.6 577,192.6 " })))));
42
- };
43
- var CompassButtonStyled = styled(CompassButtonBase)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n /* Add custom tip color if specified. */\n ", "\n"], ["\n /* Add custom tip color if specified. */\n ", "\n"
44
- /**
45
- * The `CompassButton` shows a bearing arrow which points to the north.
46
- * It optionally tilts the arrow to reflect the current pitch.
47
- *
48
- * The current map ViewState must be passed to this control, which is done
49
- * automatically when the control is hosted inside a `Map` instance. The ViewState
50
- * is then passed down through a context and can be accessed using `useViewState`.
51
- *
52
- * A default _hint_ is provided, but can be overridden using `hint`. The hint can
53
- * be removed entirely by setting `hint={null}`.
54
- *
55
- * ```tsx
56
- * <CompassButton
57
- * x={40} y={50} visualizePitch contrastTip
58
- * />
59
- * ```
60
- */
61
- ])), function (p) { return p.contrastTip && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n svg polygon.arrow {\n fill: ", ";\n }"], ["\n svg polygon.arrow {\n fill: ", ";\n }"])), typeof p.contrastTip === "string" ? p.contrastTip : "red"); });
62
- /**
63
- * The `CompassButton` shows a bearing arrow which points to the north.
64
- * It optionally tilts the arrow to reflect the current pitch.
65
- *
66
- * The current map ViewState must be passed to this control, which is done
67
- * automatically when the control is hosted inside a `Map` instance. The ViewState
68
- * is then passed down through a context and can be accessed using `useViewState`.
69
- *
70
- * A default _hint_ is provided, but can be overridden using `hint`. The hint can
71
- * be removed entirely by setting `hint={null}`.
72
- *
73
- * ```tsx
74
- * <CompassButton
75
- * x={40} y={50} visualizePitch contrastTip
76
- * />
77
- * ```
78
- */
79
- var CompassButton = function (_a) {
80
- var _b = _a.hint, hint = _b === void 0 ? React.createElement(React.Fragment, null,
81
- React.createElement(Key, { value: "Ctrl" }),
82
- " + ",
83
- React.createElement(Mouse, { size: 16, left: true }),
84
- " Adjust pitch/bearing") : _b, props = __rest(_a, ["hint"]);
85
- return React.createElement(CompassButtonStyled, __assign({ hint: hint }, props));
86
- };
87
- export { CompassButton };
88
- var templateObject_1, templateObject_2;
@@ -1,21 +0,0 @@
1
- import * as React from 'react';
2
- import { IMapButtonProps } from '../base/MapButton';
3
- interface IProps {
4
- /**
5
- * (Optional) Container that should be made fullscreen. If omitted, this
6
- * will be the map's direct container.
7
- */
8
- container?: HTMLDivElement;
9
- }
10
- /**
11
- * The `FullscreenButton` toggles the map full-screen when clicked.
12
- *
13
- * A default _hint_ is provided, but can be overridden using `hint`. The hint can
14
- * be removed entirely by setting `hint={null}`.
15
- *
16
- * ```tsx
17
- * <FullscreenButton x={40} y={50}/>
18
- * ```
19
- */
20
- declare const FullscreenButton: ({ hint, ...props }: IMapButtonProps & IProps) => React.JSX.Element;
21
- export { FullscreenButton, IProps };