@uniformdev/mesh-sdk-react 20.50.2-alpha.39 → 20.50.2-alpha.77
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 +54 -3
- package/dist/index.d.ts +54 -3
- package/dist/index.esm.js +175 -89
- package/dist/index.js +252 -166
- package/dist/index.mjs +175 -89
- package/package.json +11 -10
package/dist/index.esm.js
CHANGED
|
@@ -2316,7 +2316,7 @@ function VariablesComposer(props) {
|
|
|
2316
2316
|
nodes: [VariableNode],
|
|
2317
2317
|
editorState: deserializeVariablesEditorState(props.value)
|
|
2318
2318
|
}),
|
|
2319
|
-
//
|
|
2319
|
+
// oxlint-disable-next-line react/exhaustive-deps
|
|
2320
2320
|
[]
|
|
2321
2321
|
);
|
|
2322
2322
|
const editorState = useRef5(void 0);
|
|
@@ -3904,7 +3904,36 @@ function convertRequestDataToDataType(dataType, requestData) {
|
|
|
3904
3904
|
}
|
|
3905
3905
|
|
|
3906
3906
|
// src/components/Delegation/DelegationGate.tsx
|
|
3907
|
-
import {
|
|
3907
|
+
import { Callout as Callout3, LoadingOverlay } from "@uniformdev/design-system";
|
|
3908
|
+
import { Fragment as Fragment10, jsx as jsx46, jsxs as jsxs21 } from "@emotion/react/jsx-runtime";
|
|
3909
|
+
var defaultLoadingWrapperStyle = {
|
|
3910
|
+
position: "relative",
|
|
3911
|
+
minHeight: "12rem",
|
|
3912
|
+
width: "100%"
|
|
3913
|
+
};
|
|
3914
|
+
function DefaultDelegationLoading() {
|
|
3915
|
+
return /* @__PURE__ */ jsx46("div", { style: defaultLoadingWrapperStyle, children: /* @__PURE__ */ jsx46(LoadingOverlay, { isActive: true, statusMessage: "Connecting to Uniform..." }) });
|
|
3916
|
+
}
|
|
3917
|
+
function DefaultDelegationDisabled() {
|
|
3918
|
+
return /* @__PURE__ */ jsx46(Callout3, { type: "caution", title: "Feature unavailable", children: "This app requires permissions that are not currently enabled. Please contact your Uniform administrator to enable identity delegation for this integration." });
|
|
3919
|
+
}
|
|
3920
|
+
function DefaultDelegationError({ error }) {
|
|
3921
|
+
return /* @__PURE__ */ jsxs21(Callout3, { type: "error", title: "Connection error", children: [
|
|
3922
|
+
/* @__PURE__ */ jsx46("p", { children: "Failed to establish a secure connection with Uniform." }),
|
|
3923
|
+
/* @__PURE__ */ jsx46(
|
|
3924
|
+
"pre",
|
|
3925
|
+
{
|
|
3926
|
+
style: {
|
|
3927
|
+
marginTop: 8,
|
|
3928
|
+
marginBottom: 0,
|
|
3929
|
+
whiteSpace: "pre-wrap",
|
|
3930
|
+
wordBreak: "break-word"
|
|
3931
|
+
},
|
|
3932
|
+
children: error.message
|
|
3933
|
+
}
|
|
3934
|
+
)
|
|
3935
|
+
] });
|
|
3936
|
+
}
|
|
3908
3937
|
function DelegationGate({
|
|
3909
3938
|
children,
|
|
3910
3939
|
loadingComponent,
|
|
@@ -3916,17 +3945,20 @@ function DelegationGate({
|
|
|
3916
3945
|
return /* @__PURE__ */ jsx46(Fragment10, { children });
|
|
3917
3946
|
}
|
|
3918
3947
|
if (status === "idle" || status === "acquiring") {
|
|
3919
|
-
return /* @__PURE__ */ jsx46(Fragment10, { children: loadingComponent
|
|
3948
|
+
return /* @__PURE__ */ jsx46(Fragment10, { children: loadingComponent !== void 0 ? loadingComponent : /* @__PURE__ */ jsx46(DefaultDelegationLoading, {}) });
|
|
3920
3949
|
}
|
|
3921
3950
|
if (status === "disabled") {
|
|
3922
|
-
return /* @__PURE__ */ jsx46(Fragment10, { children: disabledComponent
|
|
3951
|
+
return /* @__PURE__ */ jsx46(Fragment10, { children: disabledComponent !== void 0 ? disabledComponent : /* @__PURE__ */ jsx46(DefaultDelegationDisabled, {}) });
|
|
3923
3952
|
}
|
|
3924
3953
|
if (status === "error") {
|
|
3925
3954
|
const resolvedError = error != null ? error : new Error("Unknown delegation error");
|
|
3926
|
-
if (
|
|
3927
|
-
|
|
3955
|
+
if (errorComponent !== void 0) {
|
|
3956
|
+
if (typeof errorComponent === "function") {
|
|
3957
|
+
return /* @__PURE__ */ jsx46(Fragment10, { children: errorComponent({ error: resolvedError }) });
|
|
3958
|
+
}
|
|
3959
|
+
return /* @__PURE__ */ jsx46(Fragment10, { children: errorComponent });
|
|
3928
3960
|
}
|
|
3929
|
-
return /* @__PURE__ */ jsx46(
|
|
3961
|
+
return /* @__PURE__ */ jsx46(DefaultDelegationError, { error: resolvedError });
|
|
3930
3962
|
}
|
|
3931
3963
|
return null;
|
|
3932
3964
|
}
|
|
@@ -3934,11 +3966,21 @@ function DelegationGate({
|
|
|
3934
3966
|
// src/components/Delegation/DelegationProvider.tsx
|
|
3935
3967
|
import { useCallback as useCallback5, useEffect as useEffect12, useMemo as useMemo12, useRef as useRef7, useState as useState11 } from "react";
|
|
3936
3968
|
import { jsx as jsx47 } from "@emotion/react/jsx-runtime";
|
|
3937
|
-
|
|
3969
|
+
var DEFAULT_REVALIDATE_AFTER_MS = 5 * 60 * 1e3;
|
|
3970
|
+
function DelegationProvider({
|
|
3971
|
+
sdk,
|
|
3972
|
+
onSessionToken,
|
|
3973
|
+
checkActive,
|
|
3974
|
+
revalidateOnFocus = true,
|
|
3975
|
+
revalidateAfterMs = DEFAULT_REVALIDATE_AFTER_MS,
|
|
3976
|
+
children
|
|
3977
|
+
}) {
|
|
3938
3978
|
const [status, setStatus] = useState11("idle");
|
|
3939
3979
|
const [error, setError] = useState11(null);
|
|
3940
3980
|
const acquiringRef = useRef7(false);
|
|
3941
3981
|
const mountedRef = useRef7(true);
|
|
3982
|
+
const statusRef = useRef7("idle");
|
|
3983
|
+
statusRef.current = status;
|
|
3942
3984
|
const acquire = useCallback5(async () => {
|
|
3943
3985
|
if (acquiringRef.current) {
|
|
3944
3986
|
return;
|
|
@@ -3985,6 +4027,50 @@ function DelegationProvider({ sdk, onSessionToken, checkActive, children }) {
|
|
|
3985
4027
|
mountedRef.current = false;
|
|
3986
4028
|
};
|
|
3987
4029
|
}, [acquire]);
|
|
4030
|
+
const revalidate = useCallback5(async () => {
|
|
4031
|
+
if (acquiringRef.current) {
|
|
4032
|
+
return;
|
|
4033
|
+
}
|
|
4034
|
+
if (statusRef.current !== "active") {
|
|
4035
|
+
return;
|
|
4036
|
+
}
|
|
4037
|
+
try {
|
|
4038
|
+
const isActive = await checkActive();
|
|
4039
|
+
if (!mountedRef.current) {
|
|
4040
|
+
return;
|
|
4041
|
+
}
|
|
4042
|
+
if (!isActive) {
|
|
4043
|
+
void acquire();
|
|
4044
|
+
}
|
|
4045
|
+
} catch (e) {
|
|
4046
|
+
}
|
|
4047
|
+
}, [checkActive, acquire]);
|
|
4048
|
+
useEffect12(() => {
|
|
4049
|
+
if (!revalidateOnFocus) {
|
|
4050
|
+
return;
|
|
4051
|
+
}
|
|
4052
|
+
if (typeof document === "undefined") {
|
|
4053
|
+
return;
|
|
4054
|
+
}
|
|
4055
|
+
let hiddenAt = document.visibilityState === "hidden" ? Date.now() : null;
|
|
4056
|
+
const handleVisibilityChange = () => {
|
|
4057
|
+
if (document.visibilityState === "hidden") {
|
|
4058
|
+
hiddenAt = Date.now();
|
|
4059
|
+
return;
|
|
4060
|
+
}
|
|
4061
|
+
if (document.visibilityState === "visible") {
|
|
4062
|
+
const elapsed = hiddenAt === null ? 0 : Date.now() - hiddenAt;
|
|
4063
|
+
hiddenAt = null;
|
|
4064
|
+
if (elapsed >= revalidateAfterMs) {
|
|
4065
|
+
void revalidate();
|
|
4066
|
+
}
|
|
4067
|
+
}
|
|
4068
|
+
};
|
|
4069
|
+
document.addEventListener("visibilitychange", handleVisibilityChange);
|
|
4070
|
+
return () => {
|
|
4071
|
+
document.removeEventListener("visibilitychange", handleVisibilityChange);
|
|
4072
|
+
};
|
|
4073
|
+
}, [revalidateOnFocus, revalidateAfterMs, revalidate]);
|
|
3988
4074
|
const reacquire = useCallback5(() => {
|
|
3989
4075
|
void acquire();
|
|
3990
4076
|
}, [acquire]);
|
|
@@ -3993,7 +4079,7 @@ function DelegationProvider({ sdk, onSessionToken, checkActive, children }) {
|
|
|
3993
4079
|
}
|
|
3994
4080
|
|
|
3995
4081
|
// src/components/MeshApp.tsx
|
|
3996
|
-
import { LoadingIndicator as LoadingIndicator2, Theme as Theme2 } from "@uniformdev/design-system";
|
|
4082
|
+
import { IconsProvider, LoadingIndicator as LoadingIndicator2, Theme as Theme2 } from "@uniformdev/design-system";
|
|
3997
4083
|
|
|
3998
4084
|
// src/hooks/useInitializeUniformMeshSdk.ts
|
|
3999
4085
|
import { initializeUniformMeshSDK } from "@uniformdev/mesh-sdk";
|
|
@@ -4020,7 +4106,7 @@ var useInitializeUniformMeshSdk = ({ autoResizingDisabled } = {}) => {
|
|
|
4020
4106
|
setSdk(window.UniformMeshSDK);
|
|
4021
4107
|
}
|
|
4022
4108
|
},
|
|
4023
|
-
//
|
|
4109
|
+
// oxlint-disable-next-line react/exhaustive-deps
|
|
4024
4110
|
[autoResizingDisabled]
|
|
4025
4111
|
);
|
|
4026
4112
|
return {
|
|
@@ -4035,7 +4121,7 @@ var useInitializeUniformMeshSdk = ({ autoResizingDisabled } = {}) => {
|
|
|
4035
4121
|
};
|
|
4036
4122
|
|
|
4037
4123
|
// src/components/MeshApp.tsx
|
|
4038
|
-
import { jsx as jsx48, jsxs as
|
|
4124
|
+
import { jsx as jsx48, jsxs as jsxs22 } from "@emotion/react/jsx-runtime";
|
|
4039
4125
|
var MeshApp = ({
|
|
4040
4126
|
children,
|
|
4041
4127
|
loadingComponent,
|
|
@@ -4053,23 +4139,23 @@ var MeshApp = ({
|
|
|
4053
4139
|
}
|
|
4054
4140
|
throw error;
|
|
4055
4141
|
}
|
|
4056
|
-
return /* @__PURE__ */
|
|
4142
|
+
return /* @__PURE__ */ jsxs22(UniformMeshSdkContext.Provider, { value: { sdk }, children: [
|
|
4057
4143
|
/* @__PURE__ */ jsx48(Theme2, {}),
|
|
4058
|
-
/* @__PURE__ */ jsx48(UniformMeshLocationContextProvider, { children })
|
|
4144
|
+
/* @__PURE__ */ jsx48(IconsProvider, { children: /* @__PURE__ */ jsx48(UniformMeshLocationContextProvider, { children }) })
|
|
4059
4145
|
] });
|
|
4060
4146
|
};
|
|
4061
4147
|
|
|
4062
4148
|
// src/components/ObjectSearch/DataRefreshButton.tsx
|
|
4063
4149
|
import { css as css14 } from "@emotion/react";
|
|
4064
4150
|
import { Button as Button2, LoadingIndicator as LoadingIndicator3 } from "@uniformdev/design-system";
|
|
4065
|
-
import { jsx as jsx49, jsxs as
|
|
4151
|
+
import { jsx as jsx49, jsxs as jsxs23 } from "@emotion/react/jsx-runtime";
|
|
4066
4152
|
var DataRefreshButton = ({
|
|
4067
4153
|
buttonText,
|
|
4068
4154
|
isLoading,
|
|
4069
4155
|
onRefreshData,
|
|
4070
4156
|
...props
|
|
4071
4157
|
}) => {
|
|
4072
|
-
return /* @__PURE__ */
|
|
4158
|
+
return /* @__PURE__ */ jsxs23(Button2, { buttonType: "ghost", onClick: onRefreshData, disabled: isLoading, ...props, children: [
|
|
4073
4159
|
!isLoading ? null : /* @__PURE__ */ jsx49(
|
|
4074
4160
|
LoadingIndicator3,
|
|
4075
4161
|
{
|
|
@@ -4085,7 +4171,7 @@ var DataRefreshButton = ({
|
|
|
4085
4171
|
// src/components/ObjectSearch/ObjectSearchContainer.tsx
|
|
4086
4172
|
import { css as css16 } from "@emotion/react";
|
|
4087
4173
|
import { bindVariables } from "@uniformdev/canvas";
|
|
4088
|
-
import { Callout as
|
|
4174
|
+
import { Callout as Callout4, Container, ScrollableList, VerticalRhythm as VerticalRhythm3 } from "@uniformdev/design-system";
|
|
4089
4175
|
|
|
4090
4176
|
// src/components/ObjectSearch/hooks/ObjectSearchContext.tsx
|
|
4091
4177
|
import { bindVariablesToObject as bindVariablesToObject2 } from "@uniformdev/canvas";
|
|
@@ -4284,7 +4370,7 @@ var ObjectListItemUnControlledContent = css15`
|
|
|
4284
4370
|
`;
|
|
4285
4371
|
|
|
4286
4372
|
// src/components/ObjectSearch/ObjectSearchListItem.tsx
|
|
4287
|
-
import { jsx as jsx51, jsxs as
|
|
4373
|
+
import { jsx as jsx51, jsxs as jsxs24 } from "@emotion/react/jsx-runtime";
|
|
4288
4374
|
var ObjectSearchListItem = ({
|
|
4289
4375
|
id,
|
|
4290
4376
|
title,
|
|
@@ -4309,7 +4395,7 @@ var ObjectSearchListItem = ({
|
|
|
4309
4395
|
return onSelectItem([selectedItem]);
|
|
4310
4396
|
};
|
|
4311
4397
|
const selected = selectedListItems.some((item) => item.id === id);
|
|
4312
|
-
return /* @__PURE__ */
|
|
4398
|
+
return /* @__PURE__ */ jsxs24(
|
|
4313
4399
|
"div",
|
|
4314
4400
|
{
|
|
4315
4401
|
role: "listitem",
|
|
@@ -4317,7 +4403,7 @@ var ObjectSearchListItem = ({
|
|
|
4317
4403
|
"data-testid": "list-item",
|
|
4318
4404
|
...props,
|
|
4319
4405
|
children: [
|
|
4320
|
-
/* @__PURE__ */
|
|
4406
|
+
/* @__PURE__ */ jsxs24(
|
|
4321
4407
|
"div",
|
|
4322
4408
|
{
|
|
4323
4409
|
role: "button",
|
|
@@ -4334,14 +4420,14 @@ var ObjectSearchListItem = ({
|
|
|
4334
4420
|
loading: "lazy"
|
|
4335
4421
|
}
|
|
4336
4422
|
) : null,
|
|
4337
|
-
/* @__PURE__ */
|
|
4423
|
+
/* @__PURE__ */ jsxs24("div", { role: "heading", css: ObjectListItemHeadingGroup, children: [
|
|
4338
4424
|
!contentType ? null : /* @__PURE__ */ jsx51("span", { css: ObjectListItemSubtitle, children: formatedContentType }),
|
|
4339
4425
|
/* @__PURE__ */ jsx51("span", { css: ObjectListItemTitle, "data-testid": "title", children: title })
|
|
4340
4426
|
] })
|
|
4341
4427
|
]
|
|
4342
4428
|
}
|
|
4343
4429
|
),
|
|
4344
|
-
/* @__PURE__ */
|
|
4430
|
+
/* @__PURE__ */ jsxs24("div", { css: ObjectListItemInfoContainer, children: [
|
|
4345
4431
|
selected ? /* @__PURE__ */ jsx51(Chip, { text: "selected", size: "xs" }) : null,
|
|
4346
4432
|
!popoverData ? null : /* @__PURE__ */ jsx51(Popover, { ariaLabel: title, buttonText: `See ${title} details`, children: popoverData })
|
|
4347
4433
|
] }),
|
|
@@ -4355,7 +4441,7 @@ var ObjectSearchListItemLoadingSkeleton = () => {
|
|
|
4355
4441
|
};
|
|
4356
4442
|
|
|
4357
4443
|
// src/components/ObjectSearch/ObjectSearchContainer.tsx
|
|
4358
|
-
import { jsx as jsx52, jsxs as
|
|
4444
|
+
import { jsx as jsx52, jsxs as jsxs25 } from "@emotion/react/jsx-runtime";
|
|
4359
4445
|
var ObjectSearchContainer = ({
|
|
4360
4446
|
label,
|
|
4361
4447
|
enableDynamicInputToResultId,
|
|
@@ -4379,7 +4465,7 @@ var ObjectSearchContainer = ({
|
|
|
4379
4465
|
children: /* @__PURE__ */ jsx52(DefaultResultList, {})
|
|
4380
4466
|
}
|
|
4381
4467
|
);
|
|
4382
|
-
const body = /* @__PURE__ */
|
|
4468
|
+
const body = /* @__PURE__ */ jsxs25(VerticalRhythm3, { children: [
|
|
4383
4469
|
searchFilters,
|
|
4384
4470
|
listItems
|
|
4385
4471
|
] });
|
|
@@ -4410,7 +4496,7 @@ var ObjectSearchContainer = ({
|
|
|
4410
4496
|
}
|
|
4411
4497
|
]);
|
|
4412
4498
|
};
|
|
4413
|
-
return /* @__PURE__ */
|
|
4499
|
+
return /* @__PURE__ */ jsxs25(VerticalRhythm3, { children: [
|
|
4414
4500
|
/* @__PURE__ */ jsx52(Container, { backgroundColor: "gray-50", padding: "var(--spacing-base)", border: true, children: label ? /* @__PURE__ */ jsx52(
|
|
4415
4501
|
InputVariables,
|
|
4416
4502
|
{
|
|
@@ -4436,7 +4522,7 @@ var DefaultResultList = () => {
|
|
|
4436
4522
|
return Array.from(Array(5).keys()).map((i) => /* @__PURE__ */ jsx52(ObjectSearchListItemLoadingSkeleton, {}, i));
|
|
4437
4523
|
}
|
|
4438
4524
|
if (list.items.length === 0) {
|
|
4439
|
-
return /* @__PURE__ */ jsx52(
|
|
4525
|
+
return /* @__PURE__ */ jsx52(Callout4, { type: "info", children: "No results were found" });
|
|
4440
4526
|
}
|
|
4441
4527
|
return (_a = list.items) == null ? void 0 : _a.map((item) => /* @__PURE__ */ jsx52(ObjectSearchListItem, { ...item }, item.id));
|
|
4442
4528
|
};
|
|
@@ -4466,7 +4552,7 @@ var ObjectSearchFilterGrid = (gridColumns) => css17`
|
|
|
4466
4552
|
`;
|
|
4467
4553
|
|
|
4468
4554
|
// src/components/ObjectSearch/ObjectSearchFilter.tsx
|
|
4469
|
-
import { jsx as jsx53, jsxs as
|
|
4555
|
+
import { jsx as jsx53, jsxs as jsxs26 } from "@emotion/react/jsx-runtime";
|
|
4470
4556
|
var ObjectSearchFilter = ({
|
|
4471
4557
|
requireContentType,
|
|
4472
4558
|
typeSelectorAllTypesOptionText = "All content types",
|
|
@@ -4497,7 +4583,7 @@ var ObjectSearchFilter = ({
|
|
|
4497
4583
|
];
|
|
4498
4584
|
}, [requireContentType, typeSelectorAllTypesOptionText, selectOptions]);
|
|
4499
4585
|
const shouldRenderSelect = memoizedSelectOptions.length > 0;
|
|
4500
|
-
return /* @__PURE__ */
|
|
4586
|
+
return /* @__PURE__ */ jsxs26(
|
|
4501
4587
|
"fieldset",
|
|
4502
4588
|
{
|
|
4503
4589
|
css: [
|
|
@@ -4585,13 +4671,13 @@ var ButtonIcon = css18`
|
|
|
4585
4671
|
`;
|
|
4586
4672
|
|
|
4587
4673
|
// src/components/ObjectSearch/ObjectSearchResultItemButton.tsx
|
|
4588
|
-
import { jsx as jsx56, jsxs as
|
|
4674
|
+
import { jsx as jsx56, jsxs as jsxs27 } from "@emotion/react/jsx-runtime";
|
|
4589
4675
|
var ObjectSearchResultItemButton = ({
|
|
4590
4676
|
text,
|
|
4591
4677
|
icon,
|
|
4592
4678
|
...props
|
|
4593
4679
|
}) => {
|
|
4594
|
-
return /* @__PURE__ */
|
|
4680
|
+
return /* @__PURE__ */ jsxs27("button", { type: "button", css: ButtonStyles, ...props, children: [
|
|
4595
4681
|
!icon ? null : /* @__PURE__ */ jsx56(Image, { src: icon, css: ButtonIcon }),
|
|
4596
4682
|
text
|
|
4597
4683
|
] });
|
|
@@ -4601,7 +4687,7 @@ var LinkButton = ({
|
|
|
4601
4687
|
icon,
|
|
4602
4688
|
...props
|
|
4603
4689
|
}) => {
|
|
4604
|
-
return /* @__PURE__ */
|
|
4690
|
+
return /* @__PURE__ */ jsxs27("a", { ...props, css: ButtonStyles, target: "_blank", rel: "noopener noreferrer", children: [
|
|
4605
4691
|
!icon ? null : /* @__PURE__ */ jsx56(Image, { src: icon, css: ButtonIcon }),
|
|
4606
4692
|
text
|
|
4607
4693
|
] });
|
|
@@ -4674,7 +4760,7 @@ var ObjectSearchImage = css19`
|
|
|
4674
4760
|
`;
|
|
4675
4761
|
|
|
4676
4762
|
// src/components/ObjectSearch/ObjectSearchResultItem.tsx
|
|
4677
|
-
import { jsx as jsx57, jsxs as
|
|
4763
|
+
import { jsx as jsx57, jsxs as jsxs28 } from "@emotion/react/jsx-runtime";
|
|
4678
4764
|
var ObjectSearchResultItem = ({
|
|
4679
4765
|
id,
|
|
4680
4766
|
title,
|
|
@@ -4698,9 +4784,9 @@ var ObjectSearchResultItem = ({
|
|
|
4698
4784
|
onSelectItem({ id, title: id });
|
|
4699
4785
|
onRemove == null ? void 0 : onRemove();
|
|
4700
4786
|
};
|
|
4701
|
-
return /* @__PURE__ */
|
|
4787
|
+
return /* @__PURE__ */ jsxs28("div", { css: ObjectSearchResultItemContainer, "data-testid": "search-result-item", children: [
|
|
4702
4788
|
disableDnD ? null : /* @__PURE__ */ jsx57("div", { role: "presentation", className: "drag-handle", css: ObjectSearchDragHandle }),
|
|
4703
|
-
/* @__PURE__ */ jsx57("div", { children: /* @__PURE__ */
|
|
4789
|
+
/* @__PURE__ */ jsx57("div", { children: /* @__PURE__ */ jsxs28("div", { css: ObjectSearchContentContainer, children: [
|
|
4704
4790
|
!imageUrl ? null : /* @__PURE__ */ jsx57(
|
|
4705
4791
|
"img",
|
|
4706
4792
|
{
|
|
@@ -4710,9 +4796,9 @@ var ObjectSearchResultItem = ({
|
|
|
4710
4796
|
loading: "lazy"
|
|
4711
4797
|
}
|
|
4712
4798
|
),
|
|
4713
|
-
/* @__PURE__ */
|
|
4799
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
4714
4800
|
/* @__PURE__ */ jsx57("span", { css: ObjectSearchResultItemSubtitle, "data-testid": "sub-title", children: formatedContentType }),
|
|
4715
|
-
/* @__PURE__ */
|
|
4801
|
+
/* @__PURE__ */ jsxs28("span", { role: "heading", css: ObjectSearchResultItemTitle, "data-testid": "title", children: [
|
|
4716
4802
|
onClick ? /* @__PURE__ */ jsx57(
|
|
4717
4803
|
Link,
|
|
4718
4804
|
{
|
|
@@ -4728,14 +4814,14 @@ var ObjectSearchResultItem = ({
|
|
|
4728
4814
|
) : /* @__PURE__ */ jsx57("span", { children: title != null ? title : name }),
|
|
4729
4815
|
!popoverData ? null : /* @__PURE__ */ jsx57(Popover2, { ariaLabel: title, buttonText: `See ${title} details`, children: popoverData })
|
|
4730
4816
|
] }),
|
|
4731
|
-
!createdAt && !publishStatus ? null : /* @__PURE__ */
|
|
4817
|
+
!createdAt && !publishStatus ? null : /* @__PURE__ */ jsxs28("div", { css: ObjectSearchAuthorStateGroup, children: [
|
|
4732
4818
|
!(publishStatus == null ? void 0 : publishStatus.text) ? null : /* @__PURE__ */ jsx57(Chip2, { theme: legacyThemeMapper(publishStatus.theme), text: publishStatus.text, size: "xs" }),
|
|
4733
|
-
!createdAt && !publishedAt ? null : /* @__PURE__ */
|
|
4734
|
-
!createdAt ? null : /* @__PURE__ */
|
|
4819
|
+
!createdAt && !publishedAt ? null : /* @__PURE__ */ jsxs28("div", { css: ObjectSearchUpdateGroup, children: [
|
|
4820
|
+
!createdAt ? null : /* @__PURE__ */ jsxs28("small", { css: ObjectSearchResultItemTimeStamp, children: [
|
|
4735
4821
|
/* @__PURE__ */ jsx57("strong", { children: "Last updated: " }),
|
|
4736
4822
|
timeagoFormat(createdAt)
|
|
4737
4823
|
] }),
|
|
4738
|
-
!publishedAt ? null : /* @__PURE__ */
|
|
4824
|
+
!publishedAt ? null : /* @__PURE__ */ jsxs28("small", { css: ObjectSearchResultItemTimeStamp, children: [
|
|
4739
4825
|
/* @__PURE__ */ jsx57("strong", { children: "Last published: " }),
|
|
4740
4826
|
timeagoFormat(publishedAt)
|
|
4741
4827
|
] })
|
|
@@ -4744,7 +4830,7 @@ var ObjectSearchResultItem = ({
|
|
|
4744
4830
|
/* @__PURE__ */ jsx57("div", { children })
|
|
4745
4831
|
] })
|
|
4746
4832
|
] }) }),
|
|
4747
|
-
!editLink && hideRemoveButton ? null : /* @__PURE__ */
|
|
4833
|
+
!editLink && hideRemoveButton ? null : /* @__PURE__ */ jsxs28("div", { css: ObjectSearchAuthorStateGroup, children: [
|
|
4748
4834
|
!editLink ? null : /* @__PURE__ */ jsx57(LinkButton, { text: "Edit", href: editLink, icon: editLinkIcon }),
|
|
4749
4835
|
hideRemoveButton ? null : /* @__PURE__ */ jsx57(Button3, { buttonType: "ghostDestructive", onClick: onRemoveItem, children: "Remove" })
|
|
4750
4836
|
] })
|
|
@@ -4798,7 +4884,7 @@ var ObjectSearchResultListTitle = css20`
|
|
|
4798
4884
|
`;
|
|
4799
4885
|
|
|
4800
4886
|
// src/components/ObjectSearch/ObjectSearchResultList.tsx
|
|
4801
|
-
import { Fragment as Fragment11, jsx as jsx58, jsxs as
|
|
4887
|
+
import { Fragment as Fragment11, jsx as jsx58, jsxs as jsxs29 } from "@emotion/react/jsx-runtime";
|
|
4802
4888
|
var DroppableHack2 = Droppable2;
|
|
4803
4889
|
var DraggableHack2 = Draggable2;
|
|
4804
4890
|
function ObjectSearchResultList({
|
|
@@ -4850,14 +4936,14 @@ function ObjectSearchResultList({
|
|
|
4850
4936
|
}
|
|
4851
4937
|
);
|
|
4852
4938
|
};
|
|
4853
|
-
return /* @__PURE__ */
|
|
4854
|
-
/* @__PURE__ */
|
|
4855
|
-
!resultLabelOverride ? /* @__PURE__ */
|
|
4939
|
+
return /* @__PURE__ */ jsxs29(Fragment11, { children: [
|
|
4940
|
+
/* @__PURE__ */ jsxs29("div", { role: "group", css: ObjectSearchResultListContainer, children: [
|
|
4941
|
+
!resultLabelOverride ? /* @__PURE__ */ jsxs29("div", { role: "note", css: ObjectSearchResultListCounterContainer, children: [
|
|
4856
4942
|
/* @__PURE__ */ jsx58("span", { css: ObjectSearchResultListTitle, children: resultLabelText }),
|
|
4857
4943
|
" ",
|
|
4858
4944
|
!selectedListItems.length ? null : /* @__PURE__ */ jsx58(Counter, { count: selectedListItems.length })
|
|
4859
4945
|
] }) : resultLabelOverride,
|
|
4860
|
-
/* @__PURE__ */
|
|
4946
|
+
/* @__PURE__ */ jsxs29("div", { css: ObjectSearchResultListCounterContainer, children: [
|
|
4861
4947
|
additionalButtons,
|
|
4862
4948
|
hideRemoveButton ? null : /* @__PURE__ */ jsx58(
|
|
4863
4949
|
Button4,
|
|
@@ -4877,7 +4963,7 @@ function ObjectSearchResultList({
|
|
|
4877
4963
|
droppableId: multiSelectId != null ? multiSelectId : "canvas-multi-select",
|
|
4878
4964
|
renderClone: getContainerForDnDReparenting ? getDraggableItem : void 0,
|
|
4879
4965
|
getContainerForClone: getContainerForDnDReparenting,
|
|
4880
|
-
children: (provided) => /* @__PURE__ */
|
|
4966
|
+
children: (provided) => /* @__PURE__ */ jsxs29("div", { ...provided.droppableProps, ref: provided.innerRef, children: [
|
|
4881
4967
|
selectedListItems.map((item, i) => {
|
|
4882
4968
|
return /* @__PURE__ */ jsx58(
|
|
4883
4969
|
DraggableHack2,
|
|
@@ -4900,7 +4986,7 @@ function ObjectSearchResultList({
|
|
|
4900
4986
|
// src/components/ObjectSearch/QueryFilter.tsx
|
|
4901
4987
|
import { DebouncedInputKeywordSearch as DebouncedInputKeywordSearch2, Input as Input4, InputSelect as InputSelect4, VerticalRhythm as VerticalRhythm4 } from "@uniformdev/design-system";
|
|
4902
4988
|
import { useEffect as useEffect14, useState as useState15 } from "react";
|
|
4903
|
-
import { jsx as jsx59, jsxs as
|
|
4989
|
+
import { jsx as jsx59, jsxs as jsxs30 } from "@emotion/react/jsx-runtime";
|
|
4904
4990
|
var QueryFilter = ({
|
|
4905
4991
|
requireContentType,
|
|
4906
4992
|
queryFilterTitle = "Configure Query",
|
|
@@ -4942,9 +5028,9 @@ var QueryFilter = ({
|
|
|
4942
5028
|
useEffect14(() => {
|
|
4943
5029
|
onSetQuery(queryState);
|
|
4944
5030
|
}, []);
|
|
4945
|
-
return /* @__PURE__ */
|
|
5031
|
+
return /* @__PURE__ */ jsxs30("fieldset", { children: [
|
|
4946
5032
|
/* @__PURE__ */ jsx59("span", { css: ObjectSearchFilterContainerLabel, children: queryFilterTitle }),
|
|
4947
|
-
/* @__PURE__ */ jsx59("div", { css: ObjectSearchFilterContainer, children: /* @__PURE__ */
|
|
5033
|
+
/* @__PURE__ */ jsx59("div", { css: ObjectSearchFilterContainer, children: /* @__PURE__ */ jsxs30(VerticalRhythm4, { children: [
|
|
4948
5034
|
/* @__PURE__ */ jsx59(
|
|
4949
5035
|
InputVariables,
|
|
4950
5036
|
{
|
|
@@ -4967,7 +5053,7 @@ var QueryFilter = ({
|
|
|
4967
5053
|
)
|
|
4968
5054
|
}
|
|
4969
5055
|
),
|
|
4970
|
-
/* @__PURE__ */
|
|
5056
|
+
/* @__PURE__ */ jsxs30("div", { css: ObjectSearchFilterGrid("1fr 100px"), children: [
|
|
4971
5057
|
/* @__PURE__ */ jsx59(
|
|
4972
5058
|
InputVariables,
|
|
4973
5059
|
{
|
|
@@ -5014,7 +5100,7 @@ var QueryFilter = ({
|
|
|
5014
5100
|
}
|
|
5015
5101
|
)
|
|
5016
5102
|
] }),
|
|
5017
|
-
/* @__PURE__ */
|
|
5103
|
+
/* @__PURE__ */ jsxs30("div", { css: ObjectSearchFilterGrid("2fr 1fr"), children: [
|
|
5018
5104
|
/* @__PURE__ */ jsx59(
|
|
5019
5105
|
InputVariables,
|
|
5020
5106
|
{
|
|
@@ -5616,7 +5702,7 @@ var twoColumnGrid = {
|
|
|
5616
5702
|
};
|
|
5617
5703
|
|
|
5618
5704
|
// src/components/SearchAndFilter/editors/DateRangeEditor.tsx
|
|
5619
|
-
import { Fragment as Fragment12, jsx as jsx63, jsxs as
|
|
5705
|
+
import { Fragment as Fragment12, jsx as jsx63, jsxs as jsxs31 } from "@emotion/react/jsx-runtime";
|
|
5620
5706
|
var DateRangeEditor = ({
|
|
5621
5707
|
ariaLabel,
|
|
5622
5708
|
onChange,
|
|
@@ -5674,8 +5760,8 @@ var DateRangeEditor = ({
|
|
|
5674
5760
|
setMaxDateValue("");
|
|
5675
5761
|
}
|
|
5676
5762
|
}, [minDateValue, maxDateValue, setError]);
|
|
5677
|
-
return /* @__PURE__ */
|
|
5678
|
-
/* @__PURE__ */
|
|
5763
|
+
return /* @__PURE__ */ jsxs31(Fragment12, { children: [
|
|
5764
|
+
/* @__PURE__ */ jsxs31("div", { css: twoColumnGrid, "data-testid": valueTestId, children: [
|
|
5679
5765
|
/* @__PURE__ */ jsx63(
|
|
5680
5766
|
Input6,
|
|
5681
5767
|
{
|
|
@@ -5855,7 +5941,7 @@ var NumberEditor = ({
|
|
|
5855
5941
|
import { Input as Input8 } from "@uniformdev/design-system";
|
|
5856
5942
|
import { useEffect as useEffect17, useState as useState19 } from "react";
|
|
5857
5943
|
import { useDebounce as useDebounce5 } from "react-use";
|
|
5858
|
-
import { Fragment as Fragment13, jsx as jsx67, jsxs as
|
|
5944
|
+
import { Fragment as Fragment13, jsx as jsx67, jsxs as jsxs32 } from "@emotion/react/jsx-runtime";
|
|
5859
5945
|
var NumberRangeEditor = ({
|
|
5860
5946
|
onChange,
|
|
5861
5947
|
disabled,
|
|
@@ -5900,8 +5986,8 @@ var NumberRangeEditor = ({
|
|
|
5900
5986
|
setMaxValue(maxValue);
|
|
5901
5987
|
}
|
|
5902
5988
|
}, [maxValue, minValue, setError]);
|
|
5903
|
-
return /* @__PURE__ */
|
|
5904
|
-
/* @__PURE__ */
|
|
5989
|
+
return /* @__PURE__ */ jsxs32(Fragment13, { children: [
|
|
5990
|
+
/* @__PURE__ */ jsxs32("div", { css: twoColumnGrid, "data-testid": valueTestId, children: [
|
|
5905
5991
|
/* @__PURE__ */ jsx67(
|
|
5906
5992
|
Input8,
|
|
5907
5993
|
{
|
|
@@ -6394,7 +6480,7 @@ var SearchAndFilterAdditionalContainer = css21`
|
|
|
6394
6480
|
`;
|
|
6395
6481
|
|
|
6396
6482
|
// src/components/SearchAndFilter/FilterButton.tsx
|
|
6397
|
-
import { jsx as jsx73, jsxs as
|
|
6483
|
+
import { jsx as jsx73, jsxs as jsxs33 } from "@emotion/react/jsx-runtime";
|
|
6398
6484
|
var FilterButton2 = ({
|
|
6399
6485
|
text = "Filters",
|
|
6400
6486
|
icon = customIcons["filter-add"],
|
|
@@ -6404,7 +6490,7 @@ var FilterButton2 = ({
|
|
|
6404
6490
|
showDropdownIcon,
|
|
6405
6491
|
...props
|
|
6406
6492
|
}) => {
|
|
6407
|
-
return /* @__PURE__ */
|
|
6493
|
+
return /* @__PURE__ */ jsxs33(
|
|
6408
6494
|
"button",
|
|
6409
6495
|
{
|
|
6410
6496
|
type: "button",
|
|
@@ -6644,7 +6730,7 @@ var useSearchAndFilter = () => {
|
|
|
6644
6730
|
};
|
|
6645
6731
|
|
|
6646
6732
|
// src/components/SearchAndFilter/FilterControls.tsx
|
|
6647
|
-
import { Fragment as Fragment14, jsx as jsx76, jsxs as
|
|
6733
|
+
import { Fragment as Fragment14, jsx as jsx76, jsxs as jsxs34 } from "@emotion/react/jsx-runtime";
|
|
6648
6734
|
var FilterControls = ({
|
|
6649
6735
|
children,
|
|
6650
6736
|
hideSearchInput
|
|
@@ -6674,7 +6760,7 @@ var FilterControls = ({
|
|
|
6674
6760
|
setIdToResetInputVariables(`data-resource-search-term-input-${v42()}`);
|
|
6675
6761
|
}
|
|
6676
6762
|
}, [searchTerm]);
|
|
6677
|
-
return /* @__PURE__ */
|
|
6763
|
+
return /* @__PURE__ */ jsxs34(Fragment14, { children: [
|
|
6678
6764
|
/* @__PURE__ */ jsx76(
|
|
6679
6765
|
FilterButton2,
|
|
6680
6766
|
{
|
|
@@ -6688,7 +6774,7 @@ var FilterControls = ({
|
|
|
6688
6774
|
dataTestId: "filters-button"
|
|
6689
6775
|
}
|
|
6690
6776
|
),
|
|
6691
|
-
hideSearchInput ? null : /* @__PURE__ */
|
|
6777
|
+
hideSearchInput ? null : /* @__PURE__ */ jsxs34("div", { css: BindableKeywordSearchInputStyles, "data-testid": "search-container", children: [
|
|
6692
6778
|
/* @__PURE__ */ jsx76(
|
|
6693
6779
|
InputVariables,
|
|
6694
6780
|
{
|
|
@@ -6752,7 +6838,7 @@ function isFilterBindable(filter, operator) {
|
|
|
6752
6838
|
}
|
|
6753
6839
|
|
|
6754
6840
|
// src/components/SearchAndFilter/FilterItem.tsx
|
|
6755
|
-
import { jsx as jsx77, jsxs as
|
|
6841
|
+
import { jsx as jsx77, jsxs as jsxs35 } from "@emotion/react/jsx-runtime";
|
|
6756
6842
|
var FilterItem = ({
|
|
6757
6843
|
index,
|
|
6758
6844
|
operatorOptions,
|
|
@@ -6800,9 +6886,9 @@ var FilterItem = ({
|
|
|
6800
6886
|
} : {};
|
|
6801
6887
|
const CustomLeftHandComponent = selectedFieldValue == null ? void 0 : selectedFieldValue.leftHandSideComponentWhenSelected;
|
|
6802
6888
|
const isEmptyOperator = metaDataPossibleOptions === "empty";
|
|
6803
|
-
return /* @__PURE__ */
|
|
6889
|
+
return /* @__PURE__ */ jsxs35("div", { css: ConditionalFilterRow, "data-testid": "filter-item", children: [
|
|
6804
6890
|
/* @__PURE__ */ jsx77("span", { children: index === 0 ? initialCriteriaTitle : criteriaGroupOperator }),
|
|
6805
|
-
/* @__PURE__ */
|
|
6891
|
+
/* @__PURE__ */ jsxs35("div", { css: [ConditionalInputRow, isEmptyOperator ? ConditionalInputRowEmpty : null], children: [
|
|
6806
6892
|
CustomLeftHandComponent ? /* @__PURE__ */ jsx77(
|
|
6807
6893
|
CustomLeftHandComponent,
|
|
6808
6894
|
{
|
|
@@ -6902,13 +6988,13 @@ import { Icon as Icon5 } from "@uniformdev/design-system";
|
|
|
6902
6988
|
// src/components/SearchAndFilter/FilterMenu.tsx
|
|
6903
6989
|
import { HorizontalRhythm as HorizontalRhythm8, VerticalRhythm as VerticalRhythm6 } from "@uniformdev/design-system";
|
|
6904
6990
|
import React7, { useEffect as useEffect20 } from "react";
|
|
6905
|
-
import { jsx as jsx78, jsxs as
|
|
6991
|
+
import { jsx as jsx78, jsxs as jsxs36 } from "@emotion/react/jsx-runtime";
|
|
6906
6992
|
var SearchAndFilterOptionsContainer2 = ({
|
|
6907
6993
|
buttonRow,
|
|
6908
6994
|
additionalFiltersContainer,
|
|
6909
6995
|
children
|
|
6910
6996
|
}) => {
|
|
6911
|
-
return /* @__PURE__ */
|
|
6997
|
+
return /* @__PURE__ */ jsxs36("div", { css: SearchAndFilterOptionsContainer, children: [
|
|
6912
6998
|
/* @__PURE__ */ jsx78("div", { css: SearchAndFilterOptionsInnerContainer, children }),
|
|
6913
6999
|
buttonRow ? /* @__PURE__ */ jsx78(
|
|
6914
7000
|
HorizontalRhythm8,
|
|
@@ -6940,13 +7026,13 @@ var FilterMenu = ({
|
|
|
6940
7026
|
(_a = innerMenuRef.current) == null ? void 0 : _a.focus();
|
|
6941
7027
|
}
|
|
6942
7028
|
}, [filterVisibility]);
|
|
6943
|
-
return /* @__PURE__ */ jsx78(VerticalRhythm6, { gap: "sm", "aria-haspopup": "true", id, "data-testid": dataTestId, children: filterVisibility ? /* @__PURE__ */
|
|
7029
|
+
return /* @__PURE__ */ jsx78(VerticalRhythm6, { gap: "sm", "aria-haspopup": "true", id, "data-testid": dataTestId, children: filterVisibility ? /* @__PURE__ */ jsxs36(
|
|
6944
7030
|
SearchAndFilterOptionsContainer2,
|
|
6945
7031
|
{
|
|
6946
7032
|
buttonRow: menuControls,
|
|
6947
7033
|
additionalFiltersContainer,
|
|
6948
7034
|
children: [
|
|
6949
|
-
/* @__PURE__ */
|
|
7035
|
+
/* @__PURE__ */ jsxs36(HorizontalRhythm8, { gap: "sm", align: "center", justify: "space-between", children: [
|
|
6950
7036
|
filterTitle ? /* @__PURE__ */ jsx78("span", { css: Title, ref: innerMenuRef, tabIndex: 0, children: filterTitle }) : null,
|
|
6951
7037
|
(filters == null ? void 0 : filters.length) && resetButtonText ? /* @__PURE__ */ jsx78(
|
|
6952
7038
|
"button",
|
|
@@ -7059,7 +7145,7 @@ function hasBindings(currentValue) {
|
|
|
7059
7145
|
}
|
|
7060
7146
|
|
|
7061
7147
|
// src/components/SearchAndFilter/FilterItems.tsx
|
|
7062
|
-
import { jsx as jsx79, jsxs as
|
|
7148
|
+
import { jsx as jsx79, jsxs as jsxs37 } from "@emotion/react/jsx-runtime";
|
|
7063
7149
|
var FilterItems = ({
|
|
7064
7150
|
addButtonText = "add condition",
|
|
7065
7151
|
additionalFiltersContainer,
|
|
@@ -7075,7 +7161,7 @@ var FilterItems = ({
|
|
|
7075
7161
|
next[index] = { ...next[index], [prop]: value };
|
|
7076
7162
|
if (prop === "operator") {
|
|
7077
7163
|
const newOperatorId = value;
|
|
7078
|
-
const currentFilter =
|
|
7164
|
+
const currentFilter = filters[index];
|
|
7079
7165
|
if (!newOperatorId) {
|
|
7080
7166
|
throw new Error("you bad");
|
|
7081
7167
|
}
|
|
@@ -7101,7 +7187,7 @@ var FilterItems = ({
|
|
|
7101
7187
|
{
|
|
7102
7188
|
id: "search-and-filter-options",
|
|
7103
7189
|
dataTestId: "search-and-filter-options",
|
|
7104
|
-
menuControls: /* @__PURE__ */
|
|
7190
|
+
menuControls: /* @__PURE__ */ jsxs37(
|
|
7105
7191
|
"button",
|
|
7106
7192
|
{
|
|
7107
7193
|
type: "button",
|
|
@@ -7149,8 +7235,8 @@ var FilterItems = ({
|
|
|
7149
7235
|
import { VerticalRhythm as VerticalRhythm7 } from "@uniformdev/design-system";
|
|
7150
7236
|
|
|
7151
7237
|
// src/components/SearchAndFilter/SearchAndFilterResultContainer.tsx
|
|
7152
|
-
import { Button as Button5, Callout as
|
|
7153
|
-
import { Fragment as Fragment15, jsx as jsx80, jsxs as
|
|
7238
|
+
import { Button as Button5, Callout as Callout5, HorizontalRhythm as HorizontalRhythm9, Paragraph } from "@uniformdev/design-system";
|
|
7239
|
+
import { Fragment as Fragment15, jsx as jsx80, jsxs as jsxs38 } from "@emotion/react/jsx-runtime";
|
|
7154
7240
|
var SearchAndFilterResultContainer = ({
|
|
7155
7241
|
buttonText,
|
|
7156
7242
|
clearButtonLabel = "clear",
|
|
@@ -7201,16 +7287,16 @@ var SearchAndFilterResultContainer = ({
|
|
|
7201
7287
|
handleResetFilters();
|
|
7202
7288
|
}
|
|
7203
7289
|
};
|
|
7204
|
-
return /* @__PURE__ */
|
|
7205
|
-
/* @__PURE__ */
|
|
7206
|
-
/* @__PURE__ */
|
|
7290
|
+
return /* @__PURE__ */ jsxs38(Fragment15, { children: [
|
|
7291
|
+
/* @__PURE__ */ jsxs38(HorizontalRhythm9, { children: [
|
|
7292
|
+
/* @__PURE__ */ jsxs38("span", { children: [
|
|
7207
7293
|
totalResults,
|
|
7208
7294
|
" results ",
|
|
7209
7295
|
searchTerm ? `for "${searchTerm}"` : null
|
|
7210
7296
|
] }),
|
|
7211
7297
|
!searchTerm || hideClearButton ? null : /* @__PURE__ */ jsx80(Button5, { buttonType: "ghostDestructive", size: "zero", onClick: handleClearSearch, children: clearButtonLabel })
|
|
7212
7298
|
] }),
|
|
7213
|
-
totalResults === 0 ? /* @__PURE__ */
|
|
7299
|
+
totalResults === 0 ? /* @__PURE__ */ jsxs38(Callout5, { title: automateCalloutTitle, type: "note", children: [
|
|
7214
7300
|
calloutText ? /* @__PURE__ */ jsx80(Paragraph, { children: calloutText }) : null,
|
|
7215
7301
|
hideClearButton ? null : /* @__PURE__ */ jsx80(
|
|
7216
7302
|
Button5,
|
|
@@ -7227,7 +7313,7 @@ var SearchAndFilterResultContainer = ({
|
|
|
7227
7313
|
};
|
|
7228
7314
|
|
|
7229
7315
|
// src/components/SearchAndFilter/SearchAndFilter.tsx
|
|
7230
|
-
import { jsx as jsx81, jsxs as
|
|
7316
|
+
import { jsx as jsx81, jsxs as jsxs39 } from "@emotion/react/jsx-runtime";
|
|
7231
7317
|
var SearchAndFilter = ({
|
|
7232
7318
|
filters,
|
|
7233
7319
|
filterOptions,
|
|
@@ -7261,8 +7347,8 @@ var SearchAndFilter = ({
|
|
|
7261
7347
|
filterMapper: filterMapper2,
|
|
7262
7348
|
allowBindingSearchTerm,
|
|
7263
7349
|
onResetFilterValues,
|
|
7264
|
-
children: /* @__PURE__ */
|
|
7265
|
-
/* @__PURE__ */
|
|
7350
|
+
children: /* @__PURE__ */ jsxs39(VerticalRhythm7, { "data-testid": "search-and-filter", children: [
|
|
7351
|
+
/* @__PURE__ */ jsxs39("div", { css: SearchAndFilterOutterControlWrapper(viewSwitchControls ? "1fr auto" : "1fr"), children: [
|
|
7266
7352
|
/* @__PURE__ */ jsx81(
|
|
7267
7353
|
"div",
|
|
7268
7354
|
{
|
|
@@ -7557,7 +7643,7 @@ var InputVariableWrapper = css22`
|
|
|
7557
7643
|
`;
|
|
7558
7644
|
|
|
7559
7645
|
// src/components/SearchAndFilter/SortItems.tsx
|
|
7560
|
-
import { jsx as jsx83, jsxs as
|
|
7646
|
+
import { jsx as jsx83, jsxs as jsxs40 } from "@emotion/react/jsx-runtime";
|
|
7561
7647
|
var SortItems = ({
|
|
7562
7648
|
sortByLabel = "Sort by",
|
|
7563
7649
|
localeLabel = "Show locale",
|
|
@@ -7579,10 +7665,10 @@ var SortItems = ({
|
|
|
7579
7665
|
return (_a2 = item.options) == null ? void 0 : _a2.find((option) => option.value === sortField);
|
|
7580
7666
|
})) == null ? void 0 : _a.options) == null ? void 0 : _b.find((nestedOption) => nestedOption.value === sortField);
|
|
7581
7667
|
const localeLabelValue = sortOptions.length > 1 ? localeLabel : `${localeLabel}s`;
|
|
7582
|
-
return /* @__PURE__ */
|
|
7583
|
-
/* @__PURE__ */
|
|
7668
|
+
return /* @__PURE__ */ jsxs40("div", { css: [SortFilterWrapper(hideLocaleOptions)], "data-testid": "sorting-options", children: [
|
|
7669
|
+
/* @__PURE__ */ jsxs40(VerticalRhythm8, { gap: "xs", children: [
|
|
7584
7670
|
/* @__PURE__ */ jsx83("span", { css: Title2, children: sortByLabel }),
|
|
7585
|
-
/* @__PURE__ */
|
|
7671
|
+
/* @__PURE__ */ jsxs40("div", { css: SortFilterInputRow, children: [
|
|
7586
7672
|
/* @__PURE__ */ jsx83(
|
|
7587
7673
|
InputVariables,
|
|
7588
7674
|
{
|
|
@@ -7717,7 +7803,7 @@ function useContentDataResourceLocaleInfo({
|
|
|
7717
7803
|
import {
|
|
7718
7804
|
AddListButton as AddListButton2,
|
|
7719
7805
|
Button as Button6,
|
|
7720
|
-
Callout as
|
|
7806
|
+
Callout as Callout6,
|
|
7721
7807
|
DrawerContent,
|
|
7722
7808
|
Heading,
|
|
7723
7809
|
Input as Input10,
|
|
@@ -7727,7 +7813,7 @@ import {
|
|
|
7727
7813
|
InputToggle as InputToggle3,
|
|
7728
7814
|
Label,
|
|
7729
7815
|
LoadingIndicator as LoadingIndicator4,
|
|
7730
|
-
LoadingOverlay,
|
|
7816
|
+
LoadingOverlay as LoadingOverlay2,
|
|
7731
7817
|
Menu as Menu3,
|
|
7732
7818
|
MenuItem as MenuItem2,
|
|
7733
7819
|
ParameterGroup,
|
|
@@ -7758,7 +7844,7 @@ export {
|
|
|
7758
7844
|
AddListButton2 as AddListButton,
|
|
7759
7845
|
Button6 as Button,
|
|
7760
7846
|
CHECKBOX_OPERATORS,
|
|
7761
|
-
|
|
7847
|
+
Callout6 as Callout,
|
|
7762
7848
|
ControlledValuePlugin,
|
|
7763
7849
|
DATE_OPERATORS,
|
|
7764
7850
|
DATE_TIME_OPERATORS,
|
|
@@ -7796,7 +7882,7 @@ export {
|
|
|
7796
7882
|
Label,
|
|
7797
7883
|
LinkButton,
|
|
7798
7884
|
LoadingIndicator4 as LoadingIndicator,
|
|
7799
|
-
LoadingOverlay,
|
|
7885
|
+
LoadingOverlay2 as LoadingOverlay,
|
|
7800
7886
|
MULTI_SELECT_OPERATORS,
|
|
7801
7887
|
Menu3 as Menu,
|
|
7802
7888
|
MenuItem2 as MenuItem,
|