@uniformdev/mesh-sdk-react 18.27.1-alpha.25 → 18.29.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.ts +12 -248
- package/dist/index.esm.js +34 -773
- package/dist/index.js +59 -813
- package/dist/index.mjs +34 -773
- package/package.json +4 -4
package/dist/index.esm.js
CHANGED
|
@@ -955,12 +955,12 @@ import { Callout as Callout2 } from "@uniformdev/design-system";
|
|
|
955
955
|
import React6, { useContext as useContext2, useMemo as useMemo2, useRef as useRef5 } from "react";
|
|
956
956
|
import { useAsync, useAsyncFn as useAsyncFn2 } from "react-use";
|
|
957
957
|
|
|
958
|
-
// src/components/
|
|
958
|
+
// src/components/EntrySearch/DefaultSearchRow.tsx
|
|
959
959
|
import { css as css7 } from "@emotion/react";
|
|
960
960
|
import { useOutsideClick } from "@uniformdev/design-system";
|
|
961
961
|
import { useRef, useState } from "react";
|
|
962
962
|
|
|
963
|
-
// src/components/
|
|
963
|
+
// src/components/EntrySearch/styles/DefaultSearchRow.styles.ts
|
|
964
964
|
import { css as css6 } from "@emotion/react";
|
|
965
965
|
var searchRowContainer = css6`
|
|
966
966
|
cursor: pointer;
|
|
@@ -1001,7 +1001,7 @@ var searchRowBtn = css6`
|
|
|
1001
1001
|
inset: 0 var(--spacing-sm) 0 auto;
|
|
1002
1002
|
`;
|
|
1003
1003
|
|
|
1004
|
-
// src/components/
|
|
1004
|
+
// src/components/EntrySearch/DefaultSearchRow.tsx
|
|
1005
1005
|
import { jsx as jsx19, jsxs as jsxs8 } from "@emotion/react/jsx-runtime";
|
|
1006
1006
|
var DefaultSearchRow = ({ result, isSelected, triggerSelection }) => {
|
|
1007
1007
|
const popoverRef = useRef(null);
|
|
@@ -1075,7 +1075,7 @@ var DefaultSearchRow = ({ result, isSelected, triggerSelection }) => {
|
|
|
1075
1075
|
);
|
|
1076
1076
|
};
|
|
1077
1077
|
|
|
1078
|
-
// src/components/
|
|
1078
|
+
// src/components/EntrySearch/DefaultSelectedItem.tsx
|
|
1079
1079
|
import { css as css9 } from "@emotion/react";
|
|
1080
1080
|
import { Icon as Icon2, useOutsideClick as useOutsideClick2 } from "@uniformdev/design-system";
|
|
1081
1081
|
import { useEffect, useRef as useRef2, useState as useState2 } from "react";
|
|
@@ -1093,7 +1093,7 @@ function openWindowWithCloseCallback(href, callback) {
|
|
|
1093
1093
|
}, 500);
|
|
1094
1094
|
}
|
|
1095
1095
|
|
|
1096
|
-
// src/components/
|
|
1096
|
+
// src/components/EntrySearch/styles/DefaultSelectedItem.styles.ts
|
|
1097
1097
|
import { css as css8 } from "@emotion/react";
|
|
1098
1098
|
import { mq as mq2 } from "@uniformdev/design-system";
|
|
1099
1099
|
var selectedItemContainer = css8`
|
|
@@ -1177,7 +1177,7 @@ var selectItemLinkBtn = css8`
|
|
|
1177
1177
|
}
|
|
1178
1178
|
`;
|
|
1179
1179
|
|
|
1180
|
-
// src/components/
|
|
1180
|
+
// src/components/EntrySearch/DefaultSelectedItem.tsx
|
|
1181
1181
|
import { jsx as jsx20, jsxs as jsxs9 } from "@emotion/react/jsx-runtime";
|
|
1182
1182
|
var DefaultSelectedItem = ({
|
|
1183
1183
|
selectedItem,
|
|
@@ -1360,7 +1360,7 @@ var DefaultSelectedItem = ({
|
|
|
1360
1360
|
] }) }, selectedItem.id);
|
|
1361
1361
|
};
|
|
1362
1362
|
|
|
1363
|
-
// src/components/
|
|
1363
|
+
// src/components/EntrySearch/EntrySearch.tsx
|
|
1364
1364
|
import { css as css11 } from "@emotion/react";
|
|
1365
1365
|
import {
|
|
1366
1366
|
Button,
|
|
@@ -1411,7 +1411,7 @@ function useLoadingDelay(loading, { delay = 500, minDuration = 200 } = {
|
|
|
1411
1411
|
return state === "DISPLAY" || state === "EXPIRE";
|
|
1412
1412
|
}
|
|
1413
1413
|
|
|
1414
|
-
// src/components/
|
|
1414
|
+
// src/components/EntrySearch/styles/EntrySearch.styles.ts
|
|
1415
1415
|
import { css as css10 } from "@emotion/react";
|
|
1416
1416
|
var entrySearchWrapper = css10`
|
|
1417
1417
|
background: var(--white);
|
|
@@ -1522,7 +1522,7 @@ var badgeIcon = css10`
|
|
|
1522
1522
|
height: calc(var(--spacing-lg) + var(--spacing-xs));
|
|
1523
1523
|
`;
|
|
1524
1524
|
|
|
1525
|
-
// src/components/
|
|
1525
|
+
// src/components/EntrySearch/EntrySearch.tsx
|
|
1526
1526
|
import { Fragment as Fragment3, jsx as jsx21, jsxs as jsxs10 } from "@emotion/react/jsx-runtime";
|
|
1527
1527
|
var DefaultNoResults = ({ searchText, selectedContentType }) => {
|
|
1528
1528
|
let message = "No content found";
|
|
@@ -3895,741 +3895,17 @@ function convertRequestDataToDataType(dataType, requestData) {
|
|
|
3895
3895
|
};
|
|
3896
3896
|
}
|
|
3897
3897
|
|
|
3898
|
-
// src/components/EntrySearch/DataRefreshButton.tsx
|
|
3899
|
-
import { css as css25 } from "@emotion/react";
|
|
3900
|
-
import { Button as Button3, LoadingIndicator as LoadingIndicator2 } from "@uniformdev/design-system";
|
|
3901
|
-
import { jsx as jsx44, jsxs as jsxs25 } from "@emotion/react/jsx-runtime";
|
|
3902
|
-
var DataRefreshButton = ({
|
|
3903
|
-
buttonText,
|
|
3904
|
-
isLoading,
|
|
3905
|
-
onRefreshData,
|
|
3906
|
-
...props
|
|
3907
|
-
}) => {
|
|
3908
|
-
return /* @__PURE__ */ jsxs25(Button3, { buttonType: "primaryInvert", onClick: onRefreshData, disabled: isLoading, ...props, children: [
|
|
3909
|
-
!isLoading ? null : /* @__PURE__ */ jsx44(
|
|
3910
|
-
LoadingIndicator2,
|
|
3911
|
-
{
|
|
3912
|
-
css: css25`
|
|
3913
|
-
${isLoading ? "opacity: 0.2;" : void 0}
|
|
3914
|
-
`
|
|
3915
|
-
}
|
|
3916
|
-
),
|
|
3917
|
-
buttonText
|
|
3918
|
-
] });
|
|
3919
|
-
};
|
|
3920
|
-
|
|
3921
|
-
// src/components/EntrySearch/EntrySearchContainer.tsx
|
|
3922
|
-
import { Button as Button4, Container, IconsProvider, ScrollableList, VerticalRhythm } from "@uniformdev/design-system";
|
|
3923
|
-
|
|
3924
|
-
// src/components/EntrySearch/styles/EntrySearchContainer.styles.ts
|
|
3925
|
-
import { css as css26 } from "@emotion/react";
|
|
3926
|
-
var EntrySearchBtnGroup = css26`
|
|
3927
|
-
align-items: center;
|
|
3928
|
-
display: flex;
|
|
3929
|
-
gap: var(--spacing-sm);
|
|
3930
|
-
`;
|
|
3931
|
-
|
|
3932
|
-
// src/components/EntrySearch/EntrySearchContainer.tsx
|
|
3933
|
-
import { jsx as jsx45, jsxs as jsxs26 } from "@emotion/react/jsx-runtime";
|
|
3934
|
-
var EntrySearchContainer = ({
|
|
3935
|
-
searchFilters,
|
|
3936
|
-
resultList,
|
|
3937
|
-
onSave,
|
|
3938
|
-
onCancel,
|
|
3939
|
-
children
|
|
3940
|
-
}) => {
|
|
3941
|
-
return /* @__PURE__ */ jsx45(IconsProvider, { children: /* @__PURE__ */ jsxs26(VerticalRhythm, { children: [
|
|
3942
|
-
/* @__PURE__ */ jsx45(Container, { backgroundColor: "gray-50", padding: "var(--spacing-base)", border: true, children: /* @__PURE__ */ jsxs26(VerticalRhythm, { children: [
|
|
3943
|
-
searchFilters,
|
|
3944
|
-
!resultList ? null : /* @__PURE__ */ jsx45(ScrollableList, { role: "list", children: resultList })
|
|
3945
|
-
] }) }),
|
|
3946
|
-
children,
|
|
3947
|
-
!onSave && !onCancel ? null : /* @__PURE__ */ jsxs26("div", { css: EntrySearchBtnGroup, children: [
|
|
3948
|
-
!onSave ? null : /* @__PURE__ */ jsx45(Button4, { buttonType: "primary", onClick: onSave, children: "Save" }),
|
|
3949
|
-
!onCancel ? null : /* @__PURE__ */ jsx45(Button4, { buttonType: "ghostDestructive", onClick: onCancel, children: "Cancel" })
|
|
3950
|
-
] })
|
|
3951
|
-
] }) });
|
|
3952
|
-
};
|
|
3953
|
-
|
|
3954
|
-
// src/components/EntrySearch/EntrySearchFilter.tsx
|
|
3955
|
-
import { InputKeywordSearch as InputKeywordSearch2, InputSelect as InputSelect6 } from "@uniformdev/design-system";
|
|
3956
|
-
import { useState as useState10 } from "react";
|
|
3957
|
-
|
|
3958
|
-
// src/components/EntrySearch/hooks/EntrySearchContext.tsx
|
|
3959
|
-
import { createContext as createContext5, useCallback, useContext as useContext7, useDeferredValue, useState as useState9 } from "react";
|
|
3960
|
-
import { jsx as jsx46 } from "@emotion/react/jsx-runtime";
|
|
3961
|
-
var EntrySearchContext = createContext5({
|
|
3962
|
-
onSetQuery: () => {
|
|
3963
|
-
},
|
|
3964
|
-
onSelectItem: () => {
|
|
3965
|
-
},
|
|
3966
|
-
query: {
|
|
3967
|
-
contentType: "",
|
|
3968
|
-
keywordSearch: ""
|
|
3969
|
-
},
|
|
3970
|
-
list: {},
|
|
3971
|
-
onSetList: () => {
|
|
3972
|
-
},
|
|
3973
|
-
selectedListItems: [],
|
|
3974
|
-
onRemoveAllSelectedItems: () => {
|
|
3975
|
-
}
|
|
3976
|
-
});
|
|
3977
|
-
var EntrySearchProvider = ({ currentlySelectedItems, children }) => {
|
|
3978
|
-
const [query, setQuery] = useState9({
|
|
3979
|
-
contentType: "",
|
|
3980
|
-
keywordSearch: ""
|
|
3981
|
-
});
|
|
3982
|
-
const querySearchDeferred = useDeferredValue(query);
|
|
3983
|
-
const [selectedItems, setSelectedItems] = useState9(currentlySelectedItems != null ? currentlySelectedItems : []);
|
|
3984
|
-
const [list, setList] = useState9({});
|
|
3985
|
-
const onSetQuery = useCallback(
|
|
3986
|
-
(value) => {
|
|
3987
|
-
setQuery(value);
|
|
3988
|
-
},
|
|
3989
|
-
[setQuery]
|
|
3990
|
-
);
|
|
3991
|
-
const onSelectItem = useCallback(
|
|
3992
|
-
(selectedResult) => {
|
|
3993
|
-
if (Array.isArray(selectedResult)) {
|
|
3994
|
-
setSelectedItems(selectedResult);
|
|
3995
|
-
} else {
|
|
3996
|
-
if (selectedItems.some((item) => item.id === selectedResult.id)) {
|
|
3997
|
-
setSelectedItems((prev) => prev.filter((item) => item.id !== selectedResult.id));
|
|
3998
|
-
} else {
|
|
3999
|
-
setSelectedItems((prev) => [...prev, selectedResult]);
|
|
4000
|
-
}
|
|
4001
|
-
}
|
|
4002
|
-
},
|
|
4003
|
-
[setSelectedItems, selectedItems]
|
|
4004
|
-
);
|
|
4005
|
-
const onRemoveAllSelectedItems = useCallback(() => {
|
|
4006
|
-
setSelectedItems([]);
|
|
4007
|
-
}, [setSelectedItems]);
|
|
4008
|
-
const onSetList = useCallback(
|
|
4009
|
-
(value) => {
|
|
4010
|
-
setList(value);
|
|
4011
|
-
},
|
|
4012
|
-
[setList]
|
|
4013
|
-
);
|
|
4014
|
-
return /* @__PURE__ */ jsx46(
|
|
4015
|
-
EntrySearchContext.Provider,
|
|
4016
|
-
{
|
|
4017
|
-
value: {
|
|
4018
|
-
onSetQuery,
|
|
4019
|
-
query: querySearchDeferred,
|
|
4020
|
-
onSelectItem,
|
|
4021
|
-
selectedListItems: selectedItems,
|
|
4022
|
-
onRemoveAllSelectedItems,
|
|
4023
|
-
list,
|
|
4024
|
-
onSetList
|
|
4025
|
-
},
|
|
4026
|
-
children
|
|
4027
|
-
}
|
|
4028
|
-
);
|
|
4029
|
-
};
|
|
4030
|
-
var useEntrySearchContext = () => {
|
|
4031
|
-
const contextValues = useContext7(EntrySearchContext);
|
|
4032
|
-
return { ...contextValues };
|
|
4033
|
-
};
|
|
4034
|
-
|
|
4035
|
-
// src/components/EntrySearch/styles/EntrySearchFilterContainer.styles.ts
|
|
4036
|
-
import { css as css27 } from "@emotion/react";
|
|
4037
|
-
var EntrySearchFilterContainerLabel = css27`
|
|
4038
|
-
align-items: center;
|
|
4039
|
-
display: flex;
|
|
4040
|
-
font-size: var(--fs-sm);
|
|
4041
|
-
font-weight: var(--fw-bold);
|
|
4042
|
-
line-height: 1rem;
|
|
4043
|
-
margin-bottom: var(--spacing-sm);
|
|
4044
|
-
`;
|
|
4045
|
-
var EntrySearchFilterContainer = css27`
|
|
4046
|
-
display: grid;
|
|
4047
|
-
gap: var(--spacing-base);
|
|
4048
|
-
`;
|
|
4049
|
-
var EntrySearchFilterDropdownAndTextSearch = css27`
|
|
4050
|
-
grid-template-columns: 0.5fr 1fr;
|
|
4051
|
-
`;
|
|
4052
|
-
var EntrySearchFilterGrid = (gridColumns) => css27`
|
|
4053
|
-
display: grid;
|
|
4054
|
-
grid-template-columns: ${gridColumns};
|
|
4055
|
-
gap: var(--spacing-base);
|
|
4056
|
-
`;
|
|
4057
|
-
|
|
4058
|
-
// src/components/EntrySearch/EntrySearchFilter.tsx
|
|
4059
|
-
import { jsx as jsx47, jsxs as jsxs27 } from "@emotion/react/jsx-runtime";
|
|
4060
|
-
var EntrySearchFilter = ({
|
|
4061
|
-
requireContentType,
|
|
4062
|
-
typeSelectorAllTypesOptionText = "All content types",
|
|
4063
|
-
searchInputName = "searchText",
|
|
4064
|
-
searchInputPlaceholderText = "Enter keyword to narrow your results",
|
|
4065
|
-
selectLabel = "Content Type Select",
|
|
4066
|
-
selectOptions
|
|
4067
|
-
}) => {
|
|
4068
|
-
const { query, onSetQuery } = useEntrySearchContext();
|
|
4069
|
-
const [searchState, setSearchState] = useState10({
|
|
4070
|
-
contentType: "any",
|
|
4071
|
-
keywordSearch: ""
|
|
4072
|
-
});
|
|
4073
|
-
const handleFilterChange = (value) => {
|
|
4074
|
-
setSearchState((prev) => {
|
|
4075
|
-
return { ...prev, ...value };
|
|
4076
|
-
});
|
|
4077
|
-
onSetQuery({ ...query, ...value });
|
|
4078
|
-
};
|
|
4079
|
-
return /* @__PURE__ */ jsxs27("fieldset", { css: [EntrySearchFilterContainer, EntrySearchFilterDropdownAndTextSearch], children: [
|
|
4080
|
-
/* @__PURE__ */ jsx47(
|
|
4081
|
-
InputSelect6,
|
|
4082
|
-
{
|
|
4083
|
-
label: selectLabel,
|
|
4084
|
-
showLabel: false,
|
|
4085
|
-
onChange: (e) => handleFilterChange({ contentType: e.target.value }),
|
|
4086
|
-
options: [
|
|
4087
|
-
...!requireContentType ? [{ value: "any", label: typeSelectorAllTypesOptionText }] : [],
|
|
4088
|
-
...selectOptions ? selectOptions.map((option) => {
|
|
4089
|
-
return { value: option.id, label: option.name };
|
|
4090
|
-
}) : []
|
|
4091
|
-
],
|
|
4092
|
-
value: searchState.contentType
|
|
4093
|
-
}
|
|
4094
|
-
),
|
|
4095
|
-
/* @__PURE__ */ jsx47(
|
|
4096
|
-
InputKeywordSearch2,
|
|
4097
|
-
{
|
|
4098
|
-
inputFieldName: searchInputName,
|
|
4099
|
-
placeholder: searchInputPlaceholderText,
|
|
4100
|
-
onSearchTextChanged: (e) => handleFilterChange({ keywordSearch: e }),
|
|
4101
|
-
disabledFieldSubmission: true,
|
|
4102
|
-
onClear: () => handleFilterChange({ keywordSearch: "" }),
|
|
4103
|
-
value: searchState.keywordSearch
|
|
4104
|
-
}
|
|
4105
|
-
)
|
|
4106
|
-
] });
|
|
4107
|
-
};
|
|
4108
|
-
|
|
4109
|
-
// src/components/EntrySearch/EntrySearchFilterContainer.tsx
|
|
4110
|
-
import { jsx as jsx48, jsxs as jsxs28 } from "@emotion/react/jsx-runtime";
|
|
4111
|
-
var EntrySearchFilterContainer2 = ({ label, children }) => {
|
|
4112
|
-
return /* @__PURE__ */ jsxs28("div", { children: [
|
|
4113
|
-
/* @__PURE__ */ jsx48("span", { css: EntrySearchFilterContainerLabel, children: label }),
|
|
4114
|
-
/* @__PURE__ */ jsx48("div", { css: EntrySearchFilterContainer, children })
|
|
4115
|
-
] });
|
|
4116
|
-
};
|
|
4117
|
-
|
|
4118
|
-
// src/components/EntrySearch/EntrySearchListItem.tsx
|
|
4119
|
-
import { Popover } from "@uniformdev/design-system";
|
|
4120
|
-
|
|
4121
|
-
// src/components/EntrySearch/styles/EntrySearchListItem.styles.ts
|
|
4122
|
-
import { css as css28 } from "@emotion/react";
|
|
4123
|
-
import { skeletonLoading } from "@uniformdev/design-system";
|
|
4124
|
-
var EntryListItemContainer = css28`
|
|
4125
|
-
align-items: center;
|
|
4126
|
-
border: 1px solid var(--gray-300);
|
|
4127
|
-
border-radius: var(--rounded-base);
|
|
4128
|
-
background: var(--white);
|
|
4129
|
-
display: grid;
|
|
4130
|
-
grid-template-columns: 1fr 32px;
|
|
4131
|
-
padding: var(--spacing-sm);
|
|
4132
|
-
|
|
4133
|
-
&[hidden] {
|
|
4134
|
-
display: none;
|
|
4135
|
-
}
|
|
4136
|
-
`;
|
|
4137
|
-
var EntryListItemLoading = css28`
|
|
4138
|
-
animation: ${skeletonLoading} 1s linear infinite alternate;
|
|
4139
|
-
border-color: transparent;
|
|
4140
|
-
min-height: 42px;
|
|
4141
|
-
position: relative;
|
|
4142
|
-
|
|
4143
|
-
&:before,
|
|
4144
|
-
&:after {
|
|
4145
|
-
background: var(--gray-200);
|
|
4146
|
-
content: '';
|
|
4147
|
-
display: block;
|
|
4148
|
-
height: 1rem;
|
|
4149
|
-
}
|
|
4150
|
-
|
|
4151
|
-
&:before {
|
|
4152
|
-
border-radius: var(--rounded-base);
|
|
4153
|
-
width: 10rem;
|
|
4154
|
-
}
|
|
4155
|
-
|
|
4156
|
-
&:after {
|
|
4157
|
-
border-radius: var(--rounded-full);
|
|
4158
|
-
width: 1rem;
|
|
4159
|
-
}
|
|
4160
|
-
`;
|
|
4161
|
-
var EntryListItemHeadingGroup = css28`
|
|
4162
|
-
align-items: center;
|
|
4163
|
-
display: grid;
|
|
4164
|
-
`;
|
|
4165
|
-
var EntryListItemTitle = css28`
|
|
4166
|
-
color: var(--brand-secondary-1);
|
|
4167
|
-
display: block;
|
|
4168
|
-
font-size: var(--fs-sm);
|
|
4169
|
-
`;
|
|
4170
|
-
var EntryListItemSubtitle = css28`
|
|
4171
|
-
color: var(--gray-500);
|
|
4172
|
-
display: block;
|
|
4173
|
-
font-size: var(--fs-xs);
|
|
4174
|
-
line-height: 1;
|
|
4175
|
-
`;
|
|
4176
|
-
var EntryListItemInfoContainer = css28`
|
|
4177
|
-
align-items: center;
|
|
4178
|
-
display: flex;
|
|
4179
|
-
justify-content: center;
|
|
4180
|
-
`;
|
|
4181
|
-
var EntryListItemControlledContent = css28`
|
|
4182
|
-
display: flex;
|
|
4183
|
-
gap: var(--spacing-sm);
|
|
4184
|
-
`;
|
|
4185
|
-
var EntryListItemUnControlledContent = css28`
|
|
4186
|
-
margin-top: var(--spacing-sm);
|
|
4187
|
-
grid-column: 1 / -1;
|
|
4188
|
-
`;
|
|
4189
|
-
|
|
4190
|
-
// src/components/EntrySearch/EntrySearchListItem.tsx
|
|
4191
|
-
import { jsx as jsx49, jsxs as jsxs29 } from "@emotion/react/jsx-runtime";
|
|
4192
|
-
var EntrySearchListItem = ({
|
|
4193
|
-
id,
|
|
4194
|
-
title,
|
|
4195
|
-
contentType,
|
|
4196
|
-
image,
|
|
4197
|
-
popoverInfo,
|
|
4198
|
-
onSelect,
|
|
4199
|
-
children,
|
|
4200
|
-
...props
|
|
4201
|
-
}) => {
|
|
4202
|
-
const { onSelectItem, selectedListItems } = useEntrySearchContext();
|
|
4203
|
-
const formatedContentType = Array.isArray(contentType) ? contentType.join(", ") : contentType;
|
|
4204
|
-
const handleSelectItem = () => {
|
|
4205
|
-
var _a;
|
|
4206
|
-
const extraData = (_a = onSelect == null ? void 0 : onSelect()) != null ? _a : {};
|
|
4207
|
-
onSelectItem({ id, title, ...extraData });
|
|
4208
|
-
};
|
|
4209
|
-
const hideWhenInSelectedList = selectedListItems.some((item) => item.id === id);
|
|
4210
|
-
return /* @__PURE__ */ jsxs29("div", { role: "listitem", hidden: hideWhenInSelectedList, css: EntryListItemContainer, ...props, children: [
|
|
4211
|
-
/* @__PURE__ */ jsxs29("div", { role: "button", onClick: handleSelectItem, css: EntryListItemControlledContent, children: [
|
|
4212
|
-
!image ? null : /* @__PURE__ */ jsx49("img", { ...image, loading: (image == null ? void 0 : image.width) && image.height ? "lazy" : "eager" }),
|
|
4213
|
-
/* @__PURE__ */ jsxs29("div", { role: "heading", css: EntryListItemHeadingGroup, children: [
|
|
4214
|
-
!contentType ? null : /* @__PURE__ */ jsx49("span", { css: EntryListItemSubtitle, children: formatedContentType }),
|
|
4215
|
-
/* @__PURE__ */ jsx49("span", { css: EntryListItemTitle, children: title })
|
|
4216
|
-
] })
|
|
4217
|
-
] }),
|
|
4218
|
-
!popoverInfo ? null : /* @__PURE__ */ jsx49("div", { css: EntryListItemInfoContainer, children: /* @__PURE__ */ jsx49(Popover, { baseId: title, ariaLabel: title, buttonText: `See ${title} details`, children: popoverInfo }) }),
|
|
4219
|
-
!children ? null : /* @__PURE__ */ jsx49("div", { css: EntryListItemUnControlledContent, children })
|
|
4220
|
-
] });
|
|
4221
|
-
};
|
|
4222
|
-
var EntrySearchListItemLoadingSkeleton = () => {
|
|
4223
|
-
return /* @__PURE__ */ jsx49("div", { role: "presentation", css: [EntryListItemContainer, EntryListItemLoading] });
|
|
4224
|
-
};
|
|
4225
|
-
|
|
4226
|
-
// src/components/EntrySearch/EntrySearchResultItem.tsx
|
|
4227
|
-
import { Button as Button5, Popover as Popover2 } from "@uniformdev/design-system";
|
|
4228
|
-
import { format as timeagoFormat } from "timeago.js";
|
|
4229
|
-
|
|
4230
|
-
// src/components/EntrySearch/styles/PublishStatus.styles.ts
|
|
4231
|
-
import { css as css29 } from "@emotion/react";
|
|
4232
|
-
var StatusBadge = css29`
|
|
4233
|
-
display: inline-flex;
|
|
4234
|
-
padding: var(--spacing-xs) var(--spacing-sm);
|
|
4235
|
-
font-size: var(--fs-xxs);
|
|
4236
|
-
font-weight: var(--fw-bold);
|
|
4237
|
-
line-height: 1;
|
|
4238
|
-
text-transform: uppercase;
|
|
4239
|
-
`;
|
|
4240
|
-
var StatusBadgePublished = css29`
|
|
4241
|
-
background: #c7f1c2;
|
|
4242
|
-
color: #106226;
|
|
4243
|
-
`;
|
|
4244
|
-
var StatusBadgeUnPublished = css29`
|
|
4245
|
-
background: var(--alert);
|
|
4246
|
-
color: var(--alert-text);
|
|
4247
|
-
`;
|
|
4248
|
-
var StatusBadgeModified = css29`
|
|
4249
|
-
background: var(--gray-200);
|
|
4250
|
-
color: var(--brand-primary-1);
|
|
4251
|
-
`;
|
|
4252
|
-
var StatusBadgeDraft = css29`
|
|
4253
|
-
background: var(--gray-200);
|
|
4254
|
-
color: var(--gray-500);
|
|
4255
|
-
`;
|
|
4256
|
-
|
|
4257
|
-
// src/components/EntrySearch/PublishStatus.tsx
|
|
4258
|
-
import { jsx as jsx50 } from "@emotion/react/jsx-runtime";
|
|
4259
|
-
var PublishStatus = ({ status }) => {
|
|
4260
|
-
const statusStyles = {
|
|
4261
|
-
draft: StatusBadgeDraft,
|
|
4262
|
-
modified: StatusBadgeModified,
|
|
4263
|
-
published: StatusBadgePublished,
|
|
4264
|
-
unpublished: StatusBadgeUnPublished
|
|
4265
|
-
};
|
|
4266
|
-
return /* @__PURE__ */ jsx50("span", { role: "status", css: [StatusBadge, statusStyles[status]], children: status });
|
|
4267
|
-
};
|
|
4268
|
-
|
|
4269
|
-
// src/components/EntrySearch/styles/EntrySearchResultItem.styles.ts
|
|
4270
|
-
import { css as css30 } from "@emotion/react";
|
|
4271
|
-
var EntrySearchResultItemContainer = css30`
|
|
4272
|
-
align-items: center;
|
|
4273
|
-
border: 1px solid var(--gray-300);
|
|
4274
|
-
border-radius: var(--rounded-base);
|
|
4275
|
-
background: var(--gray-50);
|
|
4276
|
-
display: grid;
|
|
4277
|
-
grid-template-columns: 1fr auto;
|
|
4278
|
-
padding: var(--spacing-sm) var(--spacing-sm) var(--spacing-sm) var(--spacing-md);
|
|
4279
|
-
`;
|
|
4280
|
-
var EntrySearchResultItemSubtitle = css30`
|
|
4281
|
-
color: var(--gray-500);
|
|
4282
|
-
display: block;
|
|
4283
|
-
font-size: var(--fs-xs);
|
|
4284
|
-
line-height: 1;
|
|
4285
|
-
`;
|
|
4286
|
-
var EntrySearchResultItemTitle = css30`
|
|
4287
|
-
align-items: center;
|
|
4288
|
-
color: var(--brand-secondary-1);
|
|
4289
|
-
display: flex;
|
|
4290
|
-
gap: var(--spacing-xs);
|
|
4291
|
-
`;
|
|
4292
|
-
var EntrySearchResultItemTimeStamp = css30`
|
|
4293
|
-
color: var(--gray-500);
|
|
4294
|
-
font-size: var(--fs-xs);
|
|
4295
|
-
`;
|
|
4296
|
-
var EntrySearchAuthorStateGroup = css30`
|
|
4297
|
-
align-items: center;
|
|
4298
|
-
display: flex;
|
|
4299
|
-
gap: var(--spacing-sm);
|
|
4300
|
-
`;
|
|
4301
|
-
var EntrySearchContentContainer = css30`
|
|
4302
|
-
display: flex;
|
|
4303
|
-
gap: var(--spacing-xs);
|
|
4304
|
-
`;
|
|
4305
|
-
var EntrySearchImage = css30`
|
|
4306
|
-
max-width: 56px;
|
|
4307
|
-
object-fit: contain;
|
|
4308
|
-
`;
|
|
4309
|
-
|
|
4310
|
-
// src/components/EntrySearch/EntrySearchResultItem.tsx
|
|
4311
|
-
import { jsx as jsx51, jsxs as jsxs30 } from "@emotion/react/jsx-runtime";
|
|
4312
|
-
var EntrySearchResultItem = ({
|
|
4313
|
-
id,
|
|
4314
|
-
title,
|
|
4315
|
-
name,
|
|
4316
|
-
contentType,
|
|
4317
|
-
popoverData,
|
|
4318
|
-
publishStatus,
|
|
4319
|
-
editLinkIcon,
|
|
4320
|
-
editLink,
|
|
4321
|
-
imageUrl,
|
|
4322
|
-
onRemove,
|
|
4323
|
-
createdAt,
|
|
4324
|
-
hideRemoveButton = false,
|
|
4325
|
-
children
|
|
4326
|
-
}) => {
|
|
4327
|
-
const { onSelectItem } = useEntrySearchContext();
|
|
4328
|
-
const formatedContentType = Array.isArray(contentType) ? contentType.join(", ") : contentType;
|
|
4329
|
-
const onRemoveItem = () => {
|
|
4330
|
-
onSelectItem({ id });
|
|
4331
|
-
onRemove == null ? void 0 : onRemove();
|
|
4332
|
-
};
|
|
4333
|
-
return /* @__PURE__ */ jsxs30("div", { css: EntrySearchResultItemContainer, children: [
|
|
4334
|
-
/* @__PURE__ */ jsx51("div", { children: /* @__PURE__ */ jsxs30("div", { css: EntrySearchContentContainer, children: [
|
|
4335
|
-
!imageUrl ? null : /* @__PURE__ */ jsx51("img", { src: imageUrl, alt: `Thumbnail for ${title}`, css: EntrySearchImage }),
|
|
4336
|
-
/* @__PURE__ */ jsxs30("div", { children: [
|
|
4337
|
-
/* @__PURE__ */ jsx51("span", { css: EntrySearchResultItemSubtitle, children: formatedContentType }),
|
|
4338
|
-
/* @__PURE__ */ jsxs30("span", { role: "heading", css: EntrySearchResultItemTitle, children: [
|
|
4339
|
-
title != null ? title : name,
|
|
4340
|
-
!popoverData ? null : /* @__PURE__ */ jsx51(Popover2, { baseId: title, ariaLabel: title, buttonText: `See ${title} details`, children: popoverData })
|
|
4341
|
-
] }),
|
|
4342
|
-
!createdAt && !publishStatus ? null : /* @__PURE__ */ jsxs30("div", { css: EntrySearchAuthorStateGroup, children: [
|
|
4343
|
-
!publishStatus ? null : /* @__PURE__ */ jsx51(PublishStatus, { status: publishStatus }),
|
|
4344
|
-
!createdAt ? null : /* @__PURE__ */ jsxs30("small", { css: EntrySearchResultItemTimeStamp, children: [
|
|
4345
|
-
/* @__PURE__ */ jsx51("strong", { children: "Last updated: " }),
|
|
4346
|
-
timeagoFormat(createdAt)
|
|
4347
|
-
] })
|
|
4348
|
-
] }),
|
|
4349
|
-
/* @__PURE__ */ jsx51("div", { children })
|
|
4350
|
-
] })
|
|
4351
|
-
] }) }),
|
|
4352
|
-
!editLink && hideRemoveButton ? null : /* @__PURE__ */ jsxs30("div", { css: EntrySearchAuthorStateGroup, children: [
|
|
4353
|
-
!editLink ? null : /* @__PURE__ */ jsx51(LinkButton, { text: "Edit", href: editLink, icon: editLinkIcon }),
|
|
4354
|
-
hideRemoveButton ? null : /* @__PURE__ */ jsx51(Button5, { buttonType: "ghostDestructive", onClick: onRemoveItem, children: "Remove" })
|
|
4355
|
-
] })
|
|
4356
|
-
] });
|
|
4357
|
-
};
|
|
4358
|
-
|
|
4359
|
-
// src/components/EntrySearch/styles/EntrySearchResultItemButton.styles.ts
|
|
4360
|
-
import { css as css31 } from "@emotion/react";
|
|
4361
|
-
import { button as button2 } from "@uniformdev/design-system";
|
|
4362
|
-
var ButtonStyles = css31`
|
|
4363
|
-
${button2}
|
|
4364
|
-
background: transparent;
|
|
4365
|
-
border: 1px solid var(--brand-secondary-1);
|
|
4366
|
-
color: var(--brand-secondary-1);
|
|
4367
|
-
padding: var(--spacing-sm);
|
|
4368
|
-
font-size: var(--fs-sm);
|
|
4369
|
-
line-height: 1;
|
|
4370
|
-
gap: var(--spacing-xs);
|
|
4371
|
-
transition: border-color var(--duration-fast) var(--timing-ease-out),
|
|
4372
|
-
background-color var(--duration-fast) var(--timing-ease-out);
|
|
4373
|
-
|
|
4374
|
-
&:hover {
|
|
4375
|
-
background: var(--gray-100);
|
|
4376
|
-
border-color: var(--gray-300);
|
|
4377
|
-
}
|
|
4378
|
-
|
|
4379
|
-
&:disabled {
|
|
4380
|
-
background: var(--gray-300);
|
|
4381
|
-
border-color: var(--gray-200);
|
|
4382
|
-
color: var(--gray-500);
|
|
4383
|
-
}
|
|
4384
|
-
|
|
4385
|
-
&:link {
|
|
4386
|
-
text-decoration: none;
|
|
4387
|
-
}
|
|
4388
|
-
`;
|
|
4389
|
-
var ButtonIcon = css31`
|
|
4390
|
-
width: 1rem;
|
|
4391
|
-
height: 1rem;
|
|
4392
|
-
`;
|
|
4393
|
-
|
|
4394
|
-
// src/components/EntrySearch/EntrySearchResultItemButton.tsx
|
|
4395
|
-
import { jsx as jsx52, jsxs as jsxs31 } from "@emotion/react/jsx-runtime";
|
|
4396
|
-
var EntrySearchResultItemButton = ({
|
|
4397
|
-
text,
|
|
4398
|
-
icon,
|
|
4399
|
-
...props
|
|
4400
|
-
}) => {
|
|
4401
|
-
return /* @__PURE__ */ jsxs31("button", { type: "button", css: ButtonStyles, ...props, children: [
|
|
4402
|
-
!icon ? null : /* @__PURE__ */ jsx52(Image, { src: icon, css: ButtonIcon }),
|
|
4403
|
-
text
|
|
4404
|
-
] });
|
|
4405
|
-
};
|
|
4406
|
-
var LinkButton = ({
|
|
4407
|
-
text,
|
|
4408
|
-
icon,
|
|
4409
|
-
...props
|
|
4410
|
-
}) => {
|
|
4411
|
-
return /* @__PURE__ */ jsxs31("a", { ...props, css: ButtonStyles, target: "_blank", rel: "noopener noreferrer", children: [
|
|
4412
|
-
!icon ? null : /* @__PURE__ */ jsx52(Image, { src: icon, css: ButtonIcon }),
|
|
4413
|
-
text
|
|
4414
|
-
] });
|
|
4415
|
-
};
|
|
4416
|
-
|
|
4417
|
-
// src/components/EntrySearch/EntrySearchResultList.tsx
|
|
4418
|
-
import { Button as Button6, Counter, VerticalRhythm as VerticalRhythm2 } from "@uniformdev/design-system";
|
|
4419
|
-
import { DragDropContext as DragDropContext3, Draggable as Draggable3, Droppable as Droppable3 } from "react-beautiful-dnd";
|
|
4420
|
-
|
|
4421
|
-
// src/components/EntrySearch/styles/EntrySearchResultList.styles.ts
|
|
4422
|
-
import { css as css32 } from "@emotion/react";
|
|
4423
|
-
var EntrySearchResultListContainer = css32`
|
|
4424
|
-
align-items: center;
|
|
4425
|
-
display: flex;
|
|
4426
|
-
gap: var(--spacing-sm);
|
|
4427
|
-
justify-content: space-between;
|
|
4428
|
-
`;
|
|
4429
|
-
var EntrySearchResultListCounterContainer = css32`
|
|
4430
|
-
align-items: center;
|
|
4431
|
-
display: flex;
|
|
4432
|
-
gap: var(--spacing-sm);
|
|
4433
|
-
`;
|
|
4434
|
-
var EntrySearchResultListTitle = css32`
|
|
4435
|
-
font-weight: var(--fw-bold);
|
|
4436
|
-
line-height: 1;
|
|
4437
|
-
`;
|
|
4438
|
-
|
|
4439
|
-
// src/components/EntrySearch/EntrySearchResultList.tsx
|
|
4440
|
-
import { Fragment as Fragment7, jsx as jsx53, jsxs as jsxs32 } from "@emotion/react/jsx-runtime";
|
|
4441
|
-
var EntrySearchResultList = ({
|
|
4442
|
-
resultLabelText = "Selected",
|
|
4443
|
-
removeButtonText = "Remove all",
|
|
4444
|
-
onRemoveAllSelected,
|
|
4445
|
-
hideRemoveButton = false,
|
|
4446
|
-
additionalButtons,
|
|
4447
|
-
renderResultComponent = (value) => /* @__PURE__ */ jsx53(EntrySearchResultItem, { ...value }),
|
|
4448
|
-
disableDnD = false
|
|
4449
|
-
}) => {
|
|
4450
|
-
const { selectedListItems, onRemoveAllSelectedItems, onSelectItem } = useEntrySearchContext();
|
|
4451
|
-
const handleRemoveAllSelectedItems = () => {
|
|
4452
|
-
onRemoveAllSelectedItems();
|
|
4453
|
-
onRemoveAllSelected == null ? void 0 : onRemoveAllSelected();
|
|
4454
|
-
};
|
|
4455
|
-
const onDragEnd = (res) => {
|
|
4456
|
-
var _a, _b;
|
|
4457
|
-
if (res.destination && res.source.droppableId === ((_a = res.destination) == null ? void 0 : _a.droppableId)) {
|
|
4458
|
-
const result = [...selectedListItems || []];
|
|
4459
|
-
const [removed] = (_b = result == null ? void 0 : result.splice(res.source.index, 1)) != null ? _b : [];
|
|
4460
|
-
result == null ? void 0 : result.splice(res.destination.index, 0, removed);
|
|
4461
|
-
onSelectItem(result);
|
|
4462
|
-
return result;
|
|
4463
|
-
}
|
|
4464
|
-
};
|
|
4465
|
-
return /* @__PURE__ */ jsxs32(Fragment7, { children: [
|
|
4466
|
-
/* @__PURE__ */ jsxs32("div", { role: "group", css: EntrySearchResultListContainer, children: [
|
|
4467
|
-
/* @__PURE__ */ jsxs32("div", { role: "note", css: EntrySearchResultListCounterContainer, children: [
|
|
4468
|
-
/* @__PURE__ */ jsx53("span", { css: EntrySearchResultListTitle, children: resultLabelText }),
|
|
4469
|
-
" ",
|
|
4470
|
-
!selectedListItems.length ? null : /* @__PURE__ */ jsx53(Counter, { count: selectedListItems.length })
|
|
4471
|
-
] }),
|
|
4472
|
-
/* @__PURE__ */ jsxs32("div", { css: EntrySearchResultListCounterContainer, children: [
|
|
4473
|
-
additionalButtons,
|
|
4474
|
-
hideRemoveButton ? null : /* @__PURE__ */ jsx53(
|
|
4475
|
-
Button6,
|
|
4476
|
-
{
|
|
4477
|
-
buttonType: "ghostDestructive",
|
|
4478
|
-
size: "xs",
|
|
4479
|
-
disabled: selectedListItems.length === 0,
|
|
4480
|
-
onClick: handleRemoveAllSelectedItems,
|
|
4481
|
-
children: removeButtonText
|
|
4482
|
-
}
|
|
4483
|
-
)
|
|
4484
|
-
] })
|
|
4485
|
-
] }),
|
|
4486
|
-
!selectedListItems.length ? null : /* @__PURE__ */ jsx53(DragDropContext3, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ jsx53(Droppable3, { droppableId: "canvas-multi-select", children: (provided) => /* @__PURE__ */ jsxs32("div", { ...provided.droppableProps, ref: provided.innerRef, children: [
|
|
4487
|
-
/* @__PURE__ */ jsx53(VerticalRhythm2, { gap: "sm", children: selectedListItems.map((item, i) => {
|
|
4488
|
-
const renderListItem = renderResultComponent(item);
|
|
4489
|
-
return /* @__PURE__ */ jsx53(
|
|
4490
|
-
Draggable3,
|
|
4491
|
-
{
|
|
4492
|
-
draggableId: item.title,
|
|
4493
|
-
index: i,
|
|
4494
|
-
isDragDisabled: disableDnD,
|
|
4495
|
-
children: (provided2, snapshot) => /* @__PURE__ */ jsx53(
|
|
4496
|
-
"div",
|
|
4497
|
-
{
|
|
4498
|
-
ref: provided2.innerRef,
|
|
4499
|
-
"data-dragging": snapshot.isDragging,
|
|
4500
|
-
...provided2.draggableProps,
|
|
4501
|
-
...provided2.dragHandleProps,
|
|
4502
|
-
children: renderListItem
|
|
4503
|
-
}
|
|
4504
|
-
)
|
|
4505
|
-
},
|
|
4506
|
-
item.title
|
|
4507
|
-
);
|
|
4508
|
-
}) }),
|
|
4509
|
-
provided.placeholder
|
|
4510
|
-
] }) }) })
|
|
4511
|
-
] });
|
|
4512
|
-
};
|
|
4513
|
-
|
|
4514
|
-
// src/components/EntrySearch/QueryFilter.tsx
|
|
4515
|
-
import { Input as Input7, InputSelect as InputSelect7 } from "@uniformdev/design-system";
|
|
4516
|
-
import { useEffect as useEffect7, useState as useState11 } from "react";
|
|
4517
|
-
import { jsx as jsx54, jsxs as jsxs33 } from "@emotion/react/jsx-runtime";
|
|
4518
|
-
var QueryFilter = ({
|
|
4519
|
-
requireContentType,
|
|
4520
|
-
queryFilterTitle = "Configure Query",
|
|
4521
|
-
contentTypeLabel = "Filter by content type",
|
|
4522
|
-
typeSelectorAllTypesOptionText = "All content types",
|
|
4523
|
-
contentTypeOptions,
|
|
4524
|
-
countLabel = "Count",
|
|
4525
|
-
countValue = 5,
|
|
4526
|
-
sortLabel = "Sort",
|
|
4527
|
-
sortOptions,
|
|
4528
|
-
sortOrderLabel = "Sort Order",
|
|
4529
|
-
sortOrderOptions = [
|
|
4530
|
-
{
|
|
4531
|
-
name: "Ascending",
|
|
4532
|
-
id: "asc"
|
|
4533
|
-
},
|
|
4534
|
-
{
|
|
4535
|
-
name: "Descending",
|
|
4536
|
-
id: "desc"
|
|
4537
|
-
}
|
|
4538
|
-
],
|
|
4539
|
-
children
|
|
4540
|
-
}) => {
|
|
4541
|
-
var _a, _b;
|
|
4542
|
-
const { query, onSetQuery } = useEntrySearchContext();
|
|
4543
|
-
const [queryState, setQueryState] = useState11({
|
|
4544
|
-
contentType: "",
|
|
4545
|
-
count: countValue != null ? countValue : 5,
|
|
4546
|
-
sortBy: (_a = sortOptions[0].id) != null ? _a : "",
|
|
4547
|
-
sortOrder: (_b = sortOrderOptions[0].id) != null ? _b : ""
|
|
4548
|
-
});
|
|
4549
|
-
const handleFilterChange = (value) => {
|
|
4550
|
-
setQueryState((prev) => ({ ...prev, ...value }));
|
|
4551
|
-
onSetQuery({ ...query, ...value });
|
|
4552
|
-
};
|
|
4553
|
-
useEffect7(() => {
|
|
4554
|
-
onSetQuery(queryState);
|
|
4555
|
-
}, [onSetQuery, queryState]);
|
|
4556
|
-
return /* @__PURE__ */ jsxs33("fieldset", { children: [
|
|
4557
|
-
/* @__PURE__ */ jsx54("span", { css: EntrySearchFilterContainerLabel, children: queryFilterTitle }),
|
|
4558
|
-
/* @__PURE__ */ jsxs33("div", { css: EntrySearchFilterContainer, children: [
|
|
4559
|
-
/* @__PURE__ */ jsxs33("div", { css: EntrySearchFilterGrid("1fr minmax(100px, 0.2fr)"), children: [
|
|
4560
|
-
/* @__PURE__ */ jsx54(
|
|
4561
|
-
InputSelect7,
|
|
4562
|
-
{
|
|
4563
|
-
label: contentTypeLabel,
|
|
4564
|
-
options: [
|
|
4565
|
-
...!requireContentType ? [{ value: "", label: typeSelectorAllTypesOptionText }] : [],
|
|
4566
|
-
...contentTypeOptions ? contentTypeOptions.map((option) => {
|
|
4567
|
-
return { value: option.id, label: option.name };
|
|
4568
|
-
}) : []
|
|
4569
|
-
],
|
|
4570
|
-
onChange: (e) => handleFilterChange({ contentType: e.target.value }),
|
|
4571
|
-
value: queryState.contentType
|
|
4572
|
-
}
|
|
4573
|
-
),
|
|
4574
|
-
/* @__PURE__ */ jsx54(
|
|
4575
|
-
Input7,
|
|
4576
|
-
{
|
|
4577
|
-
label: countLabel,
|
|
4578
|
-
type: "number",
|
|
4579
|
-
onChange: (e) => handleFilterChange({ count: e.target.value }),
|
|
4580
|
-
defaultValue: countValue,
|
|
4581
|
-
value: queryState.count
|
|
4582
|
-
}
|
|
4583
|
-
)
|
|
4584
|
-
] }),
|
|
4585
|
-
/* @__PURE__ */ jsxs33("div", { css: EntrySearchFilterGrid("repeat(2, 1fr)"), children: [
|
|
4586
|
-
/* @__PURE__ */ jsx54(
|
|
4587
|
-
InputSelect7,
|
|
4588
|
-
{
|
|
4589
|
-
label: sortLabel,
|
|
4590
|
-
options: [
|
|
4591
|
-
{
|
|
4592
|
-
label: "Select a sort",
|
|
4593
|
-
value: ""
|
|
4594
|
-
},
|
|
4595
|
-
...sortOptions ? sortOptions.map((option) => {
|
|
4596
|
-
return { value: option.id, label: option.name };
|
|
4597
|
-
}) : []
|
|
4598
|
-
],
|
|
4599
|
-
onChange: (e) => handleFilterChange({ sortBy: e.target.value }),
|
|
4600
|
-
value: queryState.sortBy
|
|
4601
|
-
}
|
|
4602
|
-
),
|
|
4603
|
-
/* @__PURE__ */ jsx54(
|
|
4604
|
-
InputSelect7,
|
|
4605
|
-
{
|
|
4606
|
-
label: sortOrderLabel,
|
|
4607
|
-
options: [
|
|
4608
|
-
...sortOrderOptions ? sortOrderOptions.map((option) => {
|
|
4609
|
-
return { value: option.id, label: option.name };
|
|
4610
|
-
}) : []
|
|
4611
|
-
],
|
|
4612
|
-
onChange: (e) => handleFilterChange({ sortOrder: e.target.value }),
|
|
4613
|
-
value: queryState.sortOrder
|
|
4614
|
-
}
|
|
4615
|
-
)
|
|
4616
|
-
] }),
|
|
4617
|
-
children
|
|
4618
|
-
] })
|
|
4619
|
-
] });
|
|
4620
|
-
};
|
|
4621
|
-
|
|
4622
3898
|
// src/components/MeshApp.tsx
|
|
4623
|
-
import { LoadingIndicator as
|
|
3899
|
+
import { LoadingIndicator as LoadingIndicator2, Theme as Theme2 } from "@uniformdev/design-system";
|
|
4624
3900
|
|
|
4625
3901
|
// src/hooks/useInitializeUniformMeshSdk.ts
|
|
4626
3902
|
import { initializeUniformMeshSDK } from "@uniformdev/mesh-sdk";
|
|
4627
|
-
import { useEffect as
|
|
3903
|
+
import { useEffect as useEffect7, useRef as useRef10, useState as useState9 } from "react";
|
|
4628
3904
|
var useInitializeUniformMeshSdk = ({ autoResizingDisabled } = {}) => {
|
|
4629
|
-
const [error, setError] =
|
|
4630
|
-
const [sdk, setSdk] =
|
|
3905
|
+
const [error, setError] = useState9();
|
|
3906
|
+
const [sdk, setSdk] = useState9();
|
|
4631
3907
|
const initializationInProgress = useRef10(false);
|
|
4632
|
-
|
|
3908
|
+
useEffect7(
|
|
4633
3909
|
() => {
|
|
4634
3910
|
if (typeof window === "undefined" || sdk) {
|
|
4635
3911
|
return;
|
|
@@ -4662,7 +3938,7 @@ var useInitializeUniformMeshSdk = ({ autoResizingDisabled } = {}) => {
|
|
|
4662
3938
|
};
|
|
4663
3939
|
|
|
4664
3940
|
// src/components/MeshApp.tsx
|
|
4665
|
-
import { jsx as
|
|
3941
|
+
import { jsx as jsx44, jsxs as jsxs25 } from "@emotion/react/jsx-runtime";
|
|
4666
3942
|
var MeshApp = ({
|
|
4667
3943
|
children,
|
|
4668
3944
|
loadingComponent,
|
|
@@ -4671,18 +3947,18 @@ var MeshApp = ({
|
|
|
4671
3947
|
const { initializing, error, sdk } = useInitializeUniformMeshSdk();
|
|
4672
3948
|
if (initializing || !sdk) {
|
|
4673
3949
|
const LoadingComponent = loadingComponent;
|
|
4674
|
-
return LoadingComponent ? /* @__PURE__ */
|
|
3950
|
+
return LoadingComponent ? /* @__PURE__ */ jsx44(LoadingComponent, {}) : /* @__PURE__ */ jsx44(LoadingIndicator2, {});
|
|
4675
3951
|
}
|
|
4676
3952
|
if (error) {
|
|
4677
3953
|
const ErrorComponent = errorComponent;
|
|
4678
3954
|
if (ErrorComponent) {
|
|
4679
|
-
return /* @__PURE__ */
|
|
3955
|
+
return /* @__PURE__ */ jsx44(ErrorComponent, { error });
|
|
4680
3956
|
}
|
|
4681
3957
|
throw error;
|
|
4682
3958
|
}
|
|
4683
|
-
return /* @__PURE__ */
|
|
4684
|
-
/* @__PURE__ */
|
|
4685
|
-
/* @__PURE__ */
|
|
3959
|
+
return /* @__PURE__ */ jsxs25(UniformMeshSdkContext.Provider, { value: { sdk }, children: [
|
|
3960
|
+
/* @__PURE__ */ jsx44(Theme2, {}),
|
|
3961
|
+
/* @__PURE__ */ jsx44(UniformMeshLocationContextProvider, { children })
|
|
4686
3962
|
] });
|
|
4687
3963
|
};
|
|
4688
3964
|
|
|
@@ -4706,17 +3982,17 @@ function createLocationValidator(setValue, validate) {
|
|
|
4706
3982
|
// src/index.ts
|
|
4707
3983
|
import {
|
|
4708
3984
|
AddListButton as AddListButton2,
|
|
4709
|
-
Button as
|
|
3985
|
+
Button as Button3,
|
|
4710
3986
|
Callout as Callout4,
|
|
4711
3987
|
Heading,
|
|
4712
|
-
Input as
|
|
3988
|
+
Input as Input7,
|
|
4713
3989
|
InputComboBox,
|
|
4714
|
-
InputKeywordSearch as
|
|
4715
|
-
InputSelect as
|
|
3990
|
+
InputKeywordSearch as InputKeywordSearch2,
|
|
3991
|
+
InputSelect as InputSelect6,
|
|
4716
3992
|
InputToggle,
|
|
4717
|
-
InputKeywordSearch as
|
|
3993
|
+
InputKeywordSearch as InputKeywordSearch3,
|
|
4718
3994
|
Label,
|
|
4719
|
-
LoadingIndicator as
|
|
3995
|
+
LoadingIndicator as LoadingIndicator3,
|
|
4720
3996
|
LoadingOverlay as LoadingOverlay2,
|
|
4721
3997
|
Menu as Menu3,
|
|
4722
3998
|
MenuItem as MenuItem3,
|
|
@@ -4734,7 +4010,7 @@ import {
|
|
|
4734
4010
|
ParameterTextareaInner,
|
|
4735
4011
|
ParameterToggle,
|
|
4736
4012
|
ParameterToggleInner,
|
|
4737
|
-
ScrollableList
|
|
4013
|
+
ScrollableList,
|
|
4738
4014
|
ScrollableListItem,
|
|
4739
4015
|
Switch,
|
|
4740
4016
|
Textarea,
|
|
@@ -4743,38 +4019,26 @@ import {
|
|
|
4743
4019
|
export * from "@uniformdev/mesh-sdk";
|
|
4744
4020
|
export {
|
|
4745
4021
|
AddListButton2 as AddListButton,
|
|
4746
|
-
|
|
4022
|
+
Button3 as Button,
|
|
4747
4023
|
Callout4 as Callout,
|
|
4748
4024
|
DamSelectedItem,
|
|
4749
|
-
DataRefreshButton,
|
|
4750
4025
|
DataResourceVariablesList,
|
|
4751
4026
|
DataSourceEditor,
|
|
4752
4027
|
DataTypeEditor,
|
|
4753
4028
|
DefaultSearchRow,
|
|
4754
4029
|
DefaultSelectedItem,
|
|
4755
4030
|
EntrySearch,
|
|
4756
|
-
EntrySearchContainer,
|
|
4757
|
-
EntrySearchContext,
|
|
4758
|
-
EntrySearchFilter,
|
|
4759
|
-
EntrySearchFilterContainer2 as EntrySearchFilterContainer,
|
|
4760
|
-
EntrySearchListItem,
|
|
4761
|
-
EntrySearchListItemLoadingSkeleton,
|
|
4762
|
-
EntrySearchProvider,
|
|
4763
|
-
EntrySearchResultItem,
|
|
4764
|
-
EntrySearchResultItemButton,
|
|
4765
|
-
EntrySearchResultList,
|
|
4766
4031
|
Heading,
|
|
4767
4032
|
icons_exports as Icons,
|
|
4768
|
-
|
|
4033
|
+
Input7 as Input,
|
|
4769
4034
|
InputComboBox,
|
|
4770
|
-
|
|
4771
|
-
|
|
4035
|
+
InputKeywordSearch2 as InputKeywordSearch,
|
|
4036
|
+
InputSelect6 as InputSelect,
|
|
4772
4037
|
InputToggle,
|
|
4773
4038
|
InputVariables,
|
|
4774
|
-
|
|
4039
|
+
InputKeywordSearch3 as KeywordSearchInput,
|
|
4775
4040
|
Label,
|
|
4776
|
-
|
|
4777
|
-
LoadingIndicator4 as LoadingIndicator,
|
|
4041
|
+
LoadingIndicator3 as LoadingIndicator,
|
|
4778
4042
|
LoadingOverlay2 as LoadingOverlay,
|
|
4779
4043
|
Menu3 as Menu,
|
|
4780
4044
|
MenuItem3 as MenuItem,
|
|
@@ -4801,8 +4065,6 @@ export {
|
|
|
4801
4065
|
ProductSearchContext,
|
|
4802
4066
|
ProductSearchRow,
|
|
4803
4067
|
ProductSelectedItem,
|
|
4804
|
-
PublishStatus,
|
|
4805
|
-
QueryFilter,
|
|
4806
4068
|
RequestBody,
|
|
4807
4069
|
RequestHeaders,
|
|
4808
4070
|
RequestMethodSelect,
|
|
@@ -4812,7 +4074,7 @@ export {
|
|
|
4812
4074
|
RequestUrl,
|
|
4813
4075
|
RequestUrlInput,
|
|
4814
4076
|
ResolvableLoadingValue,
|
|
4815
|
-
|
|
4077
|
+
ScrollableList,
|
|
4816
4078
|
ScrollableListItem,
|
|
4817
4079
|
SelectionField,
|
|
4818
4080
|
Switch,
|
|
@@ -4891,7 +4153,6 @@ export {
|
|
|
4891
4153
|
selectedItemTitle,
|
|
4892
4154
|
urlEncodeRequestParameter,
|
|
4893
4155
|
urlEncodeRequestUrl,
|
|
4894
|
-
useEntrySearchContext,
|
|
4895
4156
|
useInitializeUniformMeshSdk,
|
|
4896
4157
|
useMeshLocation,
|
|
4897
4158
|
useParameterShell,
|