@longline/aqua-ui 1.0.0

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 (410) hide show
  1. package/README.md +7 -0
  2. package/Types.d.ts +6 -0
  3. package/Types.js +5 -0
  4. package/containers/Anchor/Anchor.d.ts +63 -0
  5. package/containers/Anchor/Anchor.js +113 -0
  6. package/containers/Anchor/index.d.ts +1 -0
  7. package/containers/Anchor/index.js +1 -0
  8. package/containers/Dock/Dock.d.ts +45 -0
  9. package/containers/Dock/Dock.js +61 -0
  10. package/containers/Dock/Dockable.d.ts +60 -0
  11. package/containers/Dock/Dockable.js +98 -0
  12. package/containers/Dock/index.d.ts +2 -0
  13. package/containers/Dock/index.js +2 -0
  14. package/containers/Form/Field.d.ts +104 -0
  15. package/containers/Form/Field.js +168 -0
  16. package/containers/Form/Form.d.ts +51 -0
  17. package/containers/Form/Form.js +89 -0
  18. package/containers/Form/Validation.d.ts +212 -0
  19. package/containers/Form/Validation.js +232 -0
  20. package/containers/Form/context/FormContext.d.ts +10 -0
  21. package/containers/Form/context/FormContext.js +3 -0
  22. package/containers/Form/context/useForm.d.ts +5 -0
  23. package/containers/Form/context/useForm.js +9 -0
  24. package/containers/Form/elements/BoxWrapper.d.ts +15 -0
  25. package/containers/Form/elements/BoxWrapper.js +35 -0
  26. package/containers/Form/elements/Hint.d.ts +21 -0
  27. package/containers/Form/elements/Hint.js +15 -0
  28. package/containers/Form/elements/Label.d.ts +22 -0
  29. package/containers/Form/elements/Label.js +15 -0
  30. package/containers/Form/elements/SimpleWrapper.d.ts +15 -0
  31. package/containers/Form/elements/SimpleWrapper.js +17 -0
  32. package/containers/GlassPane/GlassPane.d.ts +36 -0
  33. package/containers/GlassPane/GlassPane.js +66 -0
  34. package/containers/GlassPane/index.d.ts +1 -0
  35. package/containers/GlassPane/index.js +1 -0
  36. package/containers/InfoBox/InfoBox.d.ts +34 -0
  37. package/containers/InfoBox/InfoBox.js +45 -0
  38. package/containers/InfoBox/elements/Content.d.ts +23 -0
  39. package/containers/InfoBox/elements/Content.js +37 -0
  40. package/containers/InfoBox/elements/Footer.d.ts +9 -0
  41. package/containers/InfoBox/elements/Footer.js +24 -0
  42. package/containers/InfoBox/elements/Header.d.ts +9 -0
  43. package/containers/InfoBox/elements/Header.js +24 -0
  44. package/containers/List/List.d.ts +45 -0
  45. package/containers/List/List.js +47 -0
  46. package/containers/List/ListCell.d.ts +13 -0
  47. package/containers/List/ListCell.js +24 -0
  48. package/containers/List/ListRow.d.ts +15 -0
  49. package/containers/List/ListRow.js +24 -0
  50. package/containers/List/index.d.ts +3 -0
  51. package/containers/List/index.js +3 -0
  52. package/containers/Tabs/Pane.d.ts +29 -0
  53. package/containers/Tabs/Pane.js +45 -0
  54. package/containers/Tabs/Tabs.d.ts +66 -0
  55. package/containers/Tabs/Tabs.js +144 -0
  56. package/controls/Chip/Chip.d.ts +35 -0
  57. package/controls/Chip/Chip.js +83 -0
  58. package/controls/Fab/Fab.d.ts +73 -0
  59. package/controls/Fab/Fab.js +94 -0
  60. package/controls/Icon/Icon.d.ts +98 -0
  61. package/controls/Icon/Icon.js +79 -0
  62. package/controls/Icon/index.d.ts +1 -0
  63. package/controls/Icon/index.js +1 -0
  64. package/controls/Key/Key.d.ts +22 -0
  65. package/controls/Key/Key.js +74 -0
  66. package/controls/Key/index.d.ts +1 -0
  67. package/controls/Key/index.js +1 -0
  68. package/controls/LinearChart/LinearChart.d.ts +31 -0
  69. package/controls/LinearChart/LinearChart.js +58 -0
  70. package/controls/ListView/Body.d.ts +8 -0
  71. package/controls/ListView/Body.js +24 -0
  72. package/controls/ListView/Column.d.ts +55 -0
  73. package/controls/ListView/Column.js +8 -0
  74. package/controls/ListView/ColumnsManager/ColumnDraggable.d.ts +11 -0
  75. package/controls/ListView/ColumnsManager/ColumnDraggable.js +83 -0
  76. package/controls/ListView/ColumnsManager/ColumnsManager.d.ts +12 -0
  77. package/controls/ListView/ColumnsManager/ColumnsManager.js +63 -0
  78. package/controls/ListView/ColumnsManager/OrderColumns.d.ts +11 -0
  79. package/controls/ListView/ColumnsManager/OrderColumns.js +62 -0
  80. package/controls/ListView/ColumnsManager/SourceColumns.d.ts +10 -0
  81. package/controls/ListView/ColumnsManager/SourceColumns.js +45 -0
  82. package/controls/ListView/Ghost.d.ts +9 -0
  83. package/controls/ListView/Ghost.js +52 -0
  84. package/controls/ListView/Header.d.ts +12 -0
  85. package/controls/ListView/Header.js +35 -0
  86. package/controls/ListView/HeaderButton.d.ts +8 -0
  87. package/controls/ListView/HeaderButton.js +8 -0
  88. package/controls/ListView/HeaderCell.d.ts +20 -0
  89. package/controls/ListView/HeaderCell.js +47 -0
  90. package/controls/ListView/IListViewProps.d.ts +105 -0
  91. package/controls/ListView/IListViewProps.js +1 -0
  92. package/controls/ListView/ListView.d.ts +20 -0
  93. package/controls/ListView/ListView.js +97 -0
  94. package/controls/ListView/NoData.d.ts +19 -0
  95. package/controls/ListView/NoData.js +30 -0
  96. package/controls/ListView/SortButton.d.ts +16 -0
  97. package/controls/ListView/SortButton.js +26 -0
  98. package/controls/ListView/Table.d.ts +18 -0
  99. package/controls/ListView/Table.js +99 -0
  100. package/controls/ListView/Total.d.ts +9 -0
  101. package/controls/ListView/Total.js +28 -0
  102. package/controls/ListView/sortItems.d.ts +6 -0
  103. package/controls/ListView/sortItems.js +35 -0
  104. package/controls/Mouse/Mouse.d.ts +38 -0
  105. package/controls/Mouse/Mouse.js +51 -0
  106. package/controls/Mouse/index.d.ts +1 -0
  107. package/controls/Mouse/index.js +1 -0
  108. package/controls/PrimaryButton/PrimaryButton.d.ts +63 -0
  109. package/controls/PrimaryButton/PrimaryButton.js +83 -0
  110. package/controls/PrimaryButton/index.d.ts +1 -0
  111. package/controls/PrimaryButton/index.js +1 -0
  112. package/controls/Progress/Progress.d.ts +35 -0
  113. package/controls/Progress/Progress.js +49 -0
  114. package/controls/SecondaryButton/SecondaryButton.d.ts +58 -0
  115. package/controls/SecondaryButton/SecondaryButton.js +73 -0
  116. package/controls/SecondaryButton/index.d.ts +1 -0
  117. package/controls/SecondaryButton/index.js +1 -0
  118. package/controls/TabBar/Tab.d.ts +21 -0
  119. package/controls/TabBar/Tab.js +25 -0
  120. package/controls/TabBar/TabBar.d.ts +34 -0
  121. package/controls/TabBar/TabBar.js +134 -0
  122. package/controls/TabBar/Underliner.d.ts +7 -0
  123. package/controls/TabBar/Underliner.js +27 -0
  124. package/controls/TabBar/index.d.ts +1 -0
  125. package/controls/TabBar/index.js +1 -0
  126. package/controls/TertiaryButton/TertiaryButton.d.ts +28 -0
  127. package/controls/TertiaryButton/TertiaryButton.js +65 -0
  128. package/controls/TertiaryButton/index.d.ts +1 -0
  129. package/controls/TertiaryButton/index.js +1 -0
  130. package/controls/View/View.d.ts +35 -0
  131. package/controls/View/View.js +58 -0
  132. package/formatters/Date/DateTime.d.ts +45 -0
  133. package/formatters/Date/DateTime.js +64 -0
  134. package/formatters/Date/elements/Custom.d.ts +18 -0
  135. package/formatters/Date/elements/Custom.js +22 -0
  136. package/formatters/Date/elements/Distance.d.ts +24 -0
  137. package/formatters/Date/elements/Distance.js +45 -0
  138. package/formatters/Date/elements/LongDate.d.ts +17 -0
  139. package/formatters/Date/elements/LongDate.js +11 -0
  140. package/formatters/Date/elements/LongDateTime.d.ts +14 -0
  141. package/formatters/Date/elements/LongDateTime.js +10 -0
  142. package/formatters/Date/elements/LongTime.d.ts +14 -0
  143. package/formatters/Date/elements/LongTime.js +10 -0
  144. package/formatters/Date/elements/ShortDate.d.ts +14 -0
  145. package/formatters/Date/elements/ShortDate.js +10 -0
  146. package/formatters/Date/elements/ShortDateTime.d.ts +14 -0
  147. package/formatters/Date/elements/ShortDateTime.js +10 -0
  148. package/formatters/Date/elements/ShortTime.d.ts +18 -0
  149. package/formatters/Date/elements/ShortTime.js +10 -0
  150. package/formatters/Date/elements/toDate.d.ts +2 -0
  151. package/formatters/Date/elements/toDate.js +13 -0
  152. package/formatters/Filesize/Filesize.d.ts +29 -0
  153. package/formatters/Filesize/Filesize.js +54 -0
  154. package/formatters/GIS/Latitude.d.ts +23 -0
  155. package/formatters/GIS/Latitude.js +13 -0
  156. package/formatters/GIS/Longitude.d.ts +23 -0
  157. package/formatters/GIS/Longitude.js +13 -0
  158. package/formatters/GIS/index.d.ts +2 -0
  159. package/formatters/GIS/index.js +2 -0
  160. package/formatters/GIS/toDMS.d.ts +2 -0
  161. package/formatters/GIS/toDMS.js +16 -0
  162. package/formatters/Highlight/Highlight.d.ts +22 -0
  163. package/formatters/Highlight/Highlight.js +32 -0
  164. package/formatters/Highlight/index.d.ts +1 -0
  165. package/formatters/Highlight/index.js +1 -0
  166. package/formatters/Human/Human.d.ts +18 -0
  167. package/formatters/Human/Human.js +34 -0
  168. package/formatters/Human/index.d.ts +1 -0
  169. package/formatters/Human/index.js +1 -0
  170. package/formatters/Number/Number.d.ts +24 -0
  171. package/formatters/Number/Number.js +36 -0
  172. package/formatters/Number/index.d.ts +1 -0
  173. package/formatters/Number/index.js +1 -0
  174. package/helper/DMS.d.ts +22 -0
  175. package/helper/DMS.js +46 -0
  176. package/helper/HslColor.d.ts +11 -0
  177. package/helper/HslColor.js +47 -0
  178. package/helper/RgbColor.d.ts +43 -0
  179. package/helper/RgbColor.js +162 -0
  180. package/helper/SizeHelper.d.ts +10 -0
  181. package/helper/SizeHelper.js +56 -0
  182. package/helper/darken.d.ts +8 -0
  183. package/helper/darken.js +18 -0
  184. package/helper/guard.d.ts +5 -0
  185. package/helper/guard.js +7 -0
  186. package/helper/lighten.d.ts +8 -0
  187. package/helper/lighten.js +11 -0
  188. package/helper/nameToHex.d.ts +6 -0
  189. package/helper/nameToHex.js +163 -0
  190. package/inputs/DateInput/Body.d.ts +34 -0
  191. package/inputs/DateInput/Body.js +50 -0
  192. package/inputs/DateInput/Calendar.d.ts +15 -0
  193. package/inputs/DateInput/Calendar.js +60 -0
  194. package/inputs/DateInput/DateInput.d.ts +73 -0
  195. package/inputs/DateInput/DateInput.js +143 -0
  196. package/inputs/DateInput/Day.d.ts +32 -0
  197. package/inputs/DateInput/Day.js +33 -0
  198. package/inputs/DateInput/InfiniteList.d.ts +26 -0
  199. package/inputs/DateInput/InfiniteList.js +87 -0
  200. package/inputs/DateInput/Nav.d.ts +11 -0
  201. package/inputs/DateInput/Nav.js +24 -0
  202. package/inputs/DateInput/Navbar.d.ts +16 -0
  203. package/inputs/DateInput/Navbar.js +33 -0
  204. package/inputs/DateInput/NumericInput.d.ts +14 -0
  205. package/inputs/DateInput/NumericInput.js +48 -0
  206. package/inputs/DateInput/Selector.d.ts +47 -0
  207. package/inputs/DateInput/Selector.js +55 -0
  208. package/inputs/DateInput/SimpleList.d.ts +19 -0
  209. package/inputs/DateInput/SimpleList.js +31 -0
  210. package/inputs/Dropdown/Body.d.ts +25 -0
  211. package/inputs/Dropdown/Body.js +14 -0
  212. package/inputs/Dropdown/Column.d.ts +21 -0
  213. package/inputs/Dropdown/Column.js +6 -0
  214. package/inputs/Dropdown/Dropdown.d.ts +136 -0
  215. package/inputs/Dropdown/Dropdown.js +446 -0
  216. package/inputs/Dropdown/Selection.d.ts +11 -0
  217. package/inputs/Dropdown/Selection.js +23 -0
  218. package/inputs/Dropdown/Selector.d.ts +29 -0
  219. package/inputs/Dropdown/Selector.js +16 -0
  220. package/inputs/Editor/Editor.d.ts +45 -0
  221. package/inputs/Editor/Editor.js +60 -0
  222. package/inputs/Editor/buttons/BoldButton.d.ts +7 -0
  223. package/inputs/Editor/buttons/BoldButton.js +7 -0
  224. package/inputs/Editor/buttons/BulletListButton.d.ts +7 -0
  225. package/inputs/Editor/buttons/BulletListButton.js +7 -0
  226. package/inputs/Editor/buttons/CodeBlockButton.d.ts +7 -0
  227. package/inputs/Editor/buttons/CodeBlockButton.js +7 -0
  228. package/inputs/Editor/buttons/CodeButton.d.ts +7 -0
  229. package/inputs/Editor/buttons/CodeButton.js +7 -0
  230. package/inputs/Editor/buttons/ItalicButton.d.ts +7 -0
  231. package/inputs/Editor/buttons/ItalicButton.js +7 -0
  232. package/inputs/Editor/buttons/OrderedListButton.d.ts +7 -0
  233. package/inputs/Editor/buttons/OrderedListButton.js +7 -0
  234. package/inputs/Editor/buttons/StrikethroughButton.d.ts +7 -0
  235. package/inputs/Editor/buttons/StrikethroughButton.js +7 -0
  236. package/inputs/Editor/menu/MenuBar.d.ts +9 -0
  237. package/inputs/Editor/menu/MenuBar.js +44 -0
  238. package/inputs/Editor/menu/MenuButton.d.ts +35 -0
  239. package/inputs/Editor/menu/MenuButton.js +34 -0
  240. package/inputs/Editor/menu/MenuSeparator.d.ts +7 -0
  241. package/inputs/Editor/menu/MenuSeparator.js +24 -0
  242. package/inputs/Input/Clear.d.ts +7 -0
  243. package/inputs/Input/Clear.js +14 -0
  244. package/inputs/Input/Input.d.ts +133 -0
  245. package/inputs/Input/Input.js +64 -0
  246. package/inputs/Input/InputWrapper.d.ts +23 -0
  247. package/inputs/Input/InputWrapper.js +57 -0
  248. package/inputs/Input/index.d.ts +1 -0
  249. package/inputs/Input/index.js +1 -0
  250. package/inputs/Selector/ISelectorProps.d.ts +29 -0
  251. package/inputs/Selector/ISelectorProps.js +1 -0
  252. package/inputs/Selector/Selector.d.ts +29 -0
  253. package/inputs/Selector/Selector.js +77 -0
  254. package/inputs/Selector/index.d.ts +1 -0
  255. package/inputs/Selector/index.js +1 -0
  256. package/inputs/Selector/widgets/Checkbox.d.ts +6 -0
  257. package/inputs/Selector/widgets/Checkbox.js +29 -0
  258. package/inputs/Selector/widgets/Toggle.d.ts +6 -0
  259. package/inputs/Selector/widgets/Toggle.js +24 -0
  260. package/inputs/Slider/Slider.d.ts +63 -0
  261. package/inputs/Slider/Slider.js +198 -0
  262. package/inputs/Textarea/Textarea.d.ts +79 -0
  263. package/inputs/Textarea/Textarea.js +65 -0
  264. package/main.js +32 -0
  265. package/map/Map/Map.d.ts +47 -0
  266. package/map/Map/Map.js +221 -0
  267. package/map/Map/index.d.ts +1 -0
  268. package/map/Map/index.js +1 -0
  269. package/map/PositionsManager/PositionBox.d.ts +14 -0
  270. package/map/PositionsManager/PositionBox.js +86 -0
  271. package/map/PositionsManager/PositionsManager.d.ts +27 -0
  272. package/map/PositionsManager/PositionsManager.js +99 -0
  273. package/map/controls/CompassButton/CompassButton.d.ts +33 -0
  274. package/map/controls/CompassButton/CompassButton.js +88 -0
  275. package/map/controls/FullscreenButton/FullscreenButton.d.ts +21 -0
  276. package/map/controls/FullscreenButton/FullscreenButton.js +62 -0
  277. package/map/controls/Geocoder/Geocoder.d.ts +49 -0
  278. package/map/controls/Geocoder/Geocoder.js +179 -0
  279. package/map/controls/Geocoder/GeocoderApi.d.ts +59 -0
  280. package/map/controls/Geocoder/GeocoderApi.js +68 -0
  281. package/map/controls/Geocoder/GeocoderEntry.d.ts +15 -0
  282. package/map/controls/Geocoder/GeocoderEntry.js +18 -0
  283. package/map/controls/Geocoder/GeocoderList.d.ts +10 -0
  284. package/map/controls/Geocoder/GeocoderList.js +18 -0
  285. package/map/controls/Geocoder/GeocoderSelector.d.ts +16 -0
  286. package/map/controls/Geocoder/GeocoderSelector.js +25 -0
  287. package/map/controls/Graticule/Graticule.d.ts +35 -0
  288. package/map/controls/Graticule/Graticule.js +142 -0
  289. package/map/controls/MapLoader/MapLoader.d.ts +33 -0
  290. package/map/controls/MapLoader/MapLoader.js +73 -0
  291. package/map/controls/ScaleControl/ScaleControl.d.ts +24 -0
  292. package/map/controls/ScaleControl/ScaleControl.js +107 -0
  293. package/map/controls/ZoomInButton/ZoomInButton.d.ts +19 -0
  294. package/map/controls/ZoomInButton/ZoomInButton.js +56 -0
  295. package/map/controls/ZoomOutButton/ZoomOutButton.d.ts +19 -0
  296. package/map/controls/ZoomOutButton/ZoomOutButton.js +56 -0
  297. package/map/controls/base/MapButton/Hint.d.ts +17 -0
  298. package/map/controls/base/MapButton/Hint.js +34 -0
  299. package/map/controls/base/MapButton/MapButton.d.ts +46 -0
  300. package/map/controls/base/MapButton/MapButton.js +71 -0
  301. package/map/controls/base/MapButton/index.d.ts +1 -0
  302. package/map/controls/base/MapButton/index.js +1 -0
  303. package/map/controls/base/MapButtonGroup/MapButtonGroup.d.ts +17 -0
  304. package/map/controls/base/MapButtonGroup/MapButtonGroup.js +24 -0
  305. package/map/controls/base/MapControl/MapControl.d.ts +36 -0
  306. package/map/controls/base/MapControl/MapControl.js +77 -0
  307. package/map/controls/base/MapControl/index.d.ts +1 -0
  308. package/map/controls/base/MapControl/index.js +1 -0
  309. package/map/layers/ClusterLayer/ClusterLayer.d.ts +79 -0
  310. package/map/layers/ClusterLayer/ClusterLayer.js +118 -0
  311. package/map/layers/HtmlMarkerLayer/HtmlMarkerLayer.d.ts +51 -0
  312. package/map/layers/HtmlMarkerLayer/HtmlMarkerLayer.js +151 -0
  313. package/map/layers/InterpolationLayer/ContoursFragmentShader.d.ts +2 -0
  314. package/map/layers/InterpolationLayer/ContoursFragmentShader.js +2 -0
  315. package/map/layers/InterpolationLayer/ContoursVertexShader.d.ts +2 -0
  316. package/map/layers/InterpolationLayer/ContoursVertexShader.js +2 -0
  317. package/map/layers/InterpolationLayer/IGradientStop.d.ts +5 -0
  318. package/map/layers/InterpolationLayer/IGradientStop.js +1 -0
  319. package/map/layers/InterpolationLayer/InterpolationLayer.d.ts +35 -0
  320. package/map/layers/InterpolationLayer/InterpolationLayer.js +256 -0
  321. package/map/layers/InterpolationLayer/LevelsFragmentShader.d.ts +2 -0
  322. package/map/layers/InterpolationLayer/LevelsFragmentShader.js +2 -0
  323. package/map/layers/InterpolationLayer/LevelsVertexShader.d.ts +2 -0
  324. package/map/layers/InterpolationLayer/LevelsVertexShader.js +2 -0
  325. package/map/layers/ParticlesLayer/ParticlesFragmentShader.d.ts +2 -0
  326. package/map/layers/ParticlesLayer/ParticlesFragmentShader.js +2 -0
  327. package/map/layers/ParticlesLayer/ParticlesLayer.d.ts +40 -0
  328. package/map/layers/ParticlesLayer/ParticlesLayer.js +337 -0
  329. package/map/layers/ParticlesLayer/ParticlesVertexShader.d.ts +2 -0
  330. package/map/layers/ParticlesLayer/ParticlesVertexShader.js +2 -0
  331. package/map/layers/ParticlesLayer/UVFragmentShader.d.ts +2 -0
  332. package/map/layers/ParticlesLayer/UVFragmentShader.js +2 -0
  333. package/map/layers/ParticlesLayer/UVVertexShader.d.ts +2 -0
  334. package/map/layers/ParticlesLayer/UVVertexShader.js +2 -0
  335. package/map/markers/ClusterMarker/ClusterMarker.d.ts +36 -0
  336. package/map/markers/ClusterMarker/ClusterMarker.js +99 -0
  337. package/map/markers/ClusterMarker/index.d.ts +1 -0
  338. package/map/markers/ClusterMarker/index.js +1 -0
  339. package/map/markers/RiskMarker/RiskMarker.d.ts +22 -0
  340. package/map/markers/RiskMarker/RiskMarker.js +61 -0
  341. package/modules/MainMenu/Item.d.ts +42 -0
  342. package/modules/MainMenu/Item.js +94 -0
  343. package/modules/MainMenu/MainMenu.d.ts +20 -0
  344. package/modules/MainMenu/MainMenu.js +41 -0
  345. package/modules/MainMenu/index.d.ts +1 -0
  346. package/modules/MainMenu/index.js +1 -0
  347. package/modules/Root/Content.d.ts +16 -0
  348. package/modules/Root/Content.js +25 -0
  349. package/modules/Root/Overlay.d.ts +23 -0
  350. package/modules/Root/Overlay.js +33 -0
  351. package/modules/Root/Root.d.ts +7 -0
  352. package/modules/Root/Root.js +45 -0
  353. package/modules/Root/Shader.d.ts +15 -0
  354. package/modules/Root/Shader.js +24 -0
  355. package/modules/Root/Sidebar.d.ts +13 -0
  356. package/modules/Root/Sidebar.js +24 -0
  357. package/modules/Root/stories/SampleContent.d.ts +7 -0
  358. package/modules/Root/stories/SampleContent.js +44 -0
  359. package/package.json +64 -0
  360. package/services/Dialog/AlertDialog.d.ts +31 -0
  361. package/services/Dialog/AlertDialog.js +29 -0
  362. package/services/Dialog/ConfirmDialog.d.ts +34 -0
  363. package/services/Dialog/ConfirmDialog.js +30 -0
  364. package/services/Dialog/Dialog.d.ts +91 -0
  365. package/services/Dialog/Dialog.js +92 -0
  366. package/services/Dialog/DialogBackground.d.ts +7 -0
  367. package/services/Dialog/DialogBackground.js +12 -0
  368. package/services/Dialog/DialogContent.d.ts +25 -0
  369. package/services/Dialog/DialogContent.js +38 -0
  370. package/services/Dialog/DialogFooter.d.ts +24 -0
  371. package/services/Dialog/DialogFooter.js +50 -0
  372. package/services/Dialog/DialogHeader.d.ts +18 -0
  373. package/services/Dialog/DialogHeader.js +36 -0
  374. package/services/Dialog/DialogWindow.d.ts +13 -0
  375. package/services/Dialog/DialogWindow.js +12 -0
  376. package/services/Dialog/XhrDialog.d.ts +34 -0
  377. package/services/Dialog/XhrDialog.js +321 -0
  378. package/services/Toast/IToastMessage.d.ts +10 -0
  379. package/services/Toast/IToastMessage.js +1 -0
  380. package/services/Toast/IToastProps.d.ts +23 -0
  381. package/services/Toast/IToastProps.js +1 -0
  382. package/services/Toast/Toast.d.ts +21 -0
  383. package/services/Toast/Toast.js +79 -0
  384. package/services/Toast/ToastContainer.d.ts +40 -0
  385. package/services/Toast/ToastContainer.js +65 -0
  386. package/services/Toast/ToastContext.d.ts +22 -0
  387. package/services/Toast/ToastContext.js +7 -0
  388. package/services/Toast/ToastProvider.d.ts +19 -0
  389. package/services/Toast/ToastProvider.js +67 -0
  390. package/services/Toast/index.d.ts +2 -0
  391. package/services/Toast/index.js +2 -0
  392. package/services/Toast/useToast.d.ts +5 -0
  393. package/services/Toast/useToast.js +9 -0
  394. package/spritemap.svg +1 -0
  395. package/styles/NormalTheme.d.ts +3 -0
  396. package/styles/NormalTheme.js +65 -0
  397. package/styles/StyleBase.d.ts +2 -0
  398. package/styles/StyleBase.js +8 -0
  399. package/styles/StyleReset.d.ts +2 -0
  400. package/styles/StyleReset.js +8 -0
  401. package/svg/editor/index.d.ts +10 -0
  402. package/svg/editor/index.js +11 -0
  403. package/svg/file/index.d.ts +5 -0
  404. package/svg/file/index.js +6 -0
  405. package/svg/icons/index.d.ts +36 -0
  406. package/svg/icons/index.js +37 -0
  407. package/svg/index.d.ts +11 -0
  408. package/svg/index.js +5 -0
  409. package/svg/menu/index.d.ts +8 -0
  410. package/svg/menu/index.js +9 -0
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import { IListViewProps } from './IListViewProps';
3
+ import { IColumnProps } from './Column';
4
+ interface IProps extends IListViewProps {
5
+ columns: IColumnProps[];
6
+ }
7
+ declare const Body: (props: IProps) => React.JSX.Element;
8
+ export { Body };
@@ -0,0 +1,24 @@
1
+ import * as React from 'react';
2
+ import { Selector } from '../../inputs/Selector';
3
+ var Body = function (props) {
4
+ return (React.createElement("tbody", null, props.data.map(function (row, index) {
5
+ return React.createElement("tr", { key: index,
6
+ // Set classnames for tr; styles are in Table.
7
+ className: [
8
+ props.active == row ? 'active' : null,
9
+ (props.onClick || props.onDoubleClick) ? 'clickable' : null
10
+ ].join(' '), onClick: props.onClick, onDoubleClick: props.onDoubleClick },
11
+ props.onCheck && React.createElement("td", null,
12
+ React.createElement(Selector, { checked: !!row.checked, onChange: function () { return props.onCheck(index); } })),
13
+ props.columns.map(function (col, index) {
14
+ return React.createElement("td", { key: index, style: { justifyContent: (col.align == 'right' && !props.narrow) ? 'end' : 'start' } },
15
+ index == 0 && props.decorator && props.decorator(row),
16
+ React.createElement("span", { className: "label" }, props.narrow && col.name),
17
+ React.createElement("span", { className: "content" },
18
+ " ",
19
+ col.children(row)));
20
+ }),
21
+ props.columnsEditable && React.createElement("td", null));
22
+ })));
23
+ };
24
+ export { Body };
@@ -0,0 +1,55 @@
1
+ import * as React from 'react';
2
+ interface IColumnProps {
3
+ /**
4
+ * Column name, e.g. "Number of Users"
5
+ */
6
+ name: string;
7
+ /**
8
+ * Column width. If a number, e.g. `1`, then it is the column's weight,
9
+ * relative to other columns. If it is a string, e.g. `50px`, then it is
10
+ * an exact width to be applied.
11
+ * @default 1
12
+ */
13
+ width?: number | string;
14
+ /**
15
+ * Optional sort key. If not specified, column is not sortable.
16
+ */
17
+ sort?: string;
18
+ /**
19
+ * If set, this is the default sort column. If not set, the first column will
20
+ * be the sort column.
21
+ */
22
+ defaultSort?: boolean;
23
+ /**
24
+ * If true, default sorting is reverse sort.
25
+ * @default false
26
+ */
27
+ reverse?: boolean;
28
+ /**
29
+ * Cell content alignment. Defaults to `left`.
30
+ * @default let
31
+ */
32
+ align?: 'left' | 'right';
33
+ /**
34
+ * Function that takes a table row and returns cell content.
35
+ */
36
+ children: (item: any) => React.ReactNode;
37
+ /**
38
+ * If set, then this column cannot be removed from the ListView.
39
+ */
40
+ fixed?: boolean;
41
+ /**
42
+ * Is this column currently shown in the ListView?
43
+ */
44
+ active?: boolean;
45
+ }
46
+ /**
47
+ * TableColumn species a column name, and how to render content for that
48
+ * column.
49
+ * TableColumn itself doesn't render anything.
50
+ */
51
+ declare const Column: {
52
+ (_: IColumnProps): null;
53
+ displayName: string;
54
+ };
55
+ export { Column, IColumnProps };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * TableColumn species a column name, and how to render content for that
3
+ * column.
4
+ * TableColumn itself doesn't render anything.
5
+ */
6
+ var Column = function (_) { return null; };
7
+ Column.displayName = "ListView.Column";
8
+ export { Column };
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ import { IColumnProps } from '../Column';
3
+ interface IProps {
4
+ /** @ignore */
5
+ className?: string;
6
+ column: IColumnProps;
7
+ onMove: (afterName: string) => void;
8
+ onRemove: () => void;
9
+ }
10
+ declare const ColumnDraggable: (props: IProps) => React.JSX.Element;
11
+ export { ColumnDraggable };
@@ -0,0 +1,83 @@
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
+ import * as React from 'react';
17
+ import styled, { useTheme } from 'styled-components';
18
+ import { SVG } from '../../../svg';
19
+ import { Icon } from '../../Icon';
20
+ var ColumnDraggableBase = function (props) {
21
+ var theme = useTheme();
22
+ var wrapperRef = React.useRef(null);
23
+ var handleMouseDown = function () {
24
+ wrapperRef.current.draggable = true;
25
+ };
26
+ var handleMouseUp = function () {
27
+ wrapperRef.current.draggable = false;
28
+ };
29
+ var handleDragStart = function (ev) {
30
+ ev.dataTransfer.setData("text/plain", props.column.name);
31
+ ev.dataTransfer.effectAllowed = "move";
32
+ };
33
+ var handleDragOver = function (ev) {
34
+ ev.preventDefault();
35
+ ev.dataTransfer.dropEffect = "move";
36
+ };
37
+ var handleDrop = function (ev) {
38
+ ev.preventDefault();
39
+ var target = ev.target;
40
+ while (!target.classList.contains('dropzone')) {
41
+ if (!target.parentElement)
42
+ return;
43
+ target = target.parentElement;
44
+ }
45
+ target.classList.remove('drop');
46
+ props.onMove(ev.dataTransfer.getData("text/plain"));
47
+ };
48
+ // Is the target argument a dropzone, or a child of a dropzone?
49
+ var getDropzone = function (target) {
50
+ while (!target.classList.contains('dropzone')) {
51
+ if (!target.parentElement)
52
+ return null;
53
+ target = target.parentElement;
54
+ }
55
+ return target;
56
+ };
57
+ var handleDragEnter = function (ev) {
58
+ ev.preventDefault();
59
+ getDropzone(ev.target).classList.add('drop');
60
+ };
61
+ var handleDragLeave = function (ev) {
62
+ // If the destination is not a dropzone, remove my class.
63
+ if (!getDropzone(ev.relatedTarget)) {
64
+ getDropzone(ev.target).classList.remove('drop');
65
+ return;
66
+ }
67
+ // The destination is a dropzone. Is it the same as the current one?
68
+ var src_name = getDropzone(ev.target).getAttribute('x-name');
69
+ var dest_name = getDropzone(ev.relatedTarget).getAttribute('x-name');
70
+ if (src_name != dest_name) {
71
+ getDropzone(ev.target).classList.remove('drop');
72
+ return;
73
+ }
74
+ };
75
+ return (React.createElement("div", { className: "".concat(props.className, " dropzone"), "x-name": props.column.name, ref: wrapperRef, onDragStart: handleDragStart, onDragOver: handleDragOver, onDragEnter: handleDragEnter, onDragLeave: handleDragLeave, onDrop: handleDrop },
76
+ React.createElement(Handle, { className: "handle", onMouseDown: handleMouseDown, onMouseUp: handleMouseUp }, props.column.name),
77
+ !props.column.fixed && React.createElement(Icon, { color: theme.colors.primary[5], circle: true, url: SVG.Icons.Cross, onClick: props.onRemove })));
78
+ };
79
+ var Handle = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n &:before {\n position: absolute;\n content: '';\n left: 0;\n top: calc(50% - 12px);\n width: 16px;\n height: 24px;\n background-image: radial-gradient(circle at center, ", " 1px, transparent 1px, transparent 4px);\n background-size: 6px 6px;\n }\n cursor: pointer;\n padding-left: 24px;\n"], ["\n position: relative;\n &:before {\n position: absolute;\n content: '';\n left: 0;\n top: calc(50% - 12px);\n width: 16px;\n height: 24px;\n background-image: radial-gradient(circle at center, ", " 1px, transparent 1px, transparent 4px);\n background-size: 6px 6px;\n }\n cursor: pointer;\n padding-left: 24px;\n"])), function (p) { return p.theme.colors.neutral[80]; });
80
+ var ColumnDraggableStyled = styled(ColumnDraggableBase)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n user-select: none;\n outline: none;\n display: flex;\n flex-direction: row;\n height: 42px;\n color: ", ";\n background-color: ", ";\n border-bottom: solid 1px ", ";\n align-items: center;\n justify-content: space-between;\n padding: 0 16px 0 16px;\n &:hover {\n background-color: ", ";\n }\n &.drop {\n background-color: ", ";\n } \n"], ["\n user-select: none;\n outline: none;\n display: flex;\n flex-direction: row;\n height: 42px;\n color: ", ";\n background-color: ", ";\n border-bottom: solid 1px ", ";\n align-items: center;\n justify-content: space-between;\n padding: 0 16px 0 16px;\n &:hover {\n background-color: ", ";\n }\n &.drop {\n background-color: ", ";\n } \n"])), function (p) { return p.theme.colors.primary[5]; }, function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.theme.colors.neutral[80]; }, function (p) { return p.theme.colors.neutral[95]; }, function (p) { return p.theme.colors.primary[1]; });
81
+ var ColumnDraggable = function (props) { return React.createElement(ColumnDraggableStyled, __assign({}, props)); };
82
+ export { ColumnDraggable };
83
+ var templateObject_1, templateObject_2;
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import { IColumnProps } from '../Column';
3
+ interface IProps {
4
+ /** @ignore */
5
+ className?: string;
6
+ columns: IColumnProps[];
7
+ onChange: (columns: IColumnProps[]) => void;
8
+ onClose: () => void;
9
+ onReset: () => void;
10
+ }
11
+ declare const ColumnsManager: (props: IProps) => React.JSX.Element;
12
+ export { ColumnsManager };
@@ -0,0 +1,63 @@
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
+ import * as React from 'react';
17
+ import styled from 'styled-components';
18
+ import { GlassPane } from '../../../containers/GlassPane';
19
+ import { SourceColumns } from './SourceColumns';
20
+ import { OrderColumns } from './OrderColumns';
21
+ import { SecondaryButton } from '../../SecondaryButton';
22
+ import { SVG } from '../../../svg';
23
+ var ColumnsManagerBase = function (props) {
24
+ var wrapperRef = React.useRef(null);
25
+ // A mousedown event listener is attached to the document. When the document
26
+ // is clicked anywhere but this panel, the panel closes.
27
+ React.useEffect(function () {
28
+ // Listen for document-wide mousedown/keydown events when panel mounts.
29
+ document.addEventListener('mousedown', handleClickOutside);
30
+ document.addEventListener('keydown', handleKeyDown);
31
+ return function () {
32
+ // Clean up document-wide mousedown/keydown events when panel unmounts.
33
+ document.removeEventListener('mousedown', handleClickOutside);
34
+ document.removeEventListener('keydown', handleKeyDown);
35
+ };
36
+ }, []);
37
+ var handleKeyDown = function (e) {
38
+ if (e.key == 'Escape')
39
+ props.onClose();
40
+ };
41
+ // Handle document-wide mousedown event by closing the panel.
42
+ var handleClickOutside = function (event) {
43
+ var elem = event.target;
44
+ if (wrapperRef.current && !wrapperRef.current.contains(elem)) {
45
+ props.onClose();
46
+ }
47
+ };
48
+ return (React.createElement("div", { className: props.className, ref: wrapperRef },
49
+ React.createElement(GlassPane, { animated: true, bordered: true },
50
+ React.createElement(Content, null,
51
+ React.createElement(Header, null, "Available columns"),
52
+ React.createElement(Header, null,
53
+ "Selected columns ",
54
+ React.createElement(SecondaryButton, { icon: SVG.Icons.Reset, onClick: props.onReset })),
55
+ React.createElement(SourceColumns, { columns: props.columns, onChange: props.onChange }),
56
+ React.createElement(OrderColumns, { columns: props.columns, onChange: props.onChange, onReset: props.onReset })))));
57
+ };
58
+ var Header = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font: ", ";\n text-transform: lowercase;\n color: ", ";\n padding-left: 16px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n"], ["\n font: ", ";\n text-transform: lowercase;\n color: ", ";\n padding-left: 16px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n"])), function (p) { return p.theme.font.labelCaps; }, function (p) { return p.theme.colors.neutral[100]; });
59
+ var Content = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 500px;\n padding: 0 16px 16px 16px;\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-template-rows: 48px 1fr;\n column-gap: 16px;\n"], ["\n width: 500px;\n padding: 0 16px 16px 16px;\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-template-rows: 48px 1fr;\n column-gap: 16px;\n"])));
60
+ var ColumnsManagerStyled = styled(ColumnsManagerBase)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: relative;\n z-index: 1000;\n border-radius: ", "px;\n overflow: hidden;\n font: ", ";\n"], ["\n position: relative;\n z-index: 1000;\n border-radius: ", "px;\n overflow: hidden;\n font: ", ";\n"])), function (p) { return p.theme.radius.normal; }, function (p) { return p.theme.font.bodyMedium; });
61
+ var ColumnsManager = function (props) { return React.createElement(ColumnsManagerStyled, __assign({}, props)); };
62
+ export { ColumnsManager };
63
+ var templateObject_1, templateObject_2, templateObject_3;
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ import { IColumnProps } from '../Column';
3
+ interface IProps {
4
+ /** @ignore */
5
+ className?: string;
6
+ columns: IColumnProps[];
7
+ onChange: (columns: IColumnProps[]) => void;
8
+ onReset: () => void;
9
+ }
10
+ declare const OrderColumns: (props: IProps) => React.JSX.Element;
11
+ export { OrderColumns };
@@ -0,0 +1,62 @@
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 __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
17
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
18
+ if (ar || !(i in from)) {
19
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
20
+ ar[i] = from[i];
21
+ }
22
+ }
23
+ return to.concat(ar || Array.prototype.slice.call(from));
24
+ };
25
+ import * as React from 'react';
26
+ import styled from 'styled-components';
27
+ import { ColumnDraggable } from './ColumnDraggable';
28
+ import { List } from '../../../containers/List';
29
+ var OrderColumnsBase = function (props) {
30
+ var _a = React.useState(""), q = _a[0], setQ = _a[1];
31
+ var handleQ = function (value) {
32
+ setQ(value);
33
+ };
34
+ var handleRemove = function (name) {
35
+ var newColumns = props.columns.map(function (c) {
36
+ return __assign(__assign({}, c), { active: c.name === name ? false : c.active });
37
+ });
38
+ props.onChange(newColumns);
39
+ };
40
+ var handleMove = function (name, afterName) {
41
+ // Find moved column.
42
+ var column = props.columns.find(function (c) { return c.name === name; });
43
+ if (!column)
44
+ return;
45
+ // Remove moved column.
46
+ var newColumns = props.columns.filter(function (c) { return c.name !== name; });
47
+ // Find index of "after" column.
48
+ var idx = props.columns.findIndex(function (c) { return c.name === afterName; });
49
+ if (idx == -1)
50
+ return;
51
+ // Insert column:
52
+ props.onChange(__spreadArray(__spreadArray(__spreadArray([], newColumns.slice(0, idx + 1), true), [column], false), newColumns.slice(idx + 1), true));
53
+ };
54
+ return (React.createElement("div", { className: props.className },
55
+ React.createElement(List, { maxItems: 6, placeholder: "Search...", search: q, onSearch: handleQ }, props.columns.filter(function (c) { return c.active; }).filter(function (c) { return !q || c.name.toLowerCase().includes(q); }).map(function (c, idx) {
56
+ return React.createElement(ColumnDraggable, { key: c.name, column: c, onRemove: function () { return handleRemove(c.name); }, onMove: function (afterName) { return handleMove(afterName, c.name); } });
57
+ }))));
58
+ };
59
+ var OrderColumnsStyled = styled(OrderColumnsBase)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex: 1;\n display: flex;\n flex-direction: column;\n font: ", ";\n"], ["\n flex: 1;\n display: flex;\n flex-direction: column;\n font: ", ";\n"])), function (p) { return p.theme.font.bodyMedium; });
60
+ var OrderColumns = function (props) { return React.createElement(OrderColumnsStyled, __assign({}, props)); };
61
+ export { OrderColumns };
62
+ var templateObject_1;
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ import { IColumnProps } from '../Column';
3
+ interface IProps {
4
+ /** @ignore */
5
+ className?: string;
6
+ columns: IColumnProps[];
7
+ onChange: (columns: IColumnProps[]) => void;
8
+ }
9
+ declare const SourceColumns: (props: IProps) => React.JSX.Element;
10
+ export { SourceColumns };
@@ -0,0 +1,45 @@
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
+ import * as React from 'react';
17
+ import styled from 'styled-components';
18
+ import { Selector } from '../../../inputs/Selector';
19
+ import { Highlight } from '../../../formatters/Highlight';
20
+ import { List } from '../../../containers/List';
21
+ var SourceColumnsBase = function (props) {
22
+ var _a = React.useState(""), q = _a[0], setQ = _a[1];
23
+ var handleChange = function (name) {
24
+ var columns = props.columns.map(function (c, idx) {
25
+ if (c.name == name)
26
+ return __assign(__assign({}, c), { active: !c.active });
27
+ return c;
28
+ });
29
+ props.onChange(columns);
30
+ };
31
+ var handleQ = function (value) {
32
+ setQ(value);
33
+ };
34
+ return (React.createElement("div", { className: props.className },
35
+ React.createElement(List, { maxItems: 6, search: q, placeholder: "Search...", onSearch: handleQ }, props.columns.filter(function (c) { return !q || c.name.toLowerCase().includes(q); }).sort(function (a, b) { return a.name.localeCompare(b.name); }).map(function (c, idx) {
36
+ return React.createElement(Entry, { key: c.name },
37
+ React.createElement(Selector, { disabled: c.fixed, checked: !!c.active, onChange: function () { return handleChange(c.name); } }),
38
+ React.createElement(Highlight, { value: c.name, q: q }));
39
+ }))));
40
+ };
41
+ var Entry = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n color: ", ";\n padding-left: 16px;\n padding-right: 16px;\n"], ["\n display: flex;\n align-items: center;\n color: ", ";\n padding-left: 16px;\n padding-right: 16px;\n"])), function (p) { return p.theme.colors.primary[5]; });
42
+ var SourceColumnsStyled = styled(SourceColumnsBase)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font: ", ";\n display: flex;\n flex-direction: column;\n flex: 1;\n"], ["\n font: ", ";\n display: flex;\n flex-direction: column;\n flex: 1;\n"])), function (p) { return p.theme.font.bodyMedium; });
43
+ var SourceColumns = function (props) { return React.createElement(SourceColumnsStyled, __assign({}, props)); };
44
+ export { SourceColumns };
45
+ var templateObject_1, templateObject_2;
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import { IListViewProps } from './IListViewProps';
3
+ import { IColumnProps } from './Column';
4
+ interface IProps extends IListViewProps {
5
+ className?: string;
6
+ columns: IColumnProps[];
7
+ }
8
+ declare const Ghost: (props: IProps) => React.JSX.Element;
9
+ export { Ghost };
@@ -0,0 +1,52 @@
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
+ import * as React from 'react';
17
+ import styled, { css, keyframes } from 'styled-components';
18
+ var GhostBase = function (props) {
19
+ return (React.createElement("div", { className: props.className },
20
+ React.createElement("div", { className: "mask1" }),
21
+ React.createElement("div", { className: "mask2" }),
22
+ props.onCheck && React.createElement(Cell, { "$dark": props.dark, "$shadow": props.shadow, "$content": false }),
23
+ props.columns.filter(function (c) { return c.active; }).map(function (c, idx) { return React.createElement(Cell, { "$dark": props.dark, "$shadow": props.shadow, "$content": true, key: idx }); }),
24
+ props.columnsEditable && React.createElement(Cell, { "$dark": props.dark, "$shadow": props.shadow, "$content": false })));
25
+ };
26
+ var Pulse = keyframes(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n 0% {\n background-position-x: 0px;\n }\n 100% {\n background-position-x: 250px;\n }\n"], ["\n 0% {\n background-position-x: 0px;\n }\n 100% {\n background-position-x: 250px;\n }\n"])));
27
+ var Pulse2 = keyframes(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n 0% {\n background-position-x: 125px;\n }\n 50% {\n background-position-x: 250px; \n }\n 50.1% {\n background-position-x: 0px; \n } \n 100% {\n background-position-x: 125px;\n }\n"], ["\n 0% {\n background-position-x: 125px;\n }\n 50% {\n background-position-x: 250px; \n }\n 50.1% {\n background-position-x: 0px; \n } \n 100% {\n background-position-x: 125px;\n }\n"])));
28
+ var Cell = styled.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n position: relative;\n background-color: ", ";\n border-bottom: solid 1px ", ";\n z-index: 1;\n\n &:after {\n position: absolute;\n content: '';\n background: ", ";\n left: 16px;\n top: calc(50% - 7px);\n height: 14px;\n border-radius: 7px;\n ", "\n }\n\n &:last-child:after {\n right: 16px;\n }\n // Header shadow:\n ", " \n"], ["\n position: relative;\n background-color: ", ";\n border-bottom: solid 1px ", ";\n z-index: 1;\n\n &:after {\n position: absolute;\n content: '';\n background: ", ";\n left: 16px;\n top: calc(50% - 7px);\n height: 14px;\n border-radius: 7px;\n ", "\n }\n\n &:last-child:after {\n right: 16px;\n }\n // Header shadow:\n ", " \n"])), function (p) { return p.$dark ? p.theme.colors.primary[5] : p.theme.colors.neutral[100]; }, function (p) { return p.$dark ? p.theme.colors.primary[2] : p.theme.colors.neutral[80]; }, function (p) { return p.$dark ? p.theme.colors.primary[4] : p.theme.colors.neutral[80]; }, function (p) { return p.$content ? css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["right: 0;"], ["right: 0;"]))) : css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["width:14px"], ["width:14px"]))); }, function (p) { return p.$shadow && css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n &:before {\n position: absolute;\n pointer-events: none;\n content: '';\n z-index: 1;\n top: calc(100%);\n left: 0;\n right: 0;\n height: 8px;\n background: linear-gradient(rgba(0,0,0,0.1), transparent);\n }\n "], ["\n &:before {\n position: absolute;\n pointer-events: none;\n content: '';\n z-index: 1;\n top: calc(100%);\n left: 0;\n right: 0;\n height: 8px;\n background: linear-gradient(rgba(0,0,0,0.1), transparent);\n }\n "]))); });
29
+ var GhostStyled = styled(GhostBase).attrs(function (p) {
30
+ return {
31
+ fg: p.dark ? p.theme.colors.primary[1] : p.theme.colors.primary[1],
32
+ bg: p.dark ? p.theme.colors.primary[3] : p.theme.colors.neutral[100]
33
+ };
34
+ })(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n // Size and position. A table fills its container.\n position: relative;\n width: 100%;\n height: 100%;\n background: ", ";\n\n display: grid;\n // Convert column widths a string suitable for grid template:\n grid-template-columns: ", ";\n\n grid-template-rows: 48px;\n\n div.mask1 {\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n background: repeat-x 0 0/250px 100% linear-gradient(to right, ", ", ", ", ", ");\n mask: linear-gradient(to bottom, transparent 0, transparent 47px, black 47px, transparent 48px, transparent 100%) repeat-y 0 0/100% 96px;\n animation: ", " 0.8s linear infinite;\n }\n\n div.mask2 {\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n background: repeat-x 0 0/250px 100% linear-gradient(to right, ", ", ", ", ", ");\n mask: linear-gradient(to bottom, transparent 0, transparent 95px, black 100%) repeat-y 0 0/100% 96px;\n animation: ", " 0.8s linear infinite;\n }\n"], ["\n // Size and position. A table fills its container.\n position: relative;\n width: 100%;\n height: 100%;\n background: ", ";\n\n display: grid;\n // Convert column widths a string suitable for grid template:\n grid-template-columns: ", ";\n\n grid-template-rows: 48px;\n\n div.mask1 {\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n background: repeat-x 0 0/250px 100% linear-gradient(to right, ", ", ", ", ", ");\n mask: linear-gradient(to bottom, transparent 0, transparent 47px, black 47px, transparent 48px, transparent 100%) repeat-y 0 0/100% 96px;\n animation: ", " 0.8s linear infinite;\n }\n\n div.mask2 {\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n background: repeat-x 0 0/250px 100% linear-gradient(to right, ", ", ", ", ", ");\n mask: linear-gradient(to bottom, transparent 0, transparent 95px, black 100%) repeat-y 0 0/100% 96px;\n animation: ", " 0.8s linear infinite;\n }\n"])), function (p) { return p.dark ? p.theme.colors.primary[3] : p.theme.colors.neutral[100]; }, function (p) {
35
+ // Prefix a check column?
36
+ return (p.onCheck ? ['48px'] : []).concat(
37
+ // Actual columns:
38
+ p.columns.filter(function (c) { return c.active; }).map(function (col) {
39
+ var _a;
40
+ var width = (_a = col.width) !== null && _a !== void 0 ? _a : 1;
41
+ // Numeric width?
42
+ if (typeof width === 'number' && !isNaN(width))
43
+ return "minmax(0, ".concat(width, "fr)");
44
+ return "minmax(0, ".concat(width, ")");
45
+ }))
46
+ // Postfix an columns management column?
47
+ .concat(p.columnsEditable ? ['48px'] : [])
48
+ .join(" ");
49
+ }, function (p) { return p.fg; }, function (p) { return p.bg; }, function (p) { return p.fg; }, Pulse, function (p) { return p.fg; }, function (p) { return p.bg; }, function (p) { return p.fg; }, Pulse2);
50
+ var Ghost = function (props) { return React.createElement(GhostStyled, __assign({}, props)); };
51
+ export { Ghost };
52
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import { IListViewProps } from './IListViewProps';
3
+ import { IColumnProps } from './Column';
4
+ interface IProps extends IListViewProps {
5
+ columns: IColumnProps[];
6
+ sort: string;
7
+ reverse: boolean;
8
+ onSortClick: (column: IColumnProps) => void;
9
+ onOpenColumns: () => void;
10
+ }
11
+ declare const Header: (props: IProps) => React.JSX.Element;
12
+ export { Header };
@@ -0,0 +1,35 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import * as React from 'react';
13
+ import { HeaderCell } from './HeaderCell';
14
+ import { Selector } from '../../inputs/Selector';
15
+ import { SVG } from '../../svg';
16
+ import { useTheme } from 'styled-components';
17
+ import { HeaderButton } from './HeaderButton';
18
+ var Header = function (props) {
19
+ var theme = useTheme();
20
+ // Are ALL items checked?
21
+ var allChecked = props.data.map(function (x) { return !!x.checked; }).reduce(function (acc, cur) { return acc && !!cur; }, true) == true;
22
+ // Are NO items checked?
23
+ var noneChecked = props.data.map(function (x) { return !!x.checked; }).reduce(function (acc, cur) { return acc || !!cur; }, false) == false;
24
+ var indeterminate = !allChecked && !noneChecked;
25
+ return (React.createElement("thead", null,
26
+ React.createElement("tr", null,
27
+ props.onCheck &&
28
+ React.createElement("th", null,
29
+ React.createElement(Selector, { indeterminate: indeterminate, checked: allChecked, onChange: function () { return props.onCheck(allChecked ? false : true); } })),
30
+ props.columns.map(function (col, index) { return React.createElement(HeaderCell, __assign({ key: index, column: col }, props)); }),
31
+ props.columnsEditable &&
32
+ React.createElement("th", null,
33
+ React.createElement(HeaderButton, { dark: props.dark, url: SVG.Icons.Columns, onClick: props.onOpenColumns })))));
34
+ };
35
+ export { Header };
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ interface IProps {
3
+ onClick: () => void;
4
+ url: string;
5
+ dark: boolean;
6
+ }
7
+ declare const HeaderButton: (props: IProps) => React.JSX.Element;
8
+ export { HeaderButton };
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import { useTheme } from 'styled-components';
3
+ import { Icon } from '../Icon';
4
+ var HeaderButton = function (props) {
5
+ var theme = useTheme();
6
+ return (React.createElement(Icon, { url: props.url, onClick: props.onClick, color: props.dark ? theme.colors.neutral[100] : theme.colors.neutral[10] }));
7
+ };
8
+ export { HeaderButton };
@@ -0,0 +1,20 @@
1
+ import * as React from 'react';
2
+ import { IColumnProps } from './Column';
3
+ import { IListViewProps } from './IListViewProps';
4
+ interface IProps extends IListViewProps {
5
+ /** @ignore */
6
+ className?: string;
7
+ /** Column properties */
8
+ column: IColumnProps;
9
+ sort: string;
10
+ reverse: boolean;
11
+ /** Fired when column is clicked. */
12
+ onSortClick: (column: IColumnProps) => void;
13
+ }
14
+ /**
15
+ * `HeaderCell` wraps a <th>. It shows the column label, and a sort icon if
16
+ * the column is sortable. In order to avoid creating many styled-components
17
+ * classes, styling is mostly left to `Table`.
18
+ */
19
+ declare const HeaderCell: (props: IProps) => React.JSX.Element;
20
+ export { HeaderCell };
@@ -0,0 +1,47 @@
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
+ import * as React from 'react';
17
+ import styled from 'styled-components';
18
+ import { SortButton } from './SortButton';
19
+ var HeaderCellBase = function (props) {
20
+ var sorted = props.sort == props.column.sort;
21
+ return (React.createElement("th", {
22
+ // Sorted column gets .sorted class:
23
+ className: "".concat(props.className, " ").concat(sorted ? 'sort' : ''), style: {
24
+ // Sortable column has pointer cursor:
25
+ cursor: props.column.sort ? 'pointer' : 'auto'
26
+ }, onClick: (props.column.sort && props.onSortClick) ? function () { return props.onSortClick(props.column); } : null },
27
+ React.createElement("span", null, props.column.name),
28
+ React.createElement(SortButton, { dark: props.dark, active: sorted,
29
+ // If currently sorted, show sort direction.
30
+ // If not currently sorted, show default sort direction.
31
+ reverse: sorted ? props.reverse : props.column.reverse })));
32
+ };
33
+ var HeaderCellStyled = styled(HeaderCellBase)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n &:hover {\n ", " {\n opacity: 1 !important; \n path {\n animation-duration: 1000ms;\n }\n } \n }\n"], ["\n &:hover {\n ", " {\n opacity: 1 !important; \n path {\n animation-duration: 1000ms;\n }\n } \n }\n"
34
+ /**
35
+ * `HeaderCell` wraps a <th>. It shows the column label, and a sort icon if
36
+ * the column is sortable. In order to avoid creating many styled-components
37
+ * classes, styling is mostly left to `Table`.
38
+ */
39
+ ])), SortButton);
40
+ /**
41
+ * `HeaderCell` wraps a <th>. It shows the column label, and a sort icon if
42
+ * the column is sortable. In order to avoid creating many styled-components
43
+ * classes, styling is mostly left to `Table`.
44
+ */
45
+ var HeaderCell = function (props) { return React.createElement(HeaderCellStyled, __assign({}, props)); };
46
+ export { HeaderCell };
47
+ var templateObject_1;