@uniformdev/mesh-sdk-react 19.142.2-alpha.1 → 19.145.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 +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.esm.js +7 -18
- package/dist/index.js +7 -18
- package/dist/index.mjs +7 -18
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -1990,8 +1990,8 @@ type SearchAndFilterContextProps = {
|
|
|
1990
1990
|
setFilters: (updatedFilters: Filter[]) => void;
|
|
1991
1991
|
/** function that adds a blank set of filter options */
|
|
1992
1992
|
handleAddFilter: () => void;
|
|
1993
|
-
/** function to reset all filter values */
|
|
1994
|
-
handleResetFilters: (
|
|
1993
|
+
/** function to reset all filter values and search term */
|
|
1994
|
+
handleResetFilters: () => void;
|
|
1995
1995
|
/** function that deletes a row and it's values visually and from state */
|
|
1996
1996
|
handleDeleteFilter: (index: number) => void;
|
|
1997
1997
|
/** sets the initial list of filter options */
|
|
@@ -2027,8 +2027,8 @@ declare const useSearchAndFilter: () => {
|
|
|
2027
2027
|
setFilters: (updatedFilters: Filter[]) => void;
|
|
2028
2028
|
/** function that adds a blank set of filter options */
|
|
2029
2029
|
handleAddFilter: () => void;
|
|
2030
|
-
/** function to reset all filter values */
|
|
2031
|
-
handleResetFilters: (
|
|
2030
|
+
/** function to reset all filter values and search term */
|
|
2031
|
+
handleResetFilters: () => void;
|
|
2032
2032
|
/** function that deletes a row and it's values visually and from state */
|
|
2033
2033
|
handleDeleteFilter: (index: number) => void;
|
|
2034
2034
|
/** sets the initial list of filter options */
|
package/dist/index.d.ts
CHANGED
|
@@ -1990,8 +1990,8 @@ type SearchAndFilterContextProps = {
|
|
|
1990
1990
|
setFilters: (updatedFilters: Filter[]) => void;
|
|
1991
1991
|
/** function that adds a blank set of filter options */
|
|
1992
1992
|
handleAddFilter: () => void;
|
|
1993
|
-
/** function to reset all filter values */
|
|
1994
|
-
handleResetFilters: (
|
|
1993
|
+
/** function to reset all filter values and search term */
|
|
1994
|
+
handleResetFilters: () => void;
|
|
1995
1995
|
/** function that deletes a row and it's values visually and from state */
|
|
1996
1996
|
handleDeleteFilter: (index: number) => void;
|
|
1997
1997
|
/** sets the initial list of filter options */
|
|
@@ -2027,8 +2027,8 @@ declare const useSearchAndFilter: () => {
|
|
|
2027
2027
|
setFilters: (updatedFilters: Filter[]) => void;
|
|
2028
2028
|
/** function that adds a blank set of filter options */
|
|
2029
2029
|
handleAddFilter: () => void;
|
|
2030
|
-
/** function to reset all filter values */
|
|
2031
|
-
handleResetFilters: (
|
|
2030
|
+
/** function to reset all filter values and search term */
|
|
2031
|
+
handleResetFilters: () => void;
|
|
2032
2032
|
/** function that deletes a row and it's values visually and from state */
|
|
2033
2033
|
handleDeleteFilter: (index: number) => void;
|
|
2034
2034
|
/** sets the initial list of filter options */
|
package/dist/index.esm.js
CHANGED
|
@@ -7895,6 +7895,7 @@ var FilterSingleChoiceEditor = ({
|
|
|
7895
7895
|
onChange,
|
|
7896
7896
|
valueTestId
|
|
7897
7897
|
}) => {
|
|
7898
|
+
var _a;
|
|
7898
7899
|
const readOnlyProps = readOnly ? readOnlyAttributes : {};
|
|
7899
7900
|
return /* @__PURE__ */ jsx70("div", { "data-testid": valueTestId, children: /* @__PURE__ */ jsx70(
|
|
7900
7901
|
InputComboBox,
|
|
@@ -7903,11 +7904,11 @@ var FilterSingleChoiceEditor = ({
|
|
|
7903
7904
|
options,
|
|
7904
7905
|
isClearable: true,
|
|
7905
7906
|
onChange: (e) => {
|
|
7906
|
-
var
|
|
7907
|
-
return onChange((
|
|
7907
|
+
var _a2;
|
|
7908
|
+
return onChange((_a2 = e == null ? void 0 : e.value) != null ? _a2 : "");
|
|
7908
7909
|
},
|
|
7909
7910
|
isDisabled: disabled,
|
|
7910
|
-
value: options == null ? void 0 : options.find((option) => option.value === value),
|
|
7911
|
+
value: (_a = options == null ? void 0 : options.find((option) => option.value === value)) != null ? _a : null,
|
|
7911
7912
|
"aria-readonly": readOnly,
|
|
7912
7913
|
styles: {
|
|
7913
7914
|
menu(base) {
|
|
@@ -8373,8 +8374,9 @@ var SearchAndFilterProvider = ({
|
|
|
8373
8374
|
onChange([...filters, { field: "", operator: "", value: "" }]);
|
|
8374
8375
|
}, [filters, onChange]);
|
|
8375
8376
|
const handleResetFilters = useCallback6(() => {
|
|
8377
|
+
onSearchChange == null ? void 0 : onSearchChange("");
|
|
8376
8378
|
onChange(resetFilterValues);
|
|
8377
|
-
}, [onChange, resetFilterValues]);
|
|
8379
|
+
}, [onChange, resetFilterValues, onSearchChange]);
|
|
8378
8380
|
const handleDeleteFilter = useCallback6(
|
|
8379
8381
|
(index) => {
|
|
8380
8382
|
const remainingFilters = filters.filter((_, i) => i !== index);
|
|
@@ -8805,7 +8807,7 @@ var SearchAndFilterResultContainer = ({
|
|
|
8805
8807
|
onHandleClear,
|
|
8806
8808
|
hideClearButton
|
|
8807
8809
|
}) => {
|
|
8808
|
-
const { searchTerm, setSearchTerm, totalResults,
|
|
8810
|
+
const { searchTerm, setSearchTerm, totalResults, filters, handleResetFilters } = useSearchAndFilter();
|
|
8809
8811
|
const automateCalloutTitle = () => {
|
|
8810
8812
|
if (searchTerm && !filters.length) {
|
|
8811
8813
|
return "No search results found";
|
|
@@ -8815,19 +8817,6 @@ var SearchAndFilterResultContainer = ({
|
|
|
8815
8817
|
}
|
|
8816
8818
|
return "No matching results found";
|
|
8817
8819
|
};
|
|
8818
|
-
const handleResetFilters = () => {
|
|
8819
|
-
if (searchTerm && !filters.length) {
|
|
8820
|
-
setSearchTerm("");
|
|
8821
|
-
return;
|
|
8822
|
-
} else if (!searchTerm && filters.length) {
|
|
8823
|
-
setFilters([{ field: "", operator: "", value: "" }]);
|
|
8824
|
-
return;
|
|
8825
|
-
} else {
|
|
8826
|
-
setSearchTerm("");
|
|
8827
|
-
setFilters([{ field: "", operator: "", value: "" }]);
|
|
8828
|
-
return;
|
|
8829
|
-
}
|
|
8830
|
-
};
|
|
8831
8820
|
if (totalResults && totalResults > 0) {
|
|
8832
8821
|
return null;
|
|
8833
8822
|
}
|
package/dist/index.js
CHANGED
|
@@ -8045,6 +8045,7 @@ var FilterSingleChoiceEditor = ({
|
|
|
8045
8045
|
onChange,
|
|
8046
8046
|
valueTestId
|
|
8047
8047
|
}) => {
|
|
8048
|
+
var _a;
|
|
8048
8049
|
const readOnlyProps = readOnly ? readOnlyAttributes : {};
|
|
8049
8050
|
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { "data-testid": valueTestId, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
8050
8051
|
import_design_system43.InputComboBox,
|
|
@@ -8053,11 +8054,11 @@ var FilterSingleChoiceEditor = ({
|
|
|
8053
8054
|
options,
|
|
8054
8055
|
isClearable: true,
|
|
8055
8056
|
onChange: (e) => {
|
|
8056
|
-
var
|
|
8057
|
-
return onChange((
|
|
8057
|
+
var _a2;
|
|
8058
|
+
return onChange((_a2 = e == null ? void 0 : e.value) != null ? _a2 : "");
|
|
8058
8059
|
},
|
|
8059
8060
|
isDisabled: disabled,
|
|
8060
|
-
value: options == null ? void 0 : options.find((option) => option.value === value),
|
|
8061
|
+
value: (_a = options == null ? void 0 : options.find((option) => option.value === value)) != null ? _a : null,
|
|
8061
8062
|
"aria-readonly": readOnly,
|
|
8062
8063
|
styles: {
|
|
8063
8064
|
menu(base) {
|
|
@@ -8523,8 +8524,9 @@ var SearchAndFilterProvider = ({
|
|
|
8523
8524
|
onChange([...filters, { field: "", operator: "", value: "" }]);
|
|
8524
8525
|
}, [filters, onChange]);
|
|
8525
8526
|
const handleResetFilters = (0, import_react78.useCallback)(() => {
|
|
8527
|
+
onSearchChange == null ? void 0 : onSearchChange("");
|
|
8526
8528
|
onChange(resetFilterValues);
|
|
8527
|
-
}, [onChange, resetFilterValues]);
|
|
8529
|
+
}, [onChange, resetFilterValues, onSearchChange]);
|
|
8528
8530
|
const handleDeleteFilter = (0, import_react78.useCallback)(
|
|
8529
8531
|
(index) => {
|
|
8530
8532
|
const remainingFilters = filters.filter((_, i) => i !== index);
|
|
@@ -8955,7 +8957,7 @@ var SearchAndFilterResultContainer = ({
|
|
|
8955
8957
|
onHandleClear,
|
|
8956
8958
|
hideClearButton
|
|
8957
8959
|
}) => {
|
|
8958
|
-
const { searchTerm, setSearchTerm, totalResults,
|
|
8960
|
+
const { searchTerm, setSearchTerm, totalResults, filters, handleResetFilters } = useSearchAndFilter();
|
|
8959
8961
|
const automateCalloutTitle = () => {
|
|
8960
8962
|
if (searchTerm && !filters.length) {
|
|
8961
8963
|
return "No search results found";
|
|
@@ -8965,19 +8967,6 @@ var SearchAndFilterResultContainer = ({
|
|
|
8965
8967
|
}
|
|
8966
8968
|
return "No matching results found";
|
|
8967
8969
|
};
|
|
8968
|
-
const handleResetFilters = () => {
|
|
8969
|
-
if (searchTerm && !filters.length) {
|
|
8970
|
-
setSearchTerm("");
|
|
8971
|
-
return;
|
|
8972
|
-
} else if (!searchTerm && filters.length) {
|
|
8973
|
-
setFilters([{ field: "", operator: "", value: "" }]);
|
|
8974
|
-
return;
|
|
8975
|
-
} else {
|
|
8976
|
-
setSearchTerm("");
|
|
8977
|
-
setFilters([{ field: "", operator: "", value: "" }]);
|
|
8978
|
-
return;
|
|
8979
|
-
}
|
|
8980
|
-
};
|
|
8981
8970
|
if (totalResults && totalResults > 0) {
|
|
8982
8971
|
return null;
|
|
8983
8972
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -7895,6 +7895,7 @@ var FilterSingleChoiceEditor = ({
|
|
|
7895
7895
|
onChange,
|
|
7896
7896
|
valueTestId
|
|
7897
7897
|
}) => {
|
|
7898
|
+
var _a;
|
|
7898
7899
|
const readOnlyProps = readOnly ? readOnlyAttributes : {};
|
|
7899
7900
|
return /* @__PURE__ */ jsx70("div", { "data-testid": valueTestId, children: /* @__PURE__ */ jsx70(
|
|
7900
7901
|
InputComboBox,
|
|
@@ -7903,11 +7904,11 @@ var FilterSingleChoiceEditor = ({
|
|
|
7903
7904
|
options,
|
|
7904
7905
|
isClearable: true,
|
|
7905
7906
|
onChange: (e) => {
|
|
7906
|
-
var
|
|
7907
|
-
return onChange((
|
|
7907
|
+
var _a2;
|
|
7908
|
+
return onChange((_a2 = e == null ? void 0 : e.value) != null ? _a2 : "");
|
|
7908
7909
|
},
|
|
7909
7910
|
isDisabled: disabled,
|
|
7910
|
-
value: options == null ? void 0 : options.find((option) => option.value === value),
|
|
7911
|
+
value: (_a = options == null ? void 0 : options.find((option) => option.value === value)) != null ? _a : null,
|
|
7911
7912
|
"aria-readonly": readOnly,
|
|
7912
7913
|
styles: {
|
|
7913
7914
|
menu(base) {
|
|
@@ -8373,8 +8374,9 @@ var SearchAndFilterProvider = ({
|
|
|
8373
8374
|
onChange([...filters, { field: "", operator: "", value: "" }]);
|
|
8374
8375
|
}, [filters, onChange]);
|
|
8375
8376
|
const handleResetFilters = useCallback6(() => {
|
|
8377
|
+
onSearchChange == null ? void 0 : onSearchChange("");
|
|
8376
8378
|
onChange(resetFilterValues);
|
|
8377
|
-
}, [onChange, resetFilterValues]);
|
|
8379
|
+
}, [onChange, resetFilterValues, onSearchChange]);
|
|
8378
8380
|
const handleDeleteFilter = useCallback6(
|
|
8379
8381
|
(index) => {
|
|
8380
8382
|
const remainingFilters = filters.filter((_, i) => i !== index);
|
|
@@ -8805,7 +8807,7 @@ var SearchAndFilterResultContainer = ({
|
|
|
8805
8807
|
onHandleClear,
|
|
8806
8808
|
hideClearButton
|
|
8807
8809
|
}) => {
|
|
8808
|
-
const { searchTerm, setSearchTerm, totalResults,
|
|
8810
|
+
const { searchTerm, setSearchTerm, totalResults, filters, handleResetFilters } = useSearchAndFilter();
|
|
8809
8811
|
const automateCalloutTitle = () => {
|
|
8810
8812
|
if (searchTerm && !filters.length) {
|
|
8811
8813
|
return "No search results found";
|
|
@@ -8815,19 +8817,6 @@ var SearchAndFilterResultContainer = ({
|
|
|
8815
8817
|
}
|
|
8816
8818
|
return "No matching results found";
|
|
8817
8819
|
};
|
|
8818
|
-
const handleResetFilters = () => {
|
|
8819
|
-
if (searchTerm && !filters.length) {
|
|
8820
|
-
setSearchTerm("");
|
|
8821
|
-
return;
|
|
8822
|
-
} else if (!searchTerm && filters.length) {
|
|
8823
|
-
setFilters([{ field: "", operator: "", value: "" }]);
|
|
8824
|
-
return;
|
|
8825
|
-
} else {
|
|
8826
|
-
setSearchTerm("");
|
|
8827
|
-
setFilters([{ field: "", operator: "", value: "" }]);
|
|
8828
|
-
return;
|
|
8829
|
-
}
|
|
8830
|
-
};
|
|
8831
8820
|
if (totalResults && totalResults > 0) {
|
|
8832
8821
|
return null;
|
|
8833
8822
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/mesh-sdk-react",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.145.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/v4.10.1/react-icons-all-files-4.10.1.tgz",
|
|
53
|
-
"@uniformdev/canvas": "19.
|
|
54
|
-
"@uniformdev/design-system": "19.
|
|
55
|
-
"@uniformdev/mesh-sdk": "19.
|
|
53
|
+
"@uniformdev/canvas": "19.145.0",
|
|
54
|
+
"@uniformdev/design-system": "19.145.0",
|
|
55
|
+
"@uniformdev/mesh-sdk": "19.145.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": "9d69378494595742da7893ecb4e34cde934477b0"
|
|
90
90
|
}
|