@uniformdev/mesh-sdk-react 19.50.2-alpha.45 → 19.51.1-alpha.1
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 +10 -27
- package/dist/index.d.ts +10 -27
- package/dist/index.esm.js +66 -42
- package/dist/index.js +63 -39
- package/dist/index.mjs +66 -42
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -441,13 +441,6 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
441
441
|
type: TLocationType;
|
|
442
442
|
}> | Extract<_uniformdev_mesh_sdk.SettingsLocation<TLocationValue>, {
|
|
443
443
|
type: TLocationType;
|
|
444
|
-
}> | Extract<_uniformdev_mesh_sdk.MeshLocationCore<TLocationValue, {
|
|
445
|
-
settings: unknown;
|
|
446
|
-
projectId: string;
|
|
447
|
-
prompt: string;
|
|
448
|
-
promptRetry: number;
|
|
449
|
-
}, TLocationValue, "unstable_ai">, {
|
|
450
|
-
type: TLocationType;
|
|
451
444
|
}>, "setValue"> & {
|
|
452
445
|
setValue: SetLocationValueDispatch<(Extract<_uniformdev_mesh_sdk.DataSourceLocation, {
|
|
453
446
|
type: TLocationType;
|
|
@@ -461,13 +454,6 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
461
454
|
type: TLocationType;
|
|
462
455
|
}> | Extract<_uniformdev_mesh_sdk.SettingsLocation<TLocationValue>, {
|
|
463
456
|
type: TLocationType;
|
|
464
|
-
}> | Extract<_uniformdev_mesh_sdk.MeshLocationCore<TLocationValue, {
|
|
465
|
-
settings: unknown;
|
|
466
|
-
projectId: string;
|
|
467
|
-
prompt: string;
|
|
468
|
-
promptRetry: number;
|
|
469
|
-
}, TLocationValue, "unstable_ai">, {
|
|
470
|
-
type: TLocationType;
|
|
471
457
|
}>)["value"], Parameters<(Extract<_uniformdev_mesh_sdk.DataSourceLocation, {
|
|
472
458
|
type: TLocationType;
|
|
473
459
|
}> | Extract<_uniformdev_mesh_sdk.DataTypeLocation, {
|
|
@@ -480,13 +466,6 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
480
466
|
type: TLocationType;
|
|
481
467
|
}> | Extract<_uniformdev_mesh_sdk.SettingsLocation<TLocationValue>, {
|
|
482
468
|
type: TLocationType;
|
|
483
|
-
}> | Extract<_uniformdev_mesh_sdk.MeshLocationCore<TLocationValue, {
|
|
484
|
-
settings: unknown;
|
|
485
|
-
projectId: string;
|
|
486
|
-
prompt: string;
|
|
487
|
-
promptRetry: number;
|
|
488
|
-
}, TLocationValue, "unstable_ai">, {
|
|
489
|
-
type: TLocationType;
|
|
490
469
|
}>)["setValue"]>[0]>;
|
|
491
470
|
};
|
|
492
471
|
type SetLocationValueDispatch<TValue, TSetValue = TValue> = (dispatch: SetLocationValueFunction<TValue, TSetValue>) => Promise<void> | void;
|
|
@@ -793,7 +772,7 @@ type InputVariablesProps<TEditorContext = unknown> = {
|
|
|
793
772
|
/** Enables mutliple lines in the input (\n in the value) */
|
|
794
773
|
multiLine?: boolean;
|
|
795
774
|
/** Disables the inline variable selection menu when rendering a variables input */
|
|
796
|
-
disableInlineMenu?: boolean;
|
|
775
|
+
disableInlineMenu?: boolean | 'by-label' | 'by-input';
|
|
797
776
|
/**
|
|
798
777
|
* Enables clicking a variable reference to edit the variable
|
|
799
778
|
* Note: automatically disabled if `disabled` or `disableVariables` is set
|
|
@@ -824,6 +803,8 @@ type InputVariablesProps<TEditorContext = unknown> = {
|
|
|
824
803
|
* * Performing other custom mutations to the variables editor, such as inserting text from a button click.
|
|
825
804
|
*/
|
|
826
805
|
editorRef?: MutableRefObject<LexicalEditor | null>;
|
|
806
|
+
/** The compact style is similar to the parameters panel */
|
|
807
|
+
styleVariant?: 'default' | 'compact';
|
|
827
808
|
} & PasteTransformerPluginProps & UseInputVariablesStateProps<TEditorContext>;
|
|
828
809
|
/**
|
|
829
810
|
* An input box that enables insertion of 'variables', provided by VariablesProvider,
|
|
@@ -1199,8 +1180,8 @@ type ObjectSearchFilterProps = {
|
|
|
1199
1180
|
* @default 'Content Type Select'
|
|
1200
1181
|
*/
|
|
1201
1182
|
selectLabel?: string;
|
|
1202
|
-
/** sets the select input options */
|
|
1203
|
-
selectOptions
|
|
1183
|
+
/** sets the select input options, if empty - only keyword search field will be rendered */
|
|
1184
|
+
selectOptions?: Array<{
|
|
1204
1185
|
id: string;
|
|
1205
1186
|
name?: string;
|
|
1206
1187
|
label: string;
|
|
@@ -1216,7 +1197,7 @@ type ObjectSearchFilterProps = {
|
|
|
1216
1197
|
};
|
|
1217
1198
|
/**
|
|
1218
1199
|
* @description Object search filter is an opinionated filter that has pre-defined query and setQuery functions
|
|
1219
|
-
* that can be extended with custom
|
|
1200
|
+
* that can be extended with custom functions
|
|
1220
1201
|
* @example <ObjectSearchFilter selectOptions={[{ id: 'id value', name: 'name value'}]} /> */
|
|
1221
1202
|
declare const ObjectSearchFilter: ({ requireContentType, typeSelectorAllTypesOptionText, searchInputName, searchInputPlaceholderText, selectLabel, selectOptions, }: ObjectSearchFilterProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1222
1203
|
|
|
@@ -1321,7 +1302,8 @@ declare function useObjectSearchContext<TExtraSearchFilters = unknown, TExtraIte
|
|
|
1321
1302
|
type ObjectSearchListItemProps = SelectedItemProps & {
|
|
1322
1303
|
/** sets the content type value, this is normally used for subtitles e.g. Kitchens */
|
|
1323
1304
|
contentType?: string | string[];
|
|
1324
|
-
/** sets image parameters
|
|
1305
|
+
/** sets image parameters
|
|
1306
|
+
* @deprecated Please use imageUrl to make it compatible with */
|
|
1325
1307
|
image?: {
|
|
1326
1308
|
/** sets the src valuue */
|
|
1327
1309
|
src: string;
|
|
@@ -1336,6 +1318,7 @@ type ObjectSearchListItemProps = SelectedItemProps & {
|
|
|
1336
1318
|
*/
|
|
1337
1319
|
height?: number;
|
|
1338
1320
|
};
|
|
1321
|
+
imageUrl?: string;
|
|
1339
1322
|
/** sets the function call on the role="button" wrapping element */
|
|
1340
1323
|
onSelect?: (data?: Record<string, unknown>) => void;
|
|
1341
1324
|
/** allows child components within the popover data */
|
|
@@ -1352,7 +1335,7 @@ type ObjectSearchListItemProps = SelectedItemProps & {
|
|
|
1352
1335
|
/**
|
|
1353
1336
|
* @description entry search list item is an opinionated UI component best used for initial retrieved results
|
|
1354
1337
|
* @example <ObjectSearchListItem id="my-result-item" title="title" popoverData={<p>some data info</p>}><div>example of uncontrolled content</div></ObjectSearchListItem> */
|
|
1355
|
-
declare const ObjectSearchListItem: ({ id, title, contentType, image, popoverData, onSelect, isMulti, disabled, children, }: ObjectSearchListItemProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1338
|
+
declare const ObjectSearchListItem: ({ id, title, contentType, image, imageUrl, popoverData, onSelect, isMulti, disabled, children, }: ObjectSearchListItemProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1356
1339
|
/**
|
|
1357
1340
|
* An opinionated loading skeleton component best used with ObjectSearchListItem
|
|
1358
1341
|
* @example <ObjectSearchListItemLoadingSkeleton />
|
package/dist/index.d.ts
CHANGED
|
@@ -441,13 +441,6 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
441
441
|
type: TLocationType;
|
|
442
442
|
}> | Extract<_uniformdev_mesh_sdk.SettingsLocation<TLocationValue>, {
|
|
443
443
|
type: TLocationType;
|
|
444
|
-
}> | Extract<_uniformdev_mesh_sdk.MeshLocationCore<TLocationValue, {
|
|
445
|
-
settings: unknown;
|
|
446
|
-
projectId: string;
|
|
447
|
-
prompt: string;
|
|
448
|
-
promptRetry: number;
|
|
449
|
-
}, TLocationValue, "unstable_ai">, {
|
|
450
|
-
type: TLocationType;
|
|
451
444
|
}>, "setValue"> & {
|
|
452
445
|
setValue: SetLocationValueDispatch<(Extract<_uniformdev_mesh_sdk.DataSourceLocation, {
|
|
453
446
|
type: TLocationType;
|
|
@@ -461,13 +454,6 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
461
454
|
type: TLocationType;
|
|
462
455
|
}> | Extract<_uniformdev_mesh_sdk.SettingsLocation<TLocationValue>, {
|
|
463
456
|
type: TLocationType;
|
|
464
|
-
}> | Extract<_uniformdev_mesh_sdk.MeshLocationCore<TLocationValue, {
|
|
465
|
-
settings: unknown;
|
|
466
|
-
projectId: string;
|
|
467
|
-
prompt: string;
|
|
468
|
-
promptRetry: number;
|
|
469
|
-
}, TLocationValue, "unstable_ai">, {
|
|
470
|
-
type: TLocationType;
|
|
471
457
|
}>)["value"], Parameters<(Extract<_uniformdev_mesh_sdk.DataSourceLocation, {
|
|
472
458
|
type: TLocationType;
|
|
473
459
|
}> | Extract<_uniformdev_mesh_sdk.DataTypeLocation, {
|
|
@@ -480,13 +466,6 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
480
466
|
type: TLocationType;
|
|
481
467
|
}> | Extract<_uniformdev_mesh_sdk.SettingsLocation<TLocationValue>, {
|
|
482
468
|
type: TLocationType;
|
|
483
|
-
}> | Extract<_uniformdev_mesh_sdk.MeshLocationCore<TLocationValue, {
|
|
484
|
-
settings: unknown;
|
|
485
|
-
projectId: string;
|
|
486
|
-
prompt: string;
|
|
487
|
-
promptRetry: number;
|
|
488
|
-
}, TLocationValue, "unstable_ai">, {
|
|
489
|
-
type: TLocationType;
|
|
490
469
|
}>)["setValue"]>[0]>;
|
|
491
470
|
};
|
|
492
471
|
type SetLocationValueDispatch<TValue, TSetValue = TValue> = (dispatch: SetLocationValueFunction<TValue, TSetValue>) => Promise<void> | void;
|
|
@@ -793,7 +772,7 @@ type InputVariablesProps<TEditorContext = unknown> = {
|
|
|
793
772
|
/** Enables mutliple lines in the input (\n in the value) */
|
|
794
773
|
multiLine?: boolean;
|
|
795
774
|
/** Disables the inline variable selection menu when rendering a variables input */
|
|
796
|
-
disableInlineMenu?: boolean;
|
|
775
|
+
disableInlineMenu?: boolean | 'by-label' | 'by-input';
|
|
797
776
|
/**
|
|
798
777
|
* Enables clicking a variable reference to edit the variable
|
|
799
778
|
* Note: automatically disabled if `disabled` or `disableVariables` is set
|
|
@@ -824,6 +803,8 @@ type InputVariablesProps<TEditorContext = unknown> = {
|
|
|
824
803
|
* * Performing other custom mutations to the variables editor, such as inserting text from a button click.
|
|
825
804
|
*/
|
|
826
805
|
editorRef?: MutableRefObject<LexicalEditor | null>;
|
|
806
|
+
/** The compact style is similar to the parameters panel */
|
|
807
|
+
styleVariant?: 'default' | 'compact';
|
|
827
808
|
} & PasteTransformerPluginProps & UseInputVariablesStateProps<TEditorContext>;
|
|
828
809
|
/**
|
|
829
810
|
* An input box that enables insertion of 'variables', provided by VariablesProvider,
|
|
@@ -1199,8 +1180,8 @@ type ObjectSearchFilterProps = {
|
|
|
1199
1180
|
* @default 'Content Type Select'
|
|
1200
1181
|
*/
|
|
1201
1182
|
selectLabel?: string;
|
|
1202
|
-
/** sets the select input options */
|
|
1203
|
-
selectOptions
|
|
1183
|
+
/** sets the select input options, if empty - only keyword search field will be rendered */
|
|
1184
|
+
selectOptions?: Array<{
|
|
1204
1185
|
id: string;
|
|
1205
1186
|
name?: string;
|
|
1206
1187
|
label: string;
|
|
@@ -1216,7 +1197,7 @@ type ObjectSearchFilterProps = {
|
|
|
1216
1197
|
};
|
|
1217
1198
|
/**
|
|
1218
1199
|
* @description Object search filter is an opinionated filter that has pre-defined query and setQuery functions
|
|
1219
|
-
* that can be extended with custom
|
|
1200
|
+
* that can be extended with custom functions
|
|
1220
1201
|
* @example <ObjectSearchFilter selectOptions={[{ id: 'id value', name: 'name value'}]} /> */
|
|
1221
1202
|
declare const ObjectSearchFilter: ({ requireContentType, typeSelectorAllTypesOptionText, searchInputName, searchInputPlaceholderText, selectLabel, selectOptions, }: ObjectSearchFilterProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1222
1203
|
|
|
@@ -1321,7 +1302,8 @@ declare function useObjectSearchContext<TExtraSearchFilters = unknown, TExtraIte
|
|
|
1321
1302
|
type ObjectSearchListItemProps = SelectedItemProps & {
|
|
1322
1303
|
/** sets the content type value, this is normally used for subtitles e.g. Kitchens */
|
|
1323
1304
|
contentType?: string | string[];
|
|
1324
|
-
/** sets image parameters
|
|
1305
|
+
/** sets image parameters
|
|
1306
|
+
* @deprecated Please use imageUrl to make it compatible with */
|
|
1325
1307
|
image?: {
|
|
1326
1308
|
/** sets the src valuue */
|
|
1327
1309
|
src: string;
|
|
@@ -1336,6 +1318,7 @@ type ObjectSearchListItemProps = SelectedItemProps & {
|
|
|
1336
1318
|
*/
|
|
1337
1319
|
height?: number;
|
|
1338
1320
|
};
|
|
1321
|
+
imageUrl?: string;
|
|
1339
1322
|
/** sets the function call on the role="button" wrapping element */
|
|
1340
1323
|
onSelect?: (data?: Record<string, unknown>) => void;
|
|
1341
1324
|
/** allows child components within the popover data */
|
|
@@ -1352,7 +1335,7 @@ type ObjectSearchListItemProps = SelectedItemProps & {
|
|
|
1352
1335
|
/**
|
|
1353
1336
|
* @description entry search list item is an opinionated UI component best used for initial retrieved results
|
|
1354
1337
|
* @example <ObjectSearchListItem id="my-result-item" title="title" popoverData={<p>some data info</p>}><div>example of uncontrolled content</div></ObjectSearchListItem> */
|
|
1355
|
-
declare const ObjectSearchListItem: ({ id, title, contentType, image, popoverData, onSelect, isMulti, disabled, children, }: ObjectSearchListItemProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1338
|
+
declare const ObjectSearchListItem: ({ id, title, contentType, image, imageUrl, popoverData, onSelect, isMulti, disabled, children, }: ObjectSearchListItemProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1356
1339
|
/**
|
|
1357
1340
|
* An opinionated loading skeleton component best used with ObjectSearchListItem
|
|
1358
1341
|
* @example <ObjectSearchListItemLoadingSkeleton />
|
package/dist/index.esm.js
CHANGED
|
@@ -4075,6 +4075,11 @@ var input = css21`
|
|
|
4075
4075
|
margin: 0;
|
|
4076
4076
|
}
|
|
4077
4077
|
`;
|
|
4078
|
+
var inputCompact = css21`
|
|
4079
|
+
border: 1px solid var(--white);
|
|
4080
|
+
padding-block: var(--spacing-sm);
|
|
4081
|
+
font-size: var(--fs-sm);
|
|
4082
|
+
`;
|
|
4078
4083
|
|
|
4079
4084
|
// src/components/Variables/toolbox/InputVariablesProvider.tsx
|
|
4080
4085
|
import * as React10 from "react";
|
|
@@ -4598,12 +4603,12 @@ function InputVariables(props) {
|
|
|
4598
4603
|
getEditorContext,
|
|
4599
4604
|
disabled,
|
|
4600
4605
|
editorRef,
|
|
4601
|
-
filterVariable
|
|
4606
|
+
filterVariable,
|
|
4607
|
+
styleVariant = "default"
|
|
4602
4608
|
} = props;
|
|
4603
4609
|
const [finalId] = useState12(id != null ? id : () => v42());
|
|
4604
4610
|
const { dispatch, canDispatch, isEditing } = useVariables(true);
|
|
4605
4611
|
const { disableVariablesForReals, hadVariablesInValue, sharedMenuProps } = useInputVariablesState(props);
|
|
4606
|
-
const disableInlineVariablesForReals = disableVariablesForReals || disableInlineMenu;
|
|
4607
4612
|
const useInputWithNoVariables = Boolean(inputWhenNoVariables && !hadVariablesInValue);
|
|
4608
4613
|
const input3 = /* @__PURE__ */ jsxs23(
|
|
4609
4614
|
"div",
|
|
@@ -4618,7 +4623,7 @@ function InputVariables(props) {
|
|
|
4618
4623
|
InputVariablesOverlayMenu,
|
|
4619
4624
|
{
|
|
4620
4625
|
...sharedMenuProps,
|
|
4621
|
-
disabled:
|
|
4626
|
+
disabled: disableVariablesForReals || disableInlineMenu === true || disableInlineMenu === "by-input",
|
|
4622
4627
|
replaceValueOnVariableInsert: useInputWithNoVariables,
|
|
4623
4628
|
useInputWhenNoVariables: useInputWithNoVariables,
|
|
4624
4629
|
children: /* @__PURE__ */ jsx39(
|
|
@@ -4628,7 +4633,7 @@ function InputVariables(props) {
|
|
|
4628
4633
|
"aria-label": ariaLabel,
|
|
4629
4634
|
"data-testid": dataTestId ? dataTestId : "input-container",
|
|
4630
4635
|
"data-text-value": value,
|
|
4631
|
-
css: input
|
|
4636
|
+
css: [input, styleVariant === "compact" ? inputCompact : null]
|
|
4632
4637
|
}
|
|
4633
4638
|
)
|
|
4634
4639
|
}
|
|
@@ -4652,7 +4657,7 @@ function InputVariables(props) {
|
|
|
4652
4657
|
},
|
|
4653
4658
|
id: finalId,
|
|
4654
4659
|
isActive: hadVariablesInValue,
|
|
4655
|
-
disableVariables: disableVariablesForReals,
|
|
4660
|
+
disableVariables: disableVariablesForReals || disableInlineMenu === "by-label",
|
|
4656
4661
|
children: input3
|
|
4657
4662
|
}
|
|
4658
4663
|
);
|
|
@@ -6287,7 +6292,7 @@ var ObjectSearchContainer = ({
|
|
|
6287
6292
|
|
|
6288
6293
|
// src/components/ObjectSearch/ObjectSearchFilter.tsx
|
|
6289
6294
|
import { InputKeywordSearch as InputKeywordSearch2, InputSelect as InputSelect6 } from "@uniformdev/design-system";
|
|
6290
|
-
import { useState as useState16 } from "react";
|
|
6295
|
+
import { useMemo as useMemo15, useState as useState16 } from "react";
|
|
6291
6296
|
|
|
6292
6297
|
// src/components/ObjectSearch/styles/ObjectSearchFilterContainer.styles.ts
|
|
6293
6298
|
import { css as css32 } from "@emotion/react";
|
|
@@ -6303,9 +6308,6 @@ var ObjectSearchFilterContainer = css32`
|
|
|
6303
6308
|
display: grid;
|
|
6304
6309
|
gap: var(--spacing-base);
|
|
6305
6310
|
`;
|
|
6306
|
-
var ObjectSearchFilterDropdownAndTextSearch = css32`
|
|
6307
|
-
grid-template-columns: 0.5fr 1fr;
|
|
6308
|
-
`;
|
|
6309
6311
|
var ObjectSearchFilterGrid = (gridColumns) => css32`
|
|
6310
6312
|
display: grid;
|
|
6311
6313
|
grid-template-columns: ${gridColumns};
|
|
@@ -6333,35 +6335,51 @@ var ObjectSearchFilter = ({
|
|
|
6333
6335
|
});
|
|
6334
6336
|
onSetQuery({ ...query, ...value });
|
|
6335
6337
|
};
|
|
6336
|
-
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
|
|
6338
|
+
const memoizedSelectOptions = useMemo15(() => {
|
|
6339
|
+
if (!requireContentType && !(selectOptions == null ? void 0 : selectOptions.length)) {
|
|
6340
|
+
return [];
|
|
6341
|
+
}
|
|
6342
|
+
return [
|
|
6343
|
+
...!requireContentType ? [{ value: "any", label: typeSelectorAllTypesOptionText }] : [],
|
|
6344
|
+
...selectOptions ? selectOptions.map((option) => {
|
|
6345
|
+
var _a;
|
|
6346
|
+
return { name: option == null ? void 0 : option.name, label: (_a = option.label) != null ? _a : option == null ? void 0 : option.name, id: option.id };
|
|
6347
|
+
}) : []
|
|
6348
|
+
];
|
|
6349
|
+
}, [requireContentType, typeSelectorAllTypesOptionText, selectOptions]);
|
|
6350
|
+
const shouldRenderSelect = memoizedSelectOptions.length > 0;
|
|
6351
|
+
return /* @__PURE__ */ jsxs35(
|
|
6352
|
+
"fieldset",
|
|
6353
|
+
{
|
|
6354
|
+
css: [
|
|
6355
|
+
ObjectSearchFilterContainer,
|
|
6356
|
+
ObjectSearchFilterGrid(shouldRenderSelect ? "1fr 2fr" : "1fr")
|
|
6357
|
+
],
|
|
6358
|
+
children: [
|
|
6359
|
+
memoizedSelectOptions.length ? /* @__PURE__ */ jsx60(
|
|
6360
|
+
InputSelect6,
|
|
6361
|
+
{
|
|
6362
|
+
label: selectLabel,
|
|
6363
|
+
showLabel: false,
|
|
6364
|
+
onChange: (e) => handleFilterChange({ contentType: e.target.value }),
|
|
6365
|
+
options: memoizedSelectOptions,
|
|
6366
|
+
value: query.contentType
|
|
6367
|
+
}
|
|
6368
|
+
) : null,
|
|
6369
|
+
/* @__PURE__ */ jsx60(
|
|
6370
|
+
InputKeywordSearch2,
|
|
6371
|
+
{
|
|
6372
|
+
inputFieldName: searchInputName,
|
|
6373
|
+
placeholder: searchInputPlaceholderText,
|
|
6374
|
+
onSearchTextChanged: (e) => handleFilterChange({ keyword: e }),
|
|
6375
|
+
disabledFieldSubmission: true,
|
|
6376
|
+
onClear: () => handleFilterChange({ keyword: "" }),
|
|
6377
|
+
value: searchState.keyword
|
|
6378
|
+
}
|
|
6379
|
+
)
|
|
6380
|
+
]
|
|
6381
|
+
}
|
|
6382
|
+
);
|
|
6365
6383
|
};
|
|
6366
6384
|
|
|
6367
6385
|
// src/components/ObjectSearch/ObjectSearchFilterContainer.tsx
|
|
@@ -6420,6 +6438,10 @@ var ObjectListItemHeadingGroup = css33`
|
|
|
6420
6438
|
align-items: center;
|
|
6421
6439
|
display: grid;
|
|
6422
6440
|
`;
|
|
6441
|
+
var ObjectListItemThumbnail = css33`
|
|
6442
|
+
width: 30px;
|
|
6443
|
+
object-fit: contain;
|
|
6444
|
+
`;
|
|
6423
6445
|
var ObjectListItemTitle = css33`
|
|
6424
6446
|
color: var(--brand-secondary-1);
|
|
6425
6447
|
display: block;
|
|
@@ -6453,6 +6475,7 @@ var ObjectSearchListItem = ({
|
|
|
6453
6475
|
title,
|
|
6454
6476
|
contentType,
|
|
6455
6477
|
image,
|
|
6478
|
+
imageUrl,
|
|
6456
6479
|
popoverData,
|
|
6457
6480
|
onSelect,
|
|
6458
6481
|
isMulti = false,
|
|
@@ -6464,7 +6487,7 @@ var ObjectSearchListItem = ({
|
|
|
6464
6487
|
const handleSelectItem = () => {
|
|
6465
6488
|
var _a;
|
|
6466
6489
|
const extraData = (_a = onSelect == null ? void 0 : onSelect()) != null ? _a : {};
|
|
6467
|
-
const selectedItem = { id, title, contentType, image, popoverData, ...extraData };
|
|
6490
|
+
const selectedItem = { id, title, contentType, imageUrl, image, popoverData, ...extraData };
|
|
6468
6491
|
if (isMulti) {
|
|
6469
6492
|
return onSelectItem(selectedItem);
|
|
6470
6493
|
}
|
|
@@ -6485,7 +6508,8 @@ var ObjectSearchListItem = ({
|
|
|
6485
6508
|
css: ObjectListItemControlledContent,
|
|
6486
6509
|
"aria-disabled": disabled,
|
|
6487
6510
|
children: [
|
|
6488
|
-
!
|
|
6511
|
+
!imageUrl ? null : /* @__PURE__ */ jsx62("img", { src: imageUrl, alt: `Thumbnail for ${title}`, css: ObjectListItemThumbnail }),
|
|
6512
|
+
!image || imageUrl ? null : /* @__PURE__ */ jsx62("img", { ...image, loading: (image == null ? void 0 : image.width) && image.height ? "lazy" : "eager" }),
|
|
6489
6513
|
/* @__PURE__ */ jsxs37("div", { role: "heading", css: ObjectListItemHeadingGroup, children: [
|
|
6490
6514
|
!contentType ? null : /* @__PURE__ */ jsx62("span", { css: ObjectListItemSubtitle, children: formatedContentType }),
|
|
6491
6515
|
/* @__PURE__ */ jsx62("span", { css: ObjectListItemTitle, children: title })
|
|
@@ -6985,7 +7009,7 @@ var QueryFilter = ({
|
|
|
6985
7009
|
};
|
|
6986
7010
|
|
|
6987
7011
|
// src/components/ParamTypeDynamicDataProvider.tsx
|
|
6988
|
-
import { useEffect as useEffect17, useMemo as
|
|
7012
|
+
import { useEffect as useEffect17, useMemo as useMemo16, useRef as useRef15 } from "react";
|
|
6989
7013
|
import { jsx as jsx67 } from "@emotion/react/jsx-runtime";
|
|
6990
7014
|
function ParamTypeDynamicDataProvider(props) {
|
|
6991
7015
|
const { children } = props;
|
|
@@ -6994,7 +7018,7 @@ function ParamTypeDynamicDataProvider(props) {
|
|
|
6994
7018
|
} = useMeshLocation("paramType");
|
|
6995
7019
|
const dynamicInputsAsVariables = useDynamicInputsAsVariables(dynamicInputs);
|
|
6996
7020
|
const connectedDataAsVariables = useConnectedDataAsVariables(connectedData);
|
|
6997
|
-
const variables =
|
|
7021
|
+
const variables = useMemo16(
|
|
6998
7022
|
() => ({ ...connectedDataAsVariables, ...dynamicInputsAsVariables }),
|
|
6999
7023
|
[dynamicInputsAsVariables, connectedDataAsVariables]
|
|
7000
7024
|
);
|
package/dist/index.js
CHANGED
|
@@ -4253,6 +4253,11 @@ var input = import_react41.css`
|
|
|
4253
4253
|
margin: 0;
|
|
4254
4254
|
}
|
|
4255
4255
|
`;
|
|
4256
|
+
var inputCompact = import_react41.css`
|
|
4257
|
+
border: 1px solid var(--white);
|
|
4258
|
+
padding-block: var(--spacing-sm);
|
|
4259
|
+
font-size: var(--fs-sm);
|
|
4260
|
+
`;
|
|
4256
4261
|
|
|
4257
4262
|
// src/components/Variables/toolbox/InputVariablesProvider.tsx
|
|
4258
4263
|
var React10 = __toESM(require("react"));
|
|
@@ -4764,12 +4769,12 @@ function InputVariables(props) {
|
|
|
4764
4769
|
getEditorContext,
|
|
4765
4770
|
disabled,
|
|
4766
4771
|
editorRef,
|
|
4767
|
-
filterVariable
|
|
4772
|
+
filterVariable,
|
|
4773
|
+
styleVariant = "default"
|
|
4768
4774
|
} = props;
|
|
4769
4775
|
const [finalId] = (0, import_react49.useState)(id != null ? id : () => (0, import_uuid2.v4)());
|
|
4770
4776
|
const { dispatch, canDispatch, isEditing } = useVariables(true);
|
|
4771
4777
|
const { disableVariablesForReals, hadVariablesInValue, sharedMenuProps } = useInputVariablesState(props);
|
|
4772
|
-
const disableInlineVariablesForReals = disableVariablesForReals || disableInlineMenu;
|
|
4773
4778
|
const useInputWithNoVariables = Boolean(inputWhenNoVariables && !hadVariablesInValue);
|
|
4774
4779
|
const input3 = /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
4775
4780
|
"div",
|
|
@@ -4784,7 +4789,7 @@ function InputVariables(props) {
|
|
|
4784
4789
|
InputVariablesOverlayMenu,
|
|
4785
4790
|
{
|
|
4786
4791
|
...sharedMenuProps,
|
|
4787
|
-
disabled:
|
|
4792
|
+
disabled: disableVariablesForReals || disableInlineMenu === true || disableInlineMenu === "by-input",
|
|
4788
4793
|
replaceValueOnVariableInsert: useInputWithNoVariables,
|
|
4789
4794
|
useInputWhenNoVariables: useInputWithNoVariables,
|
|
4790
4795
|
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
@@ -4794,7 +4799,7 @@ function InputVariables(props) {
|
|
|
4794
4799
|
"aria-label": ariaLabel,
|
|
4795
4800
|
"data-testid": dataTestId ? dataTestId : "input-container",
|
|
4796
4801
|
"data-text-value": value,
|
|
4797
|
-
css: input
|
|
4802
|
+
css: [input, styleVariant === "compact" ? inputCompact : null]
|
|
4798
4803
|
}
|
|
4799
4804
|
)
|
|
4800
4805
|
}
|
|
@@ -4818,7 +4823,7 @@ function InputVariables(props) {
|
|
|
4818
4823
|
},
|
|
4819
4824
|
id: finalId,
|
|
4820
4825
|
isActive: hadVariablesInValue,
|
|
4821
|
-
disableVariables: disableVariablesForReals,
|
|
4826
|
+
disableVariables: disableVariablesForReals || disableInlineMenu === "by-label",
|
|
4822
4827
|
children: input3
|
|
4823
4828
|
}
|
|
4824
4829
|
);
|
|
@@ -6434,9 +6439,6 @@ var ObjectSearchFilterContainer = import_react66.css`
|
|
|
6434
6439
|
display: grid;
|
|
6435
6440
|
gap: var(--spacing-base);
|
|
6436
6441
|
`;
|
|
6437
|
-
var ObjectSearchFilterDropdownAndTextSearch = import_react66.css`
|
|
6438
|
-
grid-template-columns: 0.5fr 1fr;
|
|
6439
|
-
`;
|
|
6440
6442
|
var ObjectSearchFilterGrid = (gridColumns) => import_react66.css`
|
|
6441
6443
|
display: grid;
|
|
6442
6444
|
grid-template-columns: ${gridColumns};
|
|
@@ -6464,35 +6466,51 @@ var ObjectSearchFilter = ({
|
|
|
6464
6466
|
});
|
|
6465
6467
|
onSetQuery({ ...query, ...value });
|
|
6466
6468
|
};
|
|
6467
|
-
|
|
6468
|
-
|
|
6469
|
-
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
|
-
|
|
6474
|
-
|
|
6475
|
-
|
|
6476
|
-
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
|
|
6480
|
-
|
|
6481
|
-
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
|
|
6490
|
-
|
|
6491
|
-
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
|
|
6495
|
-
|
|
6469
|
+
const memoizedSelectOptions = (0, import_react67.useMemo)(() => {
|
|
6470
|
+
if (!requireContentType && !(selectOptions == null ? void 0 : selectOptions.length)) {
|
|
6471
|
+
return [];
|
|
6472
|
+
}
|
|
6473
|
+
return [
|
|
6474
|
+
...!requireContentType ? [{ value: "any", label: typeSelectorAllTypesOptionText }] : [],
|
|
6475
|
+
...selectOptions ? selectOptions.map((option) => {
|
|
6476
|
+
var _a;
|
|
6477
|
+
return { name: option == null ? void 0 : option.name, label: (_a = option.label) != null ? _a : option == null ? void 0 : option.name, id: option.id };
|
|
6478
|
+
}) : []
|
|
6479
|
+
];
|
|
6480
|
+
}, [requireContentType, typeSelectorAllTypesOptionText, selectOptions]);
|
|
6481
|
+
const shouldRenderSelect = memoizedSelectOptions.length > 0;
|
|
6482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
6483
|
+
"fieldset",
|
|
6484
|
+
{
|
|
6485
|
+
css: [
|
|
6486
|
+
ObjectSearchFilterContainer,
|
|
6487
|
+
ObjectSearchFilterGrid(shouldRenderSelect ? "1fr 2fr" : "1fr")
|
|
6488
|
+
],
|
|
6489
|
+
children: [
|
|
6490
|
+
memoizedSelectOptions.length ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
6491
|
+
import_design_system33.InputSelect,
|
|
6492
|
+
{
|
|
6493
|
+
label: selectLabel,
|
|
6494
|
+
showLabel: false,
|
|
6495
|
+
onChange: (e) => handleFilterChange({ contentType: e.target.value }),
|
|
6496
|
+
options: memoizedSelectOptions,
|
|
6497
|
+
value: query.contentType
|
|
6498
|
+
}
|
|
6499
|
+
) : null,
|
|
6500
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
6501
|
+
import_design_system33.InputKeywordSearch,
|
|
6502
|
+
{
|
|
6503
|
+
inputFieldName: searchInputName,
|
|
6504
|
+
placeholder: searchInputPlaceholderText,
|
|
6505
|
+
onSearchTextChanged: (e) => handleFilterChange({ keyword: e }),
|
|
6506
|
+
disabledFieldSubmission: true,
|
|
6507
|
+
onClear: () => handleFilterChange({ keyword: "" }),
|
|
6508
|
+
value: searchState.keyword
|
|
6509
|
+
}
|
|
6510
|
+
)
|
|
6511
|
+
]
|
|
6512
|
+
}
|
|
6513
|
+
);
|
|
6496
6514
|
};
|
|
6497
6515
|
|
|
6498
6516
|
// src/components/ObjectSearch/ObjectSearchFilterContainer.tsx
|
|
@@ -6551,6 +6569,10 @@ var ObjectListItemHeadingGroup = import_react68.css`
|
|
|
6551
6569
|
align-items: center;
|
|
6552
6570
|
display: grid;
|
|
6553
6571
|
`;
|
|
6572
|
+
var ObjectListItemThumbnail = import_react68.css`
|
|
6573
|
+
width: 30px;
|
|
6574
|
+
object-fit: contain;
|
|
6575
|
+
`;
|
|
6554
6576
|
var ObjectListItemTitle = import_react68.css`
|
|
6555
6577
|
color: var(--brand-secondary-1);
|
|
6556
6578
|
display: block;
|
|
@@ -6584,6 +6606,7 @@ var ObjectSearchListItem = ({
|
|
|
6584
6606
|
title,
|
|
6585
6607
|
contentType,
|
|
6586
6608
|
image,
|
|
6609
|
+
imageUrl,
|
|
6587
6610
|
popoverData,
|
|
6588
6611
|
onSelect,
|
|
6589
6612
|
isMulti = false,
|
|
@@ -6595,7 +6618,7 @@ var ObjectSearchListItem = ({
|
|
|
6595
6618
|
const handleSelectItem = () => {
|
|
6596
6619
|
var _a;
|
|
6597
6620
|
const extraData = (_a = onSelect == null ? void 0 : onSelect()) != null ? _a : {};
|
|
6598
|
-
const selectedItem = { id, title, contentType, image, popoverData, ...extraData };
|
|
6621
|
+
const selectedItem = { id, title, contentType, imageUrl, image, popoverData, ...extraData };
|
|
6599
6622
|
if (isMulti) {
|
|
6600
6623
|
return onSelectItem(selectedItem);
|
|
6601
6624
|
}
|
|
@@ -6616,7 +6639,8 @@ var ObjectSearchListItem = ({
|
|
|
6616
6639
|
css: ObjectListItemControlledContent,
|
|
6617
6640
|
"aria-disabled": disabled,
|
|
6618
6641
|
children: [
|
|
6619
|
-
!
|
|
6642
|
+
!imageUrl ? null : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("img", { src: imageUrl, alt: `Thumbnail for ${title}`, css: ObjectListItemThumbnail }),
|
|
6643
|
+
!image || imageUrl ? null : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("img", { ...image, loading: (image == null ? void 0 : image.width) && image.height ? "lazy" : "eager" }),
|
|
6620
6644
|
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { role: "heading", css: ObjectListItemHeadingGroup, children: [
|
|
6621
6645
|
!contentType ? null : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { css: ObjectListItemSubtitle, children: formatedContentType }),
|
|
6622
6646
|
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { css: ObjectListItemTitle, children: title })
|
package/dist/index.mjs
CHANGED
|
@@ -4075,6 +4075,11 @@ var input = css21`
|
|
|
4075
4075
|
margin: 0;
|
|
4076
4076
|
}
|
|
4077
4077
|
`;
|
|
4078
|
+
var inputCompact = css21`
|
|
4079
|
+
border: 1px solid var(--white);
|
|
4080
|
+
padding-block: var(--spacing-sm);
|
|
4081
|
+
font-size: var(--fs-sm);
|
|
4082
|
+
`;
|
|
4078
4083
|
|
|
4079
4084
|
// src/components/Variables/toolbox/InputVariablesProvider.tsx
|
|
4080
4085
|
import * as React10 from "react";
|
|
@@ -4598,12 +4603,12 @@ function InputVariables(props) {
|
|
|
4598
4603
|
getEditorContext,
|
|
4599
4604
|
disabled,
|
|
4600
4605
|
editorRef,
|
|
4601
|
-
filterVariable
|
|
4606
|
+
filterVariable,
|
|
4607
|
+
styleVariant = "default"
|
|
4602
4608
|
} = props;
|
|
4603
4609
|
const [finalId] = useState12(id != null ? id : () => v42());
|
|
4604
4610
|
const { dispatch, canDispatch, isEditing } = useVariables(true);
|
|
4605
4611
|
const { disableVariablesForReals, hadVariablesInValue, sharedMenuProps } = useInputVariablesState(props);
|
|
4606
|
-
const disableInlineVariablesForReals = disableVariablesForReals || disableInlineMenu;
|
|
4607
4612
|
const useInputWithNoVariables = Boolean(inputWhenNoVariables && !hadVariablesInValue);
|
|
4608
4613
|
const input3 = /* @__PURE__ */ jsxs23(
|
|
4609
4614
|
"div",
|
|
@@ -4618,7 +4623,7 @@ function InputVariables(props) {
|
|
|
4618
4623
|
InputVariablesOverlayMenu,
|
|
4619
4624
|
{
|
|
4620
4625
|
...sharedMenuProps,
|
|
4621
|
-
disabled:
|
|
4626
|
+
disabled: disableVariablesForReals || disableInlineMenu === true || disableInlineMenu === "by-input",
|
|
4622
4627
|
replaceValueOnVariableInsert: useInputWithNoVariables,
|
|
4623
4628
|
useInputWhenNoVariables: useInputWithNoVariables,
|
|
4624
4629
|
children: /* @__PURE__ */ jsx39(
|
|
@@ -4628,7 +4633,7 @@ function InputVariables(props) {
|
|
|
4628
4633
|
"aria-label": ariaLabel,
|
|
4629
4634
|
"data-testid": dataTestId ? dataTestId : "input-container",
|
|
4630
4635
|
"data-text-value": value,
|
|
4631
|
-
css: input
|
|
4636
|
+
css: [input, styleVariant === "compact" ? inputCompact : null]
|
|
4632
4637
|
}
|
|
4633
4638
|
)
|
|
4634
4639
|
}
|
|
@@ -4652,7 +4657,7 @@ function InputVariables(props) {
|
|
|
4652
4657
|
},
|
|
4653
4658
|
id: finalId,
|
|
4654
4659
|
isActive: hadVariablesInValue,
|
|
4655
|
-
disableVariables: disableVariablesForReals,
|
|
4660
|
+
disableVariables: disableVariablesForReals || disableInlineMenu === "by-label",
|
|
4656
4661
|
children: input3
|
|
4657
4662
|
}
|
|
4658
4663
|
);
|
|
@@ -6287,7 +6292,7 @@ var ObjectSearchContainer = ({
|
|
|
6287
6292
|
|
|
6288
6293
|
// src/components/ObjectSearch/ObjectSearchFilter.tsx
|
|
6289
6294
|
import { InputKeywordSearch as InputKeywordSearch2, InputSelect as InputSelect6 } from "@uniformdev/design-system";
|
|
6290
|
-
import { useState as useState16 } from "react";
|
|
6295
|
+
import { useMemo as useMemo15, useState as useState16 } from "react";
|
|
6291
6296
|
|
|
6292
6297
|
// src/components/ObjectSearch/styles/ObjectSearchFilterContainer.styles.ts
|
|
6293
6298
|
import { css as css32 } from "@emotion/react";
|
|
@@ -6303,9 +6308,6 @@ var ObjectSearchFilterContainer = css32`
|
|
|
6303
6308
|
display: grid;
|
|
6304
6309
|
gap: var(--spacing-base);
|
|
6305
6310
|
`;
|
|
6306
|
-
var ObjectSearchFilterDropdownAndTextSearch = css32`
|
|
6307
|
-
grid-template-columns: 0.5fr 1fr;
|
|
6308
|
-
`;
|
|
6309
6311
|
var ObjectSearchFilterGrid = (gridColumns) => css32`
|
|
6310
6312
|
display: grid;
|
|
6311
6313
|
grid-template-columns: ${gridColumns};
|
|
@@ -6333,35 +6335,51 @@ var ObjectSearchFilter = ({
|
|
|
6333
6335
|
});
|
|
6334
6336
|
onSetQuery({ ...query, ...value });
|
|
6335
6337
|
};
|
|
6336
|
-
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
|
|
6338
|
+
const memoizedSelectOptions = useMemo15(() => {
|
|
6339
|
+
if (!requireContentType && !(selectOptions == null ? void 0 : selectOptions.length)) {
|
|
6340
|
+
return [];
|
|
6341
|
+
}
|
|
6342
|
+
return [
|
|
6343
|
+
...!requireContentType ? [{ value: "any", label: typeSelectorAllTypesOptionText }] : [],
|
|
6344
|
+
...selectOptions ? selectOptions.map((option) => {
|
|
6345
|
+
var _a;
|
|
6346
|
+
return { name: option == null ? void 0 : option.name, label: (_a = option.label) != null ? _a : option == null ? void 0 : option.name, id: option.id };
|
|
6347
|
+
}) : []
|
|
6348
|
+
];
|
|
6349
|
+
}, [requireContentType, typeSelectorAllTypesOptionText, selectOptions]);
|
|
6350
|
+
const shouldRenderSelect = memoizedSelectOptions.length > 0;
|
|
6351
|
+
return /* @__PURE__ */ jsxs35(
|
|
6352
|
+
"fieldset",
|
|
6353
|
+
{
|
|
6354
|
+
css: [
|
|
6355
|
+
ObjectSearchFilterContainer,
|
|
6356
|
+
ObjectSearchFilterGrid(shouldRenderSelect ? "1fr 2fr" : "1fr")
|
|
6357
|
+
],
|
|
6358
|
+
children: [
|
|
6359
|
+
memoizedSelectOptions.length ? /* @__PURE__ */ jsx60(
|
|
6360
|
+
InputSelect6,
|
|
6361
|
+
{
|
|
6362
|
+
label: selectLabel,
|
|
6363
|
+
showLabel: false,
|
|
6364
|
+
onChange: (e) => handleFilterChange({ contentType: e.target.value }),
|
|
6365
|
+
options: memoizedSelectOptions,
|
|
6366
|
+
value: query.contentType
|
|
6367
|
+
}
|
|
6368
|
+
) : null,
|
|
6369
|
+
/* @__PURE__ */ jsx60(
|
|
6370
|
+
InputKeywordSearch2,
|
|
6371
|
+
{
|
|
6372
|
+
inputFieldName: searchInputName,
|
|
6373
|
+
placeholder: searchInputPlaceholderText,
|
|
6374
|
+
onSearchTextChanged: (e) => handleFilterChange({ keyword: e }),
|
|
6375
|
+
disabledFieldSubmission: true,
|
|
6376
|
+
onClear: () => handleFilterChange({ keyword: "" }),
|
|
6377
|
+
value: searchState.keyword
|
|
6378
|
+
}
|
|
6379
|
+
)
|
|
6380
|
+
]
|
|
6381
|
+
}
|
|
6382
|
+
);
|
|
6365
6383
|
};
|
|
6366
6384
|
|
|
6367
6385
|
// src/components/ObjectSearch/ObjectSearchFilterContainer.tsx
|
|
@@ -6420,6 +6438,10 @@ var ObjectListItemHeadingGroup = css33`
|
|
|
6420
6438
|
align-items: center;
|
|
6421
6439
|
display: grid;
|
|
6422
6440
|
`;
|
|
6441
|
+
var ObjectListItemThumbnail = css33`
|
|
6442
|
+
width: 30px;
|
|
6443
|
+
object-fit: contain;
|
|
6444
|
+
`;
|
|
6423
6445
|
var ObjectListItemTitle = css33`
|
|
6424
6446
|
color: var(--brand-secondary-1);
|
|
6425
6447
|
display: block;
|
|
@@ -6453,6 +6475,7 @@ var ObjectSearchListItem = ({
|
|
|
6453
6475
|
title,
|
|
6454
6476
|
contentType,
|
|
6455
6477
|
image,
|
|
6478
|
+
imageUrl,
|
|
6456
6479
|
popoverData,
|
|
6457
6480
|
onSelect,
|
|
6458
6481
|
isMulti = false,
|
|
@@ -6464,7 +6487,7 @@ var ObjectSearchListItem = ({
|
|
|
6464
6487
|
const handleSelectItem = () => {
|
|
6465
6488
|
var _a;
|
|
6466
6489
|
const extraData = (_a = onSelect == null ? void 0 : onSelect()) != null ? _a : {};
|
|
6467
|
-
const selectedItem = { id, title, contentType, image, popoverData, ...extraData };
|
|
6490
|
+
const selectedItem = { id, title, contentType, imageUrl, image, popoverData, ...extraData };
|
|
6468
6491
|
if (isMulti) {
|
|
6469
6492
|
return onSelectItem(selectedItem);
|
|
6470
6493
|
}
|
|
@@ -6485,7 +6508,8 @@ var ObjectSearchListItem = ({
|
|
|
6485
6508
|
css: ObjectListItemControlledContent,
|
|
6486
6509
|
"aria-disabled": disabled,
|
|
6487
6510
|
children: [
|
|
6488
|
-
!
|
|
6511
|
+
!imageUrl ? null : /* @__PURE__ */ jsx62("img", { src: imageUrl, alt: `Thumbnail for ${title}`, css: ObjectListItemThumbnail }),
|
|
6512
|
+
!image || imageUrl ? null : /* @__PURE__ */ jsx62("img", { ...image, loading: (image == null ? void 0 : image.width) && image.height ? "lazy" : "eager" }),
|
|
6489
6513
|
/* @__PURE__ */ jsxs37("div", { role: "heading", css: ObjectListItemHeadingGroup, children: [
|
|
6490
6514
|
!contentType ? null : /* @__PURE__ */ jsx62("span", { css: ObjectListItemSubtitle, children: formatedContentType }),
|
|
6491
6515
|
/* @__PURE__ */ jsx62("span", { css: ObjectListItemTitle, children: title })
|
|
@@ -6985,7 +7009,7 @@ var QueryFilter = ({
|
|
|
6985
7009
|
};
|
|
6986
7010
|
|
|
6987
7011
|
// src/components/ParamTypeDynamicDataProvider.tsx
|
|
6988
|
-
import { useEffect as useEffect17, useMemo as
|
|
7012
|
+
import { useEffect as useEffect17, useMemo as useMemo16, useRef as useRef15 } from "react";
|
|
6989
7013
|
import { jsx as jsx67 } from "@emotion/react/jsx-runtime";
|
|
6990
7014
|
function ParamTypeDynamicDataProvider(props) {
|
|
6991
7015
|
const { children } = props;
|
|
@@ -6994,7 +7018,7 @@ function ParamTypeDynamicDataProvider(props) {
|
|
|
6994
7018
|
} = useMeshLocation("paramType");
|
|
6995
7019
|
const dynamicInputsAsVariables = useDynamicInputsAsVariables(dynamicInputs);
|
|
6996
7020
|
const connectedDataAsVariables = useConnectedDataAsVariables(connectedData);
|
|
6997
|
-
const variables =
|
|
7021
|
+
const variables = useMemo16(
|
|
6998
7022
|
() => ({ ...connectedDataAsVariables, ...dynamicInputsAsVariables }),
|
|
6999
7023
|
[dynamicInputsAsVariables, connectedDataAsVariables]
|
|
7000
7024
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/mesh-sdk-react",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.51.1-alpha.1+e55ae6c1e",
|
|
4
4
|
"description": "Uniform Mesh Framework SDK for React",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"@lexical/selection": "^0.12.0",
|
|
51
51
|
"@lexical/utils": "^0.12.0",
|
|
52
52
|
"@react-icons/all-files": "https://github.com/react-icons/react-icons/releases/download/v4.10.1/react-icons-all-files-4.10.1.tgz",
|
|
53
|
-
"@uniformdev/canvas": "19.
|
|
54
|
-
"@uniformdev/design-system": "19.
|
|
55
|
-
"@uniformdev/mesh-sdk": "19.
|
|
53
|
+
"@uniformdev/canvas": "19.51.1-alpha.1+e55ae6c1e",
|
|
54
|
+
"@uniformdev/design-system": "19.51.1-alpha.1+e55ae6c1e",
|
|
55
|
+
"@uniformdev/mesh-sdk": "19.51.1-alpha.1+e55ae6c1e",
|
|
56
56
|
"dequal": "^2.0.3",
|
|
57
57
|
"lexical": "^0.12.0",
|
|
58
58
|
"mitt": "^3.0.0",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"access": "public"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "e55ae6c1ea8df19f04a9dba22769d76e16d28d70"
|
|
90
90
|
}
|