@uniformdev/mesh-sdk-react 20.46.1-alpha.9 → 20.47.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/LICENSE.txt +1 -1
- package/dist/index.d.mts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.esm.js +45 -41
- package/dist/index.js +10 -6
- package/dist/index.mjs +45 -41
- package/package.json +6 -6
package/LICENSE.txt
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
©
|
|
1
|
+
© 2026 Uniform Systems, Inc. All Rights Reserved.
|
|
2
2
|
See details of Uniform Systems, Inc. Master Subscription Agreement here: https://uniform.dev/eula
|
package/dist/index.d.mts
CHANGED
|
@@ -1295,8 +1295,11 @@ type RequestParametersProps = Pick<InputVariablesProps, 'disableVariables'>;
|
|
|
1295
1295
|
declare function RequestParameters({ disableVariables, addOmitIfEmpty, }: Pick<InputVariablesProps, 'disableVariables' | 'addOmitIfEmpty'>): _emotion_react_jsx_runtime.JSX.Element;
|
|
1296
1296
|
|
|
1297
1297
|
type RequestParameter = {
|
|
1298
|
+
/** The key of the parameter */
|
|
1298
1299
|
key: string;
|
|
1300
|
+
/** The value of the parameter */
|
|
1299
1301
|
value: string;
|
|
1302
|
+
/** Whether to remove the parameter value if it is empty (which can occur if using a variable value) */
|
|
1300
1303
|
omitIfEmpty?: boolean;
|
|
1301
1304
|
};
|
|
1302
1305
|
type BaseRequestData = {
|
|
@@ -1347,6 +1350,10 @@ type RequestActionContext = {
|
|
|
1347
1350
|
type RequestContext = {
|
|
1348
1351
|
dispatch: (event: RequestAction, ctx?: RequestActionContext) => void;
|
|
1349
1352
|
request: Readonly<RequestData>;
|
|
1353
|
+
/** Version number that increments when header or parameter list items are removed,
|
|
1354
|
+
* used to control remounting of the list item rows and prevent stale visible state due to lack of dom diff.
|
|
1355
|
+
*/
|
|
1356
|
+
listVersion: number;
|
|
1350
1357
|
};
|
|
1351
1358
|
/** Provides a mutable HTTP request object context. Components such as RequestBody and RequestUrl use this context to render. */
|
|
1352
1359
|
declare function RequestProvider({ value, onChange, children }: RequestProviderProps): _emotion_react_jsx_runtime.JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -1295,8 +1295,11 @@ type RequestParametersProps = Pick<InputVariablesProps, 'disableVariables'>;
|
|
|
1295
1295
|
declare function RequestParameters({ disableVariables, addOmitIfEmpty, }: Pick<InputVariablesProps, 'disableVariables' | 'addOmitIfEmpty'>): _emotion_react_jsx_runtime.JSX.Element;
|
|
1296
1296
|
|
|
1297
1297
|
type RequestParameter = {
|
|
1298
|
+
/** The key of the parameter */
|
|
1298
1299
|
key: string;
|
|
1300
|
+
/** The value of the parameter */
|
|
1299
1301
|
value: string;
|
|
1302
|
+
/** Whether to remove the parameter value if it is empty (which can occur if using a variable value) */
|
|
1300
1303
|
omitIfEmpty?: boolean;
|
|
1301
1304
|
};
|
|
1302
1305
|
type BaseRequestData = {
|
|
@@ -1347,6 +1350,10 @@ type RequestActionContext = {
|
|
|
1347
1350
|
type RequestContext = {
|
|
1348
1351
|
dispatch: (event: RequestAction, ctx?: RequestActionContext) => void;
|
|
1349
1352
|
request: Readonly<RequestData>;
|
|
1353
|
+
/** Version number that increments when header or parameter list items are removed,
|
|
1354
|
+
* used to control remounting of the list item rows and prevent stale visible state due to lack of dom diff.
|
|
1355
|
+
*/
|
|
1356
|
+
listVersion: number;
|
|
1350
1357
|
};
|
|
1351
1358
|
/** Provides a mutable HTTP request object context. Components such as RequestBody and RequestUrl use this context to render. */
|
|
1352
1359
|
declare function RequestProvider({ value, onChange, children }: RequestProviderProps): _emotion_react_jsx_runtime.JSX.Element;
|
package/dist/index.esm.js
CHANGED
|
@@ -3181,13 +3181,14 @@ function TextVariableRenderer({ definition, value, setValue }) {
|
|
|
3181
3181
|
// src/components/Request/RequestBody.tsx
|
|
3182
3182
|
import { css as css12 } from "@emotion/react";
|
|
3183
3183
|
import { InputSelect, JsonEditor } from "@uniformdev/design-system";
|
|
3184
|
-
import { useState as
|
|
3184
|
+
import { useState as useState10 } from "react";
|
|
3185
3185
|
|
|
3186
3186
|
// src/components/Request/RequestProvider.tsx
|
|
3187
3187
|
import * as React5 from "react";
|
|
3188
3188
|
import { jsx as jsx36 } from "@emotion/react/jsx-runtime";
|
|
3189
3189
|
var RequestContext = React5.createContext(null);
|
|
3190
3190
|
function RequestProvider({ value, onChange, children }) {
|
|
3191
|
+
const [listVersion, setListVersion] = React5.useState(0);
|
|
3191
3192
|
const contextValue = React5.useMemo(() => {
|
|
3192
3193
|
return {
|
|
3193
3194
|
dispatch: (event) => {
|
|
@@ -3207,6 +3208,7 @@ function RequestProvider({ value, onChange, children }) {
|
|
|
3207
3208
|
return { ...old, parameters: newParameters };
|
|
3208
3209
|
});
|
|
3209
3210
|
} else if (event.type === "removeParameter") {
|
|
3211
|
+
setListVersion((v) => v + 1);
|
|
3210
3212
|
onChange((old) => {
|
|
3211
3213
|
const newParameters = [...old.parameters];
|
|
3212
3214
|
newParameters.splice(event.index, 1);
|
|
@@ -3223,6 +3225,7 @@ function RequestProvider({ value, onChange, children }) {
|
|
|
3223
3225
|
return { ...old, headers: newHeaders };
|
|
3224
3226
|
});
|
|
3225
3227
|
} else if (event.type === "removeHeader") {
|
|
3228
|
+
setListVersion((v) => v + 1);
|
|
3226
3229
|
onChange((old) => {
|
|
3227
3230
|
const newHeaders = [...old.headers];
|
|
3228
3231
|
newHeaders.splice(event.index, 1);
|
|
@@ -3251,9 +3254,10 @@ function RequestProvider({ value, onChange, children }) {
|
|
|
3251
3254
|
throw new Error(`Unknown event ${JSON.stringify(event)}`);
|
|
3252
3255
|
}
|
|
3253
3256
|
},
|
|
3254
|
-
request: value
|
|
3257
|
+
request: value,
|
|
3258
|
+
listVersion
|
|
3255
3259
|
};
|
|
3256
|
-
}, [onChange, value]);
|
|
3260
|
+
}, [onChange, value, listVersion]);
|
|
3257
3261
|
return /* @__PURE__ */ jsx36(RequestContext.Provider, { value: contextValue, children });
|
|
3258
3262
|
}
|
|
3259
3263
|
function useRequest() {
|
|
@@ -3307,7 +3311,7 @@ var LANGUAGE_TO_CONTENT_TYPE = {
|
|
|
3307
3311
|
};
|
|
3308
3312
|
function RequestBody() {
|
|
3309
3313
|
const { request, dispatch } = useRequest();
|
|
3310
|
-
const [language, setLanguage] =
|
|
3314
|
+
const [language, setLanguage] = useState10("json");
|
|
3311
3315
|
return /* @__PURE__ */ jsxs17(
|
|
3312
3316
|
"div",
|
|
3313
3317
|
{
|
|
@@ -3380,7 +3384,7 @@ function RequestHeaders({
|
|
|
3380
3384
|
addOmitIfEmpty
|
|
3381
3385
|
}) {
|
|
3382
3386
|
var _a, _b;
|
|
3383
|
-
const { dispatch, request } = useRequest();
|
|
3387
|
+
const { dispatch, request, listVersion } = useRequest();
|
|
3384
3388
|
const deezHeaders = [...request.headers, { key: "", value: "" }];
|
|
3385
3389
|
const handleUpdateParamFromMenu = ({
|
|
3386
3390
|
key,
|
|
@@ -3466,7 +3470,7 @@ function RequestHeaders({
|
|
|
3466
3470
|
})
|
|
3467
3471
|
}
|
|
3468
3472
|
) : null }) : null
|
|
3469
|
-
] }, index);
|
|
3473
|
+
] }, `${index}-${listVersion}`);
|
|
3470
3474
|
})
|
|
3471
3475
|
] })
|
|
3472
3476
|
] }) });
|
|
@@ -3511,7 +3515,7 @@ function RequestParameters({
|
|
|
3511
3515
|
addOmitIfEmpty
|
|
3512
3516
|
}) {
|
|
3513
3517
|
var _a, _b;
|
|
3514
|
-
const { dispatch, request } = useRequest();
|
|
3518
|
+
const { dispatch, request, listVersion } = useRequest();
|
|
3515
3519
|
const deezParameters = [...request.parameters, { key: "", value: "" }];
|
|
3516
3520
|
const handleUpdateParamFromMenu = ({
|
|
3517
3521
|
key,
|
|
@@ -3609,7 +3613,7 @@ function RequestParameters({
|
|
|
3609
3613
|
}
|
|
3610
3614
|
}
|
|
3611
3615
|
) : null }) : null
|
|
3612
|
-
] }, index);
|
|
3616
|
+
] }, `${index}-${listVersion}`);
|
|
3613
3617
|
})
|
|
3614
3618
|
] })
|
|
3615
3619
|
] }) });
|
|
@@ -3891,10 +3895,10 @@ import { LoadingIndicator as LoadingIndicator2, Theme as Theme2 } from "@uniform
|
|
|
3891
3895
|
|
|
3892
3896
|
// src/hooks/useInitializeUniformMeshSdk.ts
|
|
3893
3897
|
import { initializeUniformMeshSDK } from "@uniformdev/mesh-sdk";
|
|
3894
|
-
import { useEffect as useEffect12, useRef as useRef7, useState as
|
|
3898
|
+
import { useEffect as useEffect12, useRef as useRef7, useState as useState11 } from "react";
|
|
3895
3899
|
var useInitializeUniformMeshSdk = ({ autoResizingDisabled } = {}) => {
|
|
3896
|
-
const [error, setError] =
|
|
3897
|
-
const [sdk, setSdk] =
|
|
3900
|
+
const [error, setError] = useState11();
|
|
3901
|
+
const [sdk, setSdk] = useState11();
|
|
3898
3902
|
const initializationInProgress = useRef7(false);
|
|
3899
3903
|
useEffect12(
|
|
3900
3904
|
() => {
|
|
@@ -3989,7 +3993,7 @@ import {
|
|
|
3989
3993
|
useContext as useContext5,
|
|
3990
3994
|
useDeferredValue,
|
|
3991
3995
|
useMemo as useMemo12,
|
|
3992
|
-
useState as
|
|
3996
|
+
useState as useState12
|
|
3993
3997
|
} from "react";
|
|
3994
3998
|
import { jsx as jsx48 } from "@emotion/react/jsx-runtime";
|
|
3995
3999
|
var ObjectSearchContext = createContext5({
|
|
@@ -4013,15 +4017,15 @@ var ObjectSearchProvider = ({
|
|
|
4013
4017
|
children,
|
|
4014
4018
|
defaultQuery
|
|
4015
4019
|
}) => {
|
|
4016
|
-
const [query, setQuery] =
|
|
4020
|
+
const [query, setQuery] = useState12({
|
|
4017
4021
|
contentType: "",
|
|
4018
4022
|
keyword: "",
|
|
4019
4023
|
...defaultQuery
|
|
4020
4024
|
});
|
|
4021
4025
|
const { flatVariables } = useVariables(true);
|
|
4022
4026
|
const querySearchDeferred = useDeferredValue(query);
|
|
4023
|
-
const [selectedItems, setSelectedItems] =
|
|
4024
|
-
const [list, setList] =
|
|
4027
|
+
const [selectedItems, setSelectedItems] = useState12(currentlySelectedItems != null ? currentlySelectedItems : []);
|
|
4028
|
+
const [list, setList] = useState12({});
|
|
4025
4029
|
const onSetQuery = useCallback5(
|
|
4026
4030
|
(value2) => {
|
|
4027
4031
|
if (Array.isArray(value2.contentType) && value2.contentType.length > 0) {
|
|
@@ -4337,7 +4341,7 @@ var DefaultResultList = () => {
|
|
|
4337
4341
|
|
|
4338
4342
|
// src/components/ObjectSearch/ObjectSearchFilter.tsx
|
|
4339
4343
|
import { DebouncedInputKeywordSearch, InputSelect as InputSelect3 } from "@uniformdev/design-system";
|
|
4340
|
-
import { useMemo as useMemo13, useState as
|
|
4344
|
+
import { useMemo as useMemo13, useState as useState13 } from "react";
|
|
4341
4345
|
|
|
4342
4346
|
// src/components/ObjectSearch/styles/ObjectSearchFilterContainer.styles.ts
|
|
4343
4347
|
import { css as css17 } from "@emotion/react";
|
|
@@ -4371,7 +4375,7 @@ var ObjectSearchFilter = ({
|
|
|
4371
4375
|
}) => {
|
|
4372
4376
|
var _a, _b;
|
|
4373
4377
|
const { query, onSetQuery } = useObjectSearchContext();
|
|
4374
|
-
const [searchState, setSearchState] =
|
|
4378
|
+
const [searchState, setSearchState] = useState13({
|
|
4375
4379
|
contentType: (_a = query.contentType) != null ? _a : "",
|
|
4376
4380
|
keyword: (_b = query.keyword) != null ? _b : ""
|
|
4377
4381
|
});
|
|
@@ -4793,7 +4797,7 @@ function ObjectSearchResultList({
|
|
|
4793
4797
|
|
|
4794
4798
|
// src/components/ObjectSearch/QueryFilter.tsx
|
|
4795
4799
|
import { DebouncedInputKeywordSearch as DebouncedInputKeywordSearch2, Input as Input4, InputSelect as InputSelect4, VerticalRhythm as VerticalRhythm4 } from "@uniformdev/design-system";
|
|
4796
|
-
import { useEffect as useEffect13, useState as
|
|
4800
|
+
import { useEffect as useEffect13, useState as useState14 } from "react";
|
|
4797
4801
|
import { jsx as jsx57, jsxs as jsxs29 } from "@emotion/react/jsx-runtime";
|
|
4798
4802
|
var QueryFilter = ({
|
|
4799
4803
|
requireContentType,
|
|
@@ -4822,7 +4826,7 @@ var QueryFilter = ({
|
|
|
4822
4826
|
}) => {
|
|
4823
4827
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
4824
4828
|
const { query, onSetQuery } = useObjectSearchContext();
|
|
4825
|
-
const [queryState, setQueryState] =
|
|
4829
|
+
const [queryState, setQueryState] = useState14({
|
|
4826
4830
|
contentType: (_a = query.contentType) != null ? _a : "",
|
|
4827
4831
|
keyword: (_b = query.keyword) != null ? _b : "",
|
|
4828
4832
|
count: (_c = query.count) != null ? _c : 5,
|
|
@@ -5447,7 +5451,7 @@ var MULTI_SELECT_OPERATORS = [
|
|
|
5447
5451
|
|
|
5448
5452
|
// src/components/SearchAndFilter/editors/DateEditor.tsx
|
|
5449
5453
|
import { Input as Input5 } from "@uniformdev/design-system";
|
|
5450
|
-
import { useState as
|
|
5454
|
+
import { useState as useState15 } from "react";
|
|
5451
5455
|
import { useDebounce as useDebounce2 } from "react-use";
|
|
5452
5456
|
import { jsx as jsx59 } from "@emotion/react/jsx-runtime";
|
|
5453
5457
|
var DateEditor = ({
|
|
@@ -5458,7 +5462,7 @@ var DateEditor = ({
|
|
|
5458
5462
|
readOnly,
|
|
5459
5463
|
valueTestId
|
|
5460
5464
|
}) => {
|
|
5461
|
-
const [innerValue, setInnerValue] =
|
|
5465
|
+
const [innerValue, setInnerValue] = useState15(value != null ? value : "");
|
|
5462
5466
|
useDebounce2(() => onChange(innerValue), 500, [innerValue]);
|
|
5463
5467
|
return /* @__PURE__ */ jsx59(
|
|
5464
5468
|
Input5,
|
|
@@ -5477,7 +5481,7 @@ var DateEditor = ({
|
|
|
5477
5481
|
|
|
5478
5482
|
// src/components/SearchAndFilter/editors/DateRangeEditor.tsx
|
|
5479
5483
|
import { Input as Input6 } from "@uniformdev/design-system";
|
|
5480
|
-
import { useEffect as useEffect15, useState as
|
|
5484
|
+
import { useEffect as useEffect15, useState as useState16 } from "react";
|
|
5481
5485
|
import { useDebounce as useDebounce3 } from "react-use";
|
|
5482
5486
|
|
|
5483
5487
|
// src/components/SearchAndFilter/editors/shared/ErrorContainer.tsx
|
|
@@ -5513,9 +5517,9 @@ var DateRangeEditor = ({
|
|
|
5513
5517
|
readOnly,
|
|
5514
5518
|
valueTestId
|
|
5515
5519
|
}) => {
|
|
5516
|
-
const [minDateValue, setMinDateValue] =
|
|
5517
|
-
const [maxDateValue, setMaxDateValue] =
|
|
5518
|
-
const [error, setError] =
|
|
5520
|
+
const [minDateValue, setMinDateValue] = useState16(value ? value[0] : "");
|
|
5521
|
+
const [maxDateValue, setMaxDateValue] = useState16(value ? value[1] : "");
|
|
5522
|
+
const [error, setError] = useState16("");
|
|
5519
5523
|
useDebounce3(
|
|
5520
5524
|
() => {
|
|
5521
5525
|
if (minDateValue && maxDateValue && !error) {
|
|
@@ -5710,7 +5714,7 @@ var FilterSingleChoiceEditor = ({
|
|
|
5710
5714
|
|
|
5711
5715
|
// src/components/SearchAndFilter/editors/NumberEditor.tsx
|
|
5712
5716
|
import { Input as Input7 } from "@uniformdev/design-system";
|
|
5713
|
-
import { useState as
|
|
5717
|
+
import { useState as useState17 } from "react";
|
|
5714
5718
|
import { useDebounce as useDebounce4 } from "react-use";
|
|
5715
5719
|
import { jsx as jsx64 } from "@emotion/react/jsx-runtime";
|
|
5716
5720
|
var NumberEditor = ({
|
|
@@ -5721,7 +5725,7 @@ var NumberEditor = ({
|
|
|
5721
5725
|
readOnly,
|
|
5722
5726
|
valueTestId
|
|
5723
5727
|
}) => {
|
|
5724
|
-
const [innerValue, setInnerValue] =
|
|
5728
|
+
const [innerValue, setInnerValue] = useState17(value != null ? value : "");
|
|
5725
5729
|
useDebounce4(() => onChange(innerValue), 500, [innerValue]);
|
|
5726
5730
|
return /* @__PURE__ */ jsx64(
|
|
5727
5731
|
Input7,
|
|
@@ -5741,7 +5745,7 @@ var NumberEditor = ({
|
|
|
5741
5745
|
|
|
5742
5746
|
// src/components/SearchAndFilter/editors/NumberRangeEditor.tsx
|
|
5743
5747
|
import { Input as Input8 } from "@uniformdev/design-system";
|
|
5744
|
-
import { useEffect as useEffect16, useState as
|
|
5748
|
+
import { useEffect as useEffect16, useState as useState18 } from "react";
|
|
5745
5749
|
import { useDebounce as useDebounce5 } from "react-use";
|
|
5746
5750
|
import { Fragment as Fragment12, jsx as jsx65, jsxs as jsxs31 } from "@emotion/react/jsx-runtime";
|
|
5747
5751
|
var NumberRangeEditor = ({
|
|
@@ -5752,9 +5756,9 @@ var NumberRangeEditor = ({
|
|
|
5752
5756
|
readOnly,
|
|
5753
5757
|
valueTestId
|
|
5754
5758
|
}) => {
|
|
5755
|
-
const [minValue, setMinValue] =
|
|
5756
|
-
const [maxValue, setMaxValue] =
|
|
5757
|
-
const [error, setError] =
|
|
5759
|
+
const [minValue, setMinValue] = useState18("");
|
|
5760
|
+
const [maxValue, setMaxValue] = useState18("");
|
|
5761
|
+
const [error, setError] = useState18("");
|
|
5758
5762
|
useDebounce5(
|
|
5759
5763
|
() => {
|
|
5760
5764
|
if (minValue && maxValue && !error) {
|
|
@@ -5942,7 +5946,7 @@ var StatusSingleEditor = ({
|
|
|
5942
5946
|
|
|
5943
5947
|
// src/components/SearchAndFilter/editors/TextEditor.tsx
|
|
5944
5948
|
import { Input as Input9 } from "@uniformdev/design-system";
|
|
5945
|
-
import { useState as
|
|
5949
|
+
import { useState as useState19 } from "react";
|
|
5946
5950
|
import { useDebounce as useDebounce6 } from "react-use";
|
|
5947
5951
|
import { jsx as jsx69 } from "@emotion/react/jsx-runtime";
|
|
5948
5952
|
var TextEditor = ({
|
|
@@ -5952,7 +5956,7 @@ var TextEditor = ({
|
|
|
5952
5956
|
readOnly,
|
|
5953
5957
|
valueTestId
|
|
5954
5958
|
}) => {
|
|
5955
|
-
const [innerValue, setInnerValue] =
|
|
5959
|
+
const [innerValue, setInnerValue] = useState19(value != null ? value : "");
|
|
5956
5960
|
useDebounce6(() => onChange(innerValue), 500, [innerValue]);
|
|
5957
5961
|
return /* @__PURE__ */ jsx69(
|
|
5958
5962
|
Input9,
|
|
@@ -6316,7 +6320,7 @@ import { CgClose } from "@react-icons/all-files/cg/CgClose";
|
|
|
6316
6320
|
import { hasReferencedVariables as hasReferencedVariables2 } from "@uniformdev/canvas";
|
|
6317
6321
|
import { Icon as Icon3, InputKeywordSearch } from "@uniformdev/design-system";
|
|
6318
6322
|
import { CLEAR_EDITOR_COMMAND as CLEAR_EDITOR_COMMAND2 } from "lexical";
|
|
6319
|
-
import { useEffect as useEffect18, useRef as useRef9, useState as
|
|
6323
|
+
import { useEffect as useEffect18, useRef as useRef9, useState as useState21 } from "react";
|
|
6320
6324
|
import { useDebounce as useDebounce7 } from "react-use";
|
|
6321
6325
|
import { v4 as v42 } from "uuid";
|
|
6322
6326
|
|
|
@@ -6329,7 +6333,7 @@ import {
|
|
|
6329
6333
|
useDeferredValue as useDeferredValue2,
|
|
6330
6334
|
useEffect as useEffect17,
|
|
6331
6335
|
useMemo as useMemo20,
|
|
6332
|
-
useState as
|
|
6336
|
+
useState as useState20
|
|
6333
6337
|
} from "react";
|
|
6334
6338
|
|
|
6335
6339
|
// src/components/SearchAndFilter/FilterEditor.tsx
|
|
@@ -6443,9 +6447,9 @@ var SearchAndFilterProvider = ({
|
|
|
6443
6447
|
children,
|
|
6444
6448
|
allowBindingSearchTerm
|
|
6445
6449
|
}) => {
|
|
6446
|
-
const [searchTerm, setSearchTerm] =
|
|
6450
|
+
const [searchTerm, setSearchTerm] = useState20(defaultSearchTerm);
|
|
6447
6451
|
const deferredSearchTerm = useDeferredValue2(searchTerm);
|
|
6448
|
-
const [filterVisibility, setFilterVisibility] =
|
|
6452
|
+
const [filterVisibility, setFilterVisibility] = useState20(alwaysVisible || filterVisible);
|
|
6449
6453
|
const handleSearchTerm = useCallback6(
|
|
6450
6454
|
(term) => {
|
|
6451
6455
|
setSearchTerm(term);
|
|
@@ -6542,8 +6546,8 @@ var FilterControls = ({
|
|
|
6542
6546
|
} = useSearchAndFilter();
|
|
6543
6547
|
const editorRef = useRef9(null);
|
|
6544
6548
|
const variableRefernceCountInSearchTerm = hasReferencedVariables2(searchTerm);
|
|
6545
|
-
const [idToResetInputVariables, setIdToResetInputVariables] =
|
|
6546
|
-
const [localSearchTerm, setLocalSearchTerm] =
|
|
6549
|
+
const [idToResetInputVariables, setIdToResetInputVariables] = useState21("data-resource-search-term-input");
|
|
6550
|
+
const [localSearchTerm, setLocalSearchTerm] = useState21(searchTerm);
|
|
6547
6551
|
useDebounce7(
|
|
6548
6552
|
() => {
|
|
6549
6553
|
setSearchTerm(localSearchTerm);
|
|
@@ -7162,7 +7166,7 @@ var SearchAndFilter = ({
|
|
|
7162
7166
|
|
|
7163
7167
|
// src/components/SearchAndFilter/SearchOnlyFilter.tsx
|
|
7164
7168
|
import { InputKeywordSearch as InputKeywordSearch2 } from "@uniformdev/design-system";
|
|
7165
|
-
import { createContext as createContext7, useState as
|
|
7169
|
+
import { createContext as createContext7, useState as useState22 } from "react";
|
|
7166
7170
|
import { useDebounce as useDebounce8 } from "react-use";
|
|
7167
7171
|
import { jsx as jsx80 } from "@emotion/react/jsx-runtime";
|
|
7168
7172
|
var SearchOnlyContext = createContext7({
|
|
@@ -7172,7 +7176,7 @@ var SearchOnlyContext = createContext7({
|
|
|
7172
7176
|
});
|
|
7173
7177
|
var SearchOnlyFilter = ({ onSearchChange, maxWidth }) => {
|
|
7174
7178
|
const { searchTerm, setSearchTerm } = useSearchAndFilter();
|
|
7175
|
-
const [localeSearchTerm, setLocaleSearchTerm] =
|
|
7179
|
+
const [localeSearchTerm, setLocaleSearchTerm] = useState22("");
|
|
7176
7180
|
useDebounce8(
|
|
7177
7181
|
() => {
|
|
7178
7182
|
setSearchTerm(localeSearchTerm);
|
package/dist/index.js
CHANGED
|
@@ -3306,6 +3306,7 @@ var React5 = __toESM(require("react"));
|
|
|
3306
3306
|
var import_jsx_runtime35 = require("@emotion/react/jsx-runtime");
|
|
3307
3307
|
var RequestContext = React5.createContext(null);
|
|
3308
3308
|
function RequestProvider({ value, onChange, children }) {
|
|
3309
|
+
const [listVersion, setListVersion] = React5.useState(0);
|
|
3309
3310
|
const contextValue = React5.useMemo(() => {
|
|
3310
3311
|
return {
|
|
3311
3312
|
dispatch: (event) => {
|
|
@@ -3325,6 +3326,7 @@ function RequestProvider({ value, onChange, children }) {
|
|
|
3325
3326
|
return { ...old, parameters: newParameters };
|
|
3326
3327
|
});
|
|
3327
3328
|
} else if (event.type === "removeParameter") {
|
|
3329
|
+
setListVersion((v) => v + 1);
|
|
3328
3330
|
onChange((old) => {
|
|
3329
3331
|
const newParameters = [...old.parameters];
|
|
3330
3332
|
newParameters.splice(event.index, 1);
|
|
@@ -3341,6 +3343,7 @@ function RequestProvider({ value, onChange, children }) {
|
|
|
3341
3343
|
return { ...old, headers: newHeaders };
|
|
3342
3344
|
});
|
|
3343
3345
|
} else if (event.type === "removeHeader") {
|
|
3346
|
+
setListVersion((v) => v + 1);
|
|
3344
3347
|
onChange((old) => {
|
|
3345
3348
|
const newHeaders = [...old.headers];
|
|
3346
3349
|
newHeaders.splice(event.index, 1);
|
|
@@ -3369,9 +3372,10 @@ function RequestProvider({ value, onChange, children }) {
|
|
|
3369
3372
|
throw new Error(`Unknown event ${JSON.stringify(event)}`);
|
|
3370
3373
|
}
|
|
3371
3374
|
},
|
|
3372
|
-
request: value
|
|
3375
|
+
request: value,
|
|
3376
|
+
listVersion
|
|
3373
3377
|
};
|
|
3374
|
-
}, [onChange, value]);
|
|
3378
|
+
}, [onChange, value, listVersion]);
|
|
3375
3379
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(RequestContext.Provider, { value: contextValue, children });
|
|
3376
3380
|
}
|
|
3377
3381
|
function useRequest() {
|
|
@@ -3488,7 +3492,7 @@ function RequestHeaders({
|
|
|
3488
3492
|
addOmitIfEmpty
|
|
3489
3493
|
}) {
|
|
3490
3494
|
var _a, _b;
|
|
3491
|
-
const { dispatch, request } = useRequest();
|
|
3495
|
+
const { dispatch, request, listVersion } = useRequest();
|
|
3492
3496
|
const deezHeaders = [...request.headers, { key: "", value: "" }];
|
|
3493
3497
|
const handleUpdateParamFromMenu = ({
|
|
3494
3498
|
key,
|
|
@@ -3574,7 +3578,7 @@ function RequestHeaders({
|
|
|
3574
3578
|
})
|
|
3575
3579
|
}
|
|
3576
3580
|
) : null }) : null
|
|
3577
|
-
] }, index);
|
|
3581
|
+
] }, `${index}-${listVersion}`);
|
|
3578
3582
|
})
|
|
3579
3583
|
] })
|
|
3580
3584
|
] }) });
|
|
@@ -3609,7 +3613,7 @@ function RequestParameters({
|
|
|
3609
3613
|
addOmitIfEmpty
|
|
3610
3614
|
}) {
|
|
3611
3615
|
var _a, _b;
|
|
3612
|
-
const { dispatch, request } = useRequest();
|
|
3616
|
+
const { dispatch, request, listVersion } = useRequest();
|
|
3613
3617
|
const deezParameters = [...request.parameters, { key: "", value: "" }];
|
|
3614
3618
|
const handleUpdateParamFromMenu = ({
|
|
3615
3619
|
key,
|
|
@@ -3707,7 +3711,7 @@ function RequestParameters({
|
|
|
3707
3711
|
}
|
|
3708
3712
|
}
|
|
3709
3713
|
) : null }) : null
|
|
3710
|
-
] }, index);
|
|
3714
|
+
] }, `${index}-${listVersion}`);
|
|
3711
3715
|
})
|
|
3712
3716
|
] })
|
|
3713
3717
|
] }) });
|
package/dist/index.mjs
CHANGED
|
@@ -3181,13 +3181,14 @@ function TextVariableRenderer({ definition, value, setValue }) {
|
|
|
3181
3181
|
// src/components/Request/RequestBody.tsx
|
|
3182
3182
|
import { css as css12 } from "@emotion/react";
|
|
3183
3183
|
import { InputSelect, JsonEditor } from "@uniformdev/design-system";
|
|
3184
|
-
import { useState as
|
|
3184
|
+
import { useState as useState10 } from "react";
|
|
3185
3185
|
|
|
3186
3186
|
// src/components/Request/RequestProvider.tsx
|
|
3187
3187
|
import * as React5 from "react";
|
|
3188
3188
|
import { jsx as jsx36 } from "@emotion/react/jsx-runtime";
|
|
3189
3189
|
var RequestContext = React5.createContext(null);
|
|
3190
3190
|
function RequestProvider({ value, onChange, children }) {
|
|
3191
|
+
const [listVersion, setListVersion] = React5.useState(0);
|
|
3191
3192
|
const contextValue = React5.useMemo(() => {
|
|
3192
3193
|
return {
|
|
3193
3194
|
dispatch: (event) => {
|
|
@@ -3207,6 +3208,7 @@ function RequestProvider({ value, onChange, children }) {
|
|
|
3207
3208
|
return { ...old, parameters: newParameters };
|
|
3208
3209
|
});
|
|
3209
3210
|
} else if (event.type === "removeParameter") {
|
|
3211
|
+
setListVersion((v) => v + 1);
|
|
3210
3212
|
onChange((old) => {
|
|
3211
3213
|
const newParameters = [...old.parameters];
|
|
3212
3214
|
newParameters.splice(event.index, 1);
|
|
@@ -3223,6 +3225,7 @@ function RequestProvider({ value, onChange, children }) {
|
|
|
3223
3225
|
return { ...old, headers: newHeaders };
|
|
3224
3226
|
});
|
|
3225
3227
|
} else if (event.type === "removeHeader") {
|
|
3228
|
+
setListVersion((v) => v + 1);
|
|
3226
3229
|
onChange((old) => {
|
|
3227
3230
|
const newHeaders = [...old.headers];
|
|
3228
3231
|
newHeaders.splice(event.index, 1);
|
|
@@ -3251,9 +3254,10 @@ function RequestProvider({ value, onChange, children }) {
|
|
|
3251
3254
|
throw new Error(`Unknown event ${JSON.stringify(event)}`);
|
|
3252
3255
|
}
|
|
3253
3256
|
},
|
|
3254
|
-
request: value
|
|
3257
|
+
request: value,
|
|
3258
|
+
listVersion
|
|
3255
3259
|
};
|
|
3256
|
-
}, [onChange, value]);
|
|
3260
|
+
}, [onChange, value, listVersion]);
|
|
3257
3261
|
return /* @__PURE__ */ jsx36(RequestContext.Provider, { value: contextValue, children });
|
|
3258
3262
|
}
|
|
3259
3263
|
function useRequest() {
|
|
@@ -3307,7 +3311,7 @@ var LANGUAGE_TO_CONTENT_TYPE = {
|
|
|
3307
3311
|
};
|
|
3308
3312
|
function RequestBody() {
|
|
3309
3313
|
const { request, dispatch } = useRequest();
|
|
3310
|
-
const [language, setLanguage] =
|
|
3314
|
+
const [language, setLanguage] = useState10("json");
|
|
3311
3315
|
return /* @__PURE__ */ jsxs17(
|
|
3312
3316
|
"div",
|
|
3313
3317
|
{
|
|
@@ -3380,7 +3384,7 @@ function RequestHeaders({
|
|
|
3380
3384
|
addOmitIfEmpty
|
|
3381
3385
|
}) {
|
|
3382
3386
|
var _a, _b;
|
|
3383
|
-
const { dispatch, request } = useRequest();
|
|
3387
|
+
const { dispatch, request, listVersion } = useRequest();
|
|
3384
3388
|
const deezHeaders = [...request.headers, { key: "", value: "" }];
|
|
3385
3389
|
const handleUpdateParamFromMenu = ({
|
|
3386
3390
|
key,
|
|
@@ -3466,7 +3470,7 @@ function RequestHeaders({
|
|
|
3466
3470
|
})
|
|
3467
3471
|
}
|
|
3468
3472
|
) : null }) : null
|
|
3469
|
-
] }, index);
|
|
3473
|
+
] }, `${index}-${listVersion}`);
|
|
3470
3474
|
})
|
|
3471
3475
|
] })
|
|
3472
3476
|
] }) });
|
|
@@ -3511,7 +3515,7 @@ function RequestParameters({
|
|
|
3511
3515
|
addOmitIfEmpty
|
|
3512
3516
|
}) {
|
|
3513
3517
|
var _a, _b;
|
|
3514
|
-
const { dispatch, request } = useRequest();
|
|
3518
|
+
const { dispatch, request, listVersion } = useRequest();
|
|
3515
3519
|
const deezParameters = [...request.parameters, { key: "", value: "" }];
|
|
3516
3520
|
const handleUpdateParamFromMenu = ({
|
|
3517
3521
|
key,
|
|
@@ -3609,7 +3613,7 @@ function RequestParameters({
|
|
|
3609
3613
|
}
|
|
3610
3614
|
}
|
|
3611
3615
|
) : null }) : null
|
|
3612
|
-
] }, index);
|
|
3616
|
+
] }, `${index}-${listVersion}`);
|
|
3613
3617
|
})
|
|
3614
3618
|
] })
|
|
3615
3619
|
] }) });
|
|
@@ -3891,10 +3895,10 @@ import { LoadingIndicator as LoadingIndicator2, Theme as Theme2 } from "@uniform
|
|
|
3891
3895
|
|
|
3892
3896
|
// src/hooks/useInitializeUniformMeshSdk.ts
|
|
3893
3897
|
import { initializeUniformMeshSDK } from "@uniformdev/mesh-sdk";
|
|
3894
|
-
import { useEffect as useEffect12, useRef as useRef7, useState as
|
|
3898
|
+
import { useEffect as useEffect12, useRef as useRef7, useState as useState11 } from "react";
|
|
3895
3899
|
var useInitializeUniformMeshSdk = ({ autoResizingDisabled } = {}) => {
|
|
3896
|
-
const [error, setError] =
|
|
3897
|
-
const [sdk, setSdk] =
|
|
3900
|
+
const [error, setError] = useState11();
|
|
3901
|
+
const [sdk, setSdk] = useState11();
|
|
3898
3902
|
const initializationInProgress = useRef7(false);
|
|
3899
3903
|
useEffect12(
|
|
3900
3904
|
() => {
|
|
@@ -3989,7 +3993,7 @@ import {
|
|
|
3989
3993
|
useContext as useContext5,
|
|
3990
3994
|
useDeferredValue,
|
|
3991
3995
|
useMemo as useMemo12,
|
|
3992
|
-
useState as
|
|
3996
|
+
useState as useState12
|
|
3993
3997
|
} from "react";
|
|
3994
3998
|
import { jsx as jsx48 } from "@emotion/react/jsx-runtime";
|
|
3995
3999
|
var ObjectSearchContext = createContext5({
|
|
@@ -4013,15 +4017,15 @@ var ObjectSearchProvider = ({
|
|
|
4013
4017
|
children,
|
|
4014
4018
|
defaultQuery
|
|
4015
4019
|
}) => {
|
|
4016
|
-
const [query, setQuery] =
|
|
4020
|
+
const [query, setQuery] = useState12({
|
|
4017
4021
|
contentType: "",
|
|
4018
4022
|
keyword: "",
|
|
4019
4023
|
...defaultQuery
|
|
4020
4024
|
});
|
|
4021
4025
|
const { flatVariables } = useVariables(true);
|
|
4022
4026
|
const querySearchDeferred = useDeferredValue(query);
|
|
4023
|
-
const [selectedItems, setSelectedItems] =
|
|
4024
|
-
const [list, setList] =
|
|
4027
|
+
const [selectedItems, setSelectedItems] = useState12(currentlySelectedItems != null ? currentlySelectedItems : []);
|
|
4028
|
+
const [list, setList] = useState12({});
|
|
4025
4029
|
const onSetQuery = useCallback5(
|
|
4026
4030
|
(value2) => {
|
|
4027
4031
|
if (Array.isArray(value2.contentType) && value2.contentType.length > 0) {
|
|
@@ -4337,7 +4341,7 @@ var DefaultResultList = () => {
|
|
|
4337
4341
|
|
|
4338
4342
|
// src/components/ObjectSearch/ObjectSearchFilter.tsx
|
|
4339
4343
|
import { DebouncedInputKeywordSearch, InputSelect as InputSelect3 } from "@uniformdev/design-system";
|
|
4340
|
-
import { useMemo as useMemo13, useState as
|
|
4344
|
+
import { useMemo as useMemo13, useState as useState13 } from "react";
|
|
4341
4345
|
|
|
4342
4346
|
// src/components/ObjectSearch/styles/ObjectSearchFilterContainer.styles.ts
|
|
4343
4347
|
import { css as css17 } from "@emotion/react";
|
|
@@ -4371,7 +4375,7 @@ var ObjectSearchFilter = ({
|
|
|
4371
4375
|
}) => {
|
|
4372
4376
|
var _a, _b;
|
|
4373
4377
|
const { query, onSetQuery } = useObjectSearchContext();
|
|
4374
|
-
const [searchState, setSearchState] =
|
|
4378
|
+
const [searchState, setSearchState] = useState13({
|
|
4375
4379
|
contentType: (_a = query.contentType) != null ? _a : "",
|
|
4376
4380
|
keyword: (_b = query.keyword) != null ? _b : ""
|
|
4377
4381
|
});
|
|
@@ -4793,7 +4797,7 @@ function ObjectSearchResultList({
|
|
|
4793
4797
|
|
|
4794
4798
|
// src/components/ObjectSearch/QueryFilter.tsx
|
|
4795
4799
|
import { DebouncedInputKeywordSearch as DebouncedInputKeywordSearch2, Input as Input4, InputSelect as InputSelect4, VerticalRhythm as VerticalRhythm4 } from "@uniformdev/design-system";
|
|
4796
|
-
import { useEffect as useEffect13, useState as
|
|
4800
|
+
import { useEffect as useEffect13, useState as useState14 } from "react";
|
|
4797
4801
|
import { jsx as jsx57, jsxs as jsxs29 } from "@emotion/react/jsx-runtime";
|
|
4798
4802
|
var QueryFilter = ({
|
|
4799
4803
|
requireContentType,
|
|
@@ -4822,7 +4826,7 @@ var QueryFilter = ({
|
|
|
4822
4826
|
}) => {
|
|
4823
4827
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
4824
4828
|
const { query, onSetQuery } = useObjectSearchContext();
|
|
4825
|
-
const [queryState, setQueryState] =
|
|
4829
|
+
const [queryState, setQueryState] = useState14({
|
|
4826
4830
|
contentType: (_a = query.contentType) != null ? _a : "",
|
|
4827
4831
|
keyword: (_b = query.keyword) != null ? _b : "",
|
|
4828
4832
|
count: (_c = query.count) != null ? _c : 5,
|
|
@@ -5447,7 +5451,7 @@ var MULTI_SELECT_OPERATORS = [
|
|
|
5447
5451
|
|
|
5448
5452
|
// src/components/SearchAndFilter/editors/DateEditor.tsx
|
|
5449
5453
|
import { Input as Input5 } from "@uniformdev/design-system";
|
|
5450
|
-
import { useState as
|
|
5454
|
+
import { useState as useState15 } from "react";
|
|
5451
5455
|
import { useDebounce as useDebounce2 } from "react-use";
|
|
5452
5456
|
import { jsx as jsx59 } from "@emotion/react/jsx-runtime";
|
|
5453
5457
|
var DateEditor = ({
|
|
@@ -5458,7 +5462,7 @@ var DateEditor = ({
|
|
|
5458
5462
|
readOnly,
|
|
5459
5463
|
valueTestId
|
|
5460
5464
|
}) => {
|
|
5461
|
-
const [innerValue, setInnerValue] =
|
|
5465
|
+
const [innerValue, setInnerValue] = useState15(value != null ? value : "");
|
|
5462
5466
|
useDebounce2(() => onChange(innerValue), 500, [innerValue]);
|
|
5463
5467
|
return /* @__PURE__ */ jsx59(
|
|
5464
5468
|
Input5,
|
|
@@ -5477,7 +5481,7 @@ var DateEditor = ({
|
|
|
5477
5481
|
|
|
5478
5482
|
// src/components/SearchAndFilter/editors/DateRangeEditor.tsx
|
|
5479
5483
|
import { Input as Input6 } from "@uniformdev/design-system";
|
|
5480
|
-
import { useEffect as useEffect15, useState as
|
|
5484
|
+
import { useEffect as useEffect15, useState as useState16 } from "react";
|
|
5481
5485
|
import { useDebounce as useDebounce3 } from "react-use";
|
|
5482
5486
|
|
|
5483
5487
|
// src/components/SearchAndFilter/editors/shared/ErrorContainer.tsx
|
|
@@ -5513,9 +5517,9 @@ var DateRangeEditor = ({
|
|
|
5513
5517
|
readOnly,
|
|
5514
5518
|
valueTestId
|
|
5515
5519
|
}) => {
|
|
5516
|
-
const [minDateValue, setMinDateValue] =
|
|
5517
|
-
const [maxDateValue, setMaxDateValue] =
|
|
5518
|
-
const [error, setError] =
|
|
5520
|
+
const [minDateValue, setMinDateValue] = useState16(value ? value[0] : "");
|
|
5521
|
+
const [maxDateValue, setMaxDateValue] = useState16(value ? value[1] : "");
|
|
5522
|
+
const [error, setError] = useState16("");
|
|
5519
5523
|
useDebounce3(
|
|
5520
5524
|
() => {
|
|
5521
5525
|
if (minDateValue && maxDateValue && !error) {
|
|
@@ -5710,7 +5714,7 @@ var FilterSingleChoiceEditor = ({
|
|
|
5710
5714
|
|
|
5711
5715
|
// src/components/SearchAndFilter/editors/NumberEditor.tsx
|
|
5712
5716
|
import { Input as Input7 } from "@uniformdev/design-system";
|
|
5713
|
-
import { useState as
|
|
5717
|
+
import { useState as useState17 } from "react";
|
|
5714
5718
|
import { useDebounce as useDebounce4 } from "react-use";
|
|
5715
5719
|
import { jsx as jsx64 } from "@emotion/react/jsx-runtime";
|
|
5716
5720
|
var NumberEditor = ({
|
|
@@ -5721,7 +5725,7 @@ var NumberEditor = ({
|
|
|
5721
5725
|
readOnly,
|
|
5722
5726
|
valueTestId
|
|
5723
5727
|
}) => {
|
|
5724
|
-
const [innerValue, setInnerValue] =
|
|
5728
|
+
const [innerValue, setInnerValue] = useState17(value != null ? value : "");
|
|
5725
5729
|
useDebounce4(() => onChange(innerValue), 500, [innerValue]);
|
|
5726
5730
|
return /* @__PURE__ */ jsx64(
|
|
5727
5731
|
Input7,
|
|
@@ -5741,7 +5745,7 @@ var NumberEditor = ({
|
|
|
5741
5745
|
|
|
5742
5746
|
// src/components/SearchAndFilter/editors/NumberRangeEditor.tsx
|
|
5743
5747
|
import { Input as Input8 } from "@uniformdev/design-system";
|
|
5744
|
-
import { useEffect as useEffect16, useState as
|
|
5748
|
+
import { useEffect as useEffect16, useState as useState18 } from "react";
|
|
5745
5749
|
import { useDebounce as useDebounce5 } from "react-use";
|
|
5746
5750
|
import { Fragment as Fragment12, jsx as jsx65, jsxs as jsxs31 } from "@emotion/react/jsx-runtime";
|
|
5747
5751
|
var NumberRangeEditor = ({
|
|
@@ -5752,9 +5756,9 @@ var NumberRangeEditor = ({
|
|
|
5752
5756
|
readOnly,
|
|
5753
5757
|
valueTestId
|
|
5754
5758
|
}) => {
|
|
5755
|
-
const [minValue, setMinValue] =
|
|
5756
|
-
const [maxValue, setMaxValue] =
|
|
5757
|
-
const [error, setError] =
|
|
5759
|
+
const [minValue, setMinValue] = useState18("");
|
|
5760
|
+
const [maxValue, setMaxValue] = useState18("");
|
|
5761
|
+
const [error, setError] = useState18("");
|
|
5758
5762
|
useDebounce5(
|
|
5759
5763
|
() => {
|
|
5760
5764
|
if (minValue && maxValue && !error) {
|
|
@@ -5942,7 +5946,7 @@ var StatusSingleEditor = ({
|
|
|
5942
5946
|
|
|
5943
5947
|
// src/components/SearchAndFilter/editors/TextEditor.tsx
|
|
5944
5948
|
import { Input as Input9 } from "@uniformdev/design-system";
|
|
5945
|
-
import { useState as
|
|
5949
|
+
import { useState as useState19 } from "react";
|
|
5946
5950
|
import { useDebounce as useDebounce6 } from "react-use";
|
|
5947
5951
|
import { jsx as jsx69 } from "@emotion/react/jsx-runtime";
|
|
5948
5952
|
var TextEditor = ({
|
|
@@ -5952,7 +5956,7 @@ var TextEditor = ({
|
|
|
5952
5956
|
readOnly,
|
|
5953
5957
|
valueTestId
|
|
5954
5958
|
}) => {
|
|
5955
|
-
const [innerValue, setInnerValue] =
|
|
5959
|
+
const [innerValue, setInnerValue] = useState19(value != null ? value : "");
|
|
5956
5960
|
useDebounce6(() => onChange(innerValue), 500, [innerValue]);
|
|
5957
5961
|
return /* @__PURE__ */ jsx69(
|
|
5958
5962
|
Input9,
|
|
@@ -6316,7 +6320,7 @@ import { CgClose } from "@react-icons/all-files/cg/CgClose";
|
|
|
6316
6320
|
import { hasReferencedVariables as hasReferencedVariables2 } from "@uniformdev/canvas";
|
|
6317
6321
|
import { Icon as Icon3, InputKeywordSearch } from "@uniformdev/design-system";
|
|
6318
6322
|
import { CLEAR_EDITOR_COMMAND as CLEAR_EDITOR_COMMAND2 } from "lexical";
|
|
6319
|
-
import { useEffect as useEffect18, useRef as useRef9, useState as
|
|
6323
|
+
import { useEffect as useEffect18, useRef as useRef9, useState as useState21 } from "react";
|
|
6320
6324
|
import { useDebounce as useDebounce7 } from "react-use";
|
|
6321
6325
|
import { v4 as v42 } from "uuid";
|
|
6322
6326
|
|
|
@@ -6329,7 +6333,7 @@ import {
|
|
|
6329
6333
|
useDeferredValue as useDeferredValue2,
|
|
6330
6334
|
useEffect as useEffect17,
|
|
6331
6335
|
useMemo as useMemo20,
|
|
6332
|
-
useState as
|
|
6336
|
+
useState as useState20
|
|
6333
6337
|
} from "react";
|
|
6334
6338
|
|
|
6335
6339
|
// src/components/SearchAndFilter/FilterEditor.tsx
|
|
@@ -6443,9 +6447,9 @@ var SearchAndFilterProvider = ({
|
|
|
6443
6447
|
children,
|
|
6444
6448
|
allowBindingSearchTerm
|
|
6445
6449
|
}) => {
|
|
6446
|
-
const [searchTerm, setSearchTerm] =
|
|
6450
|
+
const [searchTerm, setSearchTerm] = useState20(defaultSearchTerm);
|
|
6447
6451
|
const deferredSearchTerm = useDeferredValue2(searchTerm);
|
|
6448
|
-
const [filterVisibility, setFilterVisibility] =
|
|
6452
|
+
const [filterVisibility, setFilterVisibility] = useState20(alwaysVisible || filterVisible);
|
|
6449
6453
|
const handleSearchTerm = useCallback6(
|
|
6450
6454
|
(term) => {
|
|
6451
6455
|
setSearchTerm(term);
|
|
@@ -6542,8 +6546,8 @@ var FilterControls = ({
|
|
|
6542
6546
|
} = useSearchAndFilter();
|
|
6543
6547
|
const editorRef = useRef9(null);
|
|
6544
6548
|
const variableRefernceCountInSearchTerm = hasReferencedVariables2(searchTerm);
|
|
6545
|
-
const [idToResetInputVariables, setIdToResetInputVariables] =
|
|
6546
|
-
const [localSearchTerm, setLocalSearchTerm] =
|
|
6549
|
+
const [idToResetInputVariables, setIdToResetInputVariables] = useState21("data-resource-search-term-input");
|
|
6550
|
+
const [localSearchTerm, setLocalSearchTerm] = useState21(searchTerm);
|
|
6547
6551
|
useDebounce7(
|
|
6548
6552
|
() => {
|
|
6549
6553
|
setSearchTerm(localSearchTerm);
|
|
@@ -7162,7 +7166,7 @@ var SearchAndFilter = ({
|
|
|
7162
7166
|
|
|
7163
7167
|
// src/components/SearchAndFilter/SearchOnlyFilter.tsx
|
|
7164
7168
|
import { InputKeywordSearch as InputKeywordSearch2 } from "@uniformdev/design-system";
|
|
7165
|
-
import { createContext as createContext7, useState as
|
|
7169
|
+
import { createContext as createContext7, useState as useState22 } from "react";
|
|
7166
7170
|
import { useDebounce as useDebounce8 } from "react-use";
|
|
7167
7171
|
import { jsx as jsx80 } from "@emotion/react/jsx-runtime";
|
|
7168
7172
|
var SearchOnlyContext = createContext7({
|
|
@@ -7172,7 +7176,7 @@ var SearchOnlyContext = createContext7({
|
|
|
7172
7176
|
});
|
|
7173
7177
|
var SearchOnlyFilter = ({ onSearchChange, maxWidth }) => {
|
|
7174
7178
|
const { searchTerm, setSearchTerm } = useSearchAndFilter();
|
|
7175
|
-
const [localeSearchTerm, setLocaleSearchTerm] =
|
|
7179
|
+
const [localeSearchTerm, setLocaleSearchTerm] = useState22("");
|
|
7176
7180
|
useDebounce8(
|
|
7177
7181
|
() => {
|
|
7178
7182
|
setSearchTerm(localeSearchTerm);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/mesh-sdk-react",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.47.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,10 +50,10 @@
|
|
|
50
50
|
"@lexical/selection": "0.25.0",
|
|
51
51
|
"@lexical/utils": "0.25.0",
|
|
52
52
|
"@react-icons/all-files": "https://github.com/react-icons/react-icons/releases/download/v5.5.0/react-icons-all-files-5.5.0.tgz",
|
|
53
|
-
"@uniformdev/canvas": "20.
|
|
54
|
-
"@uniformdev/design-system": "20.
|
|
55
|
-
"@uniformdev/mesh-sdk": "20.
|
|
56
|
-
"@uniformdev/richtext": "20.
|
|
53
|
+
"@uniformdev/canvas": "20.47.0",
|
|
54
|
+
"@uniformdev/design-system": "20.47.0",
|
|
55
|
+
"@uniformdev/mesh-sdk": "20.47.0",
|
|
56
|
+
"@uniformdev/richtext": "20.47.0",
|
|
57
57
|
"dequal": "^2.0.3",
|
|
58
58
|
"lexical": "0.25.0",
|
|
59
59
|
"mitt": "3.0.1",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"access": "public"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "446f701d32eee97220ab693e69b0952ed95cc1c5"
|
|
90
90
|
}
|