@jupytergis/base 0.4.5 → 0.6.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.
- package/lib/annotations/components/Annotation.d.ts +2 -2
- package/lib/annotations/components/Annotation.js +3 -3
- package/lib/annotations/components/AnnotationFloater.d.ts +1 -1
- package/lib/annotations/components/AnnotationFloater.js +2 -2
- package/lib/annotations/components/Message.d.ts +2 -1
- package/lib/annotations/components/Message.js +3 -3
- package/lib/annotations/model.js +5 -5
- package/lib/commands/BaseCommandIDs.d.ts +32 -0
- package/lib/commands/BaseCommandIDs.js +43 -0
- package/lib/{commands.d.ts → commands/index.d.ts} +1 -1
- package/lib/{commands.js → commands/index.js} +76 -319
- package/lib/console/consoleview.d.ts +3 -3
- package/lib/console/consoleview.js +5 -5
- package/lib/constants.d.ts +2 -51
- package/lib/constants.js +6 -65
- package/lib/dialogs/ProcessingFormDialog.d.ts +4 -4
- package/lib/dialogs/ProcessingFormDialog.js +9 -11
- package/lib/dialogs/layerBrowserDialog.d.ts +1 -1
- package/lib/dialogs/layerBrowserDialog.js +7 -7
- package/lib/dialogs/layerCreationFormDialog.d.ts +4 -4
- package/lib/dialogs/layerCreationFormDialog.js +6 -6
- package/lib/dialogs/symbology/components/color_ramp/CanvasSelectComponent.d.ts +1 -1
- package/lib/dialogs/symbology/components/color_ramp/CanvasSelectComponent.js +3 -3
- package/lib/dialogs/symbology/components/color_ramp/ColorRamp.d.ts +3 -2
- package/lib/dialogs/symbology/components/color_ramp/ColorRamp.js +6 -7
- package/lib/dialogs/symbology/components/color_ramp/ColorRampEntry.d.ts +1 -1
- package/lib/dialogs/symbology/components/color_ramp/ColorRampEntry.js +1 -1
- package/lib/dialogs/symbology/components/color_ramp/ModeSelectRow.d.ts +1 -1
- package/lib/dialogs/symbology/components/color_ramp/ModeSelectRow.js +1 -1
- package/lib/dialogs/symbology/components/color_stops/StopContainer.d.ts +2 -2
- package/lib/dialogs/symbology/components/color_stops/StopContainer.js +4 -4
- package/lib/dialogs/symbology/components/color_stops/StopRow.d.ts +3 -3
- package/lib/dialogs/symbology/components/color_stops/StopRow.js +2 -2
- package/lib/dialogs/symbology/hooks/useGetBandInfo.js +5 -5
- package/lib/dialogs/symbology/hooks/useGetProperties.d.ts +1 -1
- package/lib/dialogs/symbology/hooks/useGetProperties.js +4 -4
- package/lib/dialogs/symbology/symbologyDialog.d.ts +8 -0
- package/lib/dialogs/symbology/symbologyDialog.js +1 -1
- package/lib/dialogs/symbology/symbologyUtils.js +38 -31
- package/lib/dialogs/symbology/tiff_layer/TiffRendering.d.ts +2 -2
- package/lib/dialogs/symbology/tiff_layer/TiffRendering.js +2 -2
- package/lib/dialogs/symbology/tiff_layer/components/BandRow.d.ts +2 -2
- package/lib/dialogs/symbology/tiff_layer/components/BandRow.js +4 -4
- package/lib/dialogs/symbology/tiff_layer/types/MultibandColor.d.ts +2 -2
- package/lib/dialogs/symbology/tiff_layer/types/MultibandColor.js +30 -20
- package/lib/dialogs/symbology/tiff_layer/types/SingleBandPseudoColor.d.ts +2 -2
- package/lib/dialogs/symbology/tiff_layer/types/SingleBandPseudoColor.js +23 -21
- package/lib/dialogs/symbology/vector_layer/VectorRendering.d.ts +2 -2
- package/lib/dialogs/symbology/vector_layer/VectorRendering.js +81 -39
- package/lib/dialogs/symbology/vector_layer/components/ValueSelect.d.ts +1 -1
- package/lib/dialogs/symbology/vector_layer/components/ValueSelect.js +1 -1
- package/lib/dialogs/symbology/vector_layer/types/Canonical.d.ts +4 -0
- package/lib/dialogs/symbology/vector_layer/types/Canonical.js +66 -0
- package/lib/dialogs/symbology/vector_layer/types/Categorized.d.ts +2 -2
- package/lib/dialogs/symbology/vector_layer/types/Categorized.js +142 -47
- package/lib/dialogs/symbology/vector_layer/types/Graduated.d.ts +2 -2
- package/lib/dialogs/symbology/vector_layer/types/Graduated.js +193 -99
- package/lib/dialogs/symbology/vector_layer/types/Heatmap.d.ts +2 -2
- package/lib/dialogs/symbology/vector_layer/types/Heatmap.js +7 -6
- package/lib/dialogs/symbology/vector_layer/types/SimpleSymbol.d.ts +2 -2
- package/lib/dialogs/symbology/vector_layer/types/SimpleSymbol.js +33 -30
- package/lib/formbuilder/creationform.js +3 -3
- package/lib/formbuilder/editform.js +3 -3
- package/lib/formbuilder/formselectors.d.ts +1 -1
- package/lib/formbuilder/formselectors.js +2 -2
- package/lib/formbuilder/objectform/baseform.d.ts +5 -4
- package/lib/formbuilder/objectform/baseform.js +16 -14
- package/lib/formbuilder/objectform/fileselectorwidget.d.ts +1 -1
- package/lib/formbuilder/objectform/fileselectorwidget.js +5 -5
- package/lib/formbuilder/objectform/layer/heatmapLayerForm.js +2 -2
- package/lib/formbuilder/objectform/layer/hillshadeLayerForm.js +1 -1
- package/lib/formbuilder/objectform/layer/layerform.d.ts +1 -1
- package/lib/formbuilder/objectform/layer/layerform.js +3 -2
- package/lib/formbuilder/objectform/process/dissolveProcessForm.d.ts +1 -1
- package/lib/formbuilder/objectform/process/dissolveProcessForm.js +5 -5
- package/lib/formbuilder/objectform/source/geojsonsource.js +4 -4
- package/lib/formbuilder/objectform/source/geotiffsource.js +4 -4
- package/lib/formbuilder/objectform/source/pathbasedsource.js +6 -6
- package/lib/formbuilder/objectform/source/sourceform.d.ts +1 -1
- package/lib/formbuilder/objectform/source/sourceform.js +1 -1
- package/lib/formbuilder/objectform/source/tilesourceform.js +3 -3
- package/lib/gdal.js +2 -2
- package/lib/icons.js +29 -29
- package/lib/index.d.ts +4 -2
- package/lib/index.js +4 -2
- package/lib/mainview/CollaboratorPointers.d.ts +1 -1
- package/lib/mainview/CollaboratorPointers.js +5 -5
- package/lib/mainview/FollowIndicator.d.ts +2 -2
- package/lib/mainview/FollowIndicator.js +3 -3
- package/lib/mainview/TemporalSlider.d.ts +1 -1
- package/lib/mainview/TemporalSlider.js +7 -7
- package/lib/mainview/mainView.d.ts +4 -2
- package/lib/mainview/mainView.js +232 -137
- package/lib/menus.d.ts +4 -0
- package/lib/menus.js +45 -0
- package/lib/panelview/annotationPanel.d.ts +2 -2
- package/lib/panelview/annotationPanel.js +1 -1
- package/lib/panelview/components/filter-panel/Filter.d.ts +2 -2
- package/lib/panelview/components/filter-panel/Filter.js +5 -5
- package/lib/panelview/components/filter-panel/FilterRow.d.ts +2 -2
- package/lib/panelview/components/identify-panel/IdentifyPanel.d.ts +1 -1
- package/lib/panelview/components/identify-panel/IdentifyPanel.js +5 -5
- package/lib/panelview/components/layers.d.ts +1 -1
- package/lib/panelview/components/layers.js +12 -12
- package/lib/panelview/leftpanel.d.ts +4 -2
- package/lib/panelview/leftpanel.js +24 -14
- package/lib/panelview/model.d.ts +1 -1
- package/lib/panelview/objectproperties.d.ts +1 -1
- package/lib/panelview/objectproperties.js +3 -3
- package/lib/panelview/rightpanel.d.ts +2 -1
- package/lib/panelview/rightpanel.js +13 -5
- package/lib/{processing.d.ts → processing/index.d.ts} +4 -4
- package/lib/{processing.js → processing/index.js} +19 -24
- package/lib/processing/processingCommands.d.ts +6 -0
- package/lib/processing/processingCommands.js +47 -0
- package/lib/processing/processingFormToParam.d.ts +2 -0
- package/lib/processing/processingFormToParam.js +15 -0
- package/lib/shared/components/Badge.d.ts +7 -0
- package/lib/shared/components/Badge.js +19 -0
- package/lib/shared/components/Button.d.ts +9 -0
- package/lib/shared/components/Button.js +20 -0
- package/lib/shared/components/Calendar.d.ts +47 -0
- package/lib/shared/components/Calendar.js +184 -0
- package/lib/shared/components/Checkbox.d.ts +4 -0
- package/lib/shared/components/Checkbox.js +25 -0
- package/lib/shared/components/DropdownMenu.d.ts +27 -0
- package/lib/shared/components/DropdownMenu.js +92 -0
- package/lib/shared/components/Pagination.d.ts +25 -0
- package/lib/shared/components/Pagination.js +68 -0
- package/lib/shared/components/Popover.d.ts +7 -0
- package/lib/shared/components/Popover.js +32 -0
- package/lib/shared/components/Tabs.d.ts +7 -0
- package/lib/shared/components/Tabs.js +31 -0
- package/lib/shared/components/ToggleGroup.d.ts +12 -0
- package/lib/shared/components/ToggleGroup.js +52 -0
- package/lib/shared/components/loading.d.ts +12 -0
- package/lib/shared/components/loading.js +6 -0
- package/lib/shared/components/utils.d.ts +2 -0
- package/lib/shared/components/utils.js +4 -0
- package/lib/shared/hooks/useIsFirstRender.d.ts +2 -0
- package/lib/shared/hooks/useIsFirstRender.js +10 -0
- package/lib/stacBrowser/StacBrowser.d.ts +7 -0
- package/lib/stacBrowser/StacBrowser.js +16 -0
- package/lib/stacBrowser/StacPanel.d.ts +14 -0
- package/lib/stacBrowser/StacPanel.js +16 -0
- package/lib/stacBrowser/components/StacFilterSection.d.ts +23 -0
- package/lib/stacBrowser/components/StacFilterSection.js +49 -0
- package/lib/stacBrowser/components/StacPanelFilters.d.ts +14 -0
- package/lib/stacBrowser/components/StacPanelFilters.js +65 -0
- package/lib/stacBrowser/components/StacPanelResults.d.ts +13 -0
- package/lib/stacBrowser/components/StacPanelResults.js +48 -0
- package/lib/stacBrowser/components/StacPanelView.d.ts +7 -0
- package/lib/stacBrowser/components/StacPanelView.js +20 -0
- package/lib/stacBrowser/constants.d.ts +25 -0
- package/lib/stacBrowser/constants.js +197 -0
- package/lib/stacBrowser/hooks/useStacSearch.d.ts +30 -0
- package/lib/stacBrowser/hooks/useStacSearch.js +221 -0
- package/lib/stacBrowser/index.d.ts +1 -0
- package/lib/stacBrowser/index.js +1 -0
- package/lib/stacBrowser/types/types.d.ts +124 -0
- package/lib/stacBrowser/types/types.js +1 -0
- package/lib/statusbar/StatusBar.d.ts +1 -1
- package/lib/statusbar/StatusBar.js +3 -3
- package/lib/toolbar/index.d.ts +0 -1
- package/lib/toolbar/index.js +0 -1
- package/lib/toolbar/widget.js +28 -64
- package/lib/tools.d.ts +30 -5
- package/lib/tools.js +82 -69
- package/lib/types.d.ts +2 -0
- package/lib/widget.d.ts +2 -1
- package/lib/widget.js +8 -5
- package/package.json +22 -8
- package/style/base.css +26 -0
- package/style/layerBrowser.css +10 -0
- package/style/leftPanel.css +0 -1
- package/style/shared/badge.css +61 -0
- package/style/shared/button.css +164 -0
- package/style/shared/calendar.css +274 -0
- package/style/shared/checkbox.css +28 -0
- package/style/shared/dropdownMenu.css +240 -0
- package/style/shared/pagination.css +167 -0
- package/style/shared/popover.css +53 -0
- package/style/shared/tabs.css +57 -0
- package/style/shared/toggle.css +85 -0
- package/style/stacBrowser.css +74 -0
- package/style/symbologyDialog.css +0 -7
- package/lib/mainview/spinner.d.ts +0 -6
- package/lib/mainview/spinner.js +0 -5
- package/lib/panelview/components/sources.d.ts +0 -10
- package/lib/panelview/components/sources.js +0 -147
- package/lib/toolbar/usertoolbaritem.d.ts +0 -19
- package/lib/toolbar/usertoolbaritem.js +0 -59
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
import { cn } from './utils';
|
|
15
|
+
const Popover = (_a) => {
|
|
16
|
+
var props = __rest(_a, []);
|
|
17
|
+
return React.createElement(PopoverPrimitive.Root, Object.assign({ "data-slot": "popover" }, props));
|
|
18
|
+
};
|
|
19
|
+
const PopoverTrigger = (_a) => {
|
|
20
|
+
var props = __rest(_a, []);
|
|
21
|
+
return React.createElement(PopoverPrimitive.Trigger, Object.assign({ "data-slot": "popover-trigger" }, props));
|
|
22
|
+
};
|
|
23
|
+
const PopoverContent = (_a) => {
|
|
24
|
+
var { className, align = 'center', sideOffset = 4 } = _a, props = __rest(_a, ["className", "align", "sideOffset"]);
|
|
25
|
+
return (React.createElement(PopoverPrimitive.Portal, null,
|
|
26
|
+
React.createElement(PopoverPrimitive.Content, Object.assign({ "data-slot": "popover-content", align: align, sideOffset: sideOffset, className: cn('jgis-popover-content', className) }, props))));
|
|
27
|
+
};
|
|
28
|
+
const PopoverAnchor = (_a) => {
|
|
29
|
+
var props = __rest(_a, []);
|
|
30
|
+
return React.createElement(PopoverPrimitive.Anchor, Object.assign({ "data-slot": "popover-anchor" }, props));
|
|
31
|
+
};
|
|
32
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const Tabs: React.FC<React.ComponentProps<typeof TabsPrimitive.Root>>;
|
|
4
|
+
declare const TabsList: React.FC<React.ComponentProps<typeof TabsPrimitive.List>>;
|
|
5
|
+
declare const TabsTrigger: React.FC<React.ComponentProps<typeof TabsPrimitive.Trigger>>;
|
|
6
|
+
declare const TabsContent: React.FC<React.ComponentProps<typeof TabsPrimitive.Content>>;
|
|
7
|
+
export { Tabs, TabsContent, TabsList, TabsTrigger };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
import { cn } from './utils';
|
|
15
|
+
const Tabs = (_a) => {
|
|
16
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
17
|
+
return (React.createElement(TabsPrimitive.Root, Object.assign({ "data-slot": "tabs", className: cn('TabsList', className) }, props)));
|
|
18
|
+
};
|
|
19
|
+
const TabsList = (_a) => {
|
|
20
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
21
|
+
return (React.createElement(TabsPrimitive.List, Object.assign({ "data-slot": "tabs-list", className: cn('jgis-tabs-list', className) }, props)));
|
|
22
|
+
};
|
|
23
|
+
const TabsTrigger = (_a) => {
|
|
24
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
25
|
+
return (React.createElement(TabsPrimitive.Trigger, Object.assign({ "data-slot": "tabs-trigger", className: cn('jgis-tabs-trigger', className) }, props)));
|
|
26
|
+
};
|
|
27
|
+
const TabsContent = (_a) => {
|
|
28
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
29
|
+
return (React.createElement(TabsPrimitive.Content, Object.assign({ "data-slot": "tabs-content", className: cn('jgis-tabs-content', className) }, props)));
|
|
30
|
+
};
|
|
31
|
+
export { Tabs, TabsContent, TabsList, TabsTrigger };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
declare const ToggleGroup: React.ForwardRefExoticComponent<((Omit<ToggleGroupPrimitive.ToggleGroupSingleProps & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<ToggleGroupPrimitive.ToggleGroupMultipleProps & React.RefAttributes<HTMLDivElement>, "ref">) & VariantProps<(props?: ({
|
|
5
|
+
variant?: "default" | "outline" | null | undefined;
|
|
6
|
+
size?: "sm" | "lg" | "default" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string>) & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const ToggleGroupItem: React.ForwardRefExoticComponent<Omit<ToggleGroupPrimitive.ToggleGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
9
|
+
variant?: "default" | "outline" | null | undefined;
|
|
10
|
+
size?: "sm" | "lg" | "default" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
export { ToggleGroup, ToggleGroupItem };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
13
|
+
import { cva } from 'class-variance-authority';
|
|
14
|
+
import * as React from 'react';
|
|
15
|
+
import { cn } from './utils';
|
|
16
|
+
const toggleVariants = cva('jgis-toggle', {
|
|
17
|
+
variants: {
|
|
18
|
+
variant: {
|
|
19
|
+
default: 'jgis-toggle-default',
|
|
20
|
+
outline: 'jgis-toggle-outline',
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
default: 'jgis-toggle-default-size',
|
|
24
|
+
sm: 'jgis-toggle-small-size',
|
|
25
|
+
lg: 'jgis-toggle-large-size',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
defaultVariants: {
|
|
29
|
+
variant: 'default',
|
|
30
|
+
size: 'default',
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
const ToggleGroupContext = React.createContext({
|
|
34
|
+
size: 'default',
|
|
35
|
+
variant: 'default',
|
|
36
|
+
});
|
|
37
|
+
const ToggleGroup = React.forwardRef((_a, ref) => {
|
|
38
|
+
var { className, variant, size, children } = _a, props = __rest(_a, ["className", "variant", "size", "children"]);
|
|
39
|
+
return (React.createElement(ToggleGroupPrimitive.Root, Object.assign({ ref: ref, className: cn('jgis-toggle-group-context', className) }, props),
|
|
40
|
+
React.createElement(ToggleGroupContext.Provider, { value: { variant, size } }, children)));
|
|
41
|
+
});
|
|
42
|
+
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
43
|
+
const ToggleGroupItem = React.forwardRef((_a, ref) => {
|
|
44
|
+
var { className, children, variant, size } = _a, props = __rest(_a, ["className", "children", "variant", "size"]);
|
|
45
|
+
const context = React.useContext(ToggleGroupContext);
|
|
46
|
+
return (React.createElement(ToggleGroupPrimitive.Item, Object.assign({ ref: ref, className: cn(toggleVariants({
|
|
47
|
+
variant: context.variant || variant,
|
|
48
|
+
size: context.size || size,
|
|
49
|
+
}), className) }, props), children));
|
|
50
|
+
});
|
|
51
|
+
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
52
|
+
export { ToggleGroup, ToggleGroupItem };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type FontAwesomeIconSize = '2xs' | 'xs' | 'sm' | 'lg' | 'xl' | '2xl' | '1x' | '2x' | '3x' | '4x' | '5x' | '6x' | '7x' | '8x' | '9x' | '10x';
|
|
3
|
+
interface ILoadingIcon {
|
|
4
|
+
size?: FontAwesomeIconSize;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const LoadingIcon: React.FC<ILoadingIcon>;
|
|
9
|
+
export declare const LoadingOverlay: React.FC<{
|
|
10
|
+
loading: boolean;
|
|
11
|
+
}>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { faSpinner } from '@fortawesome/free-solid-svg-icons';
|
|
2
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
export const LoadingIcon = props => (React.createElement(FontAwesomeIcon, { icon: faSpinner, spin: true, size: props.size || 'xl', style: props.style || { margin: 'auto', padding: '1rem' }, className: props.className }));
|
|
5
|
+
export const LoadingOverlay = props => (React.createElement("div", { className: 'jGIS-Spinner', style: { display: props.loading ? 'flex' : 'none' } },
|
|
6
|
+
React.createElement("div", { className: 'jGIS-SpinnerContent' })));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useRef } from 'react';
|
|
2
|
+
const useIsFirstRender = () => {
|
|
3
|
+
const isFirstRenderRef = useRef(true);
|
|
4
|
+
if (isFirstRenderRef.current) {
|
|
5
|
+
isFirstRenderRef.current = false;
|
|
6
|
+
return true;
|
|
7
|
+
}
|
|
8
|
+
return isFirstRenderRef.current;
|
|
9
|
+
};
|
|
10
|
+
export default useIsFirstRender;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IControlPanelModel } from "../types";
|
|
3
|
+
interface IStacBrowserDialogProps {
|
|
4
|
+
controlPanelModel: IControlPanelModel;
|
|
5
|
+
}
|
|
6
|
+
declare const StacBrowser: ({ controlPanelModel }: IStacBrowserDialogProps) => React.JSX.Element;
|
|
7
|
+
export default StacBrowser;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import StacPanelView from "./components/StacPanelView";
|
|
3
|
+
const StacBrowser = ({ controlPanelModel }) => {
|
|
4
|
+
const [jgisModel, setJgisModel] = useState(controlPanelModel === null || controlPanelModel === void 0 ? void 0 : controlPanelModel.jGISModel);
|
|
5
|
+
useEffect(() => {
|
|
6
|
+
const handleCurrentChanged = (_, widget) => {
|
|
7
|
+
setJgisModel(widget === null || widget === void 0 ? void 0 : widget.model);
|
|
8
|
+
};
|
|
9
|
+
controlPanelModel.documentChanged.connect(handleCurrentChanged);
|
|
10
|
+
return () => {
|
|
11
|
+
controlPanelModel.documentChanged.disconnect(handleCurrentChanged);
|
|
12
|
+
};
|
|
13
|
+
}, [controlPanelModel]);
|
|
14
|
+
return React.createElement(StacPanelView, { model: jgisModel });
|
|
15
|
+
};
|
|
16
|
+
export default StacBrowser;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IJupyterGISTracker } from '@jupytergis/schema';
|
|
2
|
+
import { Panel } from '@lumino/widgets';
|
|
3
|
+
import { IControlPanelModel } from "../types";
|
|
4
|
+
export declare class StacPanel extends Panel {
|
|
5
|
+
constructor(options: StacPanel.IOptions);
|
|
6
|
+
private _model;
|
|
7
|
+
}
|
|
8
|
+
export declare namespace StacPanel {
|
|
9
|
+
interface IOptions {
|
|
10
|
+
model: IControlPanelModel;
|
|
11
|
+
tracker: IJupyterGISTracker;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export default StacPanel;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactWidget } from '@jupyterlab/ui-components';
|
|
2
|
+
import { Panel } from '@lumino/widgets';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import StacBrowser from "./StacBrowser";
|
|
5
|
+
export class StacPanel extends Panel {
|
|
6
|
+
constructor(options) {
|
|
7
|
+
super();
|
|
8
|
+
this._model = options.model;
|
|
9
|
+
this.id = 'jupytergis::stacPanel';
|
|
10
|
+
this.title.caption = 'STAC';
|
|
11
|
+
this.title.label = 'STAC';
|
|
12
|
+
this.addClass('jgis-scrollable');
|
|
13
|
+
this.addWidget(ReactWidget.create(React.createElement(StacBrowser, { controlPanelModel: this._model })));
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export default StacPanel;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DatasetsType, PlatformsType, ProductsType } from "../constants";
|
|
3
|
+
type StacFilterSectionProps = {
|
|
4
|
+
section: 'Collection';
|
|
5
|
+
data: DatasetsType;
|
|
6
|
+
selectedCollections: string[];
|
|
7
|
+
selectedData: string[];
|
|
8
|
+
handleCheckedChange: (dataset: string, collection: string) => void;
|
|
9
|
+
} | {
|
|
10
|
+
section: 'Platform';
|
|
11
|
+
data: PlatformsType;
|
|
12
|
+
selectedCollections: string[];
|
|
13
|
+
selectedData: string[];
|
|
14
|
+
handleCheckedChange: (platform: string, _collection: string) => void;
|
|
15
|
+
} | {
|
|
16
|
+
section: 'Data / Product';
|
|
17
|
+
data: ProductsType;
|
|
18
|
+
selectedCollections: string[];
|
|
19
|
+
selectedData: string[];
|
|
20
|
+
handleCheckedChange: (product: string, collection: string) => void;
|
|
21
|
+
};
|
|
22
|
+
declare const StacFilterSection: ({ section, data, selectedCollections, selectedData, handleCheckedChange, }: StacFilterSectionProps) => React.JSX.Element;
|
|
23
|
+
export default StacFilterSection;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ChevronRight } from 'lucide-react';
|
|
2
|
+
import React, { useMemo } from 'react';
|
|
3
|
+
import Badge from "../../shared/components/Badge";
|
|
4
|
+
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, } from "../../shared/components/DropdownMenu";
|
|
5
|
+
const StacFilterSection = ({ section, data, selectedCollections, selectedData, handleCheckedChange, }) => {
|
|
6
|
+
const items = useMemo(() => {
|
|
7
|
+
if (section === 'Collection') {
|
|
8
|
+
return (React.createElement(DropdownMenuGroup, null, data.map(entry => (React.createElement(DropdownMenuSub, { key: entry.collection },
|
|
9
|
+
React.createElement(DropdownMenuSubTrigger, null, entry.collection),
|
|
10
|
+
React.createElement(DropdownMenuPortal, null,
|
|
11
|
+
React.createElement(DropdownMenuSubContent, null, entry.datasets.map(dataset => (React.createElement(DropdownMenuCheckboxItem, { key: dataset, checked: selectedData.includes(dataset), onCheckedChange: () => {
|
|
12
|
+
handleCheckedChange(dataset, entry.collection);
|
|
13
|
+
}, onSelect: e => {
|
|
14
|
+
e.preventDefault();
|
|
15
|
+
} }, dataset))))))))));
|
|
16
|
+
}
|
|
17
|
+
if (section === 'Platform') {
|
|
18
|
+
return (React.createElement(React.Fragment, null, selectedCollections.map(collection => {
|
|
19
|
+
var _a;
|
|
20
|
+
return (React.createElement(DropdownMenuGroup, { key: collection },
|
|
21
|
+
React.createElement(DropdownMenuLabel, null, collection), (_a = data[collection]) === null || _a === void 0 ? void 0 :
|
|
22
|
+
_a.map(platform => (React.createElement(DropdownMenuCheckboxItem, { key: platform, checked: selectedData.includes(platform), onCheckedChange: () => {
|
|
23
|
+
handleCheckedChange(platform, '');
|
|
24
|
+
}, onSelect: e => {
|
|
25
|
+
e.preventDefault();
|
|
26
|
+
} }, platform)))));
|
|
27
|
+
})));
|
|
28
|
+
}
|
|
29
|
+
if (section === 'Data / Product') {
|
|
30
|
+
return (React.createElement(React.Fragment, null, selectedCollections.map(collection => (React.createElement(DropdownMenuGroup, { key: collection },
|
|
31
|
+
React.createElement(DropdownMenuLabel, null, collection),
|
|
32
|
+
data
|
|
33
|
+
.filter(product => product.collections.includes(collection))
|
|
34
|
+
.map(product => (React.createElement(DropdownMenuCheckboxItem, { key: product.productCode, checked: selectedData.includes(product.productCode), onCheckedChange: () => {
|
|
35
|
+
handleCheckedChange(product.productCode, collection);
|
|
36
|
+
}, onSelect: e => {
|
|
37
|
+
e.preventDefault();
|
|
38
|
+
} }, product.productCode))))))));
|
|
39
|
+
}
|
|
40
|
+
}, [section, data, selectedCollections, selectedData, handleCheckedChange]);
|
|
41
|
+
return (React.createElement("div", { className: "jgis-stac-filter-section-container" },
|
|
42
|
+
React.createElement(DropdownMenu, { modal: false },
|
|
43
|
+
React.createElement(DropdownMenuTrigger, { className: "jgis-stac-filter-trigger" },
|
|
44
|
+
section,
|
|
45
|
+
React.createElement(ChevronRight, { className: "DropdownMenuIcon" })),
|
|
46
|
+
React.createElement(DropdownMenuContent, { side: "right" }, items)),
|
|
47
|
+
React.createElement("div", { className: "jgis-stac-filter-section-badges" }, selectedData.map(data => (React.createElement(Badge, { key: data }, data))))));
|
|
48
|
+
};
|
|
49
|
+
export default StacFilterSection;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StacFilterState, StacFilterSetters } from "../types/types";
|
|
3
|
+
interface IStacPanelFiltersProps {
|
|
4
|
+
filterState: StacFilterState;
|
|
5
|
+
filterSetters: StacFilterSetters;
|
|
6
|
+
startTime: Date | undefined;
|
|
7
|
+
setStartTime: (date: Date | undefined) => void;
|
|
8
|
+
endTime: Date | undefined;
|
|
9
|
+
setEndTime: (date: Date | undefined) => void;
|
|
10
|
+
useWorldBBox: boolean;
|
|
11
|
+
setUseWorldBBox: (val: boolean) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const StacPanelFilters: ({ filterState, filterSetters, startTime, setStartTime, endTime, setEndTime, useWorldBBox, setUseWorldBBox, }: IStacPanelFiltersProps) => React.JSX.Element;
|
|
14
|
+
export default StacPanelFilters;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { format } from 'date-fns';
|
|
2
|
+
import { CalendarIcon } from 'lucide-react';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Button } from "../../shared/components/Button";
|
|
5
|
+
import { Calendar } from "../../shared/components/Calendar";
|
|
6
|
+
import Checkbox from "../../shared/components/Checkbox";
|
|
7
|
+
import { Popover, PopoverContent, PopoverTrigger, } from "../../shared/components/Popover";
|
|
8
|
+
import StacFilterSection from "./StacFilterSection";
|
|
9
|
+
import { datasets as datasetsList, platforms, products, } from "../constants";
|
|
10
|
+
const StacPanelFilters = ({ filterState, filterSetters, startTime, setStartTime, endTime, setEndTime, useWorldBBox, setUseWorldBBox, }) => {
|
|
11
|
+
const handleDatasetSelection = (dataset, collection) => {
|
|
12
|
+
const collections = new Set(filterState.collections);
|
|
13
|
+
const datasets = new Set(filterState.datasets);
|
|
14
|
+
if (datasets.has(dataset)) {
|
|
15
|
+
datasets.delete(dataset);
|
|
16
|
+
// Remove the collection if no datasets remain for it
|
|
17
|
+
const datasetsForCollection = Array.from(datasets).filter(d => {
|
|
18
|
+
return datasetsList.some(entry => entry.collection === collection && entry.datasets.includes(d));
|
|
19
|
+
});
|
|
20
|
+
if (datasetsForCollection.length === 0) {
|
|
21
|
+
collections.delete(collection);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
datasets.add(dataset);
|
|
26
|
+
collections.add(collection);
|
|
27
|
+
}
|
|
28
|
+
filterSetters.collections(collections);
|
|
29
|
+
filterSetters.datasets(datasets);
|
|
30
|
+
};
|
|
31
|
+
const handleToggle = (key, value) => {
|
|
32
|
+
const updated = new Set(filterState[key]);
|
|
33
|
+
if (updated.has(value)) {
|
|
34
|
+
updated.delete(value);
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
updated.add(value);
|
|
38
|
+
}
|
|
39
|
+
filterSetters[key](updated);
|
|
40
|
+
};
|
|
41
|
+
return (React.createElement("div", { className: "jgis-stac-browser-filters-panel" },
|
|
42
|
+
React.createElement("div", null,
|
|
43
|
+
React.createElement("span", { style: { display: 'flex', alignItems: 'center', gap: '0.5rem' } },
|
|
44
|
+
React.createElement(Checkbox, { checked: useWorldBBox, onCheckedChange: setUseWorldBBox }),
|
|
45
|
+
"Use whole world as bounding box")),
|
|
46
|
+
React.createElement("div", { className: "jgis-stac-browser-date-picker" },
|
|
47
|
+
React.createElement(Popover, null,
|
|
48
|
+
React.createElement(PopoverTrigger, { asChild: true },
|
|
49
|
+
React.createElement(Button, { style: { padding: '0 0.5rem' }, variant: 'outline' },
|
|
50
|
+
React.createElement(CalendarIcon, { className: "jgis-stac-datepicker-icon" }),
|
|
51
|
+
startTime ? format(startTime, 'PPP') : React.createElement("span", null, "Start Date"))),
|
|
52
|
+
React.createElement(PopoverContent, null,
|
|
53
|
+
React.createElement(Calendar, { mode: "single", selected: startTime, onSelect: setStartTime, autoFocus: true }))),
|
|
54
|
+
React.createElement(Popover, null,
|
|
55
|
+
React.createElement(PopoverTrigger, { asChild: true },
|
|
56
|
+
React.createElement(Button, { style: { padding: '0 0.5rem' }, variant: 'outline' },
|
|
57
|
+
React.createElement(CalendarIcon, { className: "jgis-stac-datepicker-icon" }),
|
|
58
|
+
endTime ? format(endTime, 'PPP') : React.createElement("span", null, "End Date"))),
|
|
59
|
+
React.createElement(PopoverContent, null,
|
|
60
|
+
React.createElement(Calendar, { mode: "single", selected: endTime, onSelect: setEndTime, autoFocus: true })))),
|
|
61
|
+
React.createElement(StacFilterSection, { section: "Collection", data: datasetsList, selectedCollections: Array.from(filterState.collections), selectedData: Array.from(filterState.datasets), handleCheckedChange: handleDatasetSelection }),
|
|
62
|
+
React.createElement(StacFilterSection, { section: "Platform", data: platforms, selectedCollections: Array.from(filterState.collections), selectedData: Array.from(filterState.platforms), handleCheckedChange: platform => handleToggle('platforms', platform) }),
|
|
63
|
+
React.createElement(StacFilterSection, { section: "Data / Product", data: products, selectedCollections: Array.from(filterState.collections), selectedData: Array.from(filterState.products), handleCheckedChange: product => handleToggle('products', product) })));
|
|
64
|
+
};
|
|
65
|
+
export default StacPanelFilters;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IStacItem } from "../types/types";
|
|
3
|
+
interface IStacPanelResultsProps {
|
|
4
|
+
results: IStacItem[];
|
|
5
|
+
currentPage: number;
|
|
6
|
+
totalPages: number;
|
|
7
|
+
handlePaginationClick: (page: number) => void;
|
|
8
|
+
handleResultClick: (id: string) => void;
|
|
9
|
+
formatResult: (item: IStacItem) => string;
|
|
10
|
+
isLoading: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const StacPanelResults: ({ results, currentPage, totalPages, handlePaginationClick, handleResultClick, formatResult, isLoading, }: IStacPanelResultsProps) => React.JSX.Element;
|
|
13
|
+
export default StacPanelResults;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Button } from "../../shared/components/Button";
|
|
3
|
+
import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, } from "../../shared/components/Pagination";
|
|
4
|
+
function getPageItems(currentPage, totalPages) {
|
|
5
|
+
if (totalPages <= 5) {
|
|
6
|
+
return Array.from({ length: totalPages }, (_, i) => i + 1);
|
|
7
|
+
}
|
|
8
|
+
if (currentPage <= 3) {
|
|
9
|
+
return [1, 2, 3, 'ellipsis', totalPages];
|
|
10
|
+
}
|
|
11
|
+
if (currentPage >= totalPages - 2) {
|
|
12
|
+
return [
|
|
13
|
+
totalPages - 4,
|
|
14
|
+
totalPages - 3,
|
|
15
|
+
totalPages - 2,
|
|
16
|
+
totalPages - 1,
|
|
17
|
+
totalPages,
|
|
18
|
+
];
|
|
19
|
+
}
|
|
20
|
+
return [
|
|
21
|
+
currentPage - 2,
|
|
22
|
+
currentPage - 1,
|
|
23
|
+
currentPage,
|
|
24
|
+
'ellipsis',
|
|
25
|
+
totalPages,
|
|
26
|
+
];
|
|
27
|
+
}
|
|
28
|
+
const StacPanelResults = ({ results, currentPage, totalPages, handlePaginationClick, handleResultClick, formatResult, isLoading, }) => {
|
|
29
|
+
return (React.createElement("div", { className: "jgis-stac-browser-filters-panel" },
|
|
30
|
+
React.createElement(Pagination, null,
|
|
31
|
+
React.createElement(PaginationContent, { style: { marginTop: 0 } },
|
|
32
|
+
React.createElement(PaginationItem, null,
|
|
33
|
+
React.createElement(PaginationPrevious, { onClick: () => handlePaginationClick(Math.max(1, currentPage - 1)), disabled: currentPage === 1 })),
|
|
34
|
+
totalPages <= 0 ? (React.createElement("div", null, "No Matches Found")) : (getPageItems(currentPage, totalPages).map(item => {
|
|
35
|
+
if (item === 'ellipsis') {
|
|
36
|
+
return (React.createElement(PaginationItem, { key: "ellipsis" },
|
|
37
|
+
React.createElement(PaginationEllipsis, null)));
|
|
38
|
+
}
|
|
39
|
+
return (React.createElement(PaginationItem, { key: item },
|
|
40
|
+
React.createElement(PaginationLink, { isActive: item === currentPage, onClick: () => handlePaginationClick(item) }, item)));
|
|
41
|
+
})),
|
|
42
|
+
React.createElement(PaginationItem, null,
|
|
43
|
+
React.createElement(PaginationNext, { onClick: () => handlePaginationClick(Math.min(totalPages, currentPage + 1)), disabled: currentPage === totalPages })))),
|
|
44
|
+
React.createElement("div", { className: "jgis-stac-browser-results-list" }, isLoading ? (
|
|
45
|
+
// TODO: Fancy spinner
|
|
46
|
+
React.createElement("div", null, "Loading results...")) : (results.map(result => (React.createElement(Button, { key: result.id, className: "jgis-stac-browser-results-item", onClick: () => handleResultClick(result.id) }, formatResult(result))))))));
|
|
47
|
+
};
|
|
48
|
+
export default StacPanelResults;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger, } from "../../shared/components/Tabs";
|
|
3
|
+
import useStacSearch from "../hooks/useStacSearch";
|
|
4
|
+
import StacPanelFilters from './StacPanelFilters';
|
|
5
|
+
import StacPanelResults from './StacPanelResults';
|
|
6
|
+
const StacPanelView = ({ model }) => {
|
|
7
|
+
const { filterState, filterSetters, results, startTime, setStartTime, endTime, setEndTime, totalPages, currentPage, totalResults, handlePaginationClick, handleResultClick, formatResult, isLoading, useWorldBBox, setUseWorldBBox, } = useStacSearch({ model });
|
|
8
|
+
if (!model) {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
return (React.createElement(Tabs, { defaultValue: "filters", className: "jgis-stac-browser-main" },
|
|
12
|
+
React.createElement(TabsList, { style: { borderRadius: 0 } },
|
|
13
|
+
React.createElement(TabsTrigger, { className: "jGIS-layer-browser-category", value: "filters" }, "Filters"),
|
|
14
|
+
React.createElement(TabsTrigger, { className: "jGIS-layer-browser-category", value: "results" }, `Results (${totalResults})`)),
|
|
15
|
+
React.createElement(TabsContent, { value: "filters" },
|
|
16
|
+
React.createElement(StacPanelFilters, { filterState: filterState, filterSetters: filterSetters, startTime: startTime, setStartTime: setStartTime, endTime: endTime, setEndTime: setEndTime, useWorldBBox: useWorldBBox, setUseWorldBBox: setUseWorldBBox })),
|
|
17
|
+
React.createElement(TabsContent, { value: "results" },
|
|
18
|
+
React.createElement(StacPanelResults, { results: results, currentPage: currentPage, totalPages: totalPages, handlePaginationClick: handlePaginationClick, handleResultClick: handleResultClick, formatResult: formatResult, isLoading: isLoading }))));
|
|
19
|
+
};
|
|
20
|
+
export default StacPanelView;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const datasets: {
|
|
2
|
+
collection: string;
|
|
3
|
+
datasets: string[];
|
|
4
|
+
}[];
|
|
5
|
+
export declare const platforms: {
|
|
6
|
+
'Sentinel 1': string[];
|
|
7
|
+
'Sentinel 2': string[];
|
|
8
|
+
Venus: string[];
|
|
9
|
+
Spot: string[];
|
|
10
|
+
Landsat: string[];
|
|
11
|
+
};
|
|
12
|
+
export declare const products: ({
|
|
13
|
+
productCode: string;
|
|
14
|
+
productType: string[];
|
|
15
|
+
processingLevel: string;
|
|
16
|
+
collections: string[];
|
|
17
|
+
} | {
|
|
18
|
+
productCode: string;
|
|
19
|
+
productType: string[];
|
|
20
|
+
collections: string[];
|
|
21
|
+
processingLevel?: undefined;
|
|
22
|
+
})[];
|
|
23
|
+
export type DatasetsType = typeof datasets;
|
|
24
|
+
export type PlatformsType = typeof platforms;
|
|
25
|
+
export type ProductsType = typeof products;
|