@uniformdev/mesh-sdk-react 19.151.1-alpha.3 → 19.152.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 +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.esm.js +17 -4
- package/dist/index.js +17 -4
- package/dist/index.mjs +17 -4
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -423,8 +423,6 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
423
423
|
type: TLocationType;
|
|
424
424
|
}> | Extract<_uniformdev_mesh_sdk.DataResourceLocation, {
|
|
425
425
|
type: TLocationType;
|
|
426
|
-
}> | Extract<_uniformdev_mesh_sdk.CanvasEditorSideRailLocation, {
|
|
427
|
-
type: TLocationType;
|
|
428
426
|
}> | Extract<_uniformdev_mesh_sdk.AIPromptMetadataLocation, {
|
|
429
427
|
type: TLocationType;
|
|
430
428
|
}> | Extract<_uniformdev_mesh_sdk.ParamTypeLocation<TLocationValue, unknown, TLocationSetValue, unknown>, {
|
|
@@ -446,8 +444,6 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
446
444
|
type: TLocationType;
|
|
447
445
|
}> | Extract<_uniformdev_mesh_sdk.DataResourceLocation, {
|
|
448
446
|
type: TLocationType;
|
|
449
|
-
}> | Extract<_uniformdev_mesh_sdk.CanvasEditorSideRailLocation, {
|
|
450
|
-
type: TLocationType;
|
|
451
447
|
}> | Extract<_uniformdev_mesh_sdk.AIPromptMetadataLocation, {
|
|
452
448
|
type: TLocationType;
|
|
453
449
|
}> | Extract<_uniformdev_mesh_sdk.ParamTypeLocation<TLocationValue, unknown, TLocationSetValue, unknown>, {
|
|
@@ -468,8 +464,6 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
468
464
|
type: TLocationType;
|
|
469
465
|
}> | Extract<_uniformdev_mesh_sdk.DataResourceLocation, {
|
|
470
466
|
type: TLocationType;
|
|
471
|
-
}> | Extract<_uniformdev_mesh_sdk.CanvasEditorSideRailLocation, {
|
|
472
|
-
type: TLocationType;
|
|
473
467
|
}> | Extract<_uniformdev_mesh_sdk.AIPromptMetadataLocation, {
|
|
474
468
|
type: TLocationType;
|
|
475
469
|
}> | Extract<_uniformdev_mesh_sdk.ParamTypeLocation<TLocationValue, unknown, TLocationSetValue, unknown>, {
|
|
@@ -1986,6 +1980,8 @@ type SearchAndFilterProviderProps = {
|
|
|
1986
1980
|
filterMapper?: FilterMapper;
|
|
1987
1981
|
/** sets child components giving access to useSearchAndFilter context */
|
|
1988
1982
|
children: ReactNode;
|
|
1983
|
+
/** Allow to bind dynamic inputs to the search term */
|
|
1984
|
+
allowBindingSearchTerm?: boolean;
|
|
1989
1985
|
};
|
|
1990
1986
|
type SearchAndFilterContextProps = {
|
|
1991
1987
|
/** the search term value */
|
|
@@ -2014,13 +2010,15 @@ type SearchAndFilterContextProps = {
|
|
|
2014
2010
|
filterMapper?: FilterMapper;
|
|
2015
2011
|
/** the total number of results */
|
|
2016
2012
|
totalResults?: number;
|
|
2013
|
+
/** Allow to bind dynamic inputs to the search term */
|
|
2014
|
+
allowBindingSearchTerm?: boolean;
|
|
2017
2015
|
};
|
|
2018
2016
|
declare const SearchAndFilterContext: React$1.Context<SearchAndFilterContextProps>;
|
|
2019
2017
|
/**
|
|
2020
2018
|
* @deprecated beta - Search and filter provider
|
|
2021
2019
|
* @example <SearchAndFilterProvider filters={filters} filterOptions={filterOptions} onSearchChange={onSearchChange} onChange={onChange}>Children</SearchAndFilterProvider>
|
|
2022
2020
|
* */
|
|
2023
|
-
declare const SearchAndFilterProvider: ({ filters, filterOptions, filterVisible, defaultSearchTerm, onSearchChange, onChange, resetFilterValues, totalResults, filterMapper, children, }: SearchAndFilterProviderProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
2021
|
+
declare const SearchAndFilterProvider: ({ filters, filterOptions, filterVisible, defaultSearchTerm, onSearchChange, onChange, resetFilterValues, totalResults, filterMapper, children, allowBindingSearchTerm, }: SearchAndFilterProviderProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
2024
2022
|
/** @deprecated beta - Search and filter hook
|
|
2025
2023
|
* @example const { searchTerm, setSearchTerm, filterVisibility, setFilterVisibility, filters, setFilters, handleAddFilter, handleResetFilters, handleDeleteFilter, filterOptions, validFilterQuery } = useSearchAndFilter();
|
|
2026
2024
|
*/
|
|
@@ -2051,6 +2049,8 @@ declare const useSearchAndFilter: () => {
|
|
|
2051
2049
|
filterMapper?: FilterMapper | undefined;
|
|
2052
2050
|
/** the total number of results */
|
|
2053
2051
|
totalResults?: number | undefined;
|
|
2052
|
+
/** Allow to bind dynamic inputs to the search term */
|
|
2053
|
+
allowBindingSearchTerm?: boolean | undefined;
|
|
2054
2054
|
};
|
|
2055
2055
|
|
|
2056
2056
|
type SearchAndFilterProps = Omit<SearchAndFilterProviderProps, 'children'> & {
|
|
@@ -2081,7 +2081,7 @@ type SearchAndFilterProps = Omit<SearchAndFilterProviderProps, 'children'> & {
|
|
|
2081
2081
|
* @deprecated beta - Search and filter component
|
|
2082
2082
|
* @example <SearchAndFilter filters={filters} filterOptions={filterOptions} onChange={onChange} onSearchChange={onSearchChange} onSearchReset={onSearchReset} totalResults={totalResults} />
|
|
2083
2083
|
* */
|
|
2084
|
-
declare const SearchAndFilter: ({ filters, filterOptions, filterVisible, filterControls, viewSwitchControls, resultsContainerView, filterMapper, additionalFiltersContainer, onChange, defaultSearchTerm, onSearchChange, totalResults, resetFilterValues, }: SearchAndFilterProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
2084
|
+
declare const SearchAndFilter: ({ filters, filterOptions, filterVisible, filterControls, viewSwitchControls, resultsContainerView, filterMapper, additionalFiltersContainer, onChange, defaultSearchTerm, onSearchChange, totalResults, allowBindingSearchTerm, resetFilterValues, }: SearchAndFilterProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
2085
2085
|
|
|
2086
2086
|
type FilterRowProps = {
|
|
2087
2087
|
/** the index of the filter row */
|
package/dist/index.d.ts
CHANGED
|
@@ -423,8 +423,6 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
423
423
|
type: TLocationType;
|
|
424
424
|
}> | Extract<_uniformdev_mesh_sdk.DataResourceLocation, {
|
|
425
425
|
type: TLocationType;
|
|
426
|
-
}> | Extract<_uniformdev_mesh_sdk.CanvasEditorSideRailLocation, {
|
|
427
|
-
type: TLocationType;
|
|
428
426
|
}> | Extract<_uniformdev_mesh_sdk.AIPromptMetadataLocation, {
|
|
429
427
|
type: TLocationType;
|
|
430
428
|
}> | Extract<_uniformdev_mesh_sdk.ParamTypeLocation<TLocationValue, unknown, TLocationSetValue, unknown>, {
|
|
@@ -446,8 +444,6 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
446
444
|
type: TLocationType;
|
|
447
445
|
}> | Extract<_uniformdev_mesh_sdk.DataResourceLocation, {
|
|
448
446
|
type: TLocationType;
|
|
449
|
-
}> | Extract<_uniformdev_mesh_sdk.CanvasEditorSideRailLocation, {
|
|
450
|
-
type: TLocationType;
|
|
451
447
|
}> | Extract<_uniformdev_mesh_sdk.AIPromptMetadataLocation, {
|
|
452
448
|
type: TLocationType;
|
|
453
449
|
}> | Extract<_uniformdev_mesh_sdk.ParamTypeLocation<TLocationValue, unknown, TLocationSetValue, unknown>, {
|
|
@@ -468,8 +464,6 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
468
464
|
type: TLocationType;
|
|
469
465
|
}> | Extract<_uniformdev_mesh_sdk.DataResourceLocation, {
|
|
470
466
|
type: TLocationType;
|
|
471
|
-
}> | Extract<_uniformdev_mesh_sdk.CanvasEditorSideRailLocation, {
|
|
472
|
-
type: TLocationType;
|
|
473
467
|
}> | Extract<_uniformdev_mesh_sdk.AIPromptMetadataLocation, {
|
|
474
468
|
type: TLocationType;
|
|
475
469
|
}> | Extract<_uniformdev_mesh_sdk.ParamTypeLocation<TLocationValue, unknown, TLocationSetValue, unknown>, {
|
|
@@ -1986,6 +1980,8 @@ type SearchAndFilterProviderProps = {
|
|
|
1986
1980
|
filterMapper?: FilterMapper;
|
|
1987
1981
|
/** sets child components giving access to useSearchAndFilter context */
|
|
1988
1982
|
children: ReactNode;
|
|
1983
|
+
/** Allow to bind dynamic inputs to the search term */
|
|
1984
|
+
allowBindingSearchTerm?: boolean;
|
|
1989
1985
|
};
|
|
1990
1986
|
type SearchAndFilterContextProps = {
|
|
1991
1987
|
/** the search term value */
|
|
@@ -2014,13 +2010,15 @@ type SearchAndFilterContextProps = {
|
|
|
2014
2010
|
filterMapper?: FilterMapper;
|
|
2015
2011
|
/** the total number of results */
|
|
2016
2012
|
totalResults?: number;
|
|
2013
|
+
/** Allow to bind dynamic inputs to the search term */
|
|
2014
|
+
allowBindingSearchTerm?: boolean;
|
|
2017
2015
|
};
|
|
2018
2016
|
declare const SearchAndFilterContext: React$1.Context<SearchAndFilterContextProps>;
|
|
2019
2017
|
/**
|
|
2020
2018
|
* @deprecated beta - Search and filter provider
|
|
2021
2019
|
* @example <SearchAndFilterProvider filters={filters} filterOptions={filterOptions} onSearchChange={onSearchChange} onChange={onChange}>Children</SearchAndFilterProvider>
|
|
2022
2020
|
* */
|
|
2023
|
-
declare const SearchAndFilterProvider: ({ filters, filterOptions, filterVisible, defaultSearchTerm, onSearchChange, onChange, resetFilterValues, totalResults, filterMapper, children, }: SearchAndFilterProviderProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
2021
|
+
declare const SearchAndFilterProvider: ({ filters, filterOptions, filterVisible, defaultSearchTerm, onSearchChange, onChange, resetFilterValues, totalResults, filterMapper, children, allowBindingSearchTerm, }: SearchAndFilterProviderProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
2024
2022
|
/** @deprecated beta - Search and filter hook
|
|
2025
2023
|
* @example const { searchTerm, setSearchTerm, filterVisibility, setFilterVisibility, filters, setFilters, handleAddFilter, handleResetFilters, handleDeleteFilter, filterOptions, validFilterQuery } = useSearchAndFilter();
|
|
2026
2024
|
*/
|
|
@@ -2051,6 +2049,8 @@ declare const useSearchAndFilter: () => {
|
|
|
2051
2049
|
filterMapper?: FilterMapper | undefined;
|
|
2052
2050
|
/** the total number of results */
|
|
2053
2051
|
totalResults?: number | undefined;
|
|
2052
|
+
/** Allow to bind dynamic inputs to the search term */
|
|
2053
|
+
allowBindingSearchTerm?: boolean | undefined;
|
|
2054
2054
|
};
|
|
2055
2055
|
|
|
2056
2056
|
type SearchAndFilterProps = Omit<SearchAndFilterProviderProps, 'children'> & {
|
|
@@ -2081,7 +2081,7 @@ type SearchAndFilterProps = Omit<SearchAndFilterProviderProps, 'children'> & {
|
|
|
2081
2081
|
* @deprecated beta - Search and filter component
|
|
2082
2082
|
* @example <SearchAndFilter filters={filters} filterOptions={filterOptions} onChange={onChange} onSearchChange={onSearchChange} onSearchReset={onSearchReset} totalResults={totalResults} />
|
|
2083
2083
|
* */
|
|
2084
|
-
declare const SearchAndFilter: ({ filters, filterOptions, filterVisible, filterControls, viewSwitchControls, resultsContainerView, filterMapper, additionalFiltersContainer, onChange, defaultSearchTerm, onSearchChange, totalResults, resetFilterValues, }: SearchAndFilterProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
2084
|
+
declare const SearchAndFilter: ({ filters, filterOptions, filterVisible, filterControls, viewSwitchControls, resultsContainerView, filterMapper, additionalFiltersContainer, onChange, defaultSearchTerm, onSearchChange, totalResults, allowBindingSearchTerm, resetFilterValues, }: SearchAndFilterProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
2085
2085
|
|
|
2086
2086
|
type FilterRowProps = {
|
|
2087
2087
|
/** the index of the filter row */
|
package/dist/index.esm.js
CHANGED
|
@@ -8397,7 +8397,8 @@ var SearchAndFilterContext = createContext6({
|
|
|
8397
8397
|
filterOptions: [],
|
|
8398
8398
|
validFilterQuery: [],
|
|
8399
8399
|
filterMapper: {},
|
|
8400
|
-
totalResults: 0
|
|
8400
|
+
totalResults: 0,
|
|
8401
|
+
allowBindingSearchTerm: false
|
|
8401
8402
|
});
|
|
8402
8403
|
var SearchAndFilterProvider = ({
|
|
8403
8404
|
filters,
|
|
@@ -8409,7 +8410,8 @@ var SearchAndFilterProvider = ({
|
|
|
8409
8410
|
resetFilterValues = [{ field: "", operator: "", value: "" }],
|
|
8410
8411
|
totalResults,
|
|
8411
8412
|
filterMapper: filterMapper2 = filterMapper,
|
|
8412
|
-
children
|
|
8413
|
+
children,
|
|
8414
|
+
allowBindingSearchTerm
|
|
8413
8415
|
}) => {
|
|
8414
8416
|
const [searchTerm, setSearchTerm] = useState20(defaultSearchTerm);
|
|
8415
8417
|
const deferredSearchTerm = useDeferredValue2(searchTerm);
|
|
@@ -8474,7 +8476,8 @@ var SearchAndFilterProvider = ({
|
|
|
8474
8476
|
filterOptions,
|
|
8475
8477
|
validFilterQuery,
|
|
8476
8478
|
totalResults,
|
|
8477
|
-
filterMapper: filterMapper2
|
|
8479
|
+
filterMapper: filterMapper2,
|
|
8480
|
+
allowBindingSearchTerm
|
|
8478
8481
|
},
|
|
8479
8482
|
children: /* @__PURE__ */ jsx71(VerticalRhythm5, { children })
|
|
8480
8483
|
}
|
|
@@ -8491,7 +8494,14 @@ var FilterControls = ({
|
|
|
8491
8494
|
children,
|
|
8492
8495
|
hideSearchInput
|
|
8493
8496
|
}) => {
|
|
8494
|
-
const {
|
|
8497
|
+
const {
|
|
8498
|
+
setFilterVisibility,
|
|
8499
|
+
filterVisibility,
|
|
8500
|
+
setSearchTerm,
|
|
8501
|
+
validFilterQuery,
|
|
8502
|
+
searchTerm,
|
|
8503
|
+
allowBindingSearchTerm
|
|
8504
|
+
} = useSearchAndFilter();
|
|
8495
8505
|
const editorRef = useRef16(null);
|
|
8496
8506
|
const hasVariableInSearchTerm = hasReferencedVariables(searchTerm);
|
|
8497
8507
|
const [idToResetInputVariables, setIdToResetInputVariables] = useState21("data-resource-search-term-input");
|
|
@@ -8533,6 +8543,7 @@ var FilterControls = ({
|
|
|
8533
8543
|
editorRef,
|
|
8534
8544
|
value: localeSearchTerm,
|
|
8535
8545
|
onChange: (value) => setLocaleSearchTerm(value != null ? value : ""),
|
|
8546
|
+
disableVariables: !allowBindingSearchTerm,
|
|
8536
8547
|
inputWhenNoVariables: /* @__PURE__ */ jsx72(
|
|
8537
8548
|
InputKeywordSearch2,
|
|
8538
8549
|
{
|
|
@@ -8914,6 +8925,7 @@ var SearchAndFilter = ({
|
|
|
8914
8925
|
defaultSearchTerm,
|
|
8915
8926
|
onSearchChange,
|
|
8916
8927
|
totalResults,
|
|
8928
|
+
allowBindingSearchTerm = false,
|
|
8917
8929
|
resetFilterValues = []
|
|
8918
8930
|
}) => {
|
|
8919
8931
|
return /* @__PURE__ */ jsx76(
|
|
@@ -8928,6 +8940,7 @@ var SearchAndFilter = ({
|
|
|
8928
8940
|
totalResults,
|
|
8929
8941
|
resetFilterValues,
|
|
8930
8942
|
filterMapper: filterMapper2,
|
|
8943
|
+
allowBindingSearchTerm,
|
|
8931
8944
|
children: /* @__PURE__ */ jsxs48(VerticalRhythm7, { "data-testid": "search-and-filter", children: [
|
|
8932
8945
|
/* @__PURE__ */ jsxs48("div", { css: SearchAndFilterOutterControlWrapper(viewSwitchControls ? "1fr auto" : "1fr"), children: [
|
|
8933
8946
|
/* @__PURE__ */ jsx76(
|
package/dist/index.js
CHANGED
|
@@ -8548,7 +8548,8 @@ var SearchAndFilterContext = (0, import_react78.createContext)({
|
|
|
8548
8548
|
filterOptions: [],
|
|
8549
8549
|
validFilterQuery: [],
|
|
8550
8550
|
filterMapper: {},
|
|
8551
|
-
totalResults: 0
|
|
8551
|
+
totalResults: 0,
|
|
8552
|
+
allowBindingSearchTerm: false
|
|
8552
8553
|
});
|
|
8553
8554
|
var SearchAndFilterProvider = ({
|
|
8554
8555
|
filters,
|
|
@@ -8560,7 +8561,8 @@ var SearchAndFilterProvider = ({
|
|
|
8560
8561
|
resetFilterValues = [{ field: "", operator: "", value: "" }],
|
|
8561
8562
|
totalResults,
|
|
8562
8563
|
filterMapper: filterMapper2 = filterMapper,
|
|
8563
|
-
children
|
|
8564
|
+
children,
|
|
8565
|
+
allowBindingSearchTerm
|
|
8564
8566
|
}) => {
|
|
8565
8567
|
const [searchTerm, setSearchTerm] = (0, import_react78.useState)(defaultSearchTerm);
|
|
8566
8568
|
const deferredSearchTerm = (0, import_react78.useDeferredValue)(searchTerm);
|
|
@@ -8625,7 +8627,8 @@ var SearchAndFilterProvider = ({
|
|
|
8625
8627
|
filterOptions,
|
|
8626
8628
|
validFilterQuery,
|
|
8627
8629
|
totalResults,
|
|
8628
|
-
filterMapper: filterMapper2
|
|
8630
|
+
filterMapper: filterMapper2,
|
|
8631
|
+
allowBindingSearchTerm
|
|
8629
8632
|
},
|
|
8630
8633
|
children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_design_system44.VerticalRhythm, { children })
|
|
8631
8634
|
}
|
|
@@ -8642,7 +8645,14 @@ var FilterControls = ({
|
|
|
8642
8645
|
children,
|
|
8643
8646
|
hideSearchInput
|
|
8644
8647
|
}) => {
|
|
8645
|
-
const {
|
|
8648
|
+
const {
|
|
8649
|
+
setFilterVisibility,
|
|
8650
|
+
filterVisibility,
|
|
8651
|
+
setSearchTerm,
|
|
8652
|
+
validFilterQuery,
|
|
8653
|
+
searchTerm,
|
|
8654
|
+
allowBindingSearchTerm
|
|
8655
|
+
} = useSearchAndFilter();
|
|
8646
8656
|
const editorRef = (0, import_react79.useRef)(null);
|
|
8647
8657
|
const hasVariableInSearchTerm = hasReferencedVariables(searchTerm);
|
|
8648
8658
|
const [idToResetInputVariables, setIdToResetInputVariables] = (0, import_react79.useState)("data-resource-search-term-input");
|
|
@@ -8684,6 +8694,7 @@ var FilterControls = ({
|
|
|
8684
8694
|
editorRef,
|
|
8685
8695
|
value: localeSearchTerm,
|
|
8686
8696
|
onChange: (value) => setLocaleSearchTerm(value != null ? value : ""),
|
|
8697
|
+
disableVariables: !allowBindingSearchTerm,
|
|
8687
8698
|
inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
8688
8699
|
import_design_system45.InputKeywordSearch,
|
|
8689
8700
|
{
|
|
@@ -9065,6 +9076,7 @@ var SearchAndFilter = ({
|
|
|
9065
9076
|
defaultSearchTerm,
|
|
9066
9077
|
onSearchChange,
|
|
9067
9078
|
totalResults,
|
|
9079
|
+
allowBindingSearchTerm = false,
|
|
9068
9080
|
resetFilterValues = []
|
|
9069
9081
|
}) => {
|
|
9070
9082
|
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
@@ -9079,6 +9091,7 @@ var SearchAndFilter = ({
|
|
|
9079
9091
|
totalResults,
|
|
9080
9092
|
resetFilterValues,
|
|
9081
9093
|
filterMapper: filterMapper2,
|
|
9094
|
+
allowBindingSearchTerm,
|
|
9082
9095
|
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_design_system49.VerticalRhythm, { "data-testid": "search-and-filter", children: [
|
|
9083
9096
|
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { css: SearchAndFilterOutterControlWrapper(viewSwitchControls ? "1fr auto" : "1fr"), children: [
|
|
9084
9097
|
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
package/dist/index.mjs
CHANGED
|
@@ -8397,7 +8397,8 @@ var SearchAndFilterContext = createContext6({
|
|
|
8397
8397
|
filterOptions: [],
|
|
8398
8398
|
validFilterQuery: [],
|
|
8399
8399
|
filterMapper: {},
|
|
8400
|
-
totalResults: 0
|
|
8400
|
+
totalResults: 0,
|
|
8401
|
+
allowBindingSearchTerm: false
|
|
8401
8402
|
});
|
|
8402
8403
|
var SearchAndFilterProvider = ({
|
|
8403
8404
|
filters,
|
|
@@ -8409,7 +8410,8 @@ var SearchAndFilterProvider = ({
|
|
|
8409
8410
|
resetFilterValues = [{ field: "", operator: "", value: "" }],
|
|
8410
8411
|
totalResults,
|
|
8411
8412
|
filterMapper: filterMapper2 = filterMapper,
|
|
8412
|
-
children
|
|
8413
|
+
children,
|
|
8414
|
+
allowBindingSearchTerm
|
|
8413
8415
|
}) => {
|
|
8414
8416
|
const [searchTerm, setSearchTerm] = useState20(defaultSearchTerm);
|
|
8415
8417
|
const deferredSearchTerm = useDeferredValue2(searchTerm);
|
|
@@ -8474,7 +8476,8 @@ var SearchAndFilterProvider = ({
|
|
|
8474
8476
|
filterOptions,
|
|
8475
8477
|
validFilterQuery,
|
|
8476
8478
|
totalResults,
|
|
8477
|
-
filterMapper: filterMapper2
|
|
8479
|
+
filterMapper: filterMapper2,
|
|
8480
|
+
allowBindingSearchTerm
|
|
8478
8481
|
},
|
|
8479
8482
|
children: /* @__PURE__ */ jsx71(VerticalRhythm5, { children })
|
|
8480
8483
|
}
|
|
@@ -8491,7 +8494,14 @@ var FilterControls = ({
|
|
|
8491
8494
|
children,
|
|
8492
8495
|
hideSearchInput
|
|
8493
8496
|
}) => {
|
|
8494
|
-
const {
|
|
8497
|
+
const {
|
|
8498
|
+
setFilterVisibility,
|
|
8499
|
+
filterVisibility,
|
|
8500
|
+
setSearchTerm,
|
|
8501
|
+
validFilterQuery,
|
|
8502
|
+
searchTerm,
|
|
8503
|
+
allowBindingSearchTerm
|
|
8504
|
+
} = useSearchAndFilter();
|
|
8495
8505
|
const editorRef = useRef16(null);
|
|
8496
8506
|
const hasVariableInSearchTerm = hasReferencedVariables(searchTerm);
|
|
8497
8507
|
const [idToResetInputVariables, setIdToResetInputVariables] = useState21("data-resource-search-term-input");
|
|
@@ -8533,6 +8543,7 @@ var FilterControls = ({
|
|
|
8533
8543
|
editorRef,
|
|
8534
8544
|
value: localeSearchTerm,
|
|
8535
8545
|
onChange: (value) => setLocaleSearchTerm(value != null ? value : ""),
|
|
8546
|
+
disableVariables: !allowBindingSearchTerm,
|
|
8536
8547
|
inputWhenNoVariables: /* @__PURE__ */ jsx72(
|
|
8537
8548
|
InputKeywordSearch2,
|
|
8538
8549
|
{
|
|
@@ -8914,6 +8925,7 @@ var SearchAndFilter = ({
|
|
|
8914
8925
|
defaultSearchTerm,
|
|
8915
8926
|
onSearchChange,
|
|
8916
8927
|
totalResults,
|
|
8928
|
+
allowBindingSearchTerm = false,
|
|
8917
8929
|
resetFilterValues = []
|
|
8918
8930
|
}) => {
|
|
8919
8931
|
return /* @__PURE__ */ jsx76(
|
|
@@ -8928,6 +8940,7 @@ var SearchAndFilter = ({
|
|
|
8928
8940
|
totalResults,
|
|
8929
8941
|
resetFilterValues,
|
|
8930
8942
|
filterMapper: filterMapper2,
|
|
8943
|
+
allowBindingSearchTerm,
|
|
8931
8944
|
children: /* @__PURE__ */ jsxs48(VerticalRhythm7, { "data-testid": "search-and-filter", children: [
|
|
8932
8945
|
/* @__PURE__ */ jsxs48("div", { css: SearchAndFilterOutterControlWrapper(viewSwitchControls ? "1fr auto" : "1fr"), children: [
|
|
8933
8946
|
/* @__PURE__ */ jsx76(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/mesh-sdk-react",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.152.0",
|
|
4
4
|
"description": "Uniform Mesh Framework SDK for React",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"@lexical/selection": "^0.12.0",
|
|
51
51
|
"@lexical/utils": "^0.12.0",
|
|
52
52
|
"@react-icons/all-files": "https://github.com/react-icons/react-icons/releases/download/v5.2.1/react-icons-all-files-5.2.1.tgz",
|
|
53
|
-
"@uniformdev/canvas": "19.
|
|
54
|
-
"@uniformdev/design-system": "19.
|
|
55
|
-
"@uniformdev/mesh-sdk": "19.
|
|
53
|
+
"@uniformdev/canvas": "19.152.0",
|
|
54
|
+
"@uniformdev/design-system": "19.152.0",
|
|
55
|
+
"@uniformdev/mesh-sdk": "19.152.0",
|
|
56
56
|
"dequal": "^2.0.3",
|
|
57
57
|
"lexical": "^0.12.0",
|
|
58
58
|
"mitt": "^3.0.0",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"access": "public"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "145c537745d0f56e39ea4a2799fae475336818ca"
|
|
90
90
|
}
|