@jupytergis/base 0.10.1 → 0.12.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/commands/BaseCommandIDs.d.ts +2 -0
- package/lib/commands/BaseCommandIDs.js +3 -0
- package/lib/commands/index.js +66 -0
- package/lib/constants.js +4 -0
- package/lib/dialogs/symbology/hooks/useGetBandInfo.d.ts +0 -6
- package/lib/dialogs/symbology/hooks/useGetBandInfo.js +2 -2
- package/lib/dialogs/symbology/tiff_layer/types/MultibandColor.js +4 -4
- package/lib/dialogs/symbology/vector_layer/types/Categorized.js +1 -5
- package/lib/formbuilder/formselectors.js +5 -1
- package/lib/formbuilder/objectform/StoryEditorForm.d.ts +9 -0
- package/lib/formbuilder/objectform/StoryEditorForm.js +16 -0
- package/lib/formbuilder/objectform/components/StorySegmentReset.d.ts +8 -0
- package/lib/formbuilder/objectform/components/StorySegmentReset.js +24 -0
- package/lib/formbuilder/objectform/layer/index.d.ts +1 -0
- package/lib/formbuilder/objectform/layer/index.js +1 -0
- package/lib/formbuilder/objectform/layer/storySegmentLayerForm.d.ts +5 -0
- package/lib/formbuilder/objectform/layer/storySegmentLayerForm.js +32 -0
- package/lib/mainview/mainView.d.ts +18 -0
- package/lib/mainview/mainView.js +293 -14
- package/lib/panelview/components/layers.d.ts +2 -1
- package/lib/panelview/components/layers.js +31 -23
- package/lib/panelview/{components/filter-panel → filter-panel}/Filter.js +1 -1
- package/lib/panelview/leftpanel.js +89 -7
- package/lib/panelview/rightpanel.d.ts +2 -0
- package/lib/panelview/rightpanel.js +41 -4
- package/lib/panelview/story-maps/PreviewModeSwitch.d.ts +7 -0
- package/lib/panelview/story-maps/PreviewModeSwitch.js +13 -0
- package/lib/panelview/story-maps/StoryEditorPanel.d.ts +9 -0
- package/lib/panelview/story-maps/StoryEditorPanel.js +34 -0
- package/lib/panelview/story-maps/StoryNavBar.d.ts +10 -0
- package/lib/panelview/story-maps/StoryNavBar.js +11 -0
- package/lib/panelview/story-maps/StoryViewerPanel.d.ts +13 -0
- package/lib/panelview/story-maps/StoryViewerPanel.js +179 -0
- package/lib/panelview/story-maps/components/StoryContentSection.d.ts +6 -0
- package/lib/panelview/story-maps/components/StoryContentSection.js +10 -0
- package/lib/panelview/story-maps/components/StoryImageSection.d.ts +15 -0
- package/lib/panelview/story-maps/components/StoryImageSection.js +13 -0
- package/lib/panelview/story-maps/components/StorySubtitleSection.d.ts +11 -0
- package/lib/panelview/story-maps/components/StorySubtitleSection.js +9 -0
- package/lib/panelview/story-maps/components/StoryTitleSection.d.ts +12 -0
- package/lib/panelview/story-maps/components/StoryTitleSection.js +8 -0
- package/lib/shared/components/Calendar.d.ts +1 -1
- package/lib/shared/components/Combobox.d.ts +21 -0
- package/lib/shared/components/Combobox.js +32 -0
- package/lib/shared/components/Command.d.ts +18 -0
- package/lib/shared/components/Command.js +60 -0
- package/lib/shared/components/Dialog.d.ts +15 -0
- package/lib/shared/components/Dialog.js +62 -0
- package/lib/shared/components/Input.d.ts +3 -0
- package/lib/shared/components/Input.js +18 -0
- package/lib/shared/components/Pagination.js +3 -2
- package/lib/shared/components/RadioGroup.d.ts +5 -0
- package/lib/shared/components/RadioGroup.js +26 -0
- package/lib/shared/components/Select.d.ts +19 -0
- package/lib/shared/components/Select.js +28 -0
- package/lib/shared/components/SingleDatePicker.d.ts +11 -0
- package/lib/shared/components/SingleDatePicker.js +16 -0
- package/lib/shared/components/Switch.d.ts +4 -0
- package/lib/shared/components/Switch.js +20 -0
- package/lib/stacBrowser/components/StacPanel.d.ts +9 -1
- package/lib/stacBrowser/components/StacPanel.js +53 -9
- package/lib/stacBrowser/components/filter-extension/QueryableComboBox.d.ts +9 -0
- package/lib/stacBrowser/components/filter-extension/QueryableComboBox.js +179 -0
- package/lib/stacBrowser/components/filter-extension/QueryableRow.d.ts +16 -0
- package/lib/stacBrowser/components/filter-extension/QueryableRow.js +16 -0
- package/lib/stacBrowser/components/filter-extension/StacFilterExtensionPanel.d.ts +7 -0
- package/lib/stacBrowser/components/filter-extension/StacFilterExtensionPanel.js +49 -0
- package/lib/stacBrowser/components/filter-extension/StacQueryableFilters.d.ts +11 -0
- package/lib/stacBrowser/components/filter-extension/StacQueryableFilters.js +19 -0
- package/lib/stacBrowser/components/{StacFilterSection.d.ts → geodes/StacFilterSection.d.ts} +1 -1
- package/lib/stacBrowser/components/{StacFilterSection.js → geodes/StacFilterSection.js} +3 -3
- package/lib/stacBrowser/components/geodes/StacGeodesFilterPanel.d.ts +7 -0
- package/lib/stacBrowser/components/geodes/StacGeodesFilterPanel.js +69 -0
- package/lib/stacBrowser/components/shared/StacPanelResults.d.ts +3 -0
- package/lib/stacBrowser/components/shared/StacPanelResults.js +68 -0
- package/lib/stacBrowser/components/shared/StacSpatialExtent.d.ts +8 -0
- package/lib/stacBrowser/components/shared/StacSpatialExtent.js +10 -0
- package/lib/stacBrowser/components/shared/StacTemporalExtent.d.ts +9 -0
- package/lib/stacBrowser/components/shared/StacTemporalExtent.js +9 -0
- package/lib/stacBrowser/context/StacResultsContext.d.ts +33 -0
- package/lib/stacBrowser/context/StacResultsContext.js +269 -0
- package/lib/stacBrowser/hooks/useGeodesSearch.d.ts +24 -0
- package/lib/stacBrowser/hooks/useGeodesSearch.js +178 -0
- package/lib/stacBrowser/hooks/useStacFilterExtension.d.ts +30 -0
- package/lib/stacBrowser/hooks/useStacFilterExtension.js +262 -0
- package/lib/stacBrowser/hooks/useStacSearch.d.ts +5 -16
- package/lib/stacBrowser/hooks/useStacSearch.js +30 -184
- package/lib/stacBrowser/types/types.d.ts +86 -3
- package/lib/toolbar/widget.d.ts +15 -0
- package/lib/toolbar/widget.js +70 -0
- package/lib/tools.d.ts +0 -7
- package/lib/tools.js +56 -15
- package/package.json +8 -3
- package/style/base.css +42 -3
- package/style/leftPanel.css +18 -0
- package/style/shared/button.css +6 -5
- package/style/shared/calendar.css +7 -1
- package/style/shared/combobox.css +75 -0
- package/style/shared/command.css +178 -0
- package/style/shared/dialog.css +177 -0
- package/style/shared/input.css +59 -0
- package/style/shared/pagination.css +1 -1
- package/style/shared/popover.css +1 -0
- package/style/shared/radioGroup.css +55 -0
- package/style/shared/switch.css +63 -0
- package/style/shared/tabs.css +4 -3
- package/style/shared/toggle.css +1 -1
- package/style/stacBrowser.css +169 -16
- package/style/statusBar.css +1 -0
- package/style/storyPanel.css +185 -0
- package/style/tabPanel.css +1 -88
- package/lib/stacBrowser/components/StacPanelFilters.d.ts +0 -14
- package/lib/stacBrowser/components/StacPanelFilters.js +0 -81
- package/lib/stacBrowser/components/StacPanelResults.d.ts +0 -13
- package/lib/stacBrowser/components/StacPanelResults.js +0 -48
- /package/lib/panelview/{components/filter-panel → filter-panel}/Filter.d.ts +0 -0
- /package/lib/panelview/{components/filter-panel → filter-panel}/FilterRow.d.ts +0 -0
- /package/lib/panelview/{components/filter-panel → filter-panel}/FilterRow.js +0 -0
- /package/lib/panelview/{components/identify-panel → identify-panel}/IdentifyPanel.d.ts +0 -0
- /package/lib/panelview/{components/identify-panel → identify-panel}/IdentifyPanel.js +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface IComboboxItem {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
onSelect?: () => void;
|
|
6
|
+
selected?: boolean;
|
|
7
|
+
showCheckIcon?: boolean;
|
|
8
|
+
}
|
|
9
|
+
interface IComboboxProps {
|
|
10
|
+
items: IComboboxItem[];
|
|
11
|
+
buttonText: string;
|
|
12
|
+
searchPlaceholder?: string;
|
|
13
|
+
emptyText?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
buttonClassName?: string;
|
|
16
|
+
open?: boolean;
|
|
17
|
+
onOpenChange?: (open: boolean) => void;
|
|
18
|
+
showSearch?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare function Combobox({ items, buttonText, searchPlaceholder, emptyText, className, buttonClassName, open: controlledOpen, onOpenChange: controlledOnOpenChange, showSearch, }: IComboboxProps): React.JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react';
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
|
+
import { Button } from "./Button";
|
|
4
|
+
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, } from "./Command";
|
|
5
|
+
import { Popover, PopoverContent, PopoverTrigger, } from "./Popover";
|
|
6
|
+
import { cn } from './utils';
|
|
7
|
+
export function Combobox({ items, buttonText, searchPlaceholder = 'Search...', emptyText = 'No option found.', className, buttonClassName, open: controlledOpen, onOpenChange: controlledOnOpenChange, showSearch = true, }) {
|
|
8
|
+
const [internalOpen, setInternalOpen] = useState(false);
|
|
9
|
+
const open = controlledOpen !== undefined ? controlledOpen : internalOpen;
|
|
10
|
+
const setOpen = controlledOnOpenChange || setInternalOpen;
|
|
11
|
+
const handleSelect = (item) => {
|
|
12
|
+
// Don't close automatically - allow multi-select
|
|
13
|
+
if (item.onSelect) {
|
|
14
|
+
item.onSelect();
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
return (React.createElement(Popover, { open: open, onOpenChange: setOpen },
|
|
18
|
+
React.createElement(PopoverTrigger, { asChild: true },
|
|
19
|
+
React.createElement(Button, { variant: "outline", role: "combobox", "aria-expanded": open, className: cn('jgis-combobox-button', buttonClassName) },
|
|
20
|
+
React.createElement("span", { className: "jgis-combobox-button-text" }, buttonText),
|
|
21
|
+
React.createElement(ChevronsUpDownIcon, { className: "jgis-combobox-icon" }))),
|
|
22
|
+
React.createElement(PopoverContent, { className: cn('jgis-combobox-popover', className) },
|
|
23
|
+
React.createElement(Command, null,
|
|
24
|
+
showSearch && React.createElement(CommandInput, { placeholder: searchPlaceholder }),
|
|
25
|
+
React.createElement(CommandList, null,
|
|
26
|
+
React.createElement(CommandEmpty, null, emptyText),
|
|
27
|
+
React.createElement(CommandGroup, null, items.map(item => (React.createElement(CommandItem, { key: item.value, value: item.label, onSelect: () => handleSelect(item) },
|
|
28
|
+
item.showCheckIcon && (React.createElement(CheckIcon, { className: "jgis-combobox-check-icon", style: {
|
|
29
|
+
opacity: item.selected ? 1 : 0,
|
|
30
|
+
} })),
|
|
31
|
+
item.label)))))))));
|
|
32
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Command as CommandPrimitive } from 'cmdk';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Dialog } from "./Dialog";
|
|
4
|
+
declare function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>): React.JSX.Element;
|
|
5
|
+
declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: React.ComponentProps<typeof Dialog> & {
|
|
6
|
+
title?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
showCloseButton?: boolean;
|
|
10
|
+
}): React.JSX.Element;
|
|
11
|
+
declare function CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>): React.JSX.Element;
|
|
12
|
+
declare function CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>): React.JSX.Element;
|
|
13
|
+
declare function CommandEmpty({ ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>): React.JSX.Element;
|
|
14
|
+
declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>): React.JSX.Element;
|
|
15
|
+
declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>): React.JSX.Element;
|
|
16
|
+
declare function CommandItem({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>): React.JSX.Element;
|
|
17
|
+
declare function CommandShortcut({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
18
|
+
export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
|
|
@@ -0,0 +1,60 @@
|
|
|
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 { Command as CommandPrimitive } from 'cmdk';
|
|
13
|
+
import { SearchIcon } from 'lucide-react';
|
|
14
|
+
import * as React from 'react';
|
|
15
|
+
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, } from "./Dialog";
|
|
16
|
+
import { cn } from './utils';
|
|
17
|
+
function Command(_a) {
|
|
18
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
19
|
+
return (React.createElement(CommandPrimitive, Object.assign({ "data-slot": "command", className: cn('jgis-command', className) }, props)));
|
|
20
|
+
}
|
|
21
|
+
function CommandDialog(_a) {
|
|
22
|
+
var { title = 'Command Palette', description = 'Search for a command to run...', children, className, showCloseButton = true } = _a, props = __rest(_a, ["title", "description", "children", "className", "showCloseButton"]);
|
|
23
|
+
return (React.createElement(Dialog, Object.assign({}, props),
|
|
24
|
+
React.createElement(DialogHeader, { className: "sr-only" },
|
|
25
|
+
React.createElement(DialogTitle, null, title),
|
|
26
|
+
React.createElement(DialogDescription, null, description)),
|
|
27
|
+
React.createElement(DialogContent, { className: cn(className), showCloseButton: showCloseButton },
|
|
28
|
+
React.createElement(Command, null, children))));
|
|
29
|
+
}
|
|
30
|
+
function CommandInput(_a) {
|
|
31
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
32
|
+
return (React.createElement("div", { "data-slot": "command-input-wrapper", className: "jgis-command-input-wrapper" },
|
|
33
|
+
React.createElement(SearchIcon, { className: "size-4" }),
|
|
34
|
+
React.createElement(CommandPrimitive.Input, Object.assign({ "data-slot": "command-input", className: cn('jgis-command-input', className) }, props))));
|
|
35
|
+
}
|
|
36
|
+
function CommandList(_a) {
|
|
37
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
38
|
+
return (React.createElement(CommandPrimitive.List, Object.assign({ "data-slot": "command-list", className: cn('jgis-command-list', className) }, props)));
|
|
39
|
+
}
|
|
40
|
+
function CommandEmpty(_a) {
|
|
41
|
+
var props = __rest(_a, []);
|
|
42
|
+
return (React.createElement(CommandPrimitive.Empty, Object.assign({ "data-slot": "command-empty", className: "py-6 text-center text-sm" }, props)));
|
|
43
|
+
}
|
|
44
|
+
function CommandGroup(_a) {
|
|
45
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
46
|
+
return (React.createElement(CommandPrimitive.Group, Object.assign({ "data-slot": "command-group", className: cn('jgis-command-group', className) }, props)));
|
|
47
|
+
}
|
|
48
|
+
function CommandSeparator(_a) {
|
|
49
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
50
|
+
return (React.createElement(CommandPrimitive.Separator, Object.assign({ "data-slot": "command-separator", className: cn('bg-border -mx-1 h-px', className) }, props)));
|
|
51
|
+
}
|
|
52
|
+
function CommandItem(_a) {
|
|
53
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
54
|
+
return (React.createElement(CommandPrimitive.Item, Object.assign({ "data-slot": "command-item", className: cn('jgis-command-item', className) }, props)));
|
|
55
|
+
}
|
|
56
|
+
function CommandShortcut(_a) {
|
|
57
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
58
|
+
return (React.createElement("span", Object.assign({ "data-slot": "command-shortcut", className: cn('jgis-command-shortcut', className) }, props)));
|
|
59
|
+
}
|
|
60
|
+
export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): React.JSX.Element;
|
|
5
|
+
declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): React.JSX.Element;
|
|
6
|
+
declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): React.JSX.Element;
|
|
7
|
+
declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): React.JSX.Element;
|
|
8
|
+
declare function DialogContent({ className, children, showCloseButton, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
9
|
+
showCloseButton?: boolean;
|
|
10
|
+
}): React.JSX.Element;
|
|
11
|
+
declare function DialogHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
12
|
+
declare function DialogFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
13
|
+
declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): React.JSX.Element;
|
|
14
|
+
declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): React.JSX.Element;
|
|
15
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
@@ -0,0 +1,62 @@
|
|
|
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 DialogPrimitive from '@radix-ui/react-dialog';
|
|
13
|
+
import { XIcon } from 'lucide-react';
|
|
14
|
+
import * as React from 'react';
|
|
15
|
+
import { cn } from './utils';
|
|
16
|
+
function Dialog(_a) {
|
|
17
|
+
var props = __rest(_a, []);
|
|
18
|
+
return React.createElement(DialogPrimitive.Root, Object.assign({ "data-slot": "dialog" }, props));
|
|
19
|
+
}
|
|
20
|
+
function DialogTrigger(_a) {
|
|
21
|
+
var props = __rest(_a, []);
|
|
22
|
+
return React.createElement(DialogPrimitive.Trigger, Object.assign({ "data-slot": "dialog-trigger" }, props));
|
|
23
|
+
}
|
|
24
|
+
function DialogPortal(_a) {
|
|
25
|
+
var props = __rest(_a, []);
|
|
26
|
+
return React.createElement(DialogPrimitive.Portal, Object.assign({ "data-slot": "dialog-portal" }, props));
|
|
27
|
+
}
|
|
28
|
+
function DialogClose(_a) {
|
|
29
|
+
var props = __rest(_a, []);
|
|
30
|
+
return React.createElement(DialogPrimitive.Close, Object.assign({ "data-slot": "dialog-close" }, props));
|
|
31
|
+
}
|
|
32
|
+
function DialogOverlay(_a) {
|
|
33
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
34
|
+
return (React.createElement(DialogPrimitive.Overlay, Object.assign({ "data-slot": "dialog-overlay", className: cn('jgis-dialog-overlay', className) }, props)));
|
|
35
|
+
}
|
|
36
|
+
function DialogContent(_a) {
|
|
37
|
+
var { className, children, showCloseButton = true } = _a, props = __rest(_a, ["className", "children", "showCloseButton"]);
|
|
38
|
+
return (React.createElement(DialogPortal, { "data-slot": "dialog-portal" },
|
|
39
|
+
React.createElement(DialogOverlay, null),
|
|
40
|
+
React.createElement(DialogPrimitive.Content, Object.assign({ "data-slot": "dialog-content", className: cn('jgis-dialog-content', className) }, props),
|
|
41
|
+
children,
|
|
42
|
+
showCloseButton && (React.createElement(DialogPrimitive.Close, { "data-slot": "dialog-close", className: "jgis-dialog-close" },
|
|
43
|
+
React.createElement(XIcon, null),
|
|
44
|
+
React.createElement("span", { className: "jgis-sr-only" }, "Close"))))));
|
|
45
|
+
}
|
|
46
|
+
function DialogHeader(_a) {
|
|
47
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
48
|
+
return (React.createElement("div", Object.assign({ "data-slot": "dialog-header", className: cn('jgis-dialog-header', className) }, props)));
|
|
49
|
+
}
|
|
50
|
+
function DialogFooter(_a) {
|
|
51
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
52
|
+
return (React.createElement("div", Object.assign({ "data-slot": "dialog-footer", className: cn('jgis-dialog-footer', className) }, props)));
|
|
53
|
+
}
|
|
54
|
+
function DialogTitle(_a) {
|
|
55
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
56
|
+
return (React.createElement(DialogPrimitive.Title, Object.assign({ "data-slot": "dialog-title", className: cn('jgis-dialog-title', className) }, props)));
|
|
57
|
+
}
|
|
58
|
+
function DialogDescription(_a) {
|
|
59
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
60
|
+
return (React.createElement(DialogPrimitive.Description, Object.assign({ "data-slot": "dialog-description", className: cn('jgis-dialog-description', className) }, props)));
|
|
61
|
+
}
|
|
62
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
@@ -0,0 +1,18 @@
|
|
|
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 React from 'react';
|
|
13
|
+
import { cn } from './utils';
|
|
14
|
+
function Input(_a) {
|
|
15
|
+
var { className, type } = _a, props = __rest(_a, ["className", "type"]);
|
|
16
|
+
return (React.createElement("input", Object.assign({ type: type, "data-slot": "input", className: cn(className) }, props)));
|
|
17
|
+
}
|
|
18
|
+
export { Input };
|
|
@@ -12,14 +12,15 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
import { ChevronLeft, ChevronRight, MoreHorizontal } from 'lucide-react';
|
|
13
13
|
import * as React from 'react';
|
|
14
14
|
import { Button } from './Button';
|
|
15
|
+
import { cn } from './utils';
|
|
15
16
|
const Pagination = (_a) => {
|
|
16
17
|
var props = __rest(_a, []);
|
|
17
18
|
return (React.createElement("nav", Object.assign({ role: "navigation", "aria-label": "pagination", className: 'jgis-pagination' }, props)));
|
|
18
19
|
};
|
|
19
20
|
Pagination.displayName = 'Pagination';
|
|
20
21
|
const PaginationContent = React.forwardRef((_a, ref) => {
|
|
21
|
-
var props = __rest(_a, []);
|
|
22
|
-
return (React.createElement("ul", Object.assign({ ref: ref, className: 'jgis-pagination-content' }, props)));
|
|
22
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
23
|
+
return (React.createElement("ul", Object.assign({ ref: ref, className: cn('jgis-pagination-content', className) }, props)));
|
|
23
24
|
});
|
|
24
25
|
PaginationContent.displayName = 'PaginationContent';
|
|
25
26
|
const PaginationItem = React.forwardRef((_a, ref) => {
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare function RadioGroup({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function RadioGroupItem({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Item>): React.JSX.Element;
|
|
5
|
+
export { RadioGroup, RadioGroupItem };
|
|
@@ -0,0 +1,26 @@
|
|
|
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 RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
13
|
+
import { CircleIcon } from 'lucide-react';
|
|
14
|
+
import * as React from 'react';
|
|
15
|
+
import { cn } from './utils';
|
|
16
|
+
function RadioGroup(_a) {
|
|
17
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
18
|
+
return (React.createElement(RadioGroupPrimitive.Root, Object.assign({ "data-slot": "radio-group", className: cn('jgis-radio-group', className) }, props)));
|
|
19
|
+
}
|
|
20
|
+
function RadioGroupItem(_a) {
|
|
21
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
22
|
+
return (React.createElement(RadioGroupPrimitive.Item, Object.assign({ "data-slot": "radio-group-item", className: cn('jgis-radio-group-item', className) }, props),
|
|
23
|
+
React.createElement(RadioGroupPrimitive.Indicator, { "data-slot": "radio-group-indicator", className: "jgis-radio-group-indicator" },
|
|
24
|
+
React.createElement(CircleIcon, { className: "jgis-radio-group-indicator-icon" }))));
|
|
25
|
+
}
|
|
26
|
+
export { RadioGroup, RadioGroupItem };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ISelectItem {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
onSelect?: () => void;
|
|
6
|
+
}
|
|
7
|
+
interface ISelectProps {
|
|
8
|
+
items: ISelectItem[];
|
|
9
|
+
buttonText: string;
|
|
10
|
+
emptyText?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
buttonClassName?: string;
|
|
13
|
+
open?: boolean;
|
|
14
|
+
onOpenChange?: (open: boolean) => void;
|
|
15
|
+
showSearch?: boolean;
|
|
16
|
+
searchPlaceholder?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function Select({ items, buttonText, emptyText, className, buttonClassName, open: controlledOpen, onOpenChange: controlledOnOpenChange, showSearch, searchPlaceholder, }: ISelectProps): React.JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ChevronsUpDownIcon } from 'lucide-react';
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
|
+
import { Button } from "./Button";
|
|
4
|
+
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, } from "./Command";
|
|
5
|
+
import { Popover, PopoverContent, PopoverTrigger, } from "./Popover";
|
|
6
|
+
import { cn } from './utils';
|
|
7
|
+
export function Select({ items, buttonText, emptyText = 'No option found.', className, buttonClassName, open: controlledOpen, onOpenChange: controlledOnOpenChange, showSearch = false, searchPlaceholder = 'Search...', }) {
|
|
8
|
+
const [internalOpen, setInternalOpen] = useState(false);
|
|
9
|
+
const open = controlledOpen !== undefined ? controlledOpen : internalOpen;
|
|
10
|
+
const setOpen = controlledOnOpenChange || setInternalOpen;
|
|
11
|
+
const handleSelect = (item) => {
|
|
12
|
+
setOpen(false);
|
|
13
|
+
if (item.onSelect) {
|
|
14
|
+
item.onSelect();
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
return (React.createElement(Popover, { open: open, onOpenChange: setOpen },
|
|
18
|
+
React.createElement(PopoverTrigger, { asChild: true },
|
|
19
|
+
React.createElement(Button, { variant: "outline", role: "combobox", "aria-expanded": open, className: cn('jgis-combobox-button', buttonClassName) },
|
|
20
|
+
React.createElement("span", { className: "jgis-combobox-button-text" }, buttonText),
|
|
21
|
+
React.createElement(ChevronsUpDownIcon, { className: "jgis-combobox-icon" }))),
|
|
22
|
+
React.createElement(PopoverContent, { className: cn('jgis-select-popover', className) },
|
|
23
|
+
React.createElement(Command, null,
|
|
24
|
+
showSearch && React.createElement(CommandInput, { placeholder: searchPlaceholder }),
|
|
25
|
+
React.createElement(CommandList, null,
|
|
26
|
+
React.createElement(CommandEmpty, null, emptyText),
|
|
27
|
+
React.createElement(CommandGroup, null, items.map(item => (React.createElement(CommandItem, { key: item.value, value: item.label, onSelect: () => handleSelect(item) }, item.label)))))))));
|
|
28
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ISingleDatePickerProps {
|
|
3
|
+
date: Date | undefined;
|
|
4
|
+
onDateChange: (date: Date | undefined) => void;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
dateFormat?: string;
|
|
8
|
+
showIcon?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare function SingleDatePicker({ date, onDateChange, placeholder, className, dateFormat, showIcon, }: ISingleDatePickerProps): React.JSX.Element;
|
|
11
|
+
export default SingleDatePicker;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { format } from 'date-fns';
|
|
2
|
+
import { CalendarIcon } from 'lucide-react';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Button } from "./Button";
|
|
5
|
+
import { Calendar } from "./Calendar";
|
|
6
|
+
import { Popover, PopoverContent, PopoverTrigger, } from "./Popover";
|
|
7
|
+
function SingleDatePicker({ date, onDateChange, placeholder = 'Select date', className, dateFormat = 'PPP', showIcon = true, }) {
|
|
8
|
+
return (React.createElement(Popover, null,
|
|
9
|
+
React.createElement(PopoverTrigger, { asChild: true },
|
|
10
|
+
React.createElement(Button, { className: className, variant: "outline" },
|
|
11
|
+
showIcon && React.createElement(CalendarIcon, { className: "jgis-stac-datepicker-icon" }),
|
|
12
|
+
date ? format(date, dateFormat) : React.createElement("span", null, placeholder))),
|
|
13
|
+
React.createElement(PopoverContent, null,
|
|
14
|
+
React.createElement(Calendar, { mode: "single", selected: date, onSelect: onDateChange, autoFocus: true }))));
|
|
15
|
+
}
|
|
16
|
+
export default SingleDatePicker;
|
|
@@ -0,0 +1,20 @@
|
|
|
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 SwitchPrimitive from '@radix-ui/react-switch';
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
import { cn } from './utils';
|
|
15
|
+
function Switch(_a) {
|
|
16
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
17
|
+
return (React.createElement(SwitchPrimitive.Root, Object.assign({ "data-slot": "switch", className: cn('jgis-switch', className) }, props),
|
|
18
|
+
React.createElement(SwitchPrimitive.Thumb, { "data-slot": "switch-thumb", className: "jgis-switch-thumb" })));
|
|
19
|
+
}
|
|
20
|
+
export { Switch };
|
|
@@ -3,5 +3,13 @@ import React from 'react';
|
|
|
3
3
|
interface IStacViewProps {
|
|
4
4
|
model?: IJupyterGISModel;
|
|
5
5
|
}
|
|
6
|
-
declare const StacPanel:
|
|
6
|
+
declare const StacPanel: {
|
|
7
|
+
({ model }: IStacViewProps): React.JSX.Element;
|
|
8
|
+
ProviderSelect: typeof ProviderSelect;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Provider selector component for choosing STAC providers.
|
|
12
|
+
* Uses context to manage selected provider URL.
|
|
13
|
+
*/
|
|
14
|
+
declare function ProviderSelect(): React.JSX.Element;
|
|
7
15
|
export default StacPanel;
|
|
@@ -1,20 +1,64 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { Select } from "../../shared/components/Select";
|
|
2
3
|
import { Tabs, TabsContent, TabsList, TabsTrigger, } from "../../shared/components/Tabs";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import StacPanelResults from
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
import StacFilterExtensionPanel from "./filter-extension/StacFilterExtensionPanel";
|
|
5
|
+
import StacGeodesFilterPanel from "./geodes/StacGeodesFilterPanel";
|
|
6
|
+
import StacPanelResults from "./shared/StacPanelResults";
|
|
7
|
+
import { StacResultsProvider, useStacResultsContext, } from "../context/StacResultsContext";
|
|
8
|
+
const GEODES_URL = 'https://geodes-portal.cnes.fr/api/stac/';
|
|
9
|
+
const COPERNICUS_URL = 'https://stac.dataspace.copernicus.eu/v1/';
|
|
10
|
+
const WORLDPOP_URL = 'https://api.stac.worldpop.org/';
|
|
11
|
+
const PROVIDERS = [
|
|
12
|
+
{ url: COPERNICUS_URL, name: 'Copernicus' },
|
|
13
|
+
{ url: GEODES_URL, name: 'GEODES' },
|
|
14
|
+
{ url: WORLDPOP_URL, name: 'WorldPop' },
|
|
15
|
+
];
|
|
16
|
+
// URL to panel component mapping for extensibility
|
|
17
|
+
// Add new entries here to support additional STAC providers
|
|
18
|
+
const URL_TO_PANEL_MAP = {
|
|
19
|
+
[GEODES_URL]: StacGeodesFilterPanel,
|
|
20
|
+
};
|
|
21
|
+
// Inner component that uses the context
|
|
22
|
+
const StacPanelContent = ({ model }) => {
|
|
23
|
+
var _a;
|
|
24
|
+
const { totalResults, selectedUrl } = useStacResultsContext();
|
|
8
25
|
if (!model) {
|
|
9
26
|
return null;
|
|
10
27
|
}
|
|
11
|
-
|
|
12
|
-
|
|
28
|
+
const ProviderPanel = (_a = URL_TO_PANEL_MAP[selectedUrl]) !== null && _a !== void 0 ? _a : StacFilterExtensionPanel;
|
|
29
|
+
return (React.createElement(Tabs, { defaultValue: "filters", className: "jgis-panel-tabs", style: { boxShadow: 'none' } },
|
|
30
|
+
React.createElement(TabsList, { className: "jgis-stac-panel-tabs-list" },
|
|
13
31
|
React.createElement(TabsTrigger, { className: "jGIS-layer-browser-category", value: "filters" }, "Filters"),
|
|
14
32
|
React.createElement(TabsTrigger, { className: "jGIS-layer-browser-category", value: "results" }, `Results (${totalResults})`)),
|
|
15
33
|
React.createElement(TabsContent, { value: "filters" },
|
|
16
|
-
React.createElement(
|
|
34
|
+
React.createElement("div", { className: "jgis-stac-filter-extension-panel" },
|
|
35
|
+
React.createElement(StacPanel.ProviderSelect, null),
|
|
36
|
+
selectedUrl ? (React.createElement(ProviderPanel, { model: model })) : (React.createElement("div", { className: "jgis-stac-panel-placeholder" }, "Please select a provider above")))),
|
|
17
37
|
React.createElement(TabsContent, { value: "results" },
|
|
18
|
-
React.createElement(StacPanelResults,
|
|
38
|
+
React.createElement(StacPanelResults, null))));
|
|
39
|
+
};
|
|
40
|
+
// Outer component that provides the context
|
|
41
|
+
const StacPanel = ({ model }) => {
|
|
42
|
+
return (React.createElement(StacResultsProvider, { model: model },
|
|
43
|
+
React.createElement(StacPanelContent, { model: model })));
|
|
19
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* Provider selector component for choosing STAC providers.
|
|
47
|
+
* Uses context to manage selected provider URL.
|
|
48
|
+
*/
|
|
49
|
+
function ProviderSelect() {
|
|
50
|
+
const { selectedUrl, setSelectedUrl } = useStacResultsContext();
|
|
51
|
+
const selectedProvider = PROVIDERS.find(provider => provider.url === selectedUrl);
|
|
52
|
+
const buttonText = (selectedProvider === null || selectedProvider === void 0 ? void 0 : selectedProvider.name) || 'Select a provider...';
|
|
53
|
+
const items = PROVIDERS.map(provider => ({
|
|
54
|
+
value: provider.url,
|
|
55
|
+
label: provider.name,
|
|
56
|
+
onSelect: () => setSelectedUrl(provider.url),
|
|
57
|
+
}));
|
|
58
|
+
return (React.createElement("div", { className: "jgis-stac-filter-extension-section" },
|
|
59
|
+
React.createElement("label", { className: "jgis-stac-filter-extension-label" }, "Provider"),
|
|
60
|
+
React.createElement(Select, { items: items, buttonText: buttonText, emptyText: "No provider found.", buttonClassName: "jgis-stac-filter-extension-select" })));
|
|
61
|
+
}
|
|
62
|
+
// Attach ProviderSelect as a composable sub-component
|
|
63
|
+
StacPanel.ProviderSelect = ProviderSelect;
|
|
20
64
|
export default StacPanel;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IQueryableFilter, IStacQueryables, UpdateSelectedQueryables } from "../../types/types";
|
|
3
|
+
interface IQueryableComboProps {
|
|
4
|
+
queryables: IStacQueryables;
|
|
5
|
+
selectedQueryables: Record<string, IQueryableFilter>;
|
|
6
|
+
updateSelectedQueryables: UpdateSelectedQueryables;
|
|
7
|
+
}
|
|
8
|
+
export declare function QueryableComboBox({ queryables, selectedQueryables, updateSelectedQueryables, }: IQueryableComboProps): React.JSX.Element;
|
|
9
|
+
export {};
|