@woven-planet/lakefront 5.5.3 → 6.0.12

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
@@ -27,7 +27,7 @@ import { theme } from '@woven-planet/lakefront';
27
27
  ```
28
28
 
29
29
  ## Usage
30
- ### ⚠️ <b>LakeFront requires the client application to use React 18 as well as Node 18.x. ⚠️ </b>
30
+ ### ⚠️ <b>LakeFront requires the client application to use React 18 and the Node version in the [package.json](./package.json) ⚠️ </b>
31
31
 
32
32
 
33
33
  Here is a quick example to get you started, **it's all you need**:
@@ -84,4 +84,5 @@ Please do not add information below this table, the 'npm run update-readme' will
84
84
  | [StepFunctionRenderer](https://woven-planet.github.io/lakefront/?path=/docs/lakefront-stepfunctionrenderer--step-function-renderer) | <details><summary>Screenshot</summary><img src="src/screenshots/StepFunctionRenderer.png"></details> | [Table](https://woven-planet.github.io/lakefront?path=/docs/lakefront-table--table) | <details><summary>Screenshot</summary><img src="src/screenshots/Table.png"></details> |
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
- | [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> |
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,9 +1,10 @@
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";
7
+ import { Theme } from "@emotion/react";
7
8
  import { Column } from "react-table";
8
9
  interface AnchorCopyProps {
9
10
  /**
@@ -387,6 +388,33 @@ interface CollapsibleProps {
387
388
  *
388
389
  */
389
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>;
390
418
  interface CopyButtonProps {
391
419
  /**
392
420
  * `Default = "Copy"` The text to display within the button.
@@ -458,6 +486,59 @@ interface DrawerProps {
458
486
  * Usage: Place this next to a flex container that has flex: 1
459
487
  */
460
488
  declare const Drawer: FC<DrawerProps>;
489
+ declare const LAKEFRONT_COLORS: {
490
+ white: string;
491
+ akoya: string;
492
+ selago: string;
493
+ mercury: string;
494
+ alto: string;
495
+ bombay: string;
496
+ pavement: string;
497
+ dolphin: string;
498
+ gunpowder: string;
499
+ arsenic: string;
500
+ doveGrey: string;
501
+ grey30: string;
502
+ storm: string;
503
+ cinder: string;
504
+ black: string;
505
+ orange: string;
506
+ saturatedOrange: string;
507
+ gold: string;
508
+ yellow: string;
509
+ saturatedYellow: string;
510
+ red: string;
511
+ watermelon: string;
512
+ saturatedRed: string;
513
+ cranberry: string;
514
+ mediumPurple: string;
515
+ lavender: string;
516
+ saturatedLavender: string;
517
+ green: string;
518
+ pastelGreen: string;
519
+ saturatedGreen: string;
520
+ emerald: string;
521
+ saturatedTeal: string;
522
+ teal: string;
523
+ sinbad: string;
524
+ viking: string;
525
+ vista: string;
526
+ calmingBlue: string;
527
+ blue: string;
528
+ havelockBlue: string;
529
+ saturatedBlue: string;
530
+ };
531
+ declare const colors: typeof LAKEFRONT_COLORS;
532
+ declare const _default: {
533
+ primary: string;
534
+ popover: string;
535
+ };
536
+ declare const borders: typeof _default;
537
+ declare const zIndex: {
538
+ modal: number;
539
+ popover: number;
540
+ snackbar: number;
541
+ };
461
542
  /**
462
543
  * JSONObject is a wrapper for a generic JSON object structure.
463
544
  */
@@ -478,6 +559,106 @@ interface TabDef {
478
559
  key: string;
479
560
  caption: string;
480
561
  }
562
+ type ColorsType = typeof colors;
563
+ type BordersType = typeof borders;
564
+ type ZIndexType = typeof zIndex;
565
+ interface LakefrontTheme {
566
+ colors: ColorsType;
567
+ borders: BordersType;
568
+ zIndex: ZIndexType;
569
+ DARKEN_MOST: number;
570
+ DARKEN_LEAST: number;
571
+ textColors: {
572
+ primary: string;
573
+ secondary: string;
574
+ h2: string;
575
+ h4: string;
576
+ error: string;
577
+ disabled: string;
578
+ };
579
+ backgroundColors: {
580
+ primary: string;
581
+ secondary: string;
582
+ third: string;
583
+ fourth: string;
584
+ fifth: string;
585
+ primaryWidget: string;
586
+ disabled: string;
587
+ };
588
+ borderColors: {
589
+ primary: string;
590
+ secondary: string;
591
+ disabled: string;
592
+ inverted: string;
593
+ };
594
+ buttonColors: {
595
+ primary: string;
596
+ secondary: string;
597
+ };
598
+ shadowColors: {
599
+ boxShadow: string;
600
+ };
601
+ backgrounds: {
602
+ primary: string;
603
+ secondary: string;
604
+ tertiary: string;
605
+ widget: string;
606
+ disabled: string;
607
+ inverted: string;
608
+ hover: string;
609
+ };
610
+ foregrounds: {
611
+ primary: string;
612
+ secondary: string;
613
+ error: string;
614
+ disabled: string;
615
+ info: string;
616
+ warning: string;
617
+ inverted: string;
618
+ };
619
+ lettering: {
620
+ primary: {
621
+ fontSize: number;
622
+ fontFamily: string;
623
+ fontWeight: number;
624
+ };
625
+ secondary: {
626
+ fontSize: number;
627
+ fontFamily: string;
628
+ fontWeight: number;
629
+ };
630
+ h1: {
631
+ fontSize: number;
632
+ fontFamily: string;
633
+ fontWeight: number;
634
+ };
635
+ h2: {
636
+ fontSize: number;
637
+ fontFamily: string;
638
+ fontWeight: number;
639
+ };
640
+ h3: {
641
+ fontSize: number;
642
+ fontFamily: string;
643
+ fontWeight: number;
644
+ };
645
+ h4: {
646
+ fontSize: number;
647
+ fontFamily: string;
648
+ fontWeight: number;
649
+ };
650
+ h5: {
651
+ fontSize: number;
652
+ fontFamily: string;
653
+ fontWeight: number;
654
+ };
655
+ h6: {
656
+ fontSize: number;
657
+ fontFamily: string;
658
+ fontWeight: number;
659
+ };
660
+ };
661
+ }
481
662
  type MultiSelectOption = SelectOption<string>;
482
663
  interface SelectOption$0 {
483
664
  value: string | number | undefined;
@@ -2407,6 +2588,9 @@ interface TableSortByOptions {
2407
2588
  id: string;
2408
2589
  desc: boolean;
2409
2590
  }
2591
+ interface ContextMenuConfig {
2592
+ getRowMenuItems: (row: any) => MenuItem[];
2593
+ }
2410
2594
  interface TableProps {
2411
2595
  /**
2412
2596
  * This is to set the data for the table.
@@ -2424,7 +2608,7 @@ interface TableProps {
2424
2608
  /**
2425
2609
  * This is to set the row properties.
2426
2610
  */
2427
- rowProps?: object;
2611
+ rowProps?: ComponentProps<"tr">;
2428
2612
  /**
2429
2613
  * This is to set the display message when there is no data.
2430
2614
  */
@@ -2465,6 +2649,11 @@ interface TableProps {
2465
2649
  * This is defaulted to false.
2466
2650
  */
2467
2651
  hideHeaders?: boolean;
2652
+ /**
2653
+ * Configuration for the row-level context menu.
2654
+ * If provided, a context menu will be enabled for each row.
2655
+ */
2656
+ contextMenuConfig?: ContextMenuConfig;
2468
2657
  }
2469
2658
  /**
2470
2659
  * The Table Component is used to render table with specified columns and data.
@@ -2675,101 +2864,6 @@ interface TypeaheadSearchProps {
2675
2864
  * **result from the list, you'll need to spread in the props (as shown above).**
2676
2865
  */
2677
2866
  declare const TypeaheadSearch: FC<TypeaheadSearchProps & ComponentPropsWithoutRef<"input">>;
2678
- declare const LAKEFRONT_COLORS: {
2679
- white: string;
2680
- akoya: string;
2681
- selago: string;
2682
- mercury: string;
2683
- pavement: string;
2684
- dolphin: string;
2685
- gunpowder: string;
2686
- storm: string;
2687
- cinder: string;
2688
- black: string;
2689
- grey30: string;
2690
- doveGrey: string;
2691
- bombay: string;
2692
- alto: string;
2693
- red: string;
2694
- watermelon: string;
2695
- orange: string;
2696
- yellow: string;
2697
- gold: string;
2698
- green: string;
2699
- pastelGreen: string;
2700
- emerald: string;
2701
- teal: string;
2702
- blue: string;
2703
- lavender: string;
2704
- havelockBlue: string;
2705
- calmingBlue: string;
2706
- sinbad: string;
2707
- cranberry: string;
2708
- viking: string;
2709
- mediumPurple: string;
2710
- vista: string;
2711
- saturatedRed: string;
2712
- saturatedOrange: string;
2713
- saturatedYellow: string;
2714
- saturatedBlue: string;
2715
- saturatedGreen: string;
2716
- saturatedLavender: string;
2717
- saturatedTeal: string;
2718
- arsenic: string;
2719
- };
2720
- declare const THEME: {
2721
- colors: {
2722
- white: string;
2723
- akoya: string;
2724
- selago: string;
2725
- mercury: string;
2726
- pavement: string;
2727
- dolphin: string;
2728
- gunpowder: string;
2729
- storm: string;
2730
- cinder: string;
2731
- black: string;
2732
- grey30: string;
2733
- doveGrey: string;
2734
- bombay: string;
2735
- alto: string;
2736
- red: string;
2737
- watermelon: string;
2738
- orange: string;
2739
- yellow: string;
2740
- gold: string;
2741
- green: string;
2742
- pastelGreen: string;
2743
- emerald: string;
2744
- teal: string;
2745
- blue: string;
2746
- lavender: string;
2747
- havelockBlue: string;
2748
- calmingBlue: string;
2749
- sinbad: string;
2750
- cranberry: string;
2751
- viking: string;
2752
- mediumPurple: string;
2753
- vista: string;
2754
- saturatedRed: string;
2755
- saturatedOrange: string;
2756
- saturatedYellow: string;
2757
- saturatedBlue: string;
2758
- saturatedGreen: string;
2759
- saturatedLavender: string;
2760
- saturatedTeal: string;
2761
- arsenic: string;
2762
- };
2763
- borders: {
2764
- primary: string;
2765
- popover: string;
2766
- };
2767
- zIndex: {
2768
- modal: number;
2769
- popover: number;
2770
- snackbar: number;
2771
- };
2772
- DARKEN_MOST: number;
2773
- DARKEN_LEAST: number;
2774
- };
2775
- 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, SelectOption, TabDef };
2867
+ declare const THEME: Theme;
2868
+ declare const DARK_THEME: Theme;
2869
+ 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, 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 };