@longline/aqua-ui 1.0.9 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Types.d.ts +6 -0
- package/Types.js +5 -0
- package/containers/Anchor/Anchor.d.ts +63 -0
- package/containers/Anchor/Anchor.js +113 -0
- package/containers/Anchor/index.d.ts +1 -0
- package/containers/Anchor/index.js +1 -0
- package/containers/Dock/Dock.d.ts +45 -0
- package/containers/Dock/Dock.js +61 -0
- package/containers/Dock/Dockable.d.ts +60 -0
- package/containers/Dock/Dockable.js +98 -0
- package/containers/Dock/index.d.ts +2 -0
- package/containers/Dock/index.js +2 -0
- package/containers/Form/Field.d.ts +104 -0
- package/containers/Form/Field.js +168 -0
- package/containers/Form/Form.d.ts +51 -0
- package/containers/Form/Form.js +89 -0
- package/containers/Form/Validation.d.ts +212 -0
- package/containers/Form/Validation.js +232 -0
- package/containers/Form/context/FormContext.d.ts +10 -0
- package/containers/Form/context/FormContext.js +3 -0
- package/containers/Form/context/useForm.d.ts +5 -0
- package/containers/Form/context/useForm.js +9 -0
- package/containers/Form/elements/BoxWrapper.d.ts +15 -0
- package/containers/Form/elements/BoxWrapper.js +35 -0
- package/containers/Form/elements/Hint.d.ts +21 -0
- package/containers/Form/elements/Hint.js +15 -0
- package/containers/Form/elements/Label.d.ts +22 -0
- package/containers/Form/elements/Label.js +15 -0
- package/containers/Form/elements/SimpleWrapper.d.ts +15 -0
- package/containers/Form/elements/SimpleWrapper.js +17 -0
- package/containers/Form/index.d.ts +1 -0
- package/containers/Form/index.js +1 -0
- package/containers/GlassPane/GlassPane.d.ts +36 -0
- package/containers/GlassPane/GlassPane.js +66 -0
- package/containers/GlassPane/index.d.ts +1 -0
- package/containers/GlassPane/index.js +1 -0
- package/containers/InfoBox/InfoBox.d.ts +34 -0
- package/containers/InfoBox/InfoBox.js +45 -0
- package/containers/InfoBox/elements/Content.d.ts +23 -0
- package/containers/InfoBox/elements/Content.js +37 -0
- package/containers/InfoBox/elements/Footer.d.ts +9 -0
- package/containers/InfoBox/elements/Footer.js +24 -0
- package/containers/InfoBox/elements/Header.d.ts +9 -0
- package/containers/InfoBox/elements/Header.js +24 -0
- package/containers/InfoBox/index.d.ts +1 -0
- package/containers/InfoBox/index.js +1 -0
- package/containers/List/List.d.ts +45 -0
- package/containers/List/List.js +47 -0
- package/containers/List/ListCell.d.ts +13 -0
- package/containers/List/ListCell.js +24 -0
- package/containers/List/ListRow.d.ts +15 -0
- package/containers/List/ListRow.js +24 -0
- package/containers/List/index.d.ts +3 -0
- package/containers/List/index.js +3 -0
- package/containers/Tabs/Pane.d.ts +29 -0
- package/containers/Tabs/Pane.js +45 -0
- package/containers/Tabs/Tabs.d.ts +66 -0
- package/containers/Tabs/Tabs.js +144 -0
- package/containers/Tabs/index.d.ts +1 -0
- package/containers/Tabs/index.js +1 -0
- package/controls/Chip/Chip.d.ts +35 -0
- package/controls/Chip/Chip.js +83 -0
- package/controls/Chip/index.d.ts +1 -0
- package/controls/Chip/index.js +1 -0
- package/controls/Fab/Fab.d.ts +73 -0
- package/controls/Fab/Fab.js +94 -0
- package/controls/Fab/index.d.ts +1 -0
- package/controls/Fab/index.js +1 -0
- package/controls/Icon/Icon.d.ts +98 -0
- package/controls/Icon/Icon.js +79 -0
- package/controls/Icon/index.d.ts +1 -0
- package/controls/Icon/index.js +1 -0
- package/controls/Key/Key.d.ts +22 -0
- package/controls/Key/Key.js +74 -0
- package/controls/Key/index.d.ts +1 -0
- package/controls/Key/index.js +1 -0
- package/controls/LinearChart/LinearChart.d.ts +31 -0
- package/controls/LinearChart/LinearChart.js +58 -0
- package/controls/LinearChart/index.d.ts +1 -0
- package/controls/LinearChart/index.js +1 -0
- package/controls/ListView/Body.d.ts +8 -0
- package/controls/ListView/Body.js +24 -0
- package/controls/ListView/Column.d.ts +55 -0
- package/controls/ListView/Column.js +8 -0
- package/controls/ListView/ColumnsManager/ColumnDraggable.d.ts +11 -0
- package/controls/ListView/ColumnsManager/ColumnDraggable.js +83 -0
- package/controls/ListView/ColumnsManager/ColumnsManager.d.ts +12 -0
- package/controls/ListView/ColumnsManager/ColumnsManager.js +63 -0
- package/controls/ListView/ColumnsManager/OrderColumns.d.ts +11 -0
- package/controls/ListView/ColumnsManager/OrderColumns.js +62 -0
- package/controls/ListView/ColumnsManager/SourceColumns.d.ts +10 -0
- package/controls/ListView/ColumnsManager/SourceColumns.js +45 -0
- package/controls/ListView/Ghost.d.ts +9 -0
- package/controls/ListView/Ghost.js +52 -0
- package/controls/ListView/Header.d.ts +12 -0
- package/controls/ListView/Header.js +35 -0
- package/controls/ListView/HeaderButton.d.ts +8 -0
- package/controls/ListView/HeaderButton.js +8 -0
- package/controls/ListView/HeaderCell.d.ts +20 -0
- package/controls/ListView/HeaderCell.js +47 -0
- package/controls/ListView/IListViewProps.d.ts +105 -0
- package/controls/ListView/IListViewProps.js +1 -0
- package/controls/ListView/ListView.d.ts +20 -0
- package/controls/ListView/ListView.js +97 -0
- package/controls/ListView/NoData.d.ts +19 -0
- package/controls/ListView/NoData.js +30 -0
- package/controls/ListView/SortButton.d.ts +16 -0
- package/controls/ListView/SortButton.js +26 -0
- package/controls/ListView/Table.d.ts +18 -0
- package/controls/ListView/Table.js +99 -0
- package/controls/ListView/Total.d.ts +9 -0
- package/controls/ListView/Total.js +28 -0
- package/controls/ListView/sortItems.d.ts +6 -0
- package/controls/ListView/sortItems.js +35 -0
- package/controls/Mouse/Mouse.d.ts +38 -0
- package/controls/Mouse/Mouse.js +51 -0
- package/controls/Mouse/index.d.ts +1 -0
- package/controls/Mouse/index.js +1 -0
- package/controls/PrimaryButton/PrimaryButton.d.ts +63 -0
- package/controls/PrimaryButton/PrimaryButton.js +83 -0
- package/controls/PrimaryButton/index.d.ts +1 -0
- package/controls/PrimaryButton/index.js +1 -0
- package/controls/Progress/Progress.d.ts +35 -0
- package/controls/Progress/Progress.js +49 -0
- package/controls/Progress/index.d.ts +1 -0
- package/controls/Progress/index.js +1 -0
- package/controls/SecondaryButton/SecondaryButton.d.ts +58 -0
- package/controls/SecondaryButton/SecondaryButton.js +73 -0
- package/controls/SecondaryButton/index.d.ts +1 -0
- package/controls/SecondaryButton/index.js +1 -0
- package/controls/TabBar/Tab.d.ts +21 -0
- package/controls/TabBar/Tab.js +25 -0
- package/controls/TabBar/TabBar.d.ts +34 -0
- package/controls/TabBar/TabBar.js +134 -0
- package/controls/TabBar/Underliner.d.ts +7 -0
- package/controls/TabBar/Underliner.js +27 -0
- package/controls/TabBar/index.d.ts +1 -0
- package/controls/TabBar/index.js +1 -0
- package/controls/TertiaryButton/TertiaryButton.d.ts +28 -0
- package/controls/TertiaryButton/TertiaryButton.js +65 -0
- package/controls/TertiaryButton/index.d.ts +1 -0
- package/controls/TertiaryButton/index.js +1 -0
- package/controls/View/View.d.ts +35 -0
- package/controls/View/View.js +58 -0
- package/controls/View/index.d.ts +1 -0
- package/controls/View/index.js +1 -0
- package/formatters/Date/DateTime.d.ts +45 -0
- package/formatters/Date/DateTime.js +64 -0
- package/formatters/Date/elements/Custom.d.ts +18 -0
- package/formatters/Date/elements/Custom.js +22 -0
- package/formatters/Date/elements/Distance.d.ts +24 -0
- package/formatters/Date/elements/Distance.js +45 -0
- package/formatters/Date/elements/LongDate.d.ts +17 -0
- package/formatters/Date/elements/LongDate.js +11 -0
- package/formatters/Date/elements/LongDateTime.d.ts +14 -0
- package/formatters/Date/elements/LongDateTime.js +10 -0
- package/formatters/Date/elements/LongTime.d.ts +14 -0
- package/formatters/Date/elements/LongTime.js +10 -0
- package/formatters/Date/elements/ShortDate.d.ts +14 -0
- package/formatters/Date/elements/ShortDate.js +10 -0
- package/formatters/Date/elements/ShortDateTime.d.ts +14 -0
- package/formatters/Date/elements/ShortDateTime.js +10 -0
- package/formatters/Date/elements/ShortTime.d.ts +18 -0
- package/formatters/Date/elements/ShortTime.js +10 -0
- package/formatters/Date/elements/toDate.d.ts +2 -0
- package/formatters/Date/elements/toDate.js +13 -0
- package/formatters/Date/index.d.ts +1 -0
- package/formatters/Date/index.js +1 -0
- package/formatters/Filesize/Filesize.d.ts +29 -0
- package/formatters/Filesize/Filesize.js +54 -0
- package/formatters/Filesize/index.d.ts +1 -0
- package/formatters/Filesize/index.js +1 -0
- package/formatters/GIS/Latitude.d.ts +23 -0
- package/formatters/GIS/Latitude.js +13 -0
- package/formatters/GIS/Longitude.d.ts +23 -0
- package/formatters/GIS/Longitude.js +13 -0
- package/formatters/GIS/index.d.ts +2 -0
- package/formatters/GIS/index.js +2 -0
- package/formatters/GIS/toDMS.d.ts +2 -0
- package/formatters/GIS/toDMS.js +16 -0
- package/formatters/Highlight/Highlight.d.ts +22 -0
- package/formatters/Highlight/Highlight.js +32 -0
- package/formatters/Highlight/index.d.ts +1 -0
- package/formatters/Highlight/index.js +1 -0
- package/formatters/Human/Human.d.ts +18 -0
- package/formatters/Human/Human.js +34 -0
- package/formatters/Human/index.d.ts +1 -0
- package/formatters/Human/index.js +1 -0
- package/formatters/Number/Number.d.ts +24 -0
- package/formatters/Number/Number.js +36 -0
- package/formatters/Number/index.d.ts +1 -0
- package/formatters/Number/index.js +1 -0
- package/helper/DMS.d.ts +22 -0
- package/helper/DMS.js +46 -0
- package/helper/HslColor.d.ts +11 -0
- package/helper/HslColor.js +47 -0
- package/helper/RgbColor.d.ts +43 -0
- package/helper/RgbColor.js +162 -0
- package/helper/SizeHelper.d.ts +10 -0
- package/helper/SizeHelper.js +56 -0
- package/helper/alpha.d.ts +8 -0
- package/helper/alpha.js +17 -0
- package/helper/darken.d.ts +8 -0
- package/helper/darken.js +18 -0
- package/helper/guard.d.ts +5 -0
- package/helper/guard.js +7 -0
- package/helper/lighten.d.ts +8 -0
- package/helper/lighten.js +11 -0
- package/helper/md5.d.ts +2 -0
- package/helper/md5.js +162 -0
- package/helper/nameToHex.d.ts +6 -0
- package/helper/nameToHex.js +163 -0
- package/inputs/DateInput/Body.d.ts +34 -0
- package/inputs/DateInput/Body.js +50 -0
- package/inputs/DateInput/Calendar.d.ts +15 -0
- package/inputs/DateInput/Calendar.js +60 -0
- package/inputs/DateInput/DateInput.d.ts +73 -0
- package/inputs/DateInput/DateInput.js +143 -0
- package/inputs/DateInput/Day.d.ts +32 -0
- package/inputs/DateInput/Day.js +33 -0
- package/inputs/DateInput/InfiniteList.d.ts +26 -0
- package/inputs/DateInput/InfiniteList.js +87 -0
- package/inputs/DateInput/Nav.d.ts +11 -0
- package/inputs/DateInput/Nav.js +24 -0
- package/inputs/DateInput/Navbar.d.ts +16 -0
- package/inputs/DateInput/Navbar.js +33 -0
- package/inputs/DateInput/NumericInput.d.ts +14 -0
- package/inputs/DateInput/NumericInput.js +48 -0
- package/inputs/DateInput/Selector.d.ts +47 -0
- package/inputs/DateInput/Selector.js +55 -0
- package/inputs/DateInput/SimpleList.d.ts +19 -0
- package/inputs/DateInput/SimpleList.js +31 -0
- package/inputs/Dropdown/Body.d.ts +25 -0
- package/inputs/Dropdown/Body.js +14 -0
- package/inputs/Dropdown/Column.d.ts +21 -0
- package/inputs/Dropdown/Column.js +6 -0
- package/inputs/Dropdown/Dropdown.d.ts +136 -0
- package/inputs/Dropdown/Dropdown.js +446 -0
- package/inputs/Dropdown/Selection.d.ts +11 -0
- package/inputs/Dropdown/Selection.js +23 -0
- package/inputs/Dropdown/Selector.d.ts +29 -0
- package/inputs/Dropdown/Selector.js +16 -0
- package/inputs/Dropdown/index.d.ts +1 -0
- package/inputs/Dropdown/index.js +1 -0
- package/inputs/Editor/Editor.d.ts +45 -0
- package/inputs/Editor/Editor.js +60 -0
- package/inputs/Editor/buttons/BoldButton.d.ts +7 -0
- package/inputs/Editor/buttons/BoldButton.js +7 -0
- package/inputs/Editor/buttons/BulletListButton.d.ts +7 -0
- package/inputs/Editor/buttons/BulletListButton.js +7 -0
- package/inputs/Editor/buttons/CodeBlockButton.d.ts +7 -0
- package/inputs/Editor/buttons/CodeBlockButton.js +7 -0
- package/inputs/Editor/buttons/CodeButton.d.ts +7 -0
- package/inputs/Editor/buttons/CodeButton.js +7 -0
- package/inputs/Editor/buttons/ItalicButton.d.ts +7 -0
- package/inputs/Editor/buttons/ItalicButton.js +7 -0
- package/inputs/Editor/buttons/OrderedListButton.d.ts +7 -0
- package/inputs/Editor/buttons/OrderedListButton.js +7 -0
- package/inputs/Editor/buttons/StrikethroughButton.d.ts +7 -0
- package/inputs/Editor/buttons/StrikethroughButton.js +7 -0
- package/inputs/Editor/index.d.ts +1 -0
- package/inputs/Editor/index.js +1 -0
- package/inputs/Editor/menu/MenuBar.d.ts +9 -0
- package/inputs/Editor/menu/MenuBar.js +44 -0
- package/inputs/Editor/menu/MenuButton.d.ts +35 -0
- package/inputs/Editor/menu/MenuButton.js +34 -0
- package/inputs/Editor/menu/MenuSeparator.d.ts +7 -0
- package/inputs/Editor/menu/MenuSeparator.js +24 -0
- package/inputs/Input/Clear.d.ts +7 -0
- package/inputs/Input/Clear.js +14 -0
- package/inputs/Input/Input.d.ts +133 -0
- package/inputs/Input/Input.js +64 -0
- package/inputs/Input/InputWrapper.d.ts +23 -0
- package/inputs/Input/InputWrapper.js +57 -0
- package/inputs/Input/index.d.ts +1 -0
- package/inputs/Input/index.js +1 -0
- package/inputs/Selector/ISelectorProps.d.ts +29 -0
- package/inputs/Selector/ISelectorProps.js +1 -0
- package/inputs/Selector/Selector.d.ts +29 -0
- package/inputs/Selector/Selector.js +77 -0
- package/inputs/Selector/index.d.ts +1 -0
- package/inputs/Selector/index.js +1 -0
- package/inputs/Selector/widgets/Checkbox.d.ts +6 -0
- package/inputs/Selector/widgets/Checkbox.js +29 -0
- package/inputs/Selector/widgets/Toggle.d.ts +6 -0
- package/inputs/Selector/widgets/Toggle.js +24 -0
- package/inputs/Slider/Slider.d.ts +63 -0
- package/inputs/Slider/Slider.js +198 -0
- package/inputs/Slider/index.d.ts +1 -0
- package/inputs/Slider/index.js +1 -0
- package/inputs/Textarea/Textarea.d.ts +79 -0
- package/inputs/Textarea/Textarea.js +65 -0
- package/inputs/Textarea/index.d.ts +1 -0
- package/inputs/Textarea/index.js +1 -0
- package/map/Map/Map.d.ts +47 -0
- package/map/Map/Map.js +221 -0
- package/map/Map/index.d.ts +1 -0
- package/map/Map/index.js +1 -0
- package/map/PositionsManager/PositionBox.d.ts +14 -0
- package/map/PositionsManager/PositionBox.js +86 -0
- package/map/PositionsManager/PositionsManager.d.ts +27 -0
- package/map/PositionsManager/PositionsManager.js +99 -0
- package/map/PositionsManager/index.d.ts +1 -0
- package/map/PositionsManager/index.js +1 -0
- package/map/controls/CompassButton/CompassButton.d.ts +33 -0
- package/map/controls/CompassButton/CompassButton.js +88 -0
- package/map/controls/CompassButton/index.d.ts +2 -0
- package/map/controls/CompassButton/index.js +2 -0
- package/map/controls/FullscreenButton/FullscreenButton.d.ts +21 -0
- package/map/controls/FullscreenButton/FullscreenButton.js +62 -0
- package/map/controls/FullscreenButton/index.d.ts +2 -0
- package/map/controls/FullscreenButton/index.js +2 -0
- package/map/controls/Geocoder/Geocoder.d.ts +49 -0
- package/map/controls/Geocoder/Geocoder.js +179 -0
- package/map/controls/Geocoder/GeocoderApi.d.ts +59 -0
- package/map/controls/Geocoder/GeocoderApi.js +68 -0
- package/map/controls/Geocoder/GeocoderEntry.d.ts +15 -0
- package/map/controls/Geocoder/GeocoderEntry.js +18 -0
- package/map/controls/Geocoder/GeocoderList.d.ts +10 -0
- package/map/controls/Geocoder/GeocoderList.js +18 -0
- package/map/controls/Geocoder/GeocoderSelector.d.ts +16 -0
- package/map/controls/Geocoder/GeocoderSelector.js +25 -0
- package/map/controls/Geocoder/index.d.ts +2 -0
- package/map/controls/Geocoder/index.js +2 -0
- package/map/controls/Graticule/Graticule.d.ts +35 -0
- package/map/controls/Graticule/Graticule.js +142 -0
- package/map/controls/Graticule/index.d.ts +1 -0
- package/map/controls/Graticule/index.js +1 -0
- package/map/controls/MapLoader/MapLoader.d.ts +33 -0
- package/map/controls/MapLoader/MapLoader.js +73 -0
- package/map/controls/MapLoader/index.d.ts +1 -0
- package/map/controls/MapLoader/index.js +1 -0
- package/map/controls/ScaleControl/ScaleControl.d.ts +24 -0
- package/map/controls/ScaleControl/ScaleControl.js +107 -0
- package/map/controls/ScaleControl/index.d.ts +1 -0
- package/map/controls/ScaleControl/index.js +1 -0
- package/map/controls/ZoomInButton/ZoomInButton.d.ts +19 -0
- package/map/controls/ZoomInButton/ZoomInButton.js +56 -0
- package/map/controls/ZoomInButton/index.d.ts +2 -0
- package/map/controls/ZoomInButton/index.js +2 -0
- package/map/controls/ZoomOutButton/ZoomOutButton.d.ts +19 -0
- package/map/controls/ZoomOutButton/ZoomOutButton.js +56 -0
- package/map/controls/ZoomOutButton/index.d.ts +2 -0
- package/map/controls/ZoomOutButton/index.js +2 -0
- package/map/controls/base/MapButton/Hint.d.ts +17 -0
- package/map/controls/base/MapButton/Hint.js +34 -0
- package/map/controls/base/MapButton/MapButton.d.ts +46 -0
- package/map/controls/base/MapButton/MapButton.js +71 -0
- package/map/controls/base/MapButton/index.d.ts +1 -0
- package/map/controls/base/MapButton/index.js +1 -0
- package/map/controls/base/MapButtonGroup/MapButtonGroup.d.ts +17 -0
- package/map/controls/base/MapButtonGroup/MapButtonGroup.js +24 -0
- package/map/controls/base/MapButtonGroup/index.d.ts +1 -0
- package/map/controls/base/MapButtonGroup/index.js +1 -0
- package/map/controls/base/MapControl/MapControl.d.ts +36 -0
- package/map/controls/base/MapControl/MapControl.js +77 -0
- package/map/controls/base/MapControl/index.d.ts +1 -0
- package/map/controls/base/MapControl/index.js +1 -0
- package/map/layers/ClusterLayer/ClusterLayer.d.ts +79 -0
- package/map/layers/ClusterLayer/ClusterLayer.js +118 -0
- package/map/layers/HtmlMarkerLayer/HtmlMarkerLayer.d.ts +51 -0
- package/map/layers/HtmlMarkerLayer/HtmlMarkerLayer.js +151 -0
- package/map/layers/HtmlMarkerLayer/index.d.ts +1 -0
- package/map/layers/HtmlMarkerLayer/index.js +1 -0
- package/map/layers/InterpolationLayer/ContoursFragmentShader.d.ts +2 -0
- package/map/layers/InterpolationLayer/ContoursFragmentShader.js +2 -0
- package/map/layers/InterpolationLayer/ContoursVertexShader.d.ts +2 -0
- package/map/layers/InterpolationLayer/ContoursVertexShader.js +2 -0
- package/map/layers/InterpolationLayer/IGradientStop.d.ts +5 -0
- package/map/layers/InterpolationLayer/IGradientStop.js +1 -0
- package/map/layers/InterpolationLayer/InterpolationLayer.d.ts +35 -0
- package/map/layers/InterpolationLayer/InterpolationLayer.js +256 -0
- package/map/layers/InterpolationLayer/LevelsFragmentShader.d.ts +2 -0
- package/map/layers/InterpolationLayer/LevelsFragmentShader.js +2 -0
- package/map/layers/InterpolationLayer/LevelsVertexShader.d.ts +2 -0
- package/map/layers/InterpolationLayer/LevelsVertexShader.js +2 -0
- package/map/layers/InterpolationLayer/index.d.ts +1 -0
- package/map/layers/InterpolationLayer/index.js +1 -0
- package/map/layers/ParticlesLayer/ParticlesFragmentShader.d.ts +2 -0
- package/map/layers/ParticlesLayer/ParticlesFragmentShader.js +2 -0
- package/map/layers/ParticlesLayer/ParticlesLayer.d.ts +40 -0
- package/map/layers/ParticlesLayer/ParticlesLayer.js +337 -0
- package/map/layers/ParticlesLayer/ParticlesVertexShader.d.ts +2 -0
- package/map/layers/ParticlesLayer/ParticlesVertexShader.js +2 -0
- package/map/layers/ParticlesLayer/UVFragmentShader.d.ts +2 -0
- package/map/layers/ParticlesLayer/UVFragmentShader.js +2 -0
- package/map/layers/ParticlesLayer/UVVertexShader.d.ts +2 -0
- package/map/layers/ParticlesLayer/UVVertexShader.js +2 -0
- package/map/layers/ParticlesLayer/index.d.ts +1 -0
- package/map/layers/ParticlesLayer/index.js +1 -0
- package/map/markers/ClusterMarker/ClusterMarker.d.ts +36 -0
- package/map/markers/ClusterMarker/ClusterMarker.js +99 -0
- package/map/markers/ClusterMarker/index.d.ts +1 -0
- package/map/markers/ClusterMarker/index.js +1 -0
- package/map/markers/RiskMarker/RiskMarker.d.ts +22 -0
- package/map/markers/RiskMarker/RiskMarker.js +61 -0
- package/map/markers/RiskMarker/index.d.ts +1 -0
- package/map/markers/RiskMarker/index.js +1 -0
- package/modules/MainMenu/Item.d.ts +42 -0
- package/modules/MainMenu/Item.js +94 -0
- package/modules/MainMenu/MainMenu.d.ts +20 -0
- package/modules/MainMenu/MainMenu.js +41 -0
- package/modules/MainMenu/index.d.ts +1 -0
- package/modules/MainMenu/index.js +1 -0
- package/modules/Root/Content.d.ts +16 -0
- package/modules/Root/Content.js +25 -0
- package/modules/Root/Overlay.d.ts +23 -0
- package/modules/Root/Overlay.js +33 -0
- package/modules/Root/Root.d.ts +7 -0
- package/modules/Root/Root.js +45 -0
- package/modules/Root/Shader.d.ts +15 -0
- package/modules/Root/Shader.js +24 -0
- package/modules/Root/Sidebar.d.ts +13 -0
- package/modules/Root/Sidebar.js +24 -0
- package/modules/Root/index.d.ts +1 -0
- package/modules/Root/index.js +1 -0
- package/modules/Root/stories/SampleContent.d.ts +7 -0
- package/modules/Root/stories/SampleContent.js +44 -0
- package/package.json +7 -7
- package/services/Dialog/AlertDialog.d.ts +31 -0
- package/services/Dialog/AlertDialog.js +29 -0
- package/services/Dialog/ConfirmDialog.d.ts +34 -0
- package/services/Dialog/ConfirmDialog.js +30 -0
- package/services/Dialog/Dialog.d.ts +91 -0
- package/services/Dialog/Dialog.js +92 -0
- package/services/Dialog/DialogBackground.d.ts +7 -0
- package/services/Dialog/DialogBackground.js +12 -0
- package/services/Dialog/DialogContent.d.ts +25 -0
- package/services/Dialog/DialogContent.js +38 -0
- package/services/Dialog/DialogFooter.d.ts +24 -0
- package/services/Dialog/DialogFooter.js +50 -0
- package/services/Dialog/DialogHeader.d.ts +18 -0
- package/services/Dialog/DialogHeader.js +36 -0
- package/services/Dialog/DialogWindow.d.ts +13 -0
- package/services/Dialog/DialogWindow.js +12 -0
- package/services/Dialog/XhrDialog.d.ts +34 -0
- package/services/Dialog/XhrDialog.js +321 -0
- package/services/Dialog/index.d.ts +1 -0
- package/services/Dialog/index.js +1 -0
- package/services/Toast/IToastMessage.d.ts +10 -0
- package/services/Toast/IToastMessage.js +1 -0
- package/services/Toast/IToastProps.d.ts +23 -0
- package/services/Toast/IToastProps.js +1 -0
- package/services/Toast/Toast.d.ts +21 -0
- package/services/Toast/Toast.js +79 -0
- package/services/Toast/ToastContainer.d.ts +40 -0
- package/services/Toast/ToastContainer.js +65 -0
- package/services/Toast/ToastContext.d.ts +22 -0
- package/services/Toast/ToastContext.js +7 -0
- package/services/Toast/ToastProvider.d.ts +19 -0
- package/services/Toast/ToastProvider.js +67 -0
- package/services/Toast/index.d.ts +2 -0
- package/services/Toast/index.js +2 -0
- package/services/Toast/useToast.d.ts +5 -0
- package/services/Toast/useToast.js +9 -0
- package/styles/NormalTheme.d.ts +3 -0
- package/styles/NormalTheme.js +65 -0
- package/styles/StyleBase.d.ts +2 -0
- package/styles/StyleBase.js +8 -0
- package/styles/StyleReset.d.ts +2 -0
- package/styles/StyleReset.js +8 -0
- package/styles/styled-theme.d.ts +0 -0
- package/styles/styled-theme.js +1 -0
- package/svg/editor/index.d.ts +10 -0
- package/svg/editor/index.js +11 -0
- package/svg/file/index.d.ts +5 -0
- package/svg/file/index.js +6 -0
- package/svg/icons/index.d.ts +36 -0
- package/svg/icons/index.js +37 -0
- package/svg/index.d.ts +11 -0
- package/svg/index.js +5 -0
- package/svg/menu/index.d.ts +8 -0
- package/svg/menu/index.js +9 -0
package/Types.d.ts
ADDED
package/Types.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface IProps {
|
|
3
|
+
/** @ignore */
|
|
4
|
+
className?: string;
|
|
5
|
+
/**
|
|
6
|
+
* Content to place by `Anchor`.
|
|
7
|
+
*/
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* If set, then positioning is determined to this element's nearest
|
|
11
|
+
* **scrolling** parent. If not set, positioning is relative to the
|
|
12
|
+
* viewport.
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
15
|
+
relativeToParent?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Overrides the horizontal positioning to force it `left` or `right`.
|
|
18
|
+
* @default none
|
|
19
|
+
*/
|
|
20
|
+
horizontal?: 'none' | 'left' | 'right';
|
|
21
|
+
/**
|
|
22
|
+
* Overrides the vertical positioning to force it `up` or `down`.
|
|
23
|
+
* @default none
|
|
24
|
+
*/
|
|
25
|
+
vertical?: 'none' | 'up' | 'down';
|
|
26
|
+
/**
|
|
27
|
+
* Anchor left position in parent.
|
|
28
|
+
* @default auto
|
|
29
|
+
*/
|
|
30
|
+
left?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Anchor top position in parent.
|
|
33
|
+
* @default auto
|
|
34
|
+
*/
|
|
35
|
+
top?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Anchor bottom position in parent.
|
|
38
|
+
* @default auto
|
|
39
|
+
*/
|
|
40
|
+
bottom?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Anchor right position in parent.
|
|
43
|
+
* @default auto
|
|
44
|
+
*/
|
|
45
|
+
right?: string;
|
|
46
|
+
/**
|
|
47
|
+
* If set, `Anchor` will update its position when the page is scrolled.
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
adapt?: boolean;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Often, a panel must open somewhere when a button or icon is clicked. This panel
|
|
54
|
+
* opens near the button/icon, but it may fall outside the viewports bounds, depending
|
|
55
|
+
* on the current scroll position. An `Anchor` wraps such a panel, and ensures that
|
|
56
|
+
* the panel opens up, down, left or right of the anchor position depending on the
|
|
57
|
+
* scroll position, ensuring that the panel is inside the viewport.
|
|
58
|
+
*
|
|
59
|
+
* By default, positioning happens only once (when the anchor mounts), but with
|
|
60
|
+
* the `adapt` prop, positioning happens whenever the page is scrolled.
|
|
61
|
+
*/
|
|
62
|
+
declare const Anchor: (props: IProps) => React.JSX.Element;
|
|
63
|
+
export { Anchor };
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Often, a panel must open somewhere when a button or icon is clicked. This panel
|
|
4
|
+
* opens near the button/icon, but it may fall outside the viewports bounds, depending
|
|
5
|
+
* on the current scroll position. An `Anchor` wraps such a panel, and ensures that
|
|
6
|
+
* the panel opens up, down, left or right of the anchor position depending on the
|
|
7
|
+
* scroll position, ensuring that the panel is inside the viewport.
|
|
8
|
+
*
|
|
9
|
+
* By default, positioning happens only once (when the anchor mounts), but with
|
|
10
|
+
* the `adapt` prop, positioning happens whenever the page is scrolled.
|
|
11
|
+
*/
|
|
12
|
+
var Anchor = function (props) {
|
|
13
|
+
var _a, _b, _c, _d;
|
|
14
|
+
var anchorRef = React.useRef(null);
|
|
15
|
+
var contentRef = React.useRef(null);
|
|
16
|
+
var findScrollingParentRecursive = function (node) {
|
|
17
|
+
var overflowY = window.getComputedStyle(node).overflowY;
|
|
18
|
+
if (overflowY == 'scroll' || overflowY == 'auto')
|
|
19
|
+
return node;
|
|
20
|
+
if (node.parentElement)
|
|
21
|
+
return findScrollingParentRecursive(node.parentElement);
|
|
22
|
+
return null;
|
|
23
|
+
};
|
|
24
|
+
// Return my nearest parent that's scrolling (frames are not supported). If
|
|
25
|
+
// no parent is found, null is returned.
|
|
26
|
+
var findScrollingParent = function () {
|
|
27
|
+
return findScrollingParentRecursive(anchorRef.current.parentElement);
|
|
28
|
+
};
|
|
29
|
+
// Returns true if this control is in the lower half of its scrolling parent.
|
|
30
|
+
// (if direction == parent), or in the lower half of the viewport if no
|
|
31
|
+
// scrolling parent is found.
|
|
32
|
+
var isInLowerViewport = function () {
|
|
33
|
+
var scrollingParent = findScrollingParent();
|
|
34
|
+
if (scrollingParent == null || props.relativeToParent) {
|
|
35
|
+
return anchorRef.current.getBoundingClientRect().top > window.innerHeight / 2;
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
var myY = anchorRef.current.getBoundingClientRect().top;
|
|
39
|
+
var containerY = scrollingParent.getBoundingClientRect().top;
|
|
40
|
+
var containerHeight = scrollingParent.getBoundingClientRect().height;
|
|
41
|
+
var offset = myY - containerY;
|
|
42
|
+
return offset > containerHeight / 2;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
// Returns true if this control is in the right half of its scrolling parent.
|
|
46
|
+
// (if direction == parent), or in the right half of the viewport if no
|
|
47
|
+
// scrolling parent is found.
|
|
48
|
+
var isInRightViewport = function () {
|
|
49
|
+
var scrollingParent = findScrollingParent();
|
|
50
|
+
if (scrollingParent == null || props.relativeToParent) {
|
|
51
|
+
return anchorRef.current.getBoundingClientRect().left > window.innerWidth / 2;
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
var myX = anchorRef.current.getBoundingClientRect().left;
|
|
55
|
+
var containerX = scrollingParent.getBoundingClientRect().left;
|
|
56
|
+
var containerWidth = scrollingParent.getBoundingClientRect().width;
|
|
57
|
+
var offset = myX - containerX;
|
|
58
|
+
return offset > containerWidth / 2;
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
var updatePosition = function () {
|
|
62
|
+
if (contentRef.current == null)
|
|
63
|
+
return;
|
|
64
|
+
// Calculate size of content:
|
|
65
|
+
var width = contentRef.current.getBoundingClientRect().width;
|
|
66
|
+
var height = contentRef.current.getBoundingClientRect().height;
|
|
67
|
+
contentRef.current.style.visibility = 'visible';
|
|
68
|
+
if (props.horizontal === 'left') {
|
|
69
|
+
contentRef.current.style.left = "-".concat(width, "px");
|
|
70
|
+
}
|
|
71
|
+
else if (props.horizontal === 'right') {
|
|
72
|
+
contentRef.current.style.left = '0px';
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
contentRef.current.style.left = isInRightViewport() ? "-".concat(width, "px") : '0px';
|
|
76
|
+
}
|
|
77
|
+
if (props.vertical === 'up') {
|
|
78
|
+
contentRef.current.style.top = "-".concat(height, "px");
|
|
79
|
+
}
|
|
80
|
+
else if (props.vertical === 'down') {
|
|
81
|
+
contentRef.current.style.top = '0px';
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
contentRef.current.style.top = isInLowerViewport() ? "-".concat(height, "px") : '0px';
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
React.useEffect(function () {
|
|
88
|
+
document.addEventListener('scroll', handleScroll);
|
|
89
|
+
return function () {
|
|
90
|
+
document.removeEventListener('scroll', handleScroll);
|
|
91
|
+
};
|
|
92
|
+
}, []);
|
|
93
|
+
// We always listen to the scroll event. However, we only update the anchor
|
|
94
|
+
// position on scroll when adapt=true.
|
|
95
|
+
var handleScroll = function () {
|
|
96
|
+
if (props.adapt) {
|
|
97
|
+
updatePosition();
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
// Set element position on mount, or when alignment changes.
|
|
101
|
+
React.useEffect(function () {
|
|
102
|
+
updatePosition();
|
|
103
|
+
}, [props.horizontal, props.vertical]);
|
|
104
|
+
return (React.createElement("div", { ref: anchorRef, style: {
|
|
105
|
+
position: 'absolute',
|
|
106
|
+
left: (_a = props.left) !== null && _a !== void 0 ? _a : 'auto',
|
|
107
|
+
top: (_b = props.top) !== null && _b !== void 0 ? _b : 'auto',
|
|
108
|
+
bottom: (_c = props.bottom) !== null && _c !== void 0 ? _c : 'auto',
|
|
109
|
+
right: (_d = props.right) !== null && _d !== void 0 ? _d : 'auto',
|
|
110
|
+
} },
|
|
111
|
+
React.createElement("div", { ref: contentRef, style: { position: 'absolute', visibility: 'hidden', transition: 'top 250ms ease, left 250ms ease' } }, props.children)));
|
|
112
|
+
};
|
|
113
|
+
export { Anchor };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Anchor';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Anchor';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface IProps {
|
|
3
|
+
/** @ignore */
|
|
4
|
+
className?: string;
|
|
5
|
+
/** Children are one or more `Dockable`. */
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* If set, draw a border around the Dock.
|
|
9
|
+
* @default false
|
|
10
|
+
*/
|
|
11
|
+
bordered?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Dock offset from top of map, in pixels.
|
|
14
|
+
* @default 20
|
|
15
|
+
*/
|
|
16
|
+
top?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Dock offset from bottom of map, in pixels.
|
|
19
|
+
* @default 20
|
|
20
|
+
*/
|
|
21
|
+
bottom?: number;
|
|
22
|
+
/**
|
|
23
|
+
* Dock offset from right side of map, in pixels.
|
|
24
|
+
* @default 20
|
|
25
|
+
*/
|
|
26
|
+
right?: number;
|
|
27
|
+
/**
|
|
28
|
+
* Gap between items, in pixels.
|
|
29
|
+
* @default 16
|
|
30
|
+
*/
|
|
31
|
+
gap?: number;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A `Dock` is a place where `Dockable` components live. Dockables have a lat/lng location on
|
|
35
|
+
* the map. When they go out of view, they move to the `Dock`.
|
|
36
|
+
*
|
|
37
|
+
* A `Dock` aligns to the right of the map is as wide as the entire map. It is up to
|
|
38
|
+
* the `Dockable` to set its width. A `Dock` can have offsets from the top, right, and bottom
|
|
39
|
+
* of the map.
|
|
40
|
+
*
|
|
41
|
+
* When docked, Dockables are placed in a vertical flexbox. When undocked, Dockables use
|
|
42
|
+
* absolute positioning on the map and do not stick to the Dock.
|
|
43
|
+
*/
|
|
44
|
+
declare const Dock: ({ bordered, top, bottom, right, gap, ...props }: IProps) => React.JSX.Element;
|
|
45
|
+
export { Dock };
|
|
@@ -0,0 +1,61 @@
|
|
|
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 styled, { css } from 'styled-components';
|
|
29
|
+
var DockBase = function (props) {
|
|
30
|
+
return (React.createElement("div", { className: props.className }, props.children));
|
|
31
|
+
};
|
|
32
|
+
var DockStyled = styled(DockBase)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n // Position and size:\n position: absolute;\n left: 0;\n right: ", "px;\n top: ", "px;\n bottom: ", "px;\n box-sizing: border-box;\n // zIndex >= 2 will overlap Mapbox logo.\n z-index: 2;\n\n // Appearance:\n background-color: transparent;\n ", "\n pointer-events: none !important; /* Map will set pointer-events:all to its children. */\n\n // Content:\n display: flex;\n flex-direction: column;\n align-items: end;\n gap: ", "px;\n"], ["\n // Position and size:\n position: absolute;\n left: 0;\n right: ", "px;\n top: ", "px;\n bottom: ", "px;\n box-sizing: border-box;\n // zIndex >= 2 will overlap Mapbox logo.\n z-index: 2;\n\n // Appearance:\n background-color: transparent;\n ", "\n pointer-events: none !important; /* Map will set pointer-events:all to its children. */\n\n // Content:\n display: flex;\n flex-direction: column;\n align-items: end;\n gap: ", "px;\n"
|
|
33
|
+
/**
|
|
34
|
+
* A `Dock` is a place where `Dockable` components live. Dockables have a lat/lng location on
|
|
35
|
+
* the map. When they go out of view, they move to the `Dock`.
|
|
36
|
+
*
|
|
37
|
+
* A `Dock` aligns to the right of the map is as wide as the entire map. It is up to
|
|
38
|
+
* the `Dockable` to set its width. A `Dock` can have offsets from the top, right, and bottom
|
|
39
|
+
* of the map.
|
|
40
|
+
*
|
|
41
|
+
* When docked, Dockables are placed in a vertical flexbox. When undocked, Dockables use
|
|
42
|
+
* absolute positioning on the map and do not stick to the Dock.
|
|
43
|
+
*/
|
|
44
|
+
])), function (p) { return p.right; }, function (p) { return p.top; }, function (p) { return p.bottom; }, function (p) { return p.bordered && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["border: dashed 1px white;"], ["border: dashed 1px white;"]))); }, function (p) { return p.gap; });
|
|
45
|
+
/**
|
|
46
|
+
* A `Dock` is a place where `Dockable` components live. Dockables have a lat/lng location on
|
|
47
|
+
* the map. When they go out of view, they move to the `Dock`.
|
|
48
|
+
*
|
|
49
|
+
* A `Dock` aligns to the right of the map is as wide as the entire map. It is up to
|
|
50
|
+
* the `Dockable` to set its width. A `Dock` can have offsets from the top, right, and bottom
|
|
51
|
+
* of the map.
|
|
52
|
+
*
|
|
53
|
+
* When docked, Dockables are placed in a vertical flexbox. When undocked, Dockables use
|
|
54
|
+
* absolute positioning on the map and do not stick to the Dock.
|
|
55
|
+
*/
|
|
56
|
+
var Dock = function (_a) {
|
|
57
|
+
var _b = _a.bordered, bordered = _b === void 0 ? false : _b, _c = _a.top, top = _c === void 0 ? 8 : _c, _d = _a.bottom, bottom = _d === void 0 ? 8 : _d, _e = _a.right, right = _e === void 0 ? 8 : _e, _f = _a.gap, gap = _f === void 0 ? 16 : _f, props = __rest(_a, ["bordered", "top", "bottom", "right", "gap"]);
|
|
58
|
+
return React.createElement(DockStyled, __assign({ bordered: bordered, top: top, bottom: bottom, right: right, gap: gap }, props));
|
|
59
|
+
};
|
|
60
|
+
export { Dock };
|
|
61
|
+
var templateObject_1, templateObject_2;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface IDockableProps {
|
|
3
|
+
/** @ignore */
|
|
4
|
+
className?: string;
|
|
5
|
+
/** @ignore */
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Dockable's latitude.
|
|
9
|
+
* @default 0
|
|
10
|
+
*/
|
|
11
|
+
latitude?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Dockable's longitude.
|
|
14
|
+
* @default 0
|
|
15
|
+
*/
|
|
16
|
+
longitude?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Dockable's x-offset from lat,lng position, while floating.
|
|
19
|
+
* @default 0
|
|
20
|
+
*/
|
|
21
|
+
offsetX?: number;
|
|
22
|
+
/**
|
|
23
|
+
* Dockable's y-offset from lat,lng position, while floating.
|
|
24
|
+
* @default 0
|
|
25
|
+
*/
|
|
26
|
+
offsetY?: number;
|
|
27
|
+
/**
|
|
28
|
+
* Optional custom z-index in order to stack overlapping Dockables.
|
|
29
|
+
* @default 1
|
|
30
|
+
*/
|
|
31
|
+
zIndex?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Dockables ordinarily are placed to the right of their map coordinate.
|
|
34
|
+
* If `swappable` is `horizontal`, they'll move to the left if they're too close to the right
|
|
35
|
+
* edge of the map. If `vertical`, they'll move to the top if they're too close to the top
|
|
36
|
+
* edge of the map.
|
|
37
|
+
* @default 'none'
|
|
38
|
+
*/
|
|
39
|
+
swappable?: 'none' | 'horizontal' | 'vertical' | 'both';
|
|
40
|
+
/**
|
|
41
|
+
* Force docking; don't allow Dockable to float.
|
|
42
|
+
* @default false
|
|
43
|
+
*/
|
|
44
|
+
alwaysDocked?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* It set, `Dockable` will flex in `Dock`. If a number is specified,
|
|
47
|
+
* then that's the max vertical height in pixels.
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
fill?: boolean | number;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* A `Dockable` is fixed to a lat/lng on the `Map`. It must be a child of `Dock`. When a Dockable
|
|
54
|
+
* is outside of the current map viewport, it moves to the `Dock`. If `alwaysDocked` is set,
|
|
55
|
+
* then the `Dockable` is always in the `Dock`.
|
|
56
|
+
*
|
|
57
|
+
* When a `Dockable` is out of the viewport, it gains the `.offscreen` CSS class.
|
|
58
|
+
*/
|
|
59
|
+
declare const Dockable: ({ longitude, latitude, offsetX, offsetY, swappable, alwaysDocked, zIndex, ...props }: IDockableProps) => React.JSX.Element;
|
|
60
|
+
export { Dockable, IDockableProps };
|
|
@@ -0,0 +1,98 @@
|
|
|
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 { useViewState } from '../../map/Map';
|
|
31
|
+
var DockableBase = function (props) {
|
|
32
|
+
// Reference to Dockable div:
|
|
33
|
+
var containerRef = React.useRef(null);
|
|
34
|
+
// Using the ViewState will cause this component to be rerendered when the
|
|
35
|
+
// map moves:
|
|
36
|
+
useViewState();
|
|
37
|
+
// Get size of map:
|
|
38
|
+
var map = useMap();
|
|
39
|
+
var mapWidth = map.current.getContainer().clientWidth;
|
|
40
|
+
var mapHeight = map.current.getContainer().clientHeight;
|
|
41
|
+
// Convert Dockable's lat/lng to pixel coordinates:
|
|
42
|
+
var _a = map.current.project([props.longitude, props.latitude]), x = _a.x, y = _a.y;
|
|
43
|
+
// Get size of Dockable:
|
|
44
|
+
var myWidth = containerRef.current ? containerRef.current.clientWidth : 0;
|
|
45
|
+
var myHeight = containerRef.current ? containerRef.current.clientHeight : 0;
|
|
46
|
+
// Is Dockable currently offscreen (boolean)?
|
|
47
|
+
var offsetX = props.offsetX;
|
|
48
|
+
var offsetY = props.offsetY;
|
|
49
|
+
var offscreen = x + offsetX < 0
|
|
50
|
+
|| y + offsetY < 0
|
|
51
|
+
|| x + offsetX + myWidth + (props.swappable ? -myWidth - offsetX * 2 : 0) > mapWidth
|
|
52
|
+
|| y + offsetY + myHeight > mapHeight;
|
|
53
|
+
var rightHalf = x > mapWidth / 2;
|
|
54
|
+
var bottomHalf = y > mapHeight / 2; // TODO: Future use for vertical swappable.
|
|
55
|
+
// A local style object is used rather than styled-components, because the
|
|
56
|
+
// style changes constantly and would produce too many styled-components
|
|
57
|
+
// classes.
|
|
58
|
+
var style = {
|
|
59
|
+
// Offscreen Dockables are relatively-positioned, so that they stay in the Dock.
|
|
60
|
+
// Onscreen Dockables are absolutely-positioned.
|
|
61
|
+
position: offscreen ? 'relative' : 'absolute',
|
|
62
|
+
pointerEvents: offscreen ? 'all' : 'none'
|
|
63
|
+
};
|
|
64
|
+
// Floating dockables get a position:
|
|
65
|
+
if (!offscreen && !props.alwaysDocked) {
|
|
66
|
+
if (props.swappable == 'horizontal' || props.swappable == 'both') {
|
|
67
|
+
style.marginLeft = props.swappable ? (rightHalf ? -myWidth - offsetX * 2 : 0) + "px" : 0;
|
|
68
|
+
}
|
|
69
|
+
if (props.swappable == 'vertical' || props.swappable == 'both') {
|
|
70
|
+
style.marginTop = props.swappable ? (bottomHalf ? -myHeight - offsetY * 2 : 0) + "px" : 0;
|
|
71
|
+
}
|
|
72
|
+
style.left = "".concat(x + offsetX, "px");
|
|
73
|
+
style.top = "".concat(y + offsetY, "px");
|
|
74
|
+
}
|
|
75
|
+
return (React.createElement("div", { style: style, className: "".concat(props.className, " ").concat(offscreen ? 'offscreen' : ''), ref: containerRef }, props.children));
|
|
76
|
+
};
|
|
77
|
+
var DockableStyled = styled(DockableBase)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: white;\n z-index: ", ";\n ", "\n"], ["\n color: white;\n z-index: ", ";\n ", "\n"
|
|
78
|
+
/**
|
|
79
|
+
* A `Dockable` is fixed to a lat/lng on the `Map`. It must be a child of `Dock`. When a Dockable
|
|
80
|
+
* is outside of the current map viewport, it moves to the `Dock`. If `alwaysDocked` is set,
|
|
81
|
+
* then the `Dockable` is always in the `Dock`.
|
|
82
|
+
*
|
|
83
|
+
* When a `Dockable` is out of the viewport, it gains the `.offscreen` CSS class.
|
|
84
|
+
*/
|
|
85
|
+
])), function (p) { return p.zIndex; }, function (p) { return p.fill && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n ", "\n ", "\n "], ["\n display: flex;\n ", "\n ", "\n "])), p.fill === true && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["flex: 1;"], ["flex: 1;"]))), p.fill && p.fill !== true && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["height: ", "px;"], ["height: ", "px;"])), p.fill)); });
|
|
86
|
+
/**
|
|
87
|
+
* A `Dockable` is fixed to a lat/lng on the `Map`. It must be a child of `Dock`. When a Dockable
|
|
88
|
+
* is outside of the current map viewport, it moves to the `Dock`. If `alwaysDocked` is set,
|
|
89
|
+
* then the `Dockable` is always in the `Dock`.
|
|
90
|
+
*
|
|
91
|
+
* When a `Dockable` is out of the viewport, it gains the `.offscreen` CSS class.
|
|
92
|
+
*/
|
|
93
|
+
var Dockable = function (_a) {
|
|
94
|
+
var _b = _a.longitude, longitude = _b === void 0 ? 0 : _b, _c = _a.latitude, latitude = _c === void 0 ? 0 : _c, _d = _a.offsetX, offsetX = _d === void 0 ? 0 : _d, _e = _a.offsetY, offsetY = _e === void 0 ? 0 : _e, _f = _a.swappable, swappable = _f === void 0 ? 'none' : _f, _g = _a.alwaysDocked, alwaysDocked = _g === void 0 ? false : _g, _h = _a.zIndex, zIndex = _h === void 0 ? 0 : _h, props = __rest(_a, ["longitude", "latitude", "offsetX", "offsetY", "swappable", "alwaysDocked", "zIndex"]);
|
|
95
|
+
return React.createElement(DockableStyled, __assign({ longitude: longitude, latitude: latitude, offsetX: offsetX, offsetY: offsetY, swappable: swappable, alwaysDocked: alwaysDocked, zIndex: zIndex }, props));
|
|
96
|
+
};
|
|
97
|
+
export { Dockable };
|
|
98
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IValidationProps } from './Validation';
|
|
3
|
+
interface IProps {
|
|
4
|
+
/** @ignore */
|
|
5
|
+
className?: string;
|
|
6
|
+
/** Field name. Required. */
|
|
7
|
+
name: string;
|
|
8
|
+
/** Field value. Required. */
|
|
9
|
+
value: any;
|
|
10
|
+
/** Control to show in field. */
|
|
11
|
+
control: React.ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Relative weight of field. If not set, field will not flex to fill
|
|
14
|
+
* available width.
|
|
15
|
+
*/
|
|
16
|
+
weight?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Label to show by field. Can be JSX.
|
|
19
|
+
*/
|
|
20
|
+
label?: React.ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Disabled is passed on to control. Disabled fields cannot be interacted
|
|
23
|
+
* with.
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Optional hint to be shown when there is no error. Can be JSX.
|
|
29
|
+
*/
|
|
30
|
+
hint?: React.ReactNode;
|
|
31
|
+
/**
|
|
32
|
+
* If true, a change to this field forces the whole form to update.
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
forceupdate?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* If true, display an asterisk for required fields.
|
|
38
|
+
*/
|
|
39
|
+
asterisk?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* If true, apply ghost state to Field and the control in it.
|
|
42
|
+
*/
|
|
43
|
+
ghost?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* If unset, this Field is rendered without any embellishments: no label,
|
|
46
|
+
* no hint, no wrapper. This is useful for controls that must behave like
|
|
47
|
+
* a Field (i.e. work with a Form to get their `value` and `onChange` set),
|
|
48
|
+
* but mustn't look like one.
|
|
49
|
+
*
|
|
50
|
+
* If set to `simple` then the field shows a label, hint and error.
|
|
51
|
+
*
|
|
52
|
+
* If set to `box` then the field has a boxed appearance. This places a
|
|
53
|
+
* border around the field, which is clickable and moves focus to the
|
|
54
|
+
* contained control.
|
|
55
|
+
*/
|
|
56
|
+
wrapper?: 'box' | 'simple';
|
|
57
|
+
/**
|
|
58
|
+
* Validation rules.
|
|
59
|
+
*/
|
|
60
|
+
rules?: IValidationProps;
|
|
61
|
+
/**
|
|
62
|
+
* Triggered whenever an _uncontrolled_ Field changes.
|
|
63
|
+
*/
|
|
64
|
+
onChange?: (data: any, forceupdate: boolean) => void;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* A `Form.Field` wraps a form control. It serves several purposes.
|
|
68
|
+
*
|
|
69
|
+
* * First, the Field automatically adds `name`, `onChange`, `value` and
|
|
70
|
+
* `error` props to the control it contains. The `onChange` prop is supplied by
|
|
71
|
+
* the `Form` content so that the developer does not need to add it.
|
|
72
|
+
*
|
|
73
|
+
* * Second, the Field performs validation when it is mounted, whenever its
|
|
74
|
+
* control's value changes, and when it is unmounted. Validation results are
|
|
75
|
+
* sent directly to the parent `Form` (a form context is used for this -- a
|
|
76
|
+
* Field must reside inside a form).
|
|
77
|
+
*
|
|
78
|
+
* #### Uncontrolled fields
|
|
79
|
+
* Note that Fields can be used outside of `Form`. These are known as _uncontrolled_.
|
|
80
|
+
* In this case, the Field can still benefit from a label, hint, and validation
|
|
81
|
+
* (since Field keeps an internal value), but `onChange` must be provided by
|
|
82
|
+
* the developer.
|
|
83
|
+
*
|
|
84
|
+
* #### Validations
|
|
85
|
+
* A Form.Field may add any number of validation `rules`, e.g. `required=`.
|
|
86
|
+
* Rules include `required`, `isInt`, `minLength` etc. When a
|
|
87
|
+
* field is first mounted, it is _pristine_. Even when its content is invalid,
|
|
88
|
+
* it will not show any validation error. When the user edits the field, it
|
|
89
|
+
* will no longer be pristine and any errors will appear. The parent Form also
|
|
90
|
+
* provides a `dirty` prop to the Field. When the Form is dirty, so are its
|
|
91
|
+
* fields, and any validation errors are shown, pristine or not.
|
|
92
|
+
*
|
|
93
|
+
* For dark backgrounds, fields may set their contrast prop to true to use
|
|
94
|
+
* lighter error colors.
|
|
95
|
+
*
|
|
96
|
+
* Fields have a `label` and a `hint`. Both are optional. These elements are
|
|
97
|
+
* displayed in different ways based on the field's `wrapper`. Unwrapped Fields
|
|
98
|
+
* do not display label or hint. Other wrappers are `simple` and `box`.
|
|
99
|
+
*/
|
|
100
|
+
declare const Field: {
|
|
101
|
+
(props: IProps): React.JSX.Element;
|
|
102
|
+
displayName: string;
|
|
103
|
+
};
|
|
104
|
+
export { Field, IProps };
|