@uniformdev/mesh-sdk-react 19.140.2-alpha.7 → 19.142.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/dist/index.d.mts CHANGED
@@ -9,7 +9,7 @@ import { DynamicInputs, MeshLocation, SetValueOptions, EditConnectedDataResponse
9
9
  export * from '@uniformdev/mesh-sdk';
10
10
  import { DataVariableDefinition, DataResourceVariables, DataType } from '@uniformdev/canvas';
11
11
  import { Emitter } from 'mitt';
12
- import { BadgeThemeProps, InputSelectProps, FilterEditorCommonInputProps } from '@uniformdev/design-system';
12
+ import { BadgeThemeProps, InputSelectProps, IconType } from '@uniformdev/design-system';
13
13
  export { AddListButton, AddListButtonProps, Button, ButtonProps, Callout, CalloutProps, DrawerContent, Heading, HeadingProps, Input, InputComboBox, InputComboBoxProps, InputKeywordSearch, InputProps, InputSelect, InputToggle, InputToggleProps, Label, LabelProps, LoadingIndicator, LoadingOverlay, Menu, MenuItem, MenuItemProps, MenuProps, ParameterGroup, ParameterGroupProps, ParameterImage, ParameterImageInner, ParameterImageProps, ParameterInput, ParameterInputInner, ParameterInputProps, ParameterLabel, ParameterLabelProps, ParameterMenuButton, ParameterMenuButtonProps, ParameterSelect, ParameterSelectInner, ParameterSelectProps, ParameterShell, ParameterShellContext, ParameterShellProps, ParameterTextarea, ParameterTextareaInner, ParameterTextareaProps, ParameterToggle, ParameterToggleInner, ParameterToggleProps, ScrollableList, ScrollableListItem, ScrollableListItemProps, ScrollableListProps, Switch, SwitchProps, Textarea, TextareaProps, Theme, ThemeProps, useParameterShell } from '@uniformdev/design-system';
14
14
  import * as lexical from 'lexical';
15
15
  import { SerializedEditorState, SerializedLexicalNode, Spread, DecoratorNode, NodeKey, LexicalNode, LexicalEditor, EditorState } from 'lexical';
@@ -512,7 +512,7 @@ type VariableNodeState = {
512
512
  * Note that this is ignored if `isFresh` is true, which is set for the result of edits or insertions
513
513
  * made after the editor has mounted (which we know are good and don't validate to prevent flicker or false errors)
514
514
  */
515
- referenceIsValid: boolean | 'info';
515
+ referenceIsValid: boolean | 'info' | 'warning';
516
516
  /**
517
517
  * Whether the variable node has been inserted or edited during this editing session
518
518
  * Fresh nodes are always considered "valid" because they are the result of a user action
@@ -602,6 +602,7 @@ type MeshDataVariableDefinition = Omit<DataVariableDefinition, 'default'> & {
602
602
  type KnownUndefinedVariableInfo = {
603
603
  error?: string;
604
604
  info?: string;
605
+ warning?: string;
605
606
  displayName?: string;
606
607
  };
607
608
  type DataVariableDefinitionWithName = {
@@ -613,9 +614,25 @@ type DataVariableDefinitionWithName = {
613
614
  */
614
615
  declare function variablesToList(variables: Record<string, MeshDataVariableDefinition> | undefined): Array<DataVariableDefinitionWithName>;
615
616
 
617
+ type KnownUndefinedVariableInfoWithName = KnownUndefinedVariableInfo & {
618
+ name: string;
619
+ resultType: 'undefined';
620
+ };
621
+ type VariableEditorProps<TEditorContext = unknown, TEditVariableCompletedContext = unknown, TEditVariableCancelledContext = unknown> = {
622
+ variable: string;
623
+ onSubmit: (values: DataVariableDefinitionWithName | KnownUndefinedVariableInfoWithName, context: TEditVariableCompletedContext) => void | Promise<void>;
624
+ /** Disables the tip about Mesh integrations. Intended for use when this is placed on a custom Mesh integration to edit variables. */
625
+ disableMeshTip?: boolean;
626
+ onCancel: (context: TEditVariableCancelledContext) => void;
627
+ context: TEditorContext | undefined;
628
+ disableAutoFocusOnMount?: boolean;
629
+ showDisplayName?: boolean;
630
+ };
631
+ declare function VariableEditor({ variable, onSubmit, onCancel, showDisplayName, disableMeshTip, }: VariableEditorProps<any, unknown, EditConnectedDataResponseCancellationContext>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
632
+
616
633
  type SelectVariableMenuProps<TEditorContext = undefined> = {
617
634
  /** sets the onClick menu item event. Also called if the menu adds a variable with the newly added variable. */
618
- onSelectVariable: (selectedVariable: DataVariableDefinitionWithName) => void;
635
+ onSelectVariable: (selectedVariable: DataVariableDefinitionWithName | KnownUndefinedVariableInfoWithName) => void;
619
636
  /** Controls whether one can add variables from the menu */
620
637
  showAddVariableMenuOption?: boolean | string;
621
638
  /** Emotion styles to apply to the menu trigger icon button */
@@ -784,6 +801,12 @@ type InputVariablesProps<TEditorContext = unknown> = {
784
801
  * @deprecated this is ignored if passed, computation is now automatic
785
802
  */
786
803
  disableReset?: boolean;
804
+ /**
805
+ * By default when keyDown happens in the variables input, any active variable editor is dismissed automatically.
806
+ * This makes sense, until you want to put a variables input _into_ a variables editor component. In that case,
807
+ * disable it with this prop.
808
+ */
809
+ disableDismissEditorOnChange?: boolean;
787
810
  /** Enables mutliple lines in the input (\n in the value) */
788
811
  multiLine?: boolean;
789
812
  /** Disables the inline variable selection menu when rendering a variables input */
@@ -906,18 +929,6 @@ type ParameterVariablesProps<TEditorContext = unknown> = {
906
929
  */
907
930
  declare function ParameterVariables<TEditorContext = unknown>(props: ParameterVariablesProps<TEditorContext>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
908
931
 
909
- type VariableEditorProps<TEditorContext = unknown, TEditVariableCompletedContext = unknown, TEditVariableCancelledContext = unknown> = {
910
- variable: string;
911
- onSubmit: (values: DataVariableDefinitionWithName, context: TEditVariableCompletedContext) => void | Promise<void>;
912
- /** Disables the tip about Mesh integrations. Intended for use when this is placed on a custom Mesh integration to edit variables. */
913
- disableMeshTip?: boolean;
914
- onCancel: (context: TEditVariableCancelledContext) => void;
915
- context: TEditorContext | undefined;
916
- disableAutoFocusOnMount?: boolean;
917
- showDisplayName?: boolean;
918
- };
919
- declare function VariableEditor({ variable, onSubmit, onCancel, showDisplayName, disableMeshTip, }: VariableEditorProps<any, unknown, EditConnectedDataResponseCancellationContext>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
920
-
921
932
  type VariablesProviderProps<TEditVariableContext = unknown, TEditVariableCompletedContext = unknown, TEditVariableCancelledContext = unknown> = React.PropsWithChildren<{
922
933
  /**
923
934
  * Signals that components in this variables context are not intended to allow mutation
@@ -937,6 +948,14 @@ type VariablesProviderProps<TEditVariableContext = unknown, TEditVariableComplet
937
948
  knownUndefinedValues?: Record<string, KnownUndefinedVariableInfo>;
938
949
  /** Function to handle mutations to the variable values (optional when readOnly is true) */
939
950
  onChange?: (newValue: Record<string, MeshDataVariableDefinition>) => void;
951
+ /**
952
+ * Called when a custom editVariableComponent signals that it wants to add a known undefined value to the variable context
953
+ * instead of a valid variable. This is useful when the variable editor component may be allowed to select invalid values that should produce
954
+ * warning or info messages when referenced, rather than being treated as an error.
955
+ *
956
+ * The caller must wire up the logic to pass back new `knownUndefinedValues` after they are modified.
957
+ */
958
+ onChangeKnownUndefinedValue?: (name: string, value: KnownUndefinedVariableInfo) => void;
940
959
  /**
941
960
  * Provide a component to handle editing a variable definition (e.g. a modal wrapper)
942
961
  * If not passed, the editor will be rendered inline, with potentially strange results.
@@ -973,7 +992,7 @@ type VariablesAction<TEditVariableContext> = {
973
992
  type VariableEditorCompleteEvent<TEditVariableCompletedContext, TEditVariableCancelledContext> = {
974
993
  canceled: false;
975
994
  /** Selected variable */
976
- selectedVariable: DataVariableDefinitionWithName;
995
+ selectedVariable: DataVariableDefinitionWithName | KnownUndefinedVariableInfoWithName;
977
996
  /**
978
997
  * Arbitrary object that was returned by the variables editor component's onSubmit
979
998
  * Can be used to convey context data about the submit from custom editor components
@@ -1035,7 +1054,7 @@ type VariablesContext<TEditVariableContext, TEditVariableCompletedContext, TEdit
1035
1054
  */
1036
1055
  isLoading: boolean;
1037
1056
  };
1038
- declare function VariablesProvider<TEditComponentContext = never, TEditVariableCompletedContext = never, TEditVariableCancelledContext = never>({ value, onChange, editVariableComponent, readOnly, isLoading, children, knownUndefinedValues, }: VariablesProviderProps<TEditComponentContext, TEditVariableCompletedContext, TEditVariableCancelledContext>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1057
+ declare function VariablesProvider<TEditComponentContext = never, TEditVariableCompletedContext = never, TEditVariableCancelledContext = never>({ value, onChange, editVariableComponent, readOnly, isLoading, children, knownUndefinedValues, onChangeKnownUndefinedValue, }: VariablesProviderProps<TEditComponentContext, TEditVariableCompletedContext, TEditVariableCancelledContext>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1039
1058
  declare function useVariables<TEditComponentContext = unknown, TEditVariableCompletedContext = unknown, TEditVariableCancelledContext = unknown>(returnEmptyWithoutProvider?: boolean): VariablesContext<TEditComponentContext, TEditVariableCompletedContext, TEditVariableCancelledContext>;
1040
1059
 
1041
1060
  declare function useVariableEditor<TEditorContext = unknown, TEditVariableCompletedContext = unknown, TEditVariableCancelledContext = unknown>(): {
@@ -1690,6 +1709,427 @@ declare function useRequestParameter(paramName: string): {
1690
1709
  update: (value: string) => void;
1691
1710
  };
1692
1711
 
1712
+ /** @deprecated beta - Filter editor component names */
1713
+ type FilterEditor = 'singleChoice' | 'multiChoice' | 'dateRange' | 'date' | 'text' | 'empty' | 'number' | 'numberRange' | 'statusMultiChoice' | 'statusSingleChoice';
1714
+ /** @deprecated beta - Input option props */
1715
+ type InputOption = {
1716
+ /** The label for the option */
1717
+ label: string;
1718
+ /** The value for the option */
1719
+ value?: string | undefined;
1720
+ /** The options for the option */
1721
+ options?: Array<FilterOption>;
1722
+ /** Set a disabled state on the input */
1723
+ isDisabled?: boolean;
1724
+ /** Set a readonly state on the input */
1725
+ readOnly?: boolean;
1726
+ };
1727
+ /** @deprecated beta - Operator option props */
1728
+ type Operator = {
1729
+ /** The label for the operator */
1730
+ label: string;
1731
+ /** The symbol for the operator */
1732
+ value?: string;
1733
+ /** The symbol for the operator */
1734
+ symbol?: string;
1735
+ /** The editor type for the operator */
1736
+ options?: Array<InputOption>;
1737
+ /** The editor type for the operator */
1738
+ editorType?: FilterEditor;
1739
+ };
1740
+ /** @deprecated beta - Filter option props */
1741
+ type FilterOption = {
1742
+ /** The label for the option */
1743
+ label: string;
1744
+ /** The value for the option */
1745
+ value: string;
1746
+ /** The options for the option */
1747
+ options?: FilterOption[];
1748
+ /** The operator options for the option */
1749
+ operatorOptions?: Operator[];
1750
+ /** The value options for the option */
1751
+ valueOptions?: InputOption[];
1752
+ /** Set a readonly state on the input */
1753
+ readOnly?: boolean;
1754
+ /** Set a disabled state on the input */
1755
+ disabled?: boolean;
1756
+ /** If filter operator allows it allow bind dynamic value to this filter */
1757
+ bindable?: boolean;
1758
+ };
1759
+ /** @deprecated beta - Filter selected and query value props */
1760
+ type Filter = {
1761
+ /** The field value selected */
1762
+ field: string;
1763
+ /** The operator value selected */
1764
+ operator: string;
1765
+ /** The value selected */
1766
+ value: string | string[];
1767
+ };
1768
+
1769
+ /** @deprecated beta - a list of possible operator values that sync with uniform search api */
1770
+ type OperatorValue = 'eq' | 'sys-date-eq' | 'neq' | 'sys-date-neq' | 'gt' | 'sys-date-gt' | 'gte' | 'sys-date-gte' | 'lt' | 'sys-date-lt' | 'lte' | 'sys-date-lte' | 'in' | 'nin' | 'between' | 'sys-date-between' | 'ndef' | 'def' | 'match' | 'starts';
1771
+ type OperatorValueType = {
1772
+ value: OperatorValue;
1773
+ };
1774
+ /** @deprecated beta - a list of possible operator types */
1775
+ type OperatorType = Array<Omit<Operator, 'value'> & OperatorValueType>;
1776
+ /** @deprecated beta - uniform number operators */
1777
+ declare const NUMBER_OPERATORS: OperatorType;
1778
+ /** @deprecated beta - uniform date operators */
1779
+ declare const DATE_OPERATORS: OperatorType;
1780
+ /** @deprecated beta - uniform textbox operators */
1781
+ declare const TEXTBOX_OPERATORS: OperatorType;
1782
+ /** @deprecated beta - uniform user operators */
1783
+ declare const USER_OPERATORS: OperatorType;
1784
+ /** @deprecated beta - uniform system date operators */
1785
+ declare const SYSTEM_DATE_OPERATORS: OperatorType;
1786
+ /** @deprecated beta - uniform rich text operators */
1787
+ declare const RICHTEXT_OPERATORS: OperatorType;
1788
+ /** @deprecated beta - uniform checkbox operators */
1789
+ declare const CHECKBOX_OPERATORS: OperatorType;
1790
+ /** @deprecated beta - uniform system field operators */
1791
+ declare const SYSTEM_FIELD_OPERATORS: OperatorType;
1792
+ /** @deprecated beta - uniform publish status field operators */
1793
+ declare const PUBLISH_STATUS_FIELD_OPERATORS: OperatorType;
1794
+
1795
+ /** @description beta - filter button type */
1796
+ type FilterButtonProps = {
1797
+ /** text to display on the button
1798
+ * @default "Filters"
1799
+ */
1800
+ text?: string;
1801
+ /** icon to display on the button
1802
+ * @default "filter-add"
1803
+ */
1804
+ icon?: IconType;
1805
+ /** number of filters to display on the button and sets the styles on the button */
1806
+ filterCount?: number;
1807
+ /** sets the selected styles on the button */
1808
+ hasSelectedValue?: boolean;
1809
+ /** sets the data-testid attribute on the button */
1810
+ dataTestId?: string;
1811
+ } & HTMLAttributes<HTMLButtonElement>;
1812
+ /**
1813
+ * @deprecated beta - A filter button component used to display filter menu options
1814
+ * @example <FilterButton text="Filters" filterCount={3} />
1815
+ */
1816
+ declare const FilterButton: ({ text, icon, filterCount, hasSelectedValue, dataTestId, ...props }: FilterButtonProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1817
+
1818
+ /**
1819
+ * @deprecated beta - Default filter controls for search and filter
1820
+ * @example <FilterControls />
1821
+ */
1822
+ declare const FilterControls: ({ children, hideSearchInput, }: {
1823
+ /** optional param to allow you to add your own controls */
1824
+ children?: ReactNode;
1825
+ /** optional param to hide the search input */
1826
+ hideSearchInput?: boolean | undefined;
1827
+ }) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1828
+
1829
+ type FilterEditorProps = Record<FilterEditor, ComponentType<{
1830
+ label?: string;
1831
+ value?: string;
1832
+ options: any;
1833
+ onChange: (value: any) => void;
1834
+ }> | (() => ReactNode) | null>;
1835
+ type ComboboxOption = {
1836
+ label: string;
1837
+ value: string;
1838
+ };
1839
+ type SingleValueComboboxProps = Omit<FilterEditorCommonInputProps, 'value'> & {
1840
+ value?: string;
1841
+ options: ComboboxOption[];
1842
+ onChange: (e: string) => void;
1843
+ };
1844
+ type MultiValueComboboxProps = Omit<FilterEditorCommonInputProps, 'value'> & {
1845
+ value?: string[];
1846
+ options: ComboboxOption[];
1847
+ onChange: (e: string[]) => void;
1848
+ };
1849
+ type FilterEditorCommonInputProps = {
1850
+ ariaLabel: string;
1851
+ onChange: (e: string | string[]) => void;
1852
+ disabled?: boolean;
1853
+ value?: string | string[];
1854
+ readOnly?: boolean;
1855
+ valueTestId?: string;
1856
+ bindable?: boolean;
1857
+ };
1858
+ /**
1859
+ * @deprecated beta - Multie select filter component
1860
+ * @example <FilterMultiChoiceEditor options={options} value={options.filter((option) => values.includes(option.value)} onChange={(e) => onChange(e.map((option) => option.value))} />
1861
+ */
1862
+ declare const FilterMultiChoiceEditor: ({ value, options, disabled, readOnly, valueTestId, ...props }: MultiValueComboboxProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1863
+ /**
1864
+ * @deprecated beta - Single select filter component
1865
+ * @example <FilterSingleChoiceEditor options={options} value={options.find((option) => values.includes(option.value)} onChange={(e) => onChange(e.value)} />
1866
+ */
1867
+ declare const FilterSingleChoiceEditor: ({ options, value, disabled, readOnly, onChange, valueTestId, }: SingleValueComboboxProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1868
+ /**
1869
+ * @deprecated beta - Status multi select filter component that renders a custom dropdown menu
1870
+ * @example <StatusMultiEditor options={options} value={value} onChange={onChange} />
1871
+ */
1872
+ declare const StatusMultiEditor: ({ options, value, disabled, readOnly, onChange, valueTestId, }: MultiValueComboboxProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1873
+ /**
1874
+ * @deprecated beta - Status single select filter component that renders a custom dropdown menu
1875
+ * @example <StatusSingleEditor options={options} value={value} onChange={onChange} />
1876
+ */
1877
+ declare const StatusSingleEditor: ({ options, value, disabled, readOnly, onChange, valueTestId, }: SingleValueComboboxProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1878
+ /**
1879
+ * @deprecated beta - Renders a text input field for filtering
1880
+ * @example <TextEditor ariaLabel="Search" value={value} onChange={onChange} />
1881
+ */
1882
+ declare const TextEditor: ({ onChange, ariaLabel, value, readOnly, valueTestId, }: FilterEditorCommonInputProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1883
+ /**
1884
+ * @deprecated beta - Renders a number range input field for filtering
1885
+ * @example <NumberRangeEditor ariaLabel="Number Range" value={value} onChange={onChange} />
1886
+ */
1887
+ declare const NumberRangeEditor: ({ onChange, disabled, ariaLabel, value, readOnly, valueTestId, }: FilterEditorCommonInputProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1888
+ /**
1889
+ * @deprecated beta - Renders a number input field for filtering
1890
+ * @example <NumberEditor ariaLabel="Number" value={value} onChange={onChange} />
1891
+ */
1892
+ declare const NumberEditor: ({ ariaLabel, onChange, disabled, value, readOnly, valueTestId, }: FilterEditorCommonInputProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1893
+ /**
1894
+ * @deprecated beta - Renders a date input field for filtering
1895
+ * @example <DateEditor ariaLabel="Date" value={value} onChange={onChange} />
1896
+ */
1897
+ declare const DateEditor: ({ onChange, ariaLabel, disabled, value, readOnly, valueTestId, }: FilterEditorCommonInputProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1898
+ /**
1899
+ * @deprecated beta - Renders a date range input field for filtering
1900
+ * @example <DateRangeEditor ariaLabel="Date Range" value={value} onChange={onChange} />
1901
+ */
1902
+ declare const DateRangeEditor: ({ ariaLabel, onChange, disabled, value, readOnly, valueTestId, }: FilterEditorCommonInputProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1903
+ type FilterEditorRendererProps = Pick<FilterOption, 'readOnly' | 'disabled' | 'bindable'> & {
1904
+ /** The type of filter editor to render */
1905
+ editorType: FilterEditor;
1906
+ /** The options for the filter editor */
1907
+ options?: Array<Operator>;
1908
+ /** The value for the filter editor */
1909
+ value?: string | string[] | InputOption[] | InputOption;
1910
+ /** The onChange event for the filter editor */
1911
+ onChange: (e: string) => void;
1912
+ /** Sets the data-testid value */
1913
+ valueTestId?: string;
1914
+ };
1915
+ /**
1916
+ * @deprecated beta - Renders a filter editor component
1917
+ * @example <FilterEditorRenderer editorType="multiChoice" options={options} value={value} onChange={onChange} />
1918
+ */
1919
+ declare const FilterEditorRenderer: ({ editorType, ...props }: FilterEditorRendererProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element | null;
1920
+ /** @deprecated beta - A mapper for filter editor components */
1921
+ declare const filterMapper: Record<FilterEditor, ComponentType<any> | null>;
1922
+
1923
+ type FilterMapper = Record<string, ComponentType<any> | null>;
1924
+ type SearchAndFilterProviderProps = {
1925
+ /** sets the filter values */
1926
+ filters: Filter[];
1927
+ /** sets the filter visibility */
1928
+ filterVisible?: boolean;
1929
+ /** function to trigger search change event */
1930
+ onSearchChange?: (term: string) => void;
1931
+ /** function to trigger filter change events */
1932
+ onChange: (filters: Filter[]) => void;
1933
+ /** Sets default value for full text search input, useful for bindable search */
1934
+ defaultSearchTerm?: string;
1935
+ /** sets the reset filter values
1936
+ * @default "[{ field: '', operator: '', value: '' }]"
1937
+ */
1938
+ resetFilterValues?: Filter[];
1939
+ /** sets the list of filter options for each filter row */
1940
+ filterOptions: FilterOption[];
1941
+ /** the total number of results */
1942
+ totalResults?: number;
1943
+ /** the filter mapper function */
1944
+ filterMapper?: FilterMapper;
1945
+ /** sets child components giving access to useSearchAndFilter context */
1946
+ children: ReactNode;
1947
+ };
1948
+ type SearchAndFilterContextProps = {
1949
+ /** the search term value */
1950
+ searchTerm: string;
1951
+ /** sets the search term value */
1952
+ setSearchTerm: (term: string) => void;
1953
+ /** current filter visibility */
1954
+ filterVisibility?: boolean;
1955
+ /** sets the filter visibility */
1956
+ setFilterVisibility: (visible: boolean) => void;
1957
+ /** sets the initial filters */
1958
+ filters: Filter[];
1959
+ /** function to update the current filters */
1960
+ setFilters: (updatedFilters: Filter[]) => void;
1961
+ /** function that adds a blank set of filter options */
1962
+ handleAddFilter: () => void;
1963
+ /** function to reset all filter values */
1964
+ handleResetFilters: (filters?: Filter[]) => void;
1965
+ /** function that deletes a row and it's values visually and from state */
1966
+ handleDeleteFilter: (index: number) => void;
1967
+ /** sets the initial list of filter options */
1968
+ filterOptions: FilterOption[];
1969
+ /** a valid list of valid filter options */
1970
+ validFilterQuery: Filter[] | undefined;
1971
+ /** a component list to map filter options */
1972
+ filterMapper?: FilterMapper;
1973
+ /** the total number of results */
1974
+ totalResults?: number;
1975
+ };
1976
+ declare const SearchAndFilterContext: React$1.Context<SearchAndFilterContextProps>;
1977
+ /**
1978
+ * @deprecated beta - Search and filter provider
1979
+ * @example <SearchAndFilterProvider filters={filters} filterOptions={filterOptions} onSearchChange={onSearchChange} onChange={onChange}>Children</SearchAndFilterProvider>
1980
+ * */
1981
+ declare const SearchAndFilterProvider: ({ filters, filterOptions, filterVisible, defaultSearchTerm, onSearchChange, onChange, resetFilterValues, totalResults, filterMapper, children, }: SearchAndFilterProviderProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1982
+ /** @deprecated beta - Search and filter hook
1983
+ * @example const { searchTerm, setSearchTerm, filterVisibility, setFilterVisibility, filters, setFilters, handleAddFilter, handleResetFilters, handleDeleteFilter, filterOptions, validFilterQuery } = useSearchAndFilter();
1984
+ */
1985
+ declare const useSearchAndFilter: () => {
1986
+ /** the search term value */
1987
+ searchTerm: string;
1988
+ /** sets the search term value */
1989
+ setSearchTerm: (term: string) => void;
1990
+ /** current filter visibility */
1991
+ filterVisibility?: boolean | undefined;
1992
+ /** sets the filter visibility */
1993
+ setFilterVisibility: (visible: boolean) => void;
1994
+ /** sets the initial filters */
1995
+ filters: Filter[];
1996
+ /** function to update the current filters */
1997
+ setFilters: (updatedFilters: Filter[]) => void;
1998
+ /** function that adds a blank set of filter options */
1999
+ handleAddFilter: () => void;
2000
+ /** function to reset all filter values */
2001
+ handleResetFilters: (filters?: Filter[]) => void;
2002
+ /** function that deletes a row and it's values visually and from state */
2003
+ handleDeleteFilter: (index: number) => void;
2004
+ /** sets the initial list of filter options */
2005
+ filterOptions: FilterOption[];
2006
+ /** a valid list of valid filter options */
2007
+ validFilterQuery: Filter[] | undefined;
2008
+ /** a component list to map filter options */
2009
+ filterMapper?: FilterMapper | undefined;
2010
+ /** the total number of results */
2011
+ totalResults?: number | undefined;
2012
+ };
2013
+
2014
+ type SearchAndFilterProps = Omit<SearchAndFilterProviderProps, 'children'> & {
2015
+ /** The filter controls to be displayed
2016
+ * @default '<FilterControls />'
2017
+ */
2018
+ filterControls?: React$1.ReactNode;
2019
+ /** sets the filter mode */
2020
+ filterVisible?: boolean;
2021
+ /** The view switch controls to be displayed */
2022
+ viewSwitchControls?: React$1.ReactNode;
2023
+ /** The number of total results */
2024
+ totalResults?: number;
2025
+ /** The results container view
2026
+ * @default '<SearchAndFilterResultContainer />'
2027
+ */
2028
+ resultsContainerView?: React$1.ReactNode;
2029
+ /** sets the reset filter values */
2030
+ resetFilterValues?: Filter[];
2031
+ /** The filter mapper function */
2032
+ filterMapper?: Record<FilterEditor, React$1.ComponentType<any> | null>;
2033
+ /** Component to render inside filters container right below main Filters widget
2034
+ * that should contain additional controls like filters
2035
+ * which do not fit main structure or sorting */
2036
+ additionalFiltersContainer?: React$1.ReactNode;
2037
+ };
2038
+ /**
2039
+ * @deprecated beta - Search and filter component
2040
+ * @example <SearchAndFilter filters={filters} filterOptions={filterOptions} onChange={onChange} onSearchChange={onSearchChange} onSearchReset={onSearchReset} totalResults={totalResults} />
2041
+ * */
2042
+ declare const SearchAndFilter: ({ filters, filterOptions, filterVisible, filterControls, viewSwitchControls, resultsContainerView, filterMapper, additionalFiltersContainer, onChange, defaultSearchTerm, onSearchChange, totalResults, resetFilterValues, }: SearchAndFilterProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
2043
+
2044
+ type FilterRowProps = {
2045
+ /** the index of the filter row */
2046
+ index: number;
2047
+ /** the list of filter options for each filter row */
2048
+ paramOptions: FilterOption[];
2049
+ /** function to trigger filter change events */
2050
+ onParamChange: (e: string) => void;
2051
+ /** the list of operator options for each filter row */
2052
+ operatorOptions: Operator[];
2053
+ /** function to trigger operator change events */
2054
+ onOperatorChange: (e: string) => void;
2055
+ /** function to trigger value change events */
2056
+ onValueChange: (e: string) => void;
2057
+ /** the list of value options for each filter row */
2058
+ valueOptions: InputOption[];
2059
+ };
2060
+ /** @deprecated beta - A filter item component used to display filter options */
2061
+ declare const FilterItem: ({ index, paramOptions, operatorOptions, valueOptions, onParamChange, onOperatorChange, onValueChange, }: FilterRowProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
2062
+ type FilterItemsProps = {
2063
+ /** The text for the add button */
2064
+ addButtonText?: string;
2065
+ additionalFiltersContainer: SearchAndFilterProps['additionalFiltersContainer'];
2066
+ };
2067
+ /** @deprecated beta - A filter items component used to display filter options */
2068
+ declare const FilterItems: ({ addButtonText, additionalFiltersContainer, }: FilterItemsProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
2069
+
2070
+ type SearchAndFilterOptionsContainerProps = {
2071
+ /** The button row to be displayed at the bottom of the container */
2072
+ buttonRow?: React__default.ReactNode;
2073
+ /** The children of the container */
2074
+ children: React__default.ReactNode;
2075
+ additionalFiltersContainer?: SearchAndFilterProps['additionalFiltersContainer'];
2076
+ };
2077
+ /**
2078
+ * @deprecated beta - A container component for search and filter options
2079
+ * @example <SearchAndFilterOptionsContainer buttonRow={<button>Button</button>}>Children</SearchAndFilterOptionsContainer>
2080
+ * */
2081
+ declare const SearchAndFilterOptionsContainer: ({ buttonRow, additionalFiltersContainer, children, }: SearchAndFilterOptionsContainerProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
2082
+ type FiltersProps = {
2083
+ /** The id of the filter menu */
2084
+ id: string;
2085
+ /** The text for the filter title */
2086
+ filterTitle?: string;
2087
+ /** The controls to be displayed at the bottom of the filter menu */
2088
+ menuControls?: React__default.ReactNode;
2089
+ /** The children of the filter menu */
2090
+ children: React__default.ReactNode;
2091
+ /** Sets the data-test-id attribute for the filter menu */
2092
+ dataTestId?: string;
2093
+ /** The text for the reset button
2094
+ * @default 'reset'
2095
+ */
2096
+ resetButtonText?: string;
2097
+ additionalFiltersContainer?: SearchAndFilterProps['additionalFiltersContainer'];
2098
+ };
2099
+ /**
2100
+ * @deprecated beta - A filter menu component used to display filter options
2101
+ * @example <FilterMenu id="search-and-filter-options">Children</FilterMenu>
2102
+ * */
2103
+ declare const FilterMenu: ({ id, filterTitle, menuControls, additionalFiltersContainer, children, dataTestId, resetButtonText, }: FiltersProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
2104
+
2105
+ type SearchAndFilterResultContainerProps = {
2106
+ /** The label for the clear button
2107
+ * @default 'Clear'
2108
+ */
2109
+ clearButtonLabel?: string;
2110
+ /** The text for the button */
2111
+ buttonText?: string;
2112
+ /** The title for the callout */
2113
+ calloutTitle?: string;
2114
+ /** The text for the callout */
2115
+ calloutText?: string;
2116
+ /** The function to handle the clear button */
2117
+ onHandleClear?: () => void;
2118
+ /** Sets whether to show or hide both clear search buttons */
2119
+ hideClearButton?: boolean;
2120
+ };
2121
+ /** @deprecated beta - Search and filter results container */
2122
+ declare const SearchAndFilterResultContainer: ({ buttonText, clearButtonLabel, calloutTitle, calloutText, onHandleClear, hideClearButton, }: SearchAndFilterResultContainerProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element | null;
2123
+
2124
+ declare const SearchOnlyContext: React$1.Context<Pick<SearchAndFilterContextProps, "searchTerm" | "setSearchTerm">>;
2125
+ type SearchOnlyProviderProps = Pick<SearchAndFilterProviderProps, 'onSearchChange'> & {
2126
+ /** sets the max width of input wrapper
2127
+ * @default '712px'
2128
+ */
2129
+ maxWidth?: string;
2130
+ };
2131
+ declare const SearchOnlyFilter: ({ onSearchChange, maxWidth }: SearchOnlyProviderProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
2132
+
1693
2133
  declare const bindableFiltersMapper: {
1694
2134
  multiChoice: React__default.FC<Omit<FilterEditorCommonInputProps, "value"> & {
1695
2135
  value?: string[] | undefined;
@@ -1786,4 +2226,4 @@ type ContentDataResourceLocaleInfoProps = {
1786
2226
  };
1787
2227
  declare function useContentDataResourceLocaleInfo({ locale, setLocale, dynamicInputs, }: ContentDataResourceLocaleInfoProps): ContentDataResourceLocaleInfoResult;
1788
2228
 
1789
- export { $createVariableNode, $isVariableNode, type BaseRequestData, type Brand, type ContentDataResourceLocaleInfoProps, type ContentDataResourceLocaleInfoResult, ControlledValuePlugin, DISCONNECT_VARIABLE_COMMAND, type DamItem, DamSelectedItem, type DamSelectedItemProps, DataRefreshButton, type DataRefreshButtonProps, DataResourceDynamicInputProvider, type DataResourceDynamicInputProviderProps, type DataResourceVariableRendererProps, DataResourceVariablesList, DataResourceVariablesListExplicit, type DataResourceVariablesListProps, DataSourceEditor, type DataSourceEditorProps, DataTypeEditor, type DataTypeEditorProps, type DataVariableDefinitionWithName, DefaultSearchRow, DefaultSelectedItem, type DisconnectVariableCommandArguments, type DispatchResult, EDIT_VARIABLE_COMMAND, type EditVariableCommandArguments, EntrySearch, type EntrySearchContentType, type EntrySearchProps, type EntrySearchQueryOptions, type EntrySearchResult, type EntrySearchRowProps, type EntrySearchSelectedItemProps, type GetProductOptions, type GetProductsOptions, INSERT_VARIABLE_COMMAND, index as Icons, InputVariables, type InputVariablesProps, type InsertVariableCommandArguments, type ItemListProps, type KnownUndefinedVariableInfo, LinkButton, MeshApp, type MeshAppProps, type MeshDataVariableDefinition, type NoResultsProps, OPEN_INSERT_VARIABLE_COMMAND, ObjectSearchContainer, type ObjectSearchContainerProps, type ObjectSearchContextProps, ObjectSearchFilter, ObjectSearchFilterContainer, type ObjectSearchFilterContainerProps, type ObjectSearchFilterProps, ObjectSearchListItem, ObjectSearchListItemLoadingSkeleton, type ObjectSearchListItemProps, ObjectSearchProvider, type ObjectSearchProviderProps, ObjectSearchResultItem, ObjectSearchResultItemButton, type ObjectSearchResultItemButtonProps, type ObjectSearchResultItemProps, ObjectSearchResultList, type ObjectSearchResultListProps, ParamTypeDynamicDataProvider, type ParamTypeDynamicDataProviderProps, type ParameterConnectOptions, ParameterConnectionIndicator, type ParameterConnectionIndicatorProps, ParameterOrSingleVariable, type ParameterOrSingleVariableProps, ParameterVariables, type ParameterVariablesProps, type ProductCategory, type ProductDynamicSelectorValue, ProductPreviewList, ProductQuery, type ProductQueryCategory, ProductQueryContext, type ProductQueryContextValue, type ProductQueryProps, ProductSearch, ProductSearchContext, type ProductSearchContextValue, type ProductSearchProps, type ProductSearchResult, type ProductSearchResults, ProductSearchRow, ProductSelectedItem, QueryFilter, type QueryFilterProps, type QueryFilterSearchProps, type RequestAction, RequestBody, type RequestContext, type RequestData, RequestHeaders, RequestMethodSelect, type RequestParameter, RequestParameters, type RequestParametersProps, RequestProvider, type RequestProviderProps, RequestTypeContainer, type RequestTypeContainerProps, RequestUrl, RequestUrlInput, ResolvableLoadingValue, type SearchQueryProps, type SelectedItemProps, SelectionField, type SelectionFieldValue, type SerializedVariableNode, type SetLocationValueDispatch, type SetLocationValueFunction, TextVariableRenderer, type UseVariablesMenu, type UseVariablesMenuInput, VariableEditor, type VariableEditorCompleteEvent, type VariableEditorProps, VariableNode, type VariableNodeState, type VariableSourceGroup, type VariablesAction, type VariablesContext, type VariablesEvents, VariablesList, VariablesPlugin, type VariablesPluginProps, VariablesProvider, type VariablesProviderProps, badgeIcon, bindableFiltersMapper, convertConnectedDataToVariable, createLocationValidator, damSelectItemImage, damSelectedItemContainer, damSelectedItemCopy, damSelectedItemDetails, damSelectedItemIcon, damSelectedItemInfoBtn, damSelectedItemInner, damSelectedItemLinkBtn, damSelectedItemLinkContainer, damSelectedItemMediaContainer, damSelectedItemPopover, damSelectedItemPopoverLabel, damSelectedItemSmallText, damSelectedItemTitle, draggableContainer, draggableIcon, draggableIconOffset, draggableIconWrapper, entrySearchBtn, entrySearchConfig, entrySearchConfigHidden, entrySearchLoadMoreBtn, entrySearchResultList, entrySearchSelectIcon, entrySearchSelectImg, entrySearchSelectInput, entrySearchSelectOption, entrySearchWrapper, hasReferencedVariables, prettifyBindExpression, productSearchRowActiveIcon, productSearchRowCategory, productSearchRowContainer, productSearchRowContent, productSearchRowContentActive, productSearchRowDetails, productSearchRowTitle, productSelectedItemContainer, productSelectedItemContent, productSelectedItemDetails, productSelectedItemIcon, productSelectedItemImage, productSelectedItemLinkContainer, productedSelectedItemLinkBtn, productedSelectedItemSmallText, searchRowBtn, searchRowContainer, searchRowContainerActive, searchRowContainerWithPopover, searchRowPopover, searchRowText, searchRowTextSmall, selectItemLinkBtn, selectItemLinkContainer, selectItemPopover, selectItemPopoverLabel, selectItemSmallText, selectedItemContainer, selectedItemCopy, selectedItemDetails, selectedItemIcon, selectedItemInner, selectedItemTitle, serializeVariablesEditorState, setVariablesEditorValue, urlEncodeRequestParameter, urlEncodeRequestUrl, useConnectedDataAsVariables, useContentDataResourceLocaleInfo, useDynamicInputsAsVariables, useMeshLocation, useObjectSearchContext, useProductQueryContext, useProductSearchContext, useRequest, useRequestHeader, useRequestParameter, useUniformMeshSdk, useVariableEditor, useVariables, useVariablesMenu, variableDefaultTextValue, variablePrefix, variableSuffix, variablesToGroupedList, variablesToList };
2229
+ export { $createVariableNode, $isVariableNode, type BaseRequestData, type Brand, CHECKBOX_OPERATORS, type ContentDataResourceLocaleInfoProps, type ContentDataResourceLocaleInfoResult, ControlledValuePlugin, DATE_OPERATORS, DISCONNECT_VARIABLE_COMMAND, type DamItem, DamSelectedItem, type DamSelectedItemProps, DataRefreshButton, type DataRefreshButtonProps, DataResourceDynamicInputProvider, type DataResourceDynamicInputProviderProps, type DataResourceVariableRendererProps, DataResourceVariablesList, DataResourceVariablesListExplicit, type DataResourceVariablesListProps, DataSourceEditor, type DataSourceEditorProps, DataTypeEditor, type DataTypeEditorProps, type DataVariableDefinitionWithName, DateEditor, DateRangeEditor, DefaultSearchRow, DefaultSelectedItem, type DisconnectVariableCommandArguments, type DispatchResult, EDIT_VARIABLE_COMMAND, type EditVariableCommandArguments, EntrySearch, type EntrySearchContentType, type EntrySearchProps, type EntrySearchQueryOptions, type EntrySearchResult, type EntrySearchRowProps, type EntrySearchSelectedItemProps, type Filter, FilterButton, type FilterButtonProps, FilterControls, type FilterEditor, type FilterEditorCommonInputProps, type FilterEditorProps, FilterEditorRenderer, type FilterEditorRendererProps, FilterItem, FilterItems, type FilterItemsProps, type FilterMapper, FilterMenu, FilterMultiChoiceEditor, type FilterOption, type FilterRowProps, FilterSingleChoiceEditor, type FiltersProps, type GetProductOptions, type GetProductsOptions, INSERT_VARIABLE_COMMAND, index as Icons, type InputOption, InputVariables, type InputVariablesProps, type InsertVariableCommandArguments, type ItemListProps, type KnownUndefinedVariableInfo, type KnownUndefinedVariableInfoWithName, LinkButton, MeshApp, type MeshAppProps, type MeshDataVariableDefinition, NUMBER_OPERATORS, type NoResultsProps, NumberEditor, NumberRangeEditor, OPEN_INSERT_VARIABLE_COMMAND, ObjectSearchContainer, type ObjectSearchContainerProps, type ObjectSearchContextProps, ObjectSearchFilter, ObjectSearchFilterContainer, type ObjectSearchFilterContainerProps, type ObjectSearchFilterProps, ObjectSearchListItem, ObjectSearchListItemLoadingSkeleton, type ObjectSearchListItemProps, ObjectSearchProvider, type ObjectSearchProviderProps, ObjectSearchResultItem, ObjectSearchResultItemButton, type ObjectSearchResultItemButtonProps, type ObjectSearchResultItemProps, ObjectSearchResultList, type ObjectSearchResultListProps, type Operator, type OperatorType, type OperatorValue, type OperatorValueType, PUBLISH_STATUS_FIELD_OPERATORS, ParamTypeDynamicDataProvider, type ParamTypeDynamicDataProviderProps, type ParameterConnectOptions, ParameterConnectionIndicator, type ParameterConnectionIndicatorProps, ParameterOrSingleVariable, type ParameterOrSingleVariableProps, ParameterVariables, type ParameterVariablesProps, type ProductCategory, type ProductDynamicSelectorValue, ProductPreviewList, ProductQuery, type ProductQueryCategory, ProductQueryContext, type ProductQueryContextValue, type ProductQueryProps, ProductSearch, ProductSearchContext, type ProductSearchContextValue, type ProductSearchProps, type ProductSearchResult, type ProductSearchResults, ProductSearchRow, ProductSelectedItem, QueryFilter, type QueryFilterProps, type QueryFilterSearchProps, RICHTEXT_OPERATORS, type RequestAction, RequestBody, type RequestContext, type RequestData, RequestHeaders, RequestMethodSelect, type RequestParameter, RequestParameters, type RequestParametersProps, RequestProvider, type RequestProviderProps, RequestTypeContainer, type RequestTypeContainerProps, RequestUrl, RequestUrlInput, ResolvableLoadingValue, SYSTEM_DATE_OPERATORS, SYSTEM_FIELD_OPERATORS, SearchAndFilter, SearchAndFilterContext, type SearchAndFilterContextProps, SearchAndFilterOptionsContainer, type SearchAndFilterOptionsContainerProps, type SearchAndFilterProps, SearchAndFilterProvider, type SearchAndFilterProviderProps, SearchAndFilterResultContainer, type SearchAndFilterResultContainerProps, SearchOnlyContext, SearchOnlyFilter, type SearchOnlyProviderProps, type SearchQueryProps, type SelectedItemProps, SelectionField, type SelectionFieldValue, type SerializedVariableNode, type SetLocationValueDispatch, type SetLocationValueFunction, StatusMultiEditor, StatusSingleEditor, TEXTBOX_OPERATORS, TextEditor, TextVariableRenderer, USER_OPERATORS, type UseVariablesMenu, type UseVariablesMenuInput, VariableEditor, type VariableEditorCompleteEvent, type VariableEditorProps, VariableNode, type VariableNodeState, type VariableSourceGroup, type VariablesAction, type VariablesContext, type VariablesEvents, VariablesList, VariablesPlugin, type VariablesPluginProps, VariablesProvider, type VariablesProviderProps, badgeIcon, bindableFiltersMapper, convertConnectedDataToVariable, createLocationValidator, damSelectItemImage, damSelectedItemContainer, damSelectedItemCopy, damSelectedItemDetails, damSelectedItemIcon, damSelectedItemInfoBtn, damSelectedItemInner, damSelectedItemLinkBtn, damSelectedItemLinkContainer, damSelectedItemMediaContainer, damSelectedItemPopover, damSelectedItemPopoverLabel, damSelectedItemSmallText, damSelectedItemTitle, draggableContainer, draggableIcon, draggableIconOffset, draggableIconWrapper, entrySearchBtn, entrySearchConfig, entrySearchConfigHidden, entrySearchLoadMoreBtn, entrySearchResultList, entrySearchSelectIcon, entrySearchSelectImg, entrySearchSelectInput, entrySearchSelectOption, entrySearchWrapper, filterMapper, hasReferencedVariables, prettifyBindExpression, productSearchRowActiveIcon, productSearchRowCategory, productSearchRowContainer, productSearchRowContent, productSearchRowContentActive, productSearchRowDetails, productSearchRowTitle, productSelectedItemContainer, productSelectedItemContent, productSelectedItemDetails, productSelectedItemIcon, productSelectedItemImage, productSelectedItemLinkContainer, productedSelectedItemLinkBtn, productedSelectedItemSmallText, searchRowBtn, searchRowContainer, searchRowContainerActive, searchRowContainerWithPopover, searchRowPopover, searchRowText, searchRowTextSmall, selectItemLinkBtn, selectItemLinkContainer, selectItemPopover, selectItemPopoverLabel, selectItemSmallText, selectedItemContainer, selectedItemCopy, selectedItemDetails, selectedItemIcon, selectedItemInner, selectedItemTitle, serializeVariablesEditorState, setVariablesEditorValue, urlEncodeRequestParameter, urlEncodeRequestUrl, useConnectedDataAsVariables, useContentDataResourceLocaleInfo, useDynamicInputsAsVariables, useMeshLocation, useObjectSearchContext, useProductQueryContext, useProductSearchContext, useRequest, useRequestHeader, useRequestParameter, useSearchAndFilter, useUniformMeshSdk, useVariableEditor, useVariables, useVariablesMenu, variableDefaultTextValue, variablePrefix, variableSuffix, variablesToGroupedList, variablesToList };