@woven-planet/lakefront 6.0.1 → 6.2.3

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/README.md CHANGED
@@ -85,3 +85,4 @@ Please do not add information below this table, the 'npm run update-readme' will
85
85
  | [Tabs](https://woven-planet.github.io/lakefront?path=/docs/lakefront-tabs--tabs) | <details><summary>Screenshot</summary><img src="src/screenshots/Tabs.png"></details> | [TextArea](https://woven-planet.github.io/lakefront/?path=/docs/lakefront-textarea--placeholder) | <details><summary>Screenshot</summary><img src="src/screenshots/TextArea.png"></details> |
86
86
  | [Toggle](https://woven-planet.github.io/lakefront/?path=/docs/lakefront-toggle--toggle) | <details><summary>Screenshot</summary><img src="src/screenshots/Toggle.png"></details> | [TypeaheadSearch](https://woven-planet.github.io/lakefront/?path=/docs/lakefront-typeaheadsearch--search-bottom-start) |<details><summary>Screenshot</summary><img src="src/screenshots/TypeaheadSearch.png"></details> |
87
87
  | [ModeSelector](https://woven-planet.github.io/lakefront/?path=/docs/lakefront-modeselector--simple-mode-selector) | <details><summary>Screenshot</summary><img src="src/screenshots/ModeSelector.png"></details> | [Colors](https://woven-planet.github.io/lakefront/?path=/docs/lakefront-theme-colors--docs) | <details><summary>Screenshot</summary><img src="src/screenshots/Colors.png"></details> |
88
+ [ContextMenu](https://woven-planet.github.io/lakefront/ContextMenu) | <details><summary>Screenshot</summary><img src="src/screenshots/ContextMenu.png"></details> |
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from "react";
3
- import { ComponentPropsWithoutRef, FC, RefAttributes, ReactNode, ElementType, ReactElement, ChangeEvent, Dispatch, MouseEventHandler, SetStateAction, ComponentPropsWithRef, MouseEvent } from "react";
3
+ import { ComponentPropsWithoutRef, FC, RefAttributes, ReactNode, ElementType, ReactElement, ChangeEvent, Dispatch, MouseEventHandler, SetStateAction, ComponentPropsWithRef, MouseEvent, ComponentProps } from "react";
4
4
  import { LinkProps } from "react-router-dom";
5
5
  import { GetStyles, GroupBase } from "react-select/dist/declarations/src/types";
6
6
  import { ParsedQuery } from "query-string";
@@ -388,6 +388,33 @@ interface CollapsibleProps {
388
388
  *
389
389
  */
390
390
  declare const Collapsible: FC<CollapsibleProps & Pick<ComponentPropsWithoutRef<"div">, Exclude<keyof ComponentPropsWithoutRef<"div">, keyof CollapsibleProps>>>;
391
+ type ClickableMenuItem = {
392
+ key: string;
393
+ label: ReactNode;
394
+ onClick: () => void;
395
+ isSeparator?: false;
396
+ disabled?: boolean;
397
+ };
398
+ type SeparatorMenuItem = {
399
+ isSeparator: true;
400
+ };
401
+ type MenuItem = ClickableMenuItem | SeparatorMenuItem;
402
+ interface ContextMenuProps {
403
+ /** The content that will trigger the context menu on right-click. */
404
+ children: ReactElement;
405
+ /** An array of menu item objects to be displayed. */
406
+ menuItems: MenuItem[];
407
+ /** The component or HTML tag to use as the wrapper. Defaults to 'div'. */
408
+ wrapper?: ElementType;
409
+ /**
410
+ * When true, the component will mount a div to the body and render the dialog through it.
411
+ * This is useful when the dialog would be inside a scrollable container or one with "overflow: hidden"
412
+ * so it doesn't get cut off. Uses IntersectionObserver and needs a polyfill if IE compatibility is needed. This
413
+ * defaults to `false`.
414
+ */
415
+ renderInPortal?: boolean;
416
+ }
417
+ declare const ContextMenu: FC<ContextMenuProps>;
391
418
  interface CopyButtonProps {
392
419
  /**
393
420
  * `Default = "Copy"` The text to display within the button.
@@ -578,6 +605,7 @@ interface LakefrontTheme {
578
605
  widget: string;
579
606
  disabled: string;
580
607
  inverted: string;
608
+ hover: string;
581
609
  };
582
610
  foregrounds: {
583
611
  primary: string;
@@ -1762,6 +1790,10 @@ interface ModeSelectorProps {
1762
1790
  * For this reason, `selectedMode`, `modes`, and `onModeSelect` must be provided.
1763
1791
  */
1764
1792
  declare const ModeSelector: FC<ModeSelectorProps>;
1793
+ interface MoreActionsButtonProps {
1794
+ items: MenuItem[];
1795
+ }
1796
+ declare const MoreActionsButton: FC<MoreActionsButtonProps>;
1765
1797
  interface PageProps {
1766
1798
  /**
1767
1799
  * The children to display within the styled page container.
@@ -2560,6 +2592,14 @@ interface TableSortByOptions {
2560
2592
  id: string;
2561
2593
  desc: boolean;
2562
2594
  }
2595
+ interface ContextMenuConfig {
2596
+ getRowMenuItems: (row: any) => MenuItem[];
2597
+ }
2598
+ interface MoreActionsConfig {
2599
+ getRowActionItems: (row: any) => MenuItem[];
2600
+ visibleOnHover?: boolean;
2601
+ width?: number;
2602
+ }
2563
2603
  interface TableProps {
2564
2604
  /**
2565
2605
  * This is to set the data for the table.
@@ -2577,7 +2617,7 @@ interface TableProps {
2577
2617
  /**
2578
2618
  * This is to set the row properties.
2579
2619
  */
2580
- rowProps?: object;
2620
+ rowProps?: ComponentProps<"tr">;
2581
2621
  /**
2582
2622
  * This is to set the display message when there is no data.
2583
2623
  */
@@ -2618,6 +2658,12 @@ interface TableProps {
2618
2658
  * This is defaulted to false.
2619
2659
  */
2620
2660
  hideHeaders?: boolean;
2661
+ /**
2662
+ * Configuration for the row-level context menu.
2663
+ * If provided, a context menu will be enabled for each row.
2664
+ */
2665
+ contextMenuConfig?: ContextMenuConfig;
2666
+ moreActionsConfig?: MoreActionsConfig;
2621
2667
  }
2622
2668
  /**
2623
2669
  * The Table Component is used to render table with specified columns and data.
@@ -2830,4 +2876,4 @@ interface TypeaheadSearchProps {
2830
2876
  declare const TypeaheadSearch: FC<TypeaheadSearchProps & ComponentPropsWithoutRef<"input">>;
2831
2877
  declare const THEME: Theme;
2832
2878
  declare const DARK_THEME: Theme;
2833
- export { AnchorCopy, AnchorCopyProps, BoundingBoxes, BoundingBoxesProps, BoundingBoxItemProp, BreadcrumbHeader, BreadcrumbProps, RouteProp, Breadcrumb, BreadcrumbHeaderProps, Button, ButtonProps$0 as ButtonProps, Card, CardProps, Checkbox, CheckboxProps, CheckboxGroup, CheckboxGroupProps, CheckboxGroupOption, Collapsible, CollapsibleProps, CopyButton, CopyButtonProps, Drawer, DrawerProps, Filter, getApiQueryUrl, getApiPostBody, parseInitialFilterValues, getCurrentBrowserQueryParams, getFilterBrowserQueryParams, FILTER_MODE_OPTIONS, USER_JSON_QUERY_PARAM, getDefaultValue, getDefaultJsonViewValue, getFilterAppliedCount, getUrlFromList, areSetsEqual, convertToFilterDropdownOptions, useFilter, FilterRenderProps, FilterPostBody, FilterModule, FilterSet, FilterValues, FilterHooks, FilterMap, FilterSectionHeaderProps, FilterMode, Location, UrlParameters, UpdateHistory, ContextSwitchMenuValue, ContextSwitchMenuProps, FilterBarProps, FilterJSONConfirmationModalProps, FilterJSONInputProps, FilterComponentProps, FilterContainerProps, AdditionalJSONFilterOptions, DoubleMultiSelectData, DoubleMultiSelectOptions, DoubleMultiSelectValues, DoubleMultiSelectFilterProps, DoubleMultiSelectFilterOptions, ListFilterOverrides, MultiSelectFilterProps, MultiSelectFilterOptions, RadioFilterProps, RadioFilterOptions, SingleSelectFilterProps, SingleSelectFilterOptions, TextFilterOverrides, AdditionalJSONFilter, DoubleMultiSelectFilter, ListFilter, MultiSelectFilter, RadioFilter, SingleSelectFilter, TextFilter, DurationFilter, MinMaxFilter, MinMaxInput, Header, IconButton, Input, InputProps, ItemGrid, ItemGridProps, ItemResults, ItemResultsProps, Loading, LoadingProps, MaskableImage, MaskableImageProps, ImageTagProps, Modal, ConfirmationModal, ConfirmationModalProps, ModalProps, ModeSelector, ModeSelectorProps, ModeSelectorLegendRowProps, Page, PageProps, PlaybackBar, PlaybackBarProps, HighlightsProp, usePopover, UsePopoverProps, PortalStyles, PopoverContent, ProgressBar, ProgressBarProps, CircularProgress, CircularProgressProps, DeviceProgressBar, DeviceProgressProps, DeviceProgressBarThreshold, PropertyList, Property, PropertyListProps, PropertyListVariable, RadioGroup, RadioGroupProps, RefreshToolbar, RefreshToolbarProps, Select, SelectProps, SELECT_OVERLAY_STYLES, SelectOverlayStyles, SelectPopover, SelectPopoverProps, SelectPopoverOption, Snackbar, SnackbarProps, MESSAGE_TYPES as SNACKBAR_MESSAGE_TYPES, SpeedInput, SpeedInputProps, SpeedInputVehicleSpeed, SpeedInputVehicleSpeedMode, StackBanner, StackBannerProps, StackBannerRow, StackBannerRowProps, StatusTable, StatusCard, StatusCardProps, StatusCellBadge, StatusCellBadgeProps, StatusRow, StatusRowProps, Status, StatusTableProps, StatusTableHeader, useStatusTable, StatusTableHooks, StatusTableOptions, filterData, getCompareFormat, mapTableFilters, sortData, SortOptions, sortByField, StepFunctionGraph, StepFunctionGraphProps, Table, TableProps, TableSortByOptions, Tabs, TabProps, TextArea, TextAreaProps, Toggle, ToggleProps, TransferList, ListItem, TransferListProps, TypeaheadSearch, TypeaheadSearchResultProps, TypeaheadSearchProps, TypeaheadResultItem, LAKEFRONT_COLORS as colors, THEME as theme, DARK_THEME as darkTheme, SelectOption, TabDef, LakefrontTheme };
2879
+ export { AnchorCopy, AnchorCopyProps, BoundingBoxes, BoundingBoxesProps, BoundingBoxItemProp, BreadcrumbHeader, BreadcrumbProps, RouteProp, Breadcrumb, BreadcrumbHeaderProps, Button, ButtonProps$0 as ButtonProps, Card, CardProps, Checkbox, CheckboxProps, CheckboxGroup, CheckboxGroupProps, CheckboxGroupOption, Collapsible, CollapsibleProps, ContextMenu, MenuItem, CopyButton, CopyButtonProps, Drawer, DrawerProps, Filter, getApiQueryUrl, getApiPostBody, parseInitialFilterValues, getCurrentBrowserQueryParams, getFilterBrowserQueryParams, FILTER_MODE_OPTIONS, USER_JSON_QUERY_PARAM, getDefaultValue, getDefaultJsonViewValue, getFilterAppliedCount, getUrlFromList, areSetsEqual, convertToFilterDropdownOptions, useFilter, FilterRenderProps, FilterPostBody, FilterModule, FilterSet, FilterValues, FilterHooks, FilterMap, FilterSectionHeaderProps, FilterMode, Location, UrlParameters, UpdateHistory, ContextSwitchMenuValue, ContextSwitchMenuProps, FilterBarProps, FilterJSONConfirmationModalProps, FilterJSONInputProps, FilterComponentProps, FilterContainerProps, AdditionalJSONFilterOptions, DoubleMultiSelectData, DoubleMultiSelectOptions, DoubleMultiSelectValues, DoubleMultiSelectFilterProps, DoubleMultiSelectFilterOptions, ListFilterOverrides, MultiSelectFilterProps, MultiSelectFilterOptions, RadioFilterProps, RadioFilterOptions, SingleSelectFilterProps, SingleSelectFilterOptions, TextFilterOverrides, AdditionalJSONFilter, DoubleMultiSelectFilter, ListFilter, MultiSelectFilter, RadioFilter, SingleSelectFilter, TextFilter, DurationFilter, MinMaxFilter, MinMaxInput, Header, IconButton, Input, InputProps, ItemGrid, ItemGridProps, ItemResults, ItemResultsProps, Loading, LoadingProps, MaskableImage, MaskableImageProps, ImageTagProps, Modal, ConfirmationModal, ConfirmationModalProps, ModalProps, ModeSelector, ModeSelectorProps, ModeSelectorLegendRowProps, MoreActionsButton, Page, PageProps, PlaybackBar, PlaybackBarProps, HighlightsProp, usePopover, UsePopoverProps, PortalStyles, PopoverContent, ProgressBar, ProgressBarProps, CircularProgress, CircularProgressProps, DeviceProgressBar, DeviceProgressProps, DeviceProgressBarThreshold, PropertyList, Property, PropertyListProps, PropertyListVariable, RadioGroup, RadioGroupProps, RefreshToolbar, RefreshToolbarProps, Select, SelectProps, SELECT_OVERLAY_STYLES, SelectOverlayStyles, SelectPopover, SelectPopoverProps, SelectPopoverOption, Snackbar, SnackbarProps, MESSAGE_TYPES as SNACKBAR_MESSAGE_TYPES, SpeedInput, SpeedInputProps, SpeedInputVehicleSpeed, SpeedInputVehicleSpeedMode, StackBanner, StackBannerProps, StackBannerRow, StackBannerRowProps, StatusTable, StatusCard, StatusCardProps, StatusCellBadge, StatusCellBadgeProps, StatusRow, StatusRowProps, Status, StatusTableProps, StatusTableHeader, useStatusTable, StatusTableHooks, StatusTableOptions, filterData, getCompareFormat, mapTableFilters, sortData, SortOptions, sortByField, StepFunctionGraph, StepFunctionGraphProps, Table, TableProps, TableSortByOptions, Tabs, TabProps, TextArea, TextAreaProps, Toggle, ToggleProps, TransferList, ListItem, TransferListProps, TypeaheadSearch, TypeaheadSearchResultProps, TypeaheadSearchProps, TypeaheadResultItem, LAKEFRONT_COLORS as colors, THEME as theme, DARK_THEME as darkTheme, SelectOption, TabDef, LakefrontTheme };