@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.js
CHANGED
|
@@ -33,10 +33,10 @@ var src_exports = {};
|
|
|
33
33
|
__export(src_exports, {
|
|
34
34
|
$createVariableNode: () => $createVariableNode,
|
|
35
35
|
$isVariableNode: () => $isVariableNode,
|
|
36
|
-
AddListButton: () =>
|
|
37
|
-
Button: () =>
|
|
36
|
+
AddListButton: () => import_design_system54.AddListButton,
|
|
37
|
+
Button: () => import_design_system54.Button,
|
|
38
38
|
CHECKBOX_OPERATORS: () => CHECKBOX_OPERATORS,
|
|
39
|
-
Callout: () =>
|
|
39
|
+
Callout: () => import_design_system54.Callout,
|
|
40
40
|
ControlledValuePlugin: () => ControlledValuePlugin,
|
|
41
41
|
DATE_OPERATORS: () => DATE_OPERATORS,
|
|
42
42
|
DATE_TIME_OPERATORS: () => DATE_TIME_OPERATORS,
|
|
@@ -52,7 +52,7 @@ __export(src_exports, {
|
|
|
52
52
|
DelegationContext: () => DelegationContext,
|
|
53
53
|
DelegationGate: () => DelegationGate,
|
|
54
54
|
DelegationProvider: () => DelegationProvider,
|
|
55
|
-
DrawerContent: () =>
|
|
55
|
+
DrawerContent: () => import_design_system54.DrawerContent,
|
|
56
56
|
EDIT_VARIABLE_COMMAND: () => EDIT_VARIABLE_COMMAND,
|
|
57
57
|
FilterButton: () => FilterButton2,
|
|
58
58
|
FilterControls: () => FilterControls,
|
|
@@ -62,22 +62,22 @@ __export(src_exports, {
|
|
|
62
62
|
FilterMenu: () => FilterMenu,
|
|
63
63
|
FilterMultiChoiceEditor: () => FilterMultiChoiceEditor,
|
|
64
64
|
FilterSingleChoiceEditor: () => FilterSingleChoiceEditor,
|
|
65
|
-
Heading: () =>
|
|
65
|
+
Heading: () => import_design_system54.Heading,
|
|
66
66
|
INSERT_VARIABLE_COMMAND: () => INSERT_VARIABLE_COMMAND,
|
|
67
67
|
Icons: () => icons_exports,
|
|
68
|
-
Input: () =>
|
|
69
|
-
InputComboBox: () =>
|
|
70
|
-
InputKeywordSearch: () =>
|
|
71
|
-
InputSelect: () =>
|
|
72
|
-
InputToggle: () =>
|
|
68
|
+
Input: () => import_design_system54.Input,
|
|
69
|
+
InputComboBox: () => import_design_system54.InputComboBox,
|
|
70
|
+
InputKeywordSearch: () => import_design_system54.InputKeywordSearch,
|
|
71
|
+
InputSelect: () => import_design_system54.InputSelect,
|
|
72
|
+
InputToggle: () => import_design_system54.InputToggle,
|
|
73
73
|
InputVariables: () => InputVariables,
|
|
74
|
-
Label: () =>
|
|
74
|
+
Label: () => import_design_system54.Label,
|
|
75
75
|
LinkButton: () => LinkButton,
|
|
76
|
-
LoadingIndicator: () =>
|
|
77
|
-
LoadingOverlay: () =>
|
|
76
|
+
LoadingIndicator: () => import_design_system54.LoadingIndicator,
|
|
77
|
+
LoadingOverlay: () => import_design_system54.LoadingOverlay,
|
|
78
78
|
MULTI_SELECT_OPERATORS: () => MULTI_SELECT_OPERATORS,
|
|
79
|
-
Menu: () =>
|
|
80
|
-
MenuItem: () =>
|
|
79
|
+
Menu: () => import_design_system54.Menu,
|
|
80
|
+
MenuItem: () => import_design_system54.MenuItem,
|
|
81
81
|
MeshApp: () => MeshApp,
|
|
82
82
|
NUMBER_OPERATORS: () => NUMBER_OPERATORS,
|
|
83
83
|
NumberEditor: () => NumberEditor,
|
|
@@ -96,22 +96,22 @@ __export(src_exports, {
|
|
|
96
96
|
PUBLISH_STATUS_FIELD_OPERATORS: () => PUBLISH_STATUS_FIELD_OPERATORS,
|
|
97
97
|
ParamTypeDynamicDataProvider: () => ParamTypeDynamicDataProvider,
|
|
98
98
|
ParameterConnectionIndicator: () => ParameterConnectionIndicator,
|
|
99
|
-
ParameterGroup: () =>
|
|
100
|
-
ParameterImage: () =>
|
|
101
|
-
ParameterImageInner: () =>
|
|
102
|
-
ParameterInput: () =>
|
|
103
|
-
ParameterInputInner: () =>
|
|
104
|
-
ParameterLabel: () =>
|
|
105
|
-
ParameterMenuButton: () =>
|
|
99
|
+
ParameterGroup: () => import_design_system54.ParameterGroup,
|
|
100
|
+
ParameterImage: () => import_design_system54.ParameterImage,
|
|
101
|
+
ParameterImageInner: () => import_design_system54.ParameterImageInner,
|
|
102
|
+
ParameterInput: () => import_design_system54.ParameterInput,
|
|
103
|
+
ParameterInputInner: () => import_design_system54.ParameterInputInner,
|
|
104
|
+
ParameterLabel: () => import_design_system54.ParameterLabel,
|
|
105
|
+
ParameterMenuButton: () => import_design_system54.ParameterMenuButton,
|
|
106
106
|
ParameterOrSingleVariable: () => ParameterOrSingleVariable,
|
|
107
|
-
ParameterSelect: () =>
|
|
108
|
-
ParameterSelectInner: () =>
|
|
109
|
-
ParameterShell: () =>
|
|
107
|
+
ParameterSelect: () => import_design_system54.ParameterSelect,
|
|
108
|
+
ParameterSelectInner: () => import_design_system54.ParameterSelectInner,
|
|
109
|
+
ParameterShell: () => import_design_system54.ParameterShell,
|
|
110
110
|
ParameterShellContext: () => import_design_system2.ParameterShellContext,
|
|
111
|
-
ParameterTextarea: () =>
|
|
112
|
-
ParameterTextareaInner: () =>
|
|
113
|
-
ParameterToggle: () =>
|
|
114
|
-
ParameterToggleInner: () =>
|
|
111
|
+
ParameterTextarea: () => import_design_system54.ParameterTextarea,
|
|
112
|
+
ParameterTextareaInner: () => import_design_system54.ParameterTextareaInner,
|
|
113
|
+
ParameterToggle: () => import_design_system54.ParameterToggle,
|
|
114
|
+
ParameterToggleInner: () => import_design_system54.ParameterToggleInner,
|
|
115
115
|
ParameterVariables: () => ParameterVariables,
|
|
116
116
|
QueryFilter: () => QueryFilter,
|
|
117
117
|
RICHTEXT_OPERATORS: () => RICHTEXT_OPERATORS,
|
|
@@ -125,8 +125,8 @@ __export(src_exports, {
|
|
|
125
125
|
RequestUrlInput: () => RequestUrlInput,
|
|
126
126
|
SELECT_OPERATORS: () => SELECT_OPERATORS,
|
|
127
127
|
SYSTEM_FIELD_OPERATORS: () => SYSTEM_FIELD_OPERATORS,
|
|
128
|
-
ScrollableList: () =>
|
|
129
|
-
ScrollableListItem: () =>
|
|
128
|
+
ScrollableList: () => import_design_system54.ScrollableList,
|
|
129
|
+
ScrollableListItem: () => import_design_system54.ScrollableListItem,
|
|
130
130
|
SearchAndFilter: () => SearchAndFilter,
|
|
131
131
|
SearchAndFilterContext: () => SearchAndFilterContext,
|
|
132
132
|
SearchAndFilterOptionsContainer: () => SearchAndFilterOptionsContainer2,
|
|
@@ -137,13 +137,13 @@ __export(src_exports, {
|
|
|
137
137
|
SortItems: () => SortItems,
|
|
138
138
|
StatusMultiEditor: () => StatusMultiEditor,
|
|
139
139
|
StatusSingleEditor: () => StatusSingleEditor,
|
|
140
|
-
Switch: () =>
|
|
140
|
+
Switch: () => import_design_system54.Switch,
|
|
141
141
|
TEXTBOX_OPERATORS: () => TEXTBOX_OPERATORS,
|
|
142
142
|
TextEditor: () => TextEditor,
|
|
143
143
|
TextMultiChoiceEditor: () => TextMultiChoiceEditor,
|
|
144
144
|
TextVariableRenderer: () => TextVariableRenderer,
|
|
145
|
-
Textarea: () =>
|
|
146
|
-
Theme: () =>
|
|
145
|
+
Textarea: () => import_design_system54.Textarea,
|
|
146
|
+
Theme: () => import_design_system54.Theme,
|
|
147
147
|
USER_OPERATORS: () => USER_OPERATORS,
|
|
148
148
|
VariableChip: () => VariableChip,
|
|
149
149
|
VariableEditor: () => VariableEditor,
|
|
@@ -177,7 +177,7 @@ __export(src_exports, {
|
|
|
177
177
|
useVariableEditor: () => useVariableEditor,
|
|
178
178
|
useVariables: () => useVariables,
|
|
179
179
|
useVariablesMenu: () => useVariablesMenu,
|
|
180
|
-
utilityColors: () =>
|
|
180
|
+
utilityColors: () => import_design_system54.utilityColors,
|
|
181
181
|
variableDefaultTextValue: () => variableDefaultTextValue,
|
|
182
182
|
variablePrefix: () => variablePrefix,
|
|
183
183
|
variableSuffix: () => variableSuffix,
|
|
@@ -2460,7 +2460,7 @@ function VariablesComposer(props) {
|
|
|
2460
2460
|
nodes: [VariableNode],
|
|
2461
2461
|
editorState: deserializeVariablesEditorState(props.value)
|
|
2462
2462
|
}),
|
|
2463
|
-
//
|
|
2463
|
+
// oxlint-disable-next-line react/exhaustive-deps
|
|
2464
2464
|
[]
|
|
2465
2465
|
);
|
|
2466
2466
|
const editorState = (0, import_react27.useRef)(void 0);
|
|
@@ -4006,7 +4006,36 @@ function convertRequestDataToDataType(dataType, requestData) {
|
|
|
4006
4006
|
}
|
|
4007
4007
|
|
|
4008
4008
|
// src/components/Delegation/DelegationGate.tsx
|
|
4009
|
+
var import_design_system19 = require("@uniformdev/design-system");
|
|
4009
4010
|
var import_jsx_runtime45 = require("@emotion/react/jsx-runtime");
|
|
4011
|
+
var defaultLoadingWrapperStyle = {
|
|
4012
|
+
position: "relative",
|
|
4013
|
+
minHeight: "12rem",
|
|
4014
|
+
width: "100%"
|
|
4015
|
+
};
|
|
4016
|
+
function DefaultDelegationLoading() {
|
|
4017
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { style: defaultLoadingWrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_design_system19.LoadingOverlay, { isActive: true, statusMessage: "Connecting to Uniform..." }) });
|
|
4018
|
+
}
|
|
4019
|
+
function DefaultDelegationDisabled() {
|
|
4020
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_design_system19.Callout, { 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." });
|
|
4021
|
+
}
|
|
4022
|
+
function DefaultDelegationError({ error }) {
|
|
4023
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_design_system19.Callout, { type: "error", title: "Connection error", children: [
|
|
4024
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { children: "Failed to establish a secure connection with Uniform." }),
|
|
4025
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4026
|
+
"pre",
|
|
4027
|
+
{
|
|
4028
|
+
style: {
|
|
4029
|
+
marginTop: 8,
|
|
4030
|
+
marginBottom: 0,
|
|
4031
|
+
whiteSpace: "pre-wrap",
|
|
4032
|
+
wordBreak: "break-word"
|
|
4033
|
+
},
|
|
4034
|
+
children: error.message
|
|
4035
|
+
}
|
|
4036
|
+
)
|
|
4037
|
+
] });
|
|
4038
|
+
}
|
|
4010
4039
|
function DelegationGate({
|
|
4011
4040
|
children,
|
|
4012
4041
|
loadingComponent,
|
|
@@ -4018,17 +4047,20 @@ function DelegationGate({
|
|
|
4018
4047
|
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children });
|
|
4019
4048
|
}
|
|
4020
4049
|
if (status === "idle" || status === "acquiring") {
|
|
4021
|
-
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: loadingComponent
|
|
4050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: loadingComponent !== void 0 ? loadingComponent : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DefaultDelegationLoading, {}) });
|
|
4022
4051
|
}
|
|
4023
4052
|
if (status === "disabled") {
|
|
4024
|
-
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: disabledComponent
|
|
4053
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: disabledComponent !== void 0 ? disabledComponent : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DefaultDelegationDisabled, {}) });
|
|
4025
4054
|
}
|
|
4026
4055
|
if (status === "error") {
|
|
4027
4056
|
const resolvedError = error != null ? error : new Error("Unknown delegation error");
|
|
4028
|
-
if (
|
|
4029
|
-
|
|
4057
|
+
if (errorComponent !== void 0) {
|
|
4058
|
+
if (typeof errorComponent === "function") {
|
|
4059
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: errorComponent({ error: resolvedError }) });
|
|
4060
|
+
}
|
|
4061
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: errorComponent });
|
|
4030
4062
|
}
|
|
4031
|
-
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DefaultDelegationError, { error: resolvedError });
|
|
4032
4064
|
}
|
|
4033
4065
|
return null;
|
|
4034
4066
|
}
|
|
@@ -4036,11 +4068,21 @@ function DelegationGate({
|
|
|
4036
4068
|
// src/components/Delegation/DelegationProvider.tsx
|
|
4037
4069
|
var import_react43 = require("react");
|
|
4038
4070
|
var import_jsx_runtime46 = require("@emotion/react/jsx-runtime");
|
|
4039
|
-
|
|
4071
|
+
var DEFAULT_REVALIDATE_AFTER_MS = 5 * 60 * 1e3;
|
|
4072
|
+
function DelegationProvider({
|
|
4073
|
+
sdk,
|
|
4074
|
+
onSessionToken,
|
|
4075
|
+
checkActive,
|
|
4076
|
+
revalidateOnFocus = true,
|
|
4077
|
+
revalidateAfterMs = DEFAULT_REVALIDATE_AFTER_MS,
|
|
4078
|
+
children
|
|
4079
|
+
}) {
|
|
4040
4080
|
const [status, setStatus] = (0, import_react43.useState)("idle");
|
|
4041
4081
|
const [error, setError] = (0, import_react43.useState)(null);
|
|
4042
4082
|
const acquiringRef = (0, import_react43.useRef)(false);
|
|
4043
4083
|
const mountedRef = (0, import_react43.useRef)(true);
|
|
4084
|
+
const statusRef = (0, import_react43.useRef)("idle");
|
|
4085
|
+
statusRef.current = status;
|
|
4044
4086
|
const acquire = (0, import_react43.useCallback)(async () => {
|
|
4045
4087
|
if (acquiringRef.current) {
|
|
4046
4088
|
return;
|
|
@@ -4087,6 +4129,50 @@ function DelegationProvider({ sdk, onSessionToken, checkActive, children }) {
|
|
|
4087
4129
|
mountedRef.current = false;
|
|
4088
4130
|
};
|
|
4089
4131
|
}, [acquire]);
|
|
4132
|
+
const revalidate = (0, import_react43.useCallback)(async () => {
|
|
4133
|
+
if (acquiringRef.current) {
|
|
4134
|
+
return;
|
|
4135
|
+
}
|
|
4136
|
+
if (statusRef.current !== "active") {
|
|
4137
|
+
return;
|
|
4138
|
+
}
|
|
4139
|
+
try {
|
|
4140
|
+
const isActive = await checkActive();
|
|
4141
|
+
if (!mountedRef.current) {
|
|
4142
|
+
return;
|
|
4143
|
+
}
|
|
4144
|
+
if (!isActive) {
|
|
4145
|
+
void acquire();
|
|
4146
|
+
}
|
|
4147
|
+
} catch (e) {
|
|
4148
|
+
}
|
|
4149
|
+
}, [checkActive, acquire]);
|
|
4150
|
+
(0, import_react43.useEffect)(() => {
|
|
4151
|
+
if (!revalidateOnFocus) {
|
|
4152
|
+
return;
|
|
4153
|
+
}
|
|
4154
|
+
if (typeof document === "undefined") {
|
|
4155
|
+
return;
|
|
4156
|
+
}
|
|
4157
|
+
let hiddenAt = document.visibilityState === "hidden" ? Date.now() : null;
|
|
4158
|
+
const handleVisibilityChange = () => {
|
|
4159
|
+
if (document.visibilityState === "hidden") {
|
|
4160
|
+
hiddenAt = Date.now();
|
|
4161
|
+
return;
|
|
4162
|
+
}
|
|
4163
|
+
if (document.visibilityState === "visible") {
|
|
4164
|
+
const elapsed = hiddenAt === null ? 0 : Date.now() - hiddenAt;
|
|
4165
|
+
hiddenAt = null;
|
|
4166
|
+
if (elapsed >= revalidateAfterMs) {
|
|
4167
|
+
void revalidate();
|
|
4168
|
+
}
|
|
4169
|
+
}
|
|
4170
|
+
};
|
|
4171
|
+
document.addEventListener("visibilitychange", handleVisibilityChange);
|
|
4172
|
+
return () => {
|
|
4173
|
+
document.removeEventListener("visibilitychange", handleVisibilityChange);
|
|
4174
|
+
};
|
|
4175
|
+
}, [revalidateOnFocus, revalidateAfterMs, revalidate]);
|
|
4090
4176
|
const reacquire = (0, import_react43.useCallback)(() => {
|
|
4091
4177
|
void acquire();
|
|
4092
4178
|
}, [acquire]);
|
|
@@ -4095,7 +4181,7 @@ function DelegationProvider({ sdk, onSessionToken, checkActive, children }) {
|
|
|
4095
4181
|
}
|
|
4096
4182
|
|
|
4097
4183
|
// src/components/MeshApp.tsx
|
|
4098
|
-
var
|
|
4184
|
+
var import_design_system20 = require("@uniformdev/design-system");
|
|
4099
4185
|
|
|
4100
4186
|
// src/hooks/useInitializeUniformMeshSdk.ts
|
|
4101
4187
|
var import_mesh_sdk = require("@uniformdev/mesh-sdk");
|
|
@@ -4122,7 +4208,7 @@ var useInitializeUniformMeshSdk = ({ autoResizingDisabled } = {}) => {
|
|
|
4122
4208
|
setSdk(window.UniformMeshSDK);
|
|
4123
4209
|
}
|
|
4124
4210
|
},
|
|
4125
|
-
//
|
|
4211
|
+
// oxlint-disable-next-line react/exhaustive-deps
|
|
4126
4212
|
[autoResizingDisabled]
|
|
4127
4213
|
);
|
|
4128
4214
|
return {
|
|
@@ -4146,7 +4232,7 @@ var MeshApp = ({
|
|
|
4146
4232
|
const { initializing, error, sdk } = useInitializeUniformMeshSdk();
|
|
4147
4233
|
if (initializing || !sdk) {
|
|
4148
4234
|
const LoadingComponent = loadingComponent;
|
|
4149
|
-
return LoadingComponent ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(LoadingComponent, {}) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4235
|
+
return LoadingComponent ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(LoadingComponent, {}) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_design_system20.LoadingIndicator, {});
|
|
4150
4236
|
}
|
|
4151
4237
|
if (error) {
|
|
4152
4238
|
const ErrorComponent = errorComponent;
|
|
@@ -4156,14 +4242,14 @@ var MeshApp = ({
|
|
|
4156
4242
|
throw error;
|
|
4157
4243
|
}
|
|
4158
4244
|
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(UniformMeshSdkContext.Provider, { value: { sdk }, children: [
|
|
4159
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4160
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(UniformMeshLocationContextProvider, { children })
|
|
4245
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_design_system20.Theme, {}),
|
|
4246
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_design_system20.IconsProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(UniformMeshLocationContextProvider, { children }) })
|
|
4161
4247
|
] });
|
|
4162
4248
|
};
|
|
4163
4249
|
|
|
4164
4250
|
// src/components/ObjectSearch/DataRefreshButton.tsx
|
|
4165
4251
|
var import_react45 = require("@emotion/react");
|
|
4166
|
-
var
|
|
4252
|
+
var import_design_system21 = require("@uniformdev/design-system");
|
|
4167
4253
|
var import_jsx_runtime48 = require("@emotion/react/jsx-runtime");
|
|
4168
4254
|
var DataRefreshButton = ({
|
|
4169
4255
|
buttonText,
|
|
@@ -4171,9 +4257,9 @@ var DataRefreshButton = ({
|
|
|
4171
4257
|
onRefreshData,
|
|
4172
4258
|
...props
|
|
4173
4259
|
}) => {
|
|
4174
|
-
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
4260
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_design_system21.Button, { buttonType: "ghost", onClick: onRefreshData, disabled: isLoading, ...props, children: [
|
|
4175
4261
|
!isLoading ? null : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4176
|
-
|
|
4262
|
+
import_design_system21.LoadingIndicator,
|
|
4177
4263
|
{
|
|
4178
4264
|
css: import_react45.css`
|
|
4179
4265
|
${isLoading ? "opacity: 0.2;" : void 0}
|
|
@@ -4187,7 +4273,7 @@ var DataRefreshButton = ({
|
|
|
4187
4273
|
// src/components/ObjectSearch/ObjectSearchContainer.tsx
|
|
4188
4274
|
var import_react48 = require("@emotion/react");
|
|
4189
4275
|
var import_canvas9 = require("@uniformdev/canvas");
|
|
4190
|
-
var
|
|
4276
|
+
var import_design_system24 = require("@uniformdev/design-system");
|
|
4191
4277
|
|
|
4192
4278
|
// src/components/ObjectSearch/hooks/ObjectSearchContext.tsx
|
|
4193
4279
|
var import_canvas8 = require("@uniformdev/canvas");
|
|
@@ -4301,11 +4387,11 @@ function bindQuery(query, inputs) {
|
|
|
4301
4387
|
}
|
|
4302
4388
|
|
|
4303
4389
|
// src/components/ObjectSearch/ObjectSearchListItem.tsx
|
|
4304
|
-
var
|
|
4390
|
+
var import_design_system23 = require("@uniformdev/design-system");
|
|
4305
4391
|
|
|
4306
4392
|
// src/components/ObjectSearch/styles/ObjectSearchListItem.styles.ts
|
|
4307
4393
|
var import_react47 = require("@emotion/react");
|
|
4308
|
-
var
|
|
4394
|
+
var import_design_system22 = require("@uniformdev/design-system");
|
|
4309
4395
|
var ObjectListItemContainer = import_react47.css`
|
|
4310
4396
|
align-items: center;
|
|
4311
4397
|
border: 1px solid var(--gray-300);
|
|
@@ -4320,7 +4406,7 @@ var ObjectListItemContainerDisabled = import_react47.css`
|
|
|
4320
4406
|
pointer-events: none;
|
|
4321
4407
|
`;
|
|
4322
4408
|
var ObjectListItemLoading = import_react47.css`
|
|
4323
|
-
animation: ${
|
|
4409
|
+
animation: ${import_design_system22.skeletonLoading} 1s linear infinite alternate;
|
|
4324
4410
|
border-color: transparent;
|
|
4325
4411
|
min-height: 42px;
|
|
4326
4412
|
position: relative;
|
|
@@ -4437,8 +4523,8 @@ var ObjectSearchListItem = ({
|
|
|
4437
4523
|
}
|
|
4438
4524
|
),
|
|
4439
4525
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { css: ObjectListItemInfoContainer, children: [
|
|
4440
|
-
selected ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
4441
|
-
!popoverData ? null : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
4526
|
+
selected ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_design_system23.Chip, { text: "selected", size: "xs" }) : null,
|
|
4527
|
+
!popoverData ? null : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_design_system23.Popover, { ariaLabel: title, buttonText: `See ${title} details`, children: popoverData })
|
|
4442
4528
|
] }),
|
|
4443
4529
|
!children ? null : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { css: ObjectListItemUnControlledContent, children })
|
|
4444
4530
|
]
|
|
@@ -4463,7 +4549,7 @@ var ObjectSearchContainer = ({
|
|
|
4463
4549
|
const { flatVariables } = useVariables(true);
|
|
4464
4550
|
const inputValue = (_b = (_a = selectedListItems == null ? void 0 : selectedListItems[0]) == null ? void 0 : _a.id) != null ? _b : "";
|
|
4465
4551
|
const listItems = resultList != null ? resultList : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
4466
|
-
|
|
4552
|
+
import_design_system24.ScrollableList,
|
|
4467
4553
|
{
|
|
4468
4554
|
role: "list",
|
|
4469
4555
|
css: import_react48.css`
|
|
@@ -4474,7 +4560,7 @@ var ObjectSearchContainer = ({
|
|
|
4474
4560
|
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DefaultResultList, {})
|
|
4475
4561
|
}
|
|
4476
4562
|
);
|
|
4477
|
-
const body = /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
4563
|
+
const body = /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_design_system24.VerticalRhythm, { children: [
|
|
4478
4564
|
searchFilters,
|
|
4479
4565
|
listItems
|
|
4480
4566
|
] });
|
|
@@ -4505,8 +4591,8 @@ var ObjectSearchContainer = ({
|
|
|
4505
4591
|
}
|
|
4506
4592
|
]);
|
|
4507
4593
|
};
|
|
4508
|
-
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
4509
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
4594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_design_system24.VerticalRhythm, { children: [
|
|
4595
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_design_system24.Container, { backgroundColor: "gray-50", padding: "var(--spacing-base)", border: true, children: label ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
4510
4596
|
InputVariables,
|
|
4511
4597
|
{
|
|
4512
4598
|
label,
|
|
@@ -4531,13 +4617,13 @@ var DefaultResultList = () => {
|
|
|
4531
4617
|
return Array.from(Array(5).keys()).map((i) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ObjectSearchListItemLoadingSkeleton, {}, i));
|
|
4532
4618
|
}
|
|
4533
4619
|
if (list.items.length === 0) {
|
|
4534
|
-
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
4620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_design_system24.Callout, { type: "info", children: "No results were found" });
|
|
4535
4621
|
}
|
|
4536
4622
|
return (_a = list.items) == null ? void 0 : _a.map((item) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ObjectSearchListItem, { ...item }, item.id));
|
|
4537
4623
|
};
|
|
4538
4624
|
|
|
4539
4625
|
// src/components/ObjectSearch/ObjectSearchFilter.tsx
|
|
4540
|
-
var
|
|
4626
|
+
var import_design_system25 = require("@uniformdev/design-system");
|
|
4541
4627
|
var import_react50 = require("react");
|
|
4542
4628
|
|
|
4543
4629
|
// src/components/ObjectSearch/styles/ObjectSearchFilterContainer.styles.ts
|
|
@@ -4601,7 +4687,7 @@ var ObjectSearchFilter = ({
|
|
|
4601
4687
|
],
|
|
4602
4688
|
children: [
|
|
4603
4689
|
memoizedSelectOptions.length ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
4604
|
-
|
|
4690
|
+
import_design_system25.InputSelect,
|
|
4605
4691
|
{
|
|
4606
4692
|
label: selectLabel,
|
|
4607
4693
|
showLabel: false,
|
|
@@ -4611,7 +4697,7 @@ var ObjectSearchFilter = ({
|
|
|
4611
4697
|
}
|
|
4612
4698
|
) : null,
|
|
4613
4699
|
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
4614
|
-
|
|
4700
|
+
import_design_system25.DebouncedInputKeywordSearch,
|
|
4615
4701
|
{
|
|
4616
4702
|
inputFieldName: searchInputName,
|
|
4617
4703
|
placeholder: searchInputPlaceholderText,
|
|
@@ -4633,7 +4719,7 @@ var ObjectSearchFilterContainer2 = ({ children }) => {
|
|
|
4633
4719
|
};
|
|
4634
4720
|
|
|
4635
4721
|
// src/components/ObjectSearch/ObjectSearchResultItem.tsx
|
|
4636
|
-
var
|
|
4722
|
+
var import_design_system27 = require("@uniformdev/design-system");
|
|
4637
4723
|
var import_timeago = require("timeago.js");
|
|
4638
4724
|
|
|
4639
4725
|
// src/components/Image/Image.tsx
|
|
@@ -4645,9 +4731,9 @@ function Image({ src, alt, className }) {
|
|
|
4645
4731
|
|
|
4646
4732
|
// src/components/ObjectSearch/styles/ObjectSearchResultItemButton.styles.ts
|
|
4647
4733
|
var import_react51 = require("@emotion/react");
|
|
4648
|
-
var
|
|
4734
|
+
var import_design_system26 = require("@uniformdev/design-system");
|
|
4649
4735
|
var ButtonStyles = import_react51.css`
|
|
4650
|
-
${
|
|
4736
|
+
${import_design_system26.button}
|
|
4651
4737
|
background: transparent;
|
|
4652
4738
|
border: 1px solid var(--typography-base);
|
|
4653
4739
|
color: var(--typography-base);
|
|
@@ -4809,7 +4895,7 @@ var ObjectSearchResultItem = ({
|
|
|
4809
4895
|
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { css: ObjectSearchResultItemSubtitle, "data-testid": "sub-title", children: formatedContentType }),
|
|
4810
4896
|
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { role: "heading", css: ObjectSearchResultItemTitle, "data-testid": "title", children: [
|
|
4811
4897
|
onClick ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
4812
|
-
|
|
4898
|
+
import_design_system27.Link,
|
|
4813
4899
|
{
|
|
4814
4900
|
onClick: (e) => {
|
|
4815
4901
|
e.preventDefault();
|
|
@@ -4821,10 +4907,10 @@ var ObjectSearchResultItem = ({
|
|
|
4821
4907
|
css: ObjectSearchResultItemTitleLink
|
|
4822
4908
|
}
|
|
4823
4909
|
) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { children: title != null ? title : name }),
|
|
4824
|
-
!popoverData ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
4910
|
+
!popoverData ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_design_system27.Popover, { ariaLabel: title, buttonText: `See ${title} details`, children: popoverData })
|
|
4825
4911
|
] }),
|
|
4826
4912
|
!createdAt && !publishStatus ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { css: ObjectSearchAuthorStateGroup, children: [
|
|
4827
|
-
!(publishStatus == null ? void 0 : publishStatus.text) ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
4913
|
+
!(publishStatus == null ? void 0 : publishStatus.text) ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_design_system27.Chip, { theme: legacyThemeMapper(publishStatus.theme), text: publishStatus.text, size: "xs" }),
|
|
4828
4914
|
!createdAt && !publishedAt ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { css: ObjectSearchUpdateGroup, children: [
|
|
4829
4915
|
!createdAt ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("small", { css: ObjectSearchResultItemTimeStamp, children: [
|
|
4830
4916
|
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("strong", { children: "Last updated: " }),
|
|
@@ -4841,7 +4927,7 @@ var ObjectSearchResultItem = ({
|
|
|
4841
4927
|
] }) }),
|
|
4842
4928
|
!editLink && hideRemoveButton ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { css: ObjectSearchAuthorStateGroup, children: [
|
|
4843
4929
|
!editLink ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(LinkButton, { text: "Edit", href: editLink, icon: editLinkIcon }),
|
|
4844
|
-
hideRemoveButton ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
4930
|
+
hideRemoveButton ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_design_system27.Button, { buttonType: "ghostDestructive", onClick: onRemoveItem, children: "Remove" })
|
|
4845
4931
|
] })
|
|
4846
4932
|
] });
|
|
4847
4933
|
};
|
|
@@ -4862,7 +4948,7 @@ function legacyThemeMapper(theme) {
|
|
|
4862
4948
|
|
|
4863
4949
|
// src/components/ObjectSearch/ObjectSearchResultList.tsx
|
|
4864
4950
|
var import_dnd3 = require("@hello-pangea/dnd");
|
|
4865
|
-
var
|
|
4951
|
+
var import_design_system28 = require("@uniformdev/design-system");
|
|
4866
4952
|
|
|
4867
4953
|
// src/components/ObjectSearch/styles/ObjectSearchResultList.styles.ts
|
|
4868
4954
|
var import_react53 = require("@emotion/react");
|
|
@@ -4947,12 +5033,12 @@ function ObjectSearchResultList({
|
|
|
4947
5033
|
!resultLabelOverride ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { role: "note", css: ObjectSearchResultListCounterContainer, children: [
|
|
4948
5034
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { css: ObjectSearchResultListTitle, children: resultLabelText }),
|
|
4949
5035
|
" ",
|
|
4950
|
-
!selectedListItems.length ? null : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
5036
|
+
!selectedListItems.length ? null : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_design_system28.Counter, { count: selectedListItems.length })
|
|
4951
5037
|
] }) : resultLabelOverride,
|
|
4952
5038
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { css: ObjectSearchResultListCounterContainer, children: [
|
|
4953
5039
|
additionalButtons,
|
|
4954
5040
|
hideRemoveButton ? null : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
4955
|
-
|
|
5041
|
+
import_design_system28.Button,
|
|
4956
5042
|
{
|
|
4957
5043
|
buttonType: "ghostDestructive",
|
|
4958
5044
|
size: "xs",
|
|
@@ -4990,7 +5076,7 @@ function ObjectSearchResultList({
|
|
|
4990
5076
|
}
|
|
4991
5077
|
|
|
4992
5078
|
// src/components/ObjectSearch/QueryFilter.tsx
|
|
4993
|
-
var
|
|
5079
|
+
var import_design_system29 = require("@uniformdev/design-system");
|
|
4994
5080
|
var import_react54 = require("react");
|
|
4995
5081
|
var import_jsx_runtime58 = require("@emotion/react/jsx-runtime");
|
|
4996
5082
|
var QueryFilter = ({
|
|
@@ -5036,7 +5122,7 @@ var QueryFilter = ({
|
|
|
5036
5122
|
}, []);
|
|
5037
5123
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("fieldset", { children: [
|
|
5038
5124
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { css: ObjectSearchFilterContainerLabel, children: queryFilterTitle }),
|
|
5039
|
-
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { css: ObjectSearchFilterContainer, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
5125
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { css: ObjectSearchFilterContainer, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_design_system29.VerticalRhythm, { children: [
|
|
5040
5126
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5041
5127
|
InputVariables,
|
|
5042
5128
|
{
|
|
@@ -5046,7 +5132,7 @@ var QueryFilter = ({
|
|
|
5046
5132
|
disableInlineMenu: true,
|
|
5047
5133
|
id: "qf_searchText",
|
|
5048
5134
|
inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5049
|
-
|
|
5135
|
+
import_design_system29.DebouncedInputKeywordSearch,
|
|
5050
5136
|
{
|
|
5051
5137
|
id: "qf_searchText",
|
|
5052
5138
|
inputFieldName: searchInputName,
|
|
@@ -5069,7 +5155,7 @@ var QueryFilter = ({
|
|
|
5069
5155
|
onChange: (newType) => handleFilterChange({ contentType: newType }),
|
|
5070
5156
|
disableInlineMenu: true,
|
|
5071
5157
|
inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5072
|
-
|
|
5158
|
+
import_design_system29.InputSelect,
|
|
5073
5159
|
{
|
|
5074
5160
|
id: "qf_contentType",
|
|
5075
5161
|
label: contentTypeLabel,
|
|
@@ -5092,7 +5178,7 @@ var QueryFilter = ({
|
|
|
5092
5178
|
disableInlineMenu: true,
|
|
5093
5179
|
valueToResetTo: "5",
|
|
5094
5180
|
inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5095
|
-
|
|
5181
|
+
import_design_system29.Input,
|
|
5096
5182
|
{
|
|
5097
5183
|
id: "qf_count",
|
|
5098
5184
|
label: countLabel,
|
|
@@ -5116,7 +5202,7 @@ var QueryFilter = ({
|
|
|
5116
5202
|
onChange: (newSortBy) => handleFilterChange({ sortBy: newSortBy }),
|
|
5117
5203
|
disableInlineMenu: true,
|
|
5118
5204
|
inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5119
|
-
|
|
5205
|
+
import_design_system29.InputSelect,
|
|
5120
5206
|
{
|
|
5121
5207
|
label: sortLabel,
|
|
5122
5208
|
id: "qf_sortBy",
|
|
@@ -5138,7 +5224,7 @@ var QueryFilter = ({
|
|
|
5138
5224
|
onChange: (newSort) => handleFilterChange({ sortOrder: newSort }),
|
|
5139
5225
|
disableInlineMenu: true,
|
|
5140
5226
|
inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5141
|
-
|
|
5227
|
+
import_design_system29.InputSelect,
|
|
5142
5228
|
{
|
|
5143
5229
|
label: sortOrderLabel,
|
|
5144
5230
|
id: "qf_sortOrder",
|
|
@@ -5650,7 +5736,7 @@ var MULTI_SELECT_OPERATORS = [
|
|
|
5650
5736
|
];
|
|
5651
5737
|
|
|
5652
5738
|
// src/components/SearchAndFilter/editors/DateEditor.tsx
|
|
5653
|
-
var
|
|
5739
|
+
var import_design_system30 = require("@uniformdev/design-system");
|
|
5654
5740
|
var import_react56 = require("react");
|
|
5655
5741
|
var import_react_use2 = require("react-use");
|
|
5656
5742
|
var import_jsx_runtime60 = require("@emotion/react/jsx-runtime");
|
|
@@ -5665,7 +5751,7 @@ var DateEditor = ({
|
|
|
5665
5751
|
const [innerValue, setInnerValue] = (0, import_react56.useState)(value != null ? value : "");
|
|
5666
5752
|
(0, import_react_use2.useDebounce)(() => onChange(innerValue), 500, [innerValue]);
|
|
5667
5753
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
5668
|
-
|
|
5754
|
+
import_design_system30.Input,
|
|
5669
5755
|
{
|
|
5670
5756
|
type: "date",
|
|
5671
5757
|
label: ariaLabel,
|
|
@@ -5680,12 +5766,12 @@ var DateEditor = ({
|
|
|
5680
5766
|
};
|
|
5681
5767
|
|
|
5682
5768
|
// src/components/SearchAndFilter/editors/DateRangeEditor.tsx
|
|
5683
|
-
var
|
|
5769
|
+
var import_design_system32 = require("@uniformdev/design-system");
|
|
5684
5770
|
var import_react57 = require("react");
|
|
5685
5771
|
var import_react_use3 = require("react-use");
|
|
5686
5772
|
|
|
5687
5773
|
// src/components/SearchAndFilter/editors/shared/ErrorContainer.tsx
|
|
5688
|
-
var
|
|
5774
|
+
var import_design_system31 = require("@uniformdev/design-system");
|
|
5689
5775
|
var import_jsx_runtime61 = require("@emotion/react/jsx-runtime");
|
|
5690
5776
|
var ErrorContainer = ({ errorMessage }) => {
|
|
5691
5777
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
@@ -5695,7 +5781,7 @@ var ErrorContainer = ({ errorMessage }) => {
|
|
|
5695
5781
|
gridColumn: "span 6",
|
|
5696
5782
|
order: 6
|
|
5697
5783
|
},
|
|
5698
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5784
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_design_system31.FieldMessage, { errorMessage })
|
|
5699
5785
|
}
|
|
5700
5786
|
);
|
|
5701
5787
|
};
|
|
@@ -5769,7 +5855,7 @@ var DateRangeEditor = ({
|
|
|
5769
5855
|
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
|
|
5770
5856
|
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { css: twoColumnGrid, "data-testid": valueTestId, children: [
|
|
5771
5857
|
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
5772
|
-
|
|
5858
|
+
import_design_system32.Input,
|
|
5773
5859
|
{
|
|
5774
5860
|
label: `${ariaLabel}-min-date`,
|
|
5775
5861
|
type: "date",
|
|
@@ -5783,7 +5869,7 @@ var DateRangeEditor = ({
|
|
|
5783
5869
|
}
|
|
5784
5870
|
),
|
|
5785
5871
|
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
5786
|
-
|
|
5872
|
+
import_design_system32.Input,
|
|
5787
5873
|
{
|
|
5788
5874
|
label: `${ariaLabel}-max-date`,
|
|
5789
5875
|
type: "date",
|
|
@@ -5802,7 +5888,7 @@ var DateRangeEditor = ({
|
|
|
5802
5888
|
};
|
|
5803
5889
|
|
|
5804
5890
|
// src/components/SearchAndFilter/editors/FilterMultiChoiceEditor.tsx
|
|
5805
|
-
var
|
|
5891
|
+
var import_design_system33 = require("@uniformdev/design-system");
|
|
5806
5892
|
var import_react58 = require("react");
|
|
5807
5893
|
|
|
5808
5894
|
// src/components/SearchAndFilter/editors/shared/readOnlyAttributes.tsx
|
|
@@ -5825,11 +5911,11 @@ var FilterMultiChoiceEditor = ({
|
|
|
5825
5911
|
const readOnlyProps = readOnly ? readOnlyAttributes : {};
|
|
5826
5912
|
const isClearable = !readOnly || !disabled;
|
|
5827
5913
|
const { groupedOptions, selectedOptions } = (0, import_react58.useMemo)(
|
|
5828
|
-
() => (0,
|
|
5914
|
+
() => (0, import_design_system33.convertComboBoxGroupsToSelectableGroups)({ options: options != null ? options : [], selectedItems: new Set(value) }),
|
|
5829
5915
|
[options, value]
|
|
5830
5916
|
);
|
|
5831
5917
|
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { "data-testid": valueTestId, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
5832
|
-
|
|
5918
|
+
import_design_system33.InputComboBox,
|
|
5833
5919
|
{
|
|
5834
5920
|
...props,
|
|
5835
5921
|
placeholder: "Type to search...",
|
|
@@ -5838,7 +5924,7 @@ var FilterMultiChoiceEditor = ({
|
|
|
5838
5924
|
isClearable,
|
|
5839
5925
|
isDisabled: disabled,
|
|
5840
5926
|
onChange: (e) => {
|
|
5841
|
-
const selectedValues = (0,
|
|
5927
|
+
const selectedValues = (0, import_design_system33.getComboBoxSelectedSelectableGroups)(e);
|
|
5842
5928
|
return props.onChange([...selectedValues]);
|
|
5843
5929
|
},
|
|
5844
5930
|
value: selectedOptions,
|
|
@@ -5857,7 +5943,7 @@ var FilterMultiChoiceEditor = ({
|
|
|
5857
5943
|
};
|
|
5858
5944
|
|
|
5859
5945
|
// src/components/SearchAndFilter/editors/FilterSingleChoiceEditor.tsx
|
|
5860
|
-
var
|
|
5946
|
+
var import_design_system34 = require("@uniformdev/design-system");
|
|
5861
5947
|
var import_react59 = require("react");
|
|
5862
5948
|
var import_jsx_runtime64 = require("@emotion/react/jsx-runtime");
|
|
5863
5949
|
var FilterSingleChoiceEditor = ({
|
|
@@ -5870,7 +5956,7 @@ var FilterSingleChoiceEditor = ({
|
|
|
5870
5956
|
}) => {
|
|
5871
5957
|
const readOnlyProps = readOnly ? readOnlyAttributes : {};
|
|
5872
5958
|
const { groupedOptions, selectedOptions } = (0, import_react59.useMemo)(
|
|
5873
|
-
() => (0,
|
|
5959
|
+
() => (0, import_design_system34.convertComboBoxGroupsToSelectableGroups)({
|
|
5874
5960
|
options: options != null ? options : [],
|
|
5875
5961
|
selectedItems: new Set(value ? [String(value)] : void 0),
|
|
5876
5962
|
selectionMode: "single"
|
|
@@ -5878,7 +5964,7 @@ var FilterSingleChoiceEditor = ({
|
|
|
5878
5964
|
[options, value]
|
|
5879
5965
|
);
|
|
5880
5966
|
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { "data-testid": valueTestId, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
5881
|
-
|
|
5967
|
+
import_design_system34.InputComboBox,
|
|
5882
5968
|
{
|
|
5883
5969
|
placeholder: "Type to search...",
|
|
5884
5970
|
options: groupedOptions,
|
|
@@ -5906,7 +5992,7 @@ var FilterSingleChoiceEditor = ({
|
|
|
5906
5992
|
};
|
|
5907
5993
|
|
|
5908
5994
|
// src/components/SearchAndFilter/editors/NumberEditor.tsx
|
|
5909
|
-
var
|
|
5995
|
+
var import_design_system35 = require("@uniformdev/design-system");
|
|
5910
5996
|
var import_react60 = require("react");
|
|
5911
5997
|
var import_react_use4 = require("react-use");
|
|
5912
5998
|
var import_jsx_runtime65 = require("@emotion/react/jsx-runtime");
|
|
@@ -5921,7 +6007,7 @@ var NumberEditor = ({
|
|
|
5921
6007
|
const [innerValue, setInnerValue] = (0, import_react60.useState)(value != null ? value : "");
|
|
5922
6008
|
(0, import_react_use4.useDebounce)(() => onChange(innerValue), 500, [innerValue]);
|
|
5923
6009
|
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
5924
|
-
|
|
6010
|
+
import_design_system35.Input,
|
|
5925
6011
|
{
|
|
5926
6012
|
label: ariaLabel,
|
|
5927
6013
|
type: "number",
|
|
@@ -5937,7 +6023,7 @@ var NumberEditor = ({
|
|
|
5937
6023
|
};
|
|
5938
6024
|
|
|
5939
6025
|
// src/components/SearchAndFilter/editors/NumberRangeEditor.tsx
|
|
5940
|
-
var
|
|
6026
|
+
var import_design_system36 = require("@uniformdev/design-system");
|
|
5941
6027
|
var import_react61 = require("react");
|
|
5942
6028
|
var import_react_use5 = require("react-use");
|
|
5943
6029
|
var import_jsx_runtime66 = require("@emotion/react/jsx-runtime");
|
|
@@ -5988,7 +6074,7 @@ var NumberRangeEditor = ({
|
|
|
5988
6074
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
|
|
5989
6075
|
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { css: twoColumnGrid, "data-testid": valueTestId, children: [
|
|
5990
6076
|
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5991
|
-
|
|
6077
|
+
import_design_system36.Input,
|
|
5992
6078
|
{
|
|
5993
6079
|
label: `${ariaLabel}-min`,
|
|
5994
6080
|
type: "number",
|
|
@@ -6004,7 +6090,7 @@ var NumberRangeEditor = ({
|
|
|
6004
6090
|
}
|
|
6005
6091
|
),
|
|
6006
6092
|
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
6007
|
-
|
|
6093
|
+
import_design_system36.Input,
|
|
6008
6094
|
{
|
|
6009
6095
|
type: "number",
|
|
6010
6096
|
label: `${ariaLabel}-max`,
|
|
@@ -6025,15 +6111,15 @@ var NumberRangeEditor = ({
|
|
|
6025
6111
|
};
|
|
6026
6112
|
|
|
6027
6113
|
// src/components/SearchAndFilter/editors/StatusMultiEditor.tsx
|
|
6028
|
-
var
|
|
6114
|
+
var import_design_system38 = require("@uniformdev/design-system");
|
|
6029
6115
|
var import_react62 = require("react");
|
|
6030
6116
|
|
|
6031
6117
|
// src/components/SearchAndFilter/editors/shared/CustomOptions.tsx
|
|
6032
|
-
var
|
|
6118
|
+
var import_design_system37 = require("@uniformdev/design-system");
|
|
6033
6119
|
var import_jsx_runtime67 = require("@emotion/react/jsx-runtime");
|
|
6034
6120
|
var CustomOptions = ({ label, value }) => {
|
|
6035
6121
|
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
6036
|
-
|
|
6122
|
+
import_design_system37.StatusBullet,
|
|
6037
6123
|
{
|
|
6038
6124
|
status: label,
|
|
6039
6125
|
message: Array.isArray(value) ? value.join(",") : value
|
|
@@ -6053,16 +6139,16 @@ var StatusMultiEditor = ({
|
|
|
6053
6139
|
}) => {
|
|
6054
6140
|
const readOnlyProps = readOnly ? readOnlyAttributes : {};
|
|
6055
6141
|
const { groupedOptions, selectedOptions } = (0, import_react62.useMemo)(
|
|
6056
|
-
() => (0,
|
|
6142
|
+
() => (0, import_design_system38.convertComboBoxGroupsToSelectableGroups)({ options: options != null ? options : [], selectedItems: new Set(value) }),
|
|
6057
6143
|
[options, value]
|
|
6058
6144
|
);
|
|
6059
6145
|
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { "data-testid": valueTestId, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6060
|
-
|
|
6146
|
+
import_design_system38.InputComboBox,
|
|
6061
6147
|
{
|
|
6062
6148
|
options: groupedOptions != null ? groupedOptions : [],
|
|
6063
6149
|
isMulti: true,
|
|
6064
6150
|
onChange: (e) => {
|
|
6065
|
-
const selectedValues = (0,
|
|
6151
|
+
const selectedValues = (0, import_design_system38.getComboBoxSelectedSelectableGroups)(e);
|
|
6066
6152
|
return onChange([...selectedValues]);
|
|
6067
6153
|
},
|
|
6068
6154
|
formatOptionLabel: CustomOptions,
|
|
@@ -6083,7 +6169,7 @@ var StatusMultiEditor = ({
|
|
|
6083
6169
|
};
|
|
6084
6170
|
|
|
6085
6171
|
// src/components/SearchAndFilter/editors/StatusSingleEditor.tsx
|
|
6086
|
-
var
|
|
6172
|
+
var import_design_system39 = require("@uniformdev/design-system");
|
|
6087
6173
|
var import_react63 = require("react");
|
|
6088
6174
|
var import_jsx_runtime69 = require("@emotion/react/jsx-runtime");
|
|
6089
6175
|
var StatusSingleEditor = ({
|
|
@@ -6096,7 +6182,7 @@ var StatusSingleEditor = ({
|
|
|
6096
6182
|
}) => {
|
|
6097
6183
|
const readOnlyProps = readOnly ? readOnlyAttributes : {};
|
|
6098
6184
|
const { groupedOptions, selectedOptions } = (0, import_react63.useMemo)(
|
|
6099
|
-
() => (0,
|
|
6185
|
+
() => (0, import_design_system39.convertComboBoxGroupsToSelectableGroups)({
|
|
6100
6186
|
options: options != null ? options : [],
|
|
6101
6187
|
selectedItems: new Set(value ? [value] : void 0),
|
|
6102
6188
|
selectionMode: "single"
|
|
@@ -6104,7 +6190,7 @@ var StatusSingleEditor = ({
|
|
|
6104
6190
|
[options, value]
|
|
6105
6191
|
);
|
|
6106
6192
|
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { "data-testid": valueTestId, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6107
|
-
|
|
6193
|
+
import_design_system39.InputComboBox,
|
|
6108
6194
|
{
|
|
6109
6195
|
options: groupedOptions,
|
|
6110
6196
|
onChange: (e) => {
|
|
@@ -6131,7 +6217,7 @@ var StatusSingleEditor = ({
|
|
|
6131
6217
|
};
|
|
6132
6218
|
|
|
6133
6219
|
// src/components/SearchAndFilter/editors/TextEditor.tsx
|
|
6134
|
-
var
|
|
6220
|
+
var import_design_system40 = require("@uniformdev/design-system");
|
|
6135
6221
|
var import_react64 = require("react");
|
|
6136
6222
|
var import_react_use6 = require("react-use");
|
|
6137
6223
|
var import_jsx_runtime70 = require("@emotion/react/jsx-runtime");
|
|
@@ -6145,7 +6231,7 @@ var TextEditor = ({
|
|
|
6145
6231
|
const [innerValue, setInnerValue] = (0, import_react64.useState)(value != null ? value : "");
|
|
6146
6232
|
(0, import_react_use6.useDebounce)(() => onChange(innerValue), 500, [innerValue]);
|
|
6147
6233
|
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
6148
|
-
|
|
6234
|
+
import_design_system40.Input,
|
|
6149
6235
|
{
|
|
6150
6236
|
showLabel: false,
|
|
6151
6237
|
label: ariaLabel,
|
|
@@ -6159,7 +6245,7 @@ var TextEditor = ({
|
|
|
6159
6245
|
};
|
|
6160
6246
|
|
|
6161
6247
|
// src/components/SearchAndFilter/editors/TextMultiChoiceEditor.tsx
|
|
6162
|
-
var
|
|
6248
|
+
var import_design_system41 = require("@uniformdev/design-system");
|
|
6163
6249
|
var import_react65 = require("react");
|
|
6164
6250
|
var import_jsx_runtime71 = require("@emotion/react/jsx-runtime");
|
|
6165
6251
|
var TextMultiChoiceEditor = ({
|
|
@@ -6175,10 +6261,10 @@ var TextMultiChoiceEditor = ({
|
|
|
6175
6261
|
var _a;
|
|
6176
6262
|
const coercedValue = typeof value === "string" ? [value] : value != null ? value : [];
|
|
6177
6263
|
const options = (_a = coercedValue.map((v) => ({ label: v, value: v }))) != null ? _a : [];
|
|
6178
|
-
return (0,
|
|
6264
|
+
return (0, import_design_system41.convertComboBoxGroupsToSelectableGroups)({ options, selectedItems: new Set(value) });
|
|
6179
6265
|
}, [value]);
|
|
6180
6266
|
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { "data-testid": valueTestId, children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
6181
|
-
|
|
6267
|
+
import_design_system41.InputCreatableComboBox,
|
|
6182
6268
|
{
|
|
6183
6269
|
...props,
|
|
6184
6270
|
placeholder: "Type a value\u2026",
|
|
@@ -6188,7 +6274,7 @@ var TextMultiChoiceEditor = ({
|
|
|
6188
6274
|
isClearable,
|
|
6189
6275
|
isDisabled: disabled,
|
|
6190
6276
|
onChange: (e) => {
|
|
6191
|
-
const selectedValues = (0,
|
|
6277
|
+
const selectedValues = (0, import_design_system41.getComboBoxSelectedSelectableGroups)(e);
|
|
6192
6278
|
return props.onChange([...selectedValues]);
|
|
6193
6279
|
},
|
|
6194
6280
|
value: selectedOptions,
|
|
@@ -6207,11 +6293,11 @@ var TextMultiChoiceEditor = ({
|
|
|
6207
6293
|
};
|
|
6208
6294
|
|
|
6209
6295
|
// src/components/SearchAndFilter/FilterButton.tsx
|
|
6210
|
-
var
|
|
6296
|
+
var import_design_system43 = require("@uniformdev/design-system");
|
|
6211
6297
|
|
|
6212
6298
|
// src/components/SearchAndFilter/styles/SearchAndFilter.styles.ts
|
|
6213
6299
|
var import_react66 = require("@emotion/react");
|
|
6214
|
-
var
|
|
6300
|
+
var import_design_system42 = require("@uniformdev/design-system");
|
|
6215
6301
|
var SearchAndFilterControlsWrapper = (gridColumns) => import_react66.css`
|
|
6216
6302
|
align-items: stretch;
|
|
6217
6303
|
display: grid;
|
|
@@ -6231,7 +6317,7 @@ var ConditionalFilterRow = import_react66.css`
|
|
|
6231
6317
|
gap: var(--spacing-sm);
|
|
6232
6318
|
margin-left: var(--spacing-base);
|
|
6233
6319
|
|
|
6234
|
-
${(0,
|
|
6320
|
+
${(0, import_design_system42.cq)("380px")} {
|
|
6235
6321
|
&:after {
|
|
6236
6322
|
content: '';
|
|
6237
6323
|
display: block;
|
|
@@ -6250,14 +6336,14 @@ var ConditionalFilterRow = import_react66.css`
|
|
|
6250
6336
|
grid-template-columns: 50px 1fr;
|
|
6251
6337
|
}
|
|
6252
6338
|
|
|
6253
|
-
${(0,
|
|
6339
|
+
${(0, import_design_system42.cq)("580px")} {
|
|
6254
6340
|
&:after {
|
|
6255
6341
|
display: none;
|
|
6256
6342
|
}
|
|
6257
6343
|
}
|
|
6258
6344
|
|
|
6259
6345
|
@media (prefers-reduced-motion: no-preference) {
|
|
6260
|
-
animation: ${
|
|
6346
|
+
animation: ${import_design_system42.fadeInLtr} var(--duration-fast) var(--timing-ease-out);
|
|
6261
6347
|
}
|
|
6262
6348
|
`;
|
|
6263
6349
|
var ConditionalInputRow = import_react66.css`
|
|
@@ -6265,7 +6351,7 @@ var ConditionalInputRow = import_react66.css`
|
|
|
6265
6351
|
gap: var(--spacing-sm);
|
|
6266
6352
|
flex-wrap: wrap;
|
|
6267
6353
|
|
|
6268
|
-
${(0,
|
|
6354
|
+
${(0, import_design_system42.cq)("380px")} {
|
|
6269
6355
|
& > div:nth-child(-n + 2) {
|
|
6270
6356
|
width: calc(50% - var(--spacing-sm));
|
|
6271
6357
|
}
|
|
@@ -6274,7 +6360,7 @@ var ConditionalInputRow = import_react66.css`
|
|
|
6274
6360
|
width: calc(100% - 48px);
|
|
6275
6361
|
}
|
|
6276
6362
|
}
|
|
6277
|
-
${(0,
|
|
6363
|
+
${(0, import_design_system42.cq)("764px")} {
|
|
6278
6364
|
align-items: flex-start;
|
|
6279
6365
|
display: grid;
|
|
6280
6366
|
grid-template-columns: 250px 160px 1fr 32px;
|
|
@@ -6471,7 +6557,7 @@ var SearchAndFilterAdditionalContainer = import_react66.css`
|
|
|
6471
6557
|
var import_jsx_runtime72 = require("@emotion/react/jsx-runtime");
|
|
6472
6558
|
var FilterButton2 = ({
|
|
6473
6559
|
text = "Filters",
|
|
6474
|
-
icon =
|
|
6560
|
+
icon = import_design_system43.customIcons["filter-add"],
|
|
6475
6561
|
filterCount,
|
|
6476
6562
|
hasSelectedValue,
|
|
6477
6563
|
dataTestId,
|
|
@@ -6490,10 +6576,10 @@ var FilterButton2 = ({
|
|
|
6490
6576
|
...props,
|
|
6491
6577
|
"data-testid": dataTestId,
|
|
6492
6578
|
children: [
|
|
6493
|
-
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6579
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_design_system43.Icon, { icon, iconColor: "currentColor", size: "1rem" }),
|
|
6494
6580
|
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { css: FilterButtonText, children: text }),
|
|
6495
|
-
filterCount ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6496
|
-
showDropdownIcon ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6581
|
+
filterCount ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_design_system43.Counter, { count: filterCount, bgColor: "var(--white)" }) : null,
|
|
6582
|
+
showDropdownIcon ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_design_system43.Icon, { icon: "chevron-down", iconColor: "currentColor", size: "1rem" }) : null
|
|
6497
6583
|
]
|
|
6498
6584
|
}
|
|
6499
6585
|
);
|
|
@@ -6502,14 +6588,14 @@ var FilterButton2 = ({
|
|
|
6502
6588
|
// src/components/SearchAndFilter/FilterControls.tsx
|
|
6503
6589
|
var import_CgClose = require("@react-icons/all-files/cg/CgClose");
|
|
6504
6590
|
var import_canvas10 = require("@uniformdev/canvas");
|
|
6505
|
-
var
|
|
6591
|
+
var import_design_system45 = require("@uniformdev/design-system");
|
|
6506
6592
|
var import_lexical11 = require("lexical");
|
|
6507
6593
|
var import_react68 = require("react");
|
|
6508
6594
|
var import_react_use7 = require("react-use");
|
|
6509
6595
|
var import_uuid2 = require("uuid");
|
|
6510
6596
|
|
|
6511
6597
|
// src/components/SearchAndFilter/hooks/useSearchAndFilter.tsx
|
|
6512
|
-
var
|
|
6598
|
+
var import_design_system44 = require("@uniformdev/design-system");
|
|
6513
6599
|
var import_react67 = require("react");
|
|
6514
6600
|
|
|
6515
6601
|
// src/components/SearchAndFilter/FilterEditor.tsx
|
|
@@ -6700,7 +6786,7 @@ var SearchAndFilterProvider = ({
|
|
|
6700
6786
|
filterMapper: filterMapper2,
|
|
6701
6787
|
allowBindingSearchTerm
|
|
6702
6788
|
},
|
|
6703
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6789
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_design_system44.VerticalRhythm, { children })
|
|
6704
6790
|
}
|
|
6705
6791
|
);
|
|
6706
6792
|
};
|
|
@@ -6766,7 +6852,7 @@ var FilterControls = ({
|
|
|
6766
6852
|
onChange: (value) => setLocalSearchTerm(value != null ? value : ""),
|
|
6767
6853
|
disableVariables: !allowBindingSearchTerm,
|
|
6768
6854
|
inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6769
|
-
|
|
6855
|
+
import_design_system45.InputKeywordSearch,
|
|
6770
6856
|
{
|
|
6771
6857
|
placeholder: "Search...",
|
|
6772
6858
|
onSearchTextChanged: (e) => setLocalSearchTerm(e),
|
|
@@ -6798,7 +6884,7 @@ var FilterControls = ({
|
|
|
6798
6884
|
},
|
|
6799
6885
|
type: "button",
|
|
6800
6886
|
"data-testid": "keyword-search-clear-button",
|
|
6801
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6887
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_design_system45.Icon, { icon: import_CgClose.CgClose, iconColor: "red", size: "1rem" })
|
|
6802
6888
|
}
|
|
6803
6889
|
) }) : null
|
|
6804
6890
|
] }),
|
|
@@ -6808,7 +6894,7 @@ var FilterControls = ({
|
|
|
6808
6894
|
|
|
6809
6895
|
// src/components/SearchAndFilter/FilterItem.tsx
|
|
6810
6896
|
var import_CgTrash2 = require("@react-icons/all-files/cg/CgTrash");
|
|
6811
|
-
var
|
|
6897
|
+
var import_design_system46 = require("@uniformdev/design-system");
|
|
6812
6898
|
var import_react69 = require("react");
|
|
6813
6899
|
|
|
6814
6900
|
// src/components/SearchAndFilter/util/isFilterBindable.ts
|
|
@@ -6880,7 +6966,7 @@ var FilterItem = ({
|
|
|
6880
6966
|
}
|
|
6881
6967
|
}
|
|
6882
6968
|
) : /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6883
|
-
|
|
6969
|
+
import_design_system46.InputComboBox,
|
|
6884
6970
|
{
|
|
6885
6971
|
"aria-label": label,
|
|
6886
6972
|
options: filterOptions,
|
|
@@ -6907,7 +6993,7 @@ var FilterItem = ({
|
|
|
6907
6993
|
}
|
|
6908
6994
|
),
|
|
6909
6995
|
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6910
|
-
|
|
6996
|
+
import_design_system46.InputComboBox,
|
|
6911
6997
|
{
|
|
6912
6998
|
"aria-label": operatorLabel,
|
|
6913
6999
|
options: operatorOptions,
|
|
@@ -6954,7 +7040,7 @@ var FilterItem = ({
|
|
|
6954
7040
|
css: IconBtn,
|
|
6955
7041
|
"data-testid": "delete-filter",
|
|
6956
7042
|
disabled: filters.length === 1,
|
|
6957
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
7043
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_design_system46.Icon, { icon: import_CgTrash2.CgTrash, iconColor: filters.length === 1 ? "gray" : "red", size: "1rem" })
|
|
6958
7044
|
}
|
|
6959
7045
|
)
|
|
6960
7046
|
] })
|
|
@@ -6963,10 +7049,10 @@ var FilterItem = ({
|
|
|
6963
7049
|
|
|
6964
7050
|
// src/components/SearchAndFilter/FilterItems.tsx
|
|
6965
7051
|
var import_CgMathPlus = require("@react-icons/all-files/cg/CgMathPlus");
|
|
6966
|
-
var
|
|
7052
|
+
var import_design_system48 = require("@uniformdev/design-system");
|
|
6967
7053
|
|
|
6968
7054
|
// src/components/SearchAndFilter/FilterMenu.tsx
|
|
6969
|
-
var
|
|
7055
|
+
var import_design_system47 = require("@uniformdev/design-system");
|
|
6970
7056
|
var import_react70 = __toESM(require("react"));
|
|
6971
7057
|
var import_jsx_runtime77 = require("@emotion/react/jsx-runtime");
|
|
6972
7058
|
var SearchAndFilterOptionsContainer2 = ({
|
|
@@ -6977,7 +7063,7 @@ var SearchAndFilterOptionsContainer2 = ({
|
|
|
6977
7063
|
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { css: SearchAndFilterOptionsContainer, children: [
|
|
6978
7064
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { css: SearchAndFilterOptionsInnerContainer, children }),
|
|
6979
7065
|
buttonRow ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6980
|
-
|
|
7066
|
+
import_design_system47.HorizontalRhythm,
|
|
6981
7067
|
{
|
|
6982
7068
|
css: SearchAndFilterButtonGroup,
|
|
6983
7069
|
gap: "sm",
|
|
@@ -7006,13 +7092,13 @@ var FilterMenu = ({
|
|
|
7006
7092
|
(_a = innerMenuRef.current) == null ? void 0 : _a.focus();
|
|
7007
7093
|
}
|
|
7008
7094
|
}, [filterVisibility]);
|
|
7009
|
-
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7095
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_design_system47.VerticalRhythm, { gap: "sm", "aria-haspopup": "true", id, "data-testid": dataTestId, children: filterVisibility ? /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
7010
7096
|
SearchAndFilterOptionsContainer2,
|
|
7011
7097
|
{
|
|
7012
7098
|
buttonRow: menuControls,
|
|
7013
7099
|
additionalFiltersContainer,
|
|
7014
7100
|
children: [
|
|
7015
|
-
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
7101
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_design_system47.HorizontalRhythm, { gap: "sm", align: "center", justify: "space-between", children: [
|
|
7016
7102
|
filterTitle ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { css: Title, ref: innerMenuRef, tabIndex: 0, children: filterTitle }) : null,
|
|
7017
7103
|
(filters == null ? void 0 : filters.length) && resetButtonText ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7018
7104
|
"button",
|
|
@@ -7141,7 +7227,7 @@ var FilterItems = ({
|
|
|
7141
7227
|
next[index] = { ...next[index], [prop]: value };
|
|
7142
7228
|
if (prop === "operator") {
|
|
7143
7229
|
const newOperatorId = value;
|
|
7144
|
-
const currentFilter =
|
|
7230
|
+
const currentFilter = filters[index];
|
|
7145
7231
|
if (!newOperatorId) {
|
|
7146
7232
|
throw new Error("you bad");
|
|
7147
7233
|
}
|
|
@@ -7175,7 +7261,7 @@ var FilterItems = ({
|
|
|
7175
7261
|
onClick: handleAddFilter,
|
|
7176
7262
|
"data-testid": "add-filter",
|
|
7177
7263
|
children: [
|
|
7178
|
-
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7264
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_design_system48.Icon, { icon: import_CgMathPlus.CgMathPlus, iconColor: "currentColor", size: "1rem" }),
|
|
7179
7265
|
addButtonText
|
|
7180
7266
|
]
|
|
7181
7267
|
}
|
|
@@ -7212,10 +7298,10 @@ var FilterItems = ({
|
|
|
7212
7298
|
};
|
|
7213
7299
|
|
|
7214
7300
|
// src/components/SearchAndFilter/SearchAndFilter.tsx
|
|
7215
|
-
var
|
|
7301
|
+
var import_design_system50 = require("@uniformdev/design-system");
|
|
7216
7302
|
|
|
7217
7303
|
// src/components/SearchAndFilter/SearchAndFilterResultContainer.tsx
|
|
7218
|
-
var
|
|
7304
|
+
var import_design_system49 = require("@uniformdev/design-system");
|
|
7219
7305
|
var import_jsx_runtime79 = require("@emotion/react/jsx-runtime");
|
|
7220
7306
|
var SearchAndFilterResultContainer = ({
|
|
7221
7307
|
buttonText,
|
|
@@ -7268,18 +7354,18 @@ var SearchAndFilterResultContainer = ({
|
|
|
7268
7354
|
}
|
|
7269
7355
|
};
|
|
7270
7356
|
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
|
|
7271
|
-
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
7357
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_design_system49.HorizontalRhythm, { children: [
|
|
7272
7358
|
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("span", { children: [
|
|
7273
7359
|
totalResults,
|
|
7274
7360
|
" results ",
|
|
7275
7361
|
searchTerm ? `for "${searchTerm}"` : null
|
|
7276
7362
|
] }),
|
|
7277
|
-
!searchTerm || hideClearButton ? null : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7363
|
+
!searchTerm || hideClearButton ? null : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_design_system49.Button, { buttonType: "ghostDestructive", size: "zero", onClick: handleClearSearch, children: clearButtonLabel })
|
|
7278
7364
|
] }),
|
|
7279
|
-
totalResults === 0 ? /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
7280
|
-
calloutText ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7365
|
+
totalResults === 0 ? /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_design_system49.Callout, { title: automateCalloutTitle, type: "note", children: [
|
|
7366
|
+
calloutText ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_design_system49.Paragraph, { children: calloutText }) : null,
|
|
7281
7367
|
hideClearButton ? null : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7282
|
-
|
|
7368
|
+
import_design_system49.Button,
|
|
7283
7369
|
{
|
|
7284
7370
|
buttonType: "tertiaryOutline",
|
|
7285
7371
|
size: "xs",
|
|
@@ -7327,7 +7413,7 @@ var SearchAndFilter = ({
|
|
|
7327
7413
|
filterMapper: filterMapper2,
|
|
7328
7414
|
allowBindingSearchTerm,
|
|
7329
7415
|
onResetFilterValues,
|
|
7330
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
|
|
7416
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_design_system50.VerticalRhythm, { "data-testid": "search-and-filter", children: [
|
|
7331
7417
|
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { css: SearchAndFilterOutterControlWrapper(viewSwitchControls ? "1fr auto" : "1fr"), children: [
|
|
7332
7418
|
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7333
7419
|
"div",
|
|
@@ -7346,7 +7432,7 @@ var SearchAndFilter = ({
|
|
|
7346
7432
|
};
|
|
7347
7433
|
|
|
7348
7434
|
// src/components/SearchAndFilter/SearchOnlyFilter.tsx
|
|
7349
|
-
var
|
|
7435
|
+
var import_design_system51 = require("@uniformdev/design-system");
|
|
7350
7436
|
var import_react71 = require("react");
|
|
7351
7437
|
var import_react_use8 = require("react-use");
|
|
7352
7438
|
var import_jsx_runtime81 = require("@emotion/react/jsx-runtime");
|
|
@@ -7374,7 +7460,7 @@ var SearchOnlyFilter = ({ onSearchChange, maxWidth }) => {
|
|
|
7374
7460
|
setSearchTerm: setLocaleSearchTerm
|
|
7375
7461
|
},
|
|
7376
7462
|
children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { css: { maxWidth: maxWidth != null ? maxWidth : "712px" }, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7377
|
-
|
|
7463
|
+
import_design_system51.InputKeywordSearch,
|
|
7378
7464
|
{
|
|
7379
7465
|
placeholder: "Search...",
|
|
7380
7466
|
onSearchTextChanged: (e) => setLocaleSearchTerm(e),
|
|
@@ -7388,18 +7474,18 @@ var SearchOnlyFilter = ({ onSearchChange, maxWidth }) => {
|
|
|
7388
7474
|
};
|
|
7389
7475
|
|
|
7390
7476
|
// src/components/SearchAndFilter/SortItems.tsx
|
|
7391
|
-
var
|
|
7477
|
+
var import_design_system53 = require("@uniformdev/design-system");
|
|
7392
7478
|
|
|
7393
7479
|
// src/components/SearchAndFilter/styles/SortItems.styles.ts
|
|
7394
7480
|
var import_react72 = require("@emotion/react");
|
|
7395
|
-
var
|
|
7481
|
+
var import_design_system52 = require("@uniformdev/design-system");
|
|
7396
7482
|
var ConditionalFilterRow2 = import_react72.css`
|
|
7397
7483
|
display: grid;
|
|
7398
7484
|
grid-template-columns: 35px 1fr;
|
|
7399
7485
|
gap: var(--spacing-sm);
|
|
7400
7486
|
margin-left: var(--spacing-base);
|
|
7401
7487
|
|
|
7402
|
-
${(0,
|
|
7488
|
+
${(0, import_design_system52.cq)("380px")} {
|
|
7403
7489
|
align-items: center;
|
|
7404
7490
|
|
|
7405
7491
|
&:after {
|
|
@@ -7420,14 +7506,14 @@ var ConditionalFilterRow2 = import_react72.css`
|
|
|
7420
7506
|
grid-template-columns: 50px 1fr;
|
|
7421
7507
|
}
|
|
7422
7508
|
|
|
7423
|
-
${(0,
|
|
7509
|
+
${(0, import_design_system52.cq)("580px")} {
|
|
7424
7510
|
&:after {
|
|
7425
7511
|
display: none;
|
|
7426
7512
|
}
|
|
7427
7513
|
}
|
|
7428
7514
|
|
|
7429
7515
|
@media (prefers-reduced-motion: no-preference) {
|
|
7430
|
-
animation: ${
|
|
7516
|
+
animation: ${import_design_system52.fadeInLtr} var(--duration-fast) var(--timing-ease-out);
|
|
7431
7517
|
}
|
|
7432
7518
|
`;
|
|
7433
7519
|
var ConditionalInputRow2 = import_react72.css`
|
|
@@ -7435,7 +7521,7 @@ var ConditionalInputRow2 = import_react72.css`
|
|
|
7435
7521
|
gap: var(--spacing-sm);
|
|
7436
7522
|
flex-wrap: wrap;
|
|
7437
7523
|
|
|
7438
|
-
${(0,
|
|
7524
|
+
${(0, import_design_system52.cq)("380px")} {
|
|
7439
7525
|
& > div:nth-child(-n + 2) {
|
|
7440
7526
|
width: calc(50% - var(--spacing-sm));
|
|
7441
7527
|
}
|
|
@@ -7444,7 +7530,7 @@ var ConditionalInputRow2 = import_react72.css`
|
|
|
7444
7530
|
width: calc(100% - 48px);
|
|
7445
7531
|
}
|
|
7446
7532
|
}
|
|
7447
|
-
${(0,
|
|
7533
|
+
${(0, import_design_system52.cq)("580px")} {
|
|
7448
7534
|
display: grid;
|
|
7449
7535
|
grid-template-columns: 200px 160px 1fr 32px;
|
|
7450
7536
|
|
|
@@ -7601,7 +7687,7 @@ var SortFilterWrapper = (hiddenLocaleInput) => import_react72.css`
|
|
|
7601
7687
|
gap: var(--spacing-base);
|
|
7602
7688
|
flex-grow: 1;
|
|
7603
7689
|
|
|
7604
|
-
${(0,
|
|
7690
|
+
${(0, import_design_system52.cq)("420px")} {
|
|
7605
7691
|
display: grid;
|
|
7606
7692
|
grid-template-columns: ${hiddenLocaleInput ? "1fr" : "1fr minmax(140px, 0.25fr)"};
|
|
7607
7693
|
}
|
|
@@ -7646,7 +7732,7 @@ var SortItems = ({
|
|
|
7646
7732
|
})) == null ? void 0 : _a.options) == null ? void 0 : _b.find((nestedOption) => nestedOption.value === sortField);
|
|
7647
7733
|
const localeLabelValue = sortOptions.length > 1 ? localeLabel : `${localeLabel}s`;
|
|
7648
7734
|
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { css: [SortFilterWrapper(hideLocaleOptions)], "data-testid": "sorting-options", children: [
|
|
7649
|
-
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
7735
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_design_system53.VerticalRhythm, { gap: "xs", children: [
|
|
7650
7736
|
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { css: Title2, children: sortByLabel }),
|
|
7651
7737
|
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { css: SortFilterInputRow, children: [
|
|
7652
7738
|
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
@@ -7658,7 +7744,7 @@ var SortItems = ({
|
|
|
7658
7744
|
valueToResetTo: "created_at",
|
|
7659
7745
|
onChange: (e) => onSortChange(`${e}_${sortDirection}`),
|
|
7660
7746
|
inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
7661
|
-
|
|
7747
|
+
import_design_system53.InputComboBox,
|
|
7662
7748
|
{
|
|
7663
7749
|
id: "sort-by-field",
|
|
7664
7750
|
"aria-label": "Sort by",
|
|
@@ -7689,7 +7775,7 @@ var SortItems = ({
|
|
|
7689
7775
|
showMenuPosition: disableSortBinding ? void 0 : "inline-right",
|
|
7690
7776
|
onChange: (e) => onSortChange(`${sortField}_${e}`),
|
|
7691
7777
|
inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
7692
|
-
|
|
7778
|
+
import_design_system53.SegmentedControl,
|
|
7693
7779
|
{
|
|
7694
7780
|
noCheckmark: true,
|
|
7695
7781
|
name: "sortBy",
|
|
@@ -7720,7 +7806,7 @@ var SortItems = ({
|
|
|
7720
7806
|
)
|
|
7721
7807
|
] })
|
|
7722
7808
|
] }),
|
|
7723
|
-
hideLocaleOptions ? null : /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
7809
|
+
hideLocaleOptions ? null : /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_design_system53.VerticalRhythm, { gap: "xs", css: InputVariableWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
7724
7810
|
InputVariables,
|
|
7725
7811
|
{
|
|
7726
7812
|
label: localeLabelValue,
|
|
@@ -7728,7 +7814,7 @@ var SortItems = ({
|
|
|
7728
7814
|
showMenuPosition: "inline-right",
|
|
7729
7815
|
onChange: (e) => onLocaleChange(e != null ? e : ""),
|
|
7730
7816
|
inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
7731
|
-
|
|
7817
|
+
import_design_system53.InputSelect,
|
|
7732
7818
|
{
|
|
7733
7819
|
name: "localeReturned",
|
|
7734
7820
|
"aria-label": localeLabelValue,
|
|
@@ -7780,7 +7866,7 @@ function useContentDataResourceLocaleInfo({
|
|
|
7780
7866
|
}
|
|
7781
7867
|
|
|
7782
7868
|
// src/index.ts
|
|
7783
|
-
var
|
|
7869
|
+
var import_design_system54 = require("@uniformdev/design-system");
|
|
7784
7870
|
__reExport(src_exports, require("@uniformdev/mesh-sdk"), module.exports);
|
|
7785
7871
|
// Annotate the CommonJS export names for ESM import in node:
|
|
7786
7872
|
0 && (module.exports = {
|