@uniformdev/mesh-sdk-react 19.138.1-alpha.4 → 19.141.1-alpha.5
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 +19 -7
- package/dist/index.d.ts +19 -7
- package/dist/index.esm.js +26 -18
- package/dist/index.js +26 -18
- package/dist/index.mjs +26 -18
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -1291,13 +1291,21 @@ type ObjectSearchContextProps<TExtraFilters = unknown, TExtraItemProps = unknown
|
|
|
1291
1291
|
onSetList?: (value: ItemListProps) => void;
|
|
1292
1292
|
/** is multi items selection allowed or not */
|
|
1293
1293
|
isMulti: boolean;
|
|
1294
|
+
/** Locale options for filtering. Will be picked up and render inside default ObjectSearchFilter implementation */
|
|
1294
1295
|
localeOptions?: {
|
|
1295
1296
|
label: string;
|
|
1296
1297
|
value: string;
|
|
1297
1298
|
}[];
|
|
1299
|
+
/** For backwards compatibility you need to explicitly enable default locale filter. */
|
|
1298
1300
|
enableFilterByLocale?: boolean;
|
|
1301
|
+
/** Indicator of weather or not render loader for search results list */
|
|
1299
1302
|
isListLoading?: boolean;
|
|
1303
|
+
/** Indicator of weather or not render loader for selected items list */
|
|
1300
1304
|
isSelectedItemsListLoading?: boolean;
|
|
1305
|
+
/**
|
|
1306
|
+
* Dynamic entry id for dynamic entry filtering, if instead of static entry being selected - bound dynamic value is being used.
|
|
1307
|
+
* You can use `import { hasReferencedVariables } from '@uniformdev/mesh-sdk-react';` to check if you value contains variable.
|
|
1308
|
+
* */
|
|
1301
1309
|
dynamicEntryId?: string;
|
|
1302
1310
|
};
|
|
1303
1311
|
declare const ObjectSearchContext: React$1.Context<ObjectSearchContextProps<unknown, unknown>>;
|
|
@@ -1417,7 +1425,7 @@ type ObjectSearchListItemProps = SelectedItemProps & {
|
|
|
1417
1425
|
/**
|
|
1418
1426
|
* @description entry search list item is an opinionated UI component best used for initial retrieved results
|
|
1419
1427
|
* @example <ObjectSearchListItem id="my-result-item" title="title" popoverData={<p>some data info</p>}><div>example of uncontrolled content</div></ObjectSearchListItem> */
|
|
1420
|
-
declare const ObjectSearchListItem: ({ id, title, contentType, image, imageUrl, popoverData, onSelect, isMulti, disabled, children, ...props }: ObjectSearchListItemProps & React$1.HTMLAttributes<HTMLDivElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1428
|
+
declare const ObjectSearchListItem: ({ id, title, contentType, image, imageUrl, popoverData, onSelect, isMulti, disabled, children, editLink, editLinkIcon, createdAt, publishStatus, publishedAt, ...props }: ObjectSearchListItemProps & React$1.HTMLAttributes<HTMLDivElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1421
1429
|
/**
|
|
1422
1430
|
* An opinionated loading skeleton component best used with ObjectSearchListItem
|
|
1423
1431
|
* @example <ObjectSearchListItemLoadingSkeleton />
|
|
@@ -1593,18 +1601,22 @@ type ControlledObjectSearchProviderProps = {
|
|
|
1593
1601
|
children: ReactNode;
|
|
1594
1602
|
selectedItems: Array<SelectedItemProps> | undefined;
|
|
1595
1603
|
searchResultItems: Array<SelectedItemProps> | undefined;
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
searchResultListLoading?: boolean;
|
|
1599
|
-
onQueryChange: (value: SearchQueryProps) => void;
|
|
1604
|
+
isSelectedItemsListLoading?: boolean;
|
|
1605
|
+
isSearchResultsLoading?: boolean;
|
|
1600
1606
|
onSelectItemsChange: (selectedItems: Array<SelectedItemProps>) => void;
|
|
1601
1607
|
isMulti?: boolean;
|
|
1602
|
-
|
|
1608
|
+
/** @deprecated use SearchAndFilter instead. Exists for migration purposes from <ObjectSearchProvider> */
|
|
1609
|
+
query?: SearchQueryProps;
|
|
1610
|
+
/** @deprecated use SearchAndFilter instead. Exists for migration purposes from <ObjectSearchProvider> */
|
|
1611
|
+
onQueryChange?: (value: SearchQueryProps) => void;
|
|
1612
|
+
/** @deprecated use SearchAndFilter instead. Exists for migration purposes from <ObjectSearchProvider> */
|
|
1603
1613
|
localeOptions?: ObjectSearchContextProps['localeOptions'];
|
|
1614
|
+
/** @deprecated use SearchAndFilter instead. Exists for migration purposes from <ObjectSearchProvider> */
|
|
1604
1615
|
enableFilterByLocale?: ObjectSearchContextProps['enableFilterByLocale'];
|
|
1616
|
+
/** @deprecated use SearchAndFilter instead */
|
|
1605
1617
|
dynamicEntryId?: ObjectSearchContextProps['dynamicEntryId'];
|
|
1606
1618
|
};
|
|
1607
|
-
declare const ControlledObjectSearchProvider: ({ selectedItems, searchResultItems,
|
|
1619
|
+
declare const ControlledObjectSearchProvider: ({ selectedItems, searchResultItems, isSelectedItemsListLoading, isSearchResultsLoading, onSelectItemsChange, isMulti, children, onQueryChange, query, enableFilterByLocale, localeOptions, dynamicEntryId, }: ControlledObjectSearchProviderProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1608
1620
|
|
|
1609
1621
|
type ParamTypeDynamicDataProviderProps = {
|
|
1610
1622
|
/** Child components of the provider. Variables-using components, such as ParameterVariables, can be used here. */
|
package/dist/index.d.ts
CHANGED
|
@@ -1291,13 +1291,21 @@ type ObjectSearchContextProps<TExtraFilters = unknown, TExtraItemProps = unknown
|
|
|
1291
1291
|
onSetList?: (value: ItemListProps) => void;
|
|
1292
1292
|
/** is multi items selection allowed or not */
|
|
1293
1293
|
isMulti: boolean;
|
|
1294
|
+
/** Locale options for filtering. Will be picked up and render inside default ObjectSearchFilter implementation */
|
|
1294
1295
|
localeOptions?: {
|
|
1295
1296
|
label: string;
|
|
1296
1297
|
value: string;
|
|
1297
1298
|
}[];
|
|
1299
|
+
/** For backwards compatibility you need to explicitly enable default locale filter. */
|
|
1298
1300
|
enableFilterByLocale?: boolean;
|
|
1301
|
+
/** Indicator of weather or not render loader for search results list */
|
|
1299
1302
|
isListLoading?: boolean;
|
|
1303
|
+
/** Indicator of weather or not render loader for selected items list */
|
|
1300
1304
|
isSelectedItemsListLoading?: boolean;
|
|
1305
|
+
/**
|
|
1306
|
+
* Dynamic entry id for dynamic entry filtering, if instead of static entry being selected - bound dynamic value is being used.
|
|
1307
|
+
* You can use `import { hasReferencedVariables } from '@uniformdev/mesh-sdk-react';` to check if you value contains variable.
|
|
1308
|
+
* */
|
|
1301
1309
|
dynamicEntryId?: string;
|
|
1302
1310
|
};
|
|
1303
1311
|
declare const ObjectSearchContext: React$1.Context<ObjectSearchContextProps<unknown, unknown>>;
|
|
@@ -1417,7 +1425,7 @@ type ObjectSearchListItemProps = SelectedItemProps & {
|
|
|
1417
1425
|
/**
|
|
1418
1426
|
* @description entry search list item is an opinionated UI component best used for initial retrieved results
|
|
1419
1427
|
* @example <ObjectSearchListItem id="my-result-item" title="title" popoverData={<p>some data info</p>}><div>example of uncontrolled content</div></ObjectSearchListItem> */
|
|
1420
|
-
declare const ObjectSearchListItem: ({ id, title, contentType, image, imageUrl, popoverData, onSelect, isMulti, disabled, children, ...props }: ObjectSearchListItemProps & React$1.HTMLAttributes<HTMLDivElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1428
|
+
declare const ObjectSearchListItem: ({ id, title, contentType, image, imageUrl, popoverData, onSelect, isMulti, disabled, children, editLink, editLinkIcon, createdAt, publishStatus, publishedAt, ...props }: ObjectSearchListItemProps & React$1.HTMLAttributes<HTMLDivElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1421
1429
|
/**
|
|
1422
1430
|
* An opinionated loading skeleton component best used with ObjectSearchListItem
|
|
1423
1431
|
* @example <ObjectSearchListItemLoadingSkeleton />
|
|
@@ -1593,18 +1601,22 @@ type ControlledObjectSearchProviderProps = {
|
|
|
1593
1601
|
children: ReactNode;
|
|
1594
1602
|
selectedItems: Array<SelectedItemProps> | undefined;
|
|
1595
1603
|
searchResultItems: Array<SelectedItemProps> | undefined;
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
searchResultListLoading?: boolean;
|
|
1599
|
-
onQueryChange: (value: SearchQueryProps) => void;
|
|
1604
|
+
isSelectedItemsListLoading?: boolean;
|
|
1605
|
+
isSearchResultsLoading?: boolean;
|
|
1600
1606
|
onSelectItemsChange: (selectedItems: Array<SelectedItemProps>) => void;
|
|
1601
1607
|
isMulti?: boolean;
|
|
1602
|
-
|
|
1608
|
+
/** @deprecated use SearchAndFilter instead. Exists for migration purposes from <ObjectSearchProvider> */
|
|
1609
|
+
query?: SearchQueryProps;
|
|
1610
|
+
/** @deprecated use SearchAndFilter instead. Exists for migration purposes from <ObjectSearchProvider> */
|
|
1611
|
+
onQueryChange?: (value: SearchQueryProps) => void;
|
|
1612
|
+
/** @deprecated use SearchAndFilter instead. Exists for migration purposes from <ObjectSearchProvider> */
|
|
1603
1613
|
localeOptions?: ObjectSearchContextProps['localeOptions'];
|
|
1614
|
+
/** @deprecated use SearchAndFilter instead. Exists for migration purposes from <ObjectSearchProvider> */
|
|
1604
1615
|
enableFilterByLocale?: ObjectSearchContextProps['enableFilterByLocale'];
|
|
1616
|
+
/** @deprecated use SearchAndFilter instead */
|
|
1605
1617
|
dynamicEntryId?: ObjectSearchContextProps['dynamicEntryId'];
|
|
1606
1618
|
};
|
|
1607
|
-
declare const ControlledObjectSearchProvider: ({ selectedItems, searchResultItems,
|
|
1619
|
+
declare const ControlledObjectSearchProvider: ({ selectedItems, searchResultItems, isSelectedItemsListLoading, isSearchResultsLoading, onSelectItemsChange, isMulti, children, onQueryChange, query, enableFilterByLocale, localeOptions, dynamicEntryId, }: ControlledObjectSearchProviderProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1608
1620
|
|
|
1609
1621
|
type ParamTypeDynamicDataProviderProps = {
|
|
1610
1622
|
/** Child components of the provider. Variables-using components, such as ParameterVariables, can be used here. */
|
package/dist/index.esm.js
CHANGED
|
@@ -4528,14 +4528,14 @@ function VariableField({
|
|
|
4528
4528
|
}) {
|
|
4529
4529
|
const { variables } = useVariables(true);
|
|
4530
4530
|
const varCount = Object.keys(variables).length;
|
|
4531
|
-
const variableSelector = (varCount > 0 || (selectVariableMenuOptions == null ? void 0 : selectVariableMenuOptions.showAddVariableMenuOption)) && !disableVariables ? /* @__PURE__ */ jsx37(
|
|
4531
|
+
const variableSelector = (varCount > 0 || (selectVariableMenuOptions == null ? void 0 : selectVariableMenuOptions.showAddVariableMenuOption)) && !disableVariables ? /* @__PURE__ */ jsx37("div", { "data-testid": "label-var-menu", children: /* @__PURE__ */ jsx37(
|
|
4532
4532
|
VariablesComposerVariableMenu,
|
|
4533
4533
|
{
|
|
4534
4534
|
...selectVariableMenuOptions,
|
|
4535
4535
|
buttonCss: [variableBindButton2, selectVariableMenuOptions == null ? void 0 : selectVariableMenuOptions.buttonCss],
|
|
4536
4536
|
buttonProps: isActive ? { "aria-pressed": "true" } : void 0
|
|
4537
4537
|
}
|
|
4538
|
-
) : null;
|
|
4538
|
+
) }) : null;
|
|
4539
4539
|
return /* @__PURE__ */ jsxs20("div", { "data-testid": "variable-field", children: [
|
|
4540
4540
|
/* @__PURE__ */ jsxs20("label", { htmlFor: id, css: labelText, "data-testid": "field-name", children: [
|
|
4541
4541
|
variableSelector,
|
|
@@ -4942,7 +4942,7 @@ function InputVariablesOverlayMenu({
|
|
|
4942
4942
|
if (disabled) {
|
|
4943
4943
|
return /* @__PURE__ */ jsx40(Fragment10, { children });
|
|
4944
4944
|
}
|
|
4945
|
-
return /* @__PURE__ */ jsxs23("div", { css: menuContainer, children: [
|
|
4945
|
+
return /* @__PURE__ */ jsxs23("div", { css: menuContainer, "data-testid": "inline-var-menu", children: [
|
|
4946
4946
|
children,
|
|
4947
4947
|
/* @__PURE__ */ jsx40(
|
|
4948
4948
|
VariablesComposerVariableMenu,
|
|
@@ -6477,6 +6477,11 @@ var ObjectSearchListItem = ({
|
|
|
6477
6477
|
isMulti,
|
|
6478
6478
|
disabled,
|
|
6479
6479
|
children,
|
|
6480
|
+
editLink,
|
|
6481
|
+
editLinkIcon,
|
|
6482
|
+
createdAt,
|
|
6483
|
+
publishStatus,
|
|
6484
|
+
publishedAt,
|
|
6480
6485
|
...props
|
|
6481
6486
|
}) => {
|
|
6482
6487
|
const { onSelectItem, selectedListItems, isMulti: globalIsMulti } = useObjectSearchContext();
|
|
@@ -6751,9 +6756,9 @@ function ObjectSearchResultList({
|
|
|
6751
6756
|
multiSelectId,
|
|
6752
6757
|
disableDnD = false,
|
|
6753
6758
|
getContainerForDnDReparenting,
|
|
6754
|
-
whenNothingSelected
|
|
6759
|
+
whenNothingSelected
|
|
6755
6760
|
}) {
|
|
6756
|
-
const { selectedListItems, onRemoveAllSelectedItems, onSelectItem } = useObjectSearchContext();
|
|
6761
|
+
const { selectedListItems, onRemoveAllSelectedItems, onSelectItem, isSelectedItemsListLoading } = useObjectSearchContext();
|
|
6757
6762
|
const handleRemoveAllSelectedItems = () => {
|
|
6758
6763
|
onRemoveAllSelectedItems();
|
|
6759
6764
|
onRemoveAllSelected == null ? void 0 : onRemoveAllSelected();
|
|
@@ -6789,6 +6794,9 @@ function ObjectSearchResultList({
|
|
|
6789
6794
|
}
|
|
6790
6795
|
);
|
|
6791
6796
|
};
|
|
6797
|
+
const showLoading = isSelectedItemsListLoading;
|
|
6798
|
+
const showEmptyResults = !showLoading && !selectedListItems.length;
|
|
6799
|
+
const showResults = !showLoading && !showEmptyResults;
|
|
6792
6800
|
return /* @__PURE__ */ jsxs37(Fragment13, { children: [
|
|
6793
6801
|
/* @__PURE__ */ jsxs37("div", { role: "group", css: ObjectSearchResultListContainer, children: [
|
|
6794
6802
|
!resultLabelOverride ? /* @__PURE__ */ jsxs37("div", { role: "note", css: ObjectSearchResultListCounterContainer, children: [
|
|
@@ -6810,7 +6818,9 @@ function ObjectSearchResultList({
|
|
|
6810
6818
|
)
|
|
6811
6819
|
] })
|
|
6812
6820
|
] }),
|
|
6813
|
-
|
|
6821
|
+
showLoading ? /* @__PURE__ */ jsx63(Fragment13, { children: Array.from(Array(3).keys()).map((i) => /* @__PURE__ */ jsx63(ObjectSearchListItemLoadingSkeleton, {}, i)) }) : null,
|
|
6822
|
+
showEmptyResults ? whenNothingSelected : null,
|
|
6823
|
+
showResults ? /* @__PURE__ */ jsx63(DragDropContext, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ jsx63(
|
|
6814
6824
|
Droppable3,
|
|
6815
6825
|
{
|
|
6816
6826
|
droppableId: multiSelectId != null ? multiSelectId : "canvas-multi-select",
|
|
@@ -6832,7 +6842,7 @@ function ObjectSearchResultList({
|
|
|
6832
6842
|
provided.placeholder
|
|
6833
6843
|
] })
|
|
6834
6844
|
}
|
|
6835
|
-
) })
|
|
6845
|
+
) }) : null
|
|
6836
6846
|
] });
|
|
6837
6847
|
}
|
|
6838
6848
|
|
|
@@ -7289,14 +7299,14 @@ import { jsx as jsx69 } from "@emotion/react/jsx-runtime";
|
|
|
7289
7299
|
var ControlledObjectSearchProvider = ({
|
|
7290
7300
|
selectedItems,
|
|
7291
7301
|
searchResultItems,
|
|
7292
|
-
|
|
7293
|
-
|
|
7294
|
-
searchResultItemsLoading,
|
|
7295
|
-
onQueryChange,
|
|
7302
|
+
isSelectedItemsListLoading,
|
|
7303
|
+
isSearchResultsLoading,
|
|
7296
7304
|
onSelectItemsChange,
|
|
7297
7305
|
isMulti = false,
|
|
7298
7306
|
children,
|
|
7299
|
-
|
|
7307
|
+
onQueryChange = () => {
|
|
7308
|
+
},
|
|
7309
|
+
query = {},
|
|
7300
7310
|
enableFilterByLocale,
|
|
7301
7311
|
localeOptions,
|
|
7302
7312
|
dynamicEntryId
|
|
@@ -7339,9 +7349,8 @@ var ControlledObjectSearchProvider = ({
|
|
|
7339
7349
|
selectedListItems: selectedItems != null ? selectedItems : [],
|
|
7340
7350
|
onRemoveAllSelectedItems,
|
|
7341
7351
|
list,
|
|
7342
|
-
|
|
7343
|
-
|
|
7344
|
-
searchResultListLoading,
|
|
7352
|
+
isSelectedItemsListLoading,
|
|
7353
|
+
isListLoading: isSearchResultsLoading,
|
|
7345
7354
|
isMulti,
|
|
7346
7355
|
localeOptions,
|
|
7347
7356
|
enableFilterByLocale,
|
|
@@ -7353,10 +7362,9 @@ var ControlledObjectSearchProvider = ({
|
|
|
7353
7362
|
querySearchDeferred,
|
|
7354
7363
|
onSelectItem,
|
|
7355
7364
|
selectedItems,
|
|
7356
|
-
|
|
7357
|
-
|
|
7365
|
+
isSelectedItemsListLoading,
|
|
7366
|
+
isSearchResultsLoading,
|
|
7358
7367
|
onRemoveAllSelectedItems,
|
|
7359
|
-
searchResultListLoading,
|
|
7360
7368
|
list,
|
|
7361
7369
|
isMulti,
|
|
7362
7370
|
localeOptions,
|
package/dist/index.js
CHANGED
|
@@ -4705,14 +4705,14 @@ function VariableField({
|
|
|
4705
4705
|
}) {
|
|
4706
4706
|
const { variables } = useVariables(true);
|
|
4707
4707
|
const varCount = Object.keys(variables).length;
|
|
4708
|
-
const variableSelector = (varCount > 0 || (selectVariableMenuOptions == null ? void 0 : selectVariableMenuOptions.showAddVariableMenuOption)) && !disableVariables ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
4708
|
+
const variableSelector = (varCount > 0 || (selectVariableMenuOptions == null ? void 0 : selectVariableMenuOptions.showAddVariableMenuOption)) && !disableVariables ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { "data-testid": "label-var-menu", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
4709
4709
|
VariablesComposerVariableMenu,
|
|
4710
4710
|
{
|
|
4711
4711
|
...selectVariableMenuOptions,
|
|
4712
4712
|
buttonCss: [variableBindButton2, selectVariableMenuOptions == null ? void 0 : selectVariableMenuOptions.buttonCss],
|
|
4713
4713
|
buttonProps: isActive ? { "aria-pressed": "true" } : void 0
|
|
4714
4714
|
}
|
|
4715
|
-
) : null;
|
|
4715
|
+
) }) : null;
|
|
4716
4716
|
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { "data-testid": "variable-field", children: [
|
|
4717
4717
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("label", { htmlFor: id, css: labelText, "data-testid": "field-name", children: [
|
|
4718
4718
|
variableSelector,
|
|
@@ -5107,7 +5107,7 @@ function InputVariablesOverlayMenu({
|
|
|
5107
5107
|
if (disabled) {
|
|
5108
5108
|
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_jsx_runtime40.Fragment, { children });
|
|
5109
5109
|
}
|
|
5110
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { css: menuContainer, children: [
|
|
5110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { css: menuContainer, "data-testid": "inline-var-menu", children: [
|
|
5111
5111
|
children,
|
|
5112
5112
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5113
5113
|
VariablesComposerVariableMenu,
|
|
@@ -6607,6 +6607,11 @@ var ObjectSearchListItem = ({
|
|
|
6607
6607
|
isMulti,
|
|
6608
6608
|
disabled,
|
|
6609
6609
|
children,
|
|
6610
|
+
editLink,
|
|
6611
|
+
editLinkIcon,
|
|
6612
|
+
createdAt,
|
|
6613
|
+
publishStatus,
|
|
6614
|
+
publishedAt,
|
|
6610
6615
|
...props
|
|
6611
6616
|
}) => {
|
|
6612
6617
|
const { onSelectItem, selectedListItems, isMulti: globalIsMulti } = useObjectSearchContext();
|
|
@@ -6881,9 +6886,9 @@ function ObjectSearchResultList({
|
|
|
6881
6886
|
multiSelectId,
|
|
6882
6887
|
disableDnD = false,
|
|
6883
6888
|
getContainerForDnDReparenting,
|
|
6884
|
-
whenNothingSelected
|
|
6889
|
+
whenNothingSelected
|
|
6885
6890
|
}) {
|
|
6886
|
-
const { selectedListItems, onRemoveAllSelectedItems, onSelectItem } = useObjectSearchContext();
|
|
6891
|
+
const { selectedListItems, onRemoveAllSelectedItems, onSelectItem, isSelectedItemsListLoading } = useObjectSearchContext();
|
|
6887
6892
|
const handleRemoveAllSelectedItems = () => {
|
|
6888
6893
|
onRemoveAllSelectedItems();
|
|
6889
6894
|
onRemoveAllSelected == null ? void 0 : onRemoveAllSelected();
|
|
@@ -6919,6 +6924,9 @@ function ObjectSearchResultList({
|
|
|
6919
6924
|
}
|
|
6920
6925
|
);
|
|
6921
6926
|
};
|
|
6927
|
+
const showLoading = isSelectedItemsListLoading;
|
|
6928
|
+
const showEmptyResults = !showLoading && !selectedListItems.length;
|
|
6929
|
+
const showResults = !showLoading && !showEmptyResults;
|
|
6922
6930
|
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_jsx_runtime63.Fragment, { children: [
|
|
6923
6931
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { role: "group", css: ObjectSearchResultListContainer, children: [
|
|
6924
6932
|
!resultLabelOverride ? /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { role: "note", css: ObjectSearchResultListCounterContainer, children: [
|
|
@@ -6940,7 +6948,9 @@ function ObjectSearchResultList({
|
|
|
6940
6948
|
)
|
|
6941
6949
|
] })
|
|
6942
6950
|
] }),
|
|
6943
|
-
|
|
6951
|
+
showLoading ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_jsx_runtime63.Fragment, { children: Array.from(Array(3).keys()).map((i) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(ObjectSearchListItemLoadingSkeleton, {}, i)) }) : null,
|
|
6952
|
+
showEmptyResults ? whenNothingSelected : null,
|
|
6953
|
+
showResults ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(DragDropContext, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
6944
6954
|
import_react_beautiful_dnd4.Droppable,
|
|
6945
6955
|
{
|
|
6946
6956
|
droppableId: multiSelectId != null ? multiSelectId : "canvas-multi-select",
|
|
@@ -6962,7 +6972,7 @@ function ObjectSearchResultList({
|
|
|
6962
6972
|
provided.placeholder
|
|
6963
6973
|
] })
|
|
6964
6974
|
}
|
|
6965
|
-
) })
|
|
6975
|
+
) }) : null
|
|
6966
6976
|
] });
|
|
6967
6977
|
}
|
|
6968
6978
|
|
|
@@ -7419,14 +7429,14 @@ var import_jsx_runtime69 = require("@emotion/react/jsx-runtime");
|
|
|
7419
7429
|
var ControlledObjectSearchProvider = ({
|
|
7420
7430
|
selectedItems,
|
|
7421
7431
|
searchResultItems,
|
|
7422
|
-
|
|
7423
|
-
|
|
7424
|
-
searchResultItemsLoading,
|
|
7425
|
-
onQueryChange,
|
|
7432
|
+
isSelectedItemsListLoading,
|
|
7433
|
+
isSearchResultsLoading,
|
|
7426
7434
|
onSelectItemsChange,
|
|
7427
7435
|
isMulti = false,
|
|
7428
7436
|
children,
|
|
7429
|
-
|
|
7437
|
+
onQueryChange = () => {
|
|
7438
|
+
},
|
|
7439
|
+
query = {},
|
|
7430
7440
|
enableFilterByLocale,
|
|
7431
7441
|
localeOptions,
|
|
7432
7442
|
dynamicEntryId
|
|
@@ -7469,9 +7479,8 @@ var ControlledObjectSearchProvider = ({
|
|
|
7469
7479
|
selectedListItems: selectedItems != null ? selectedItems : [],
|
|
7470
7480
|
onRemoveAllSelectedItems,
|
|
7471
7481
|
list,
|
|
7472
|
-
|
|
7473
|
-
|
|
7474
|
-
searchResultListLoading,
|
|
7482
|
+
isSelectedItemsListLoading,
|
|
7483
|
+
isListLoading: isSearchResultsLoading,
|
|
7475
7484
|
isMulti,
|
|
7476
7485
|
localeOptions,
|
|
7477
7486
|
enableFilterByLocale,
|
|
@@ -7483,10 +7492,9 @@ var ControlledObjectSearchProvider = ({
|
|
|
7483
7492
|
querySearchDeferred,
|
|
7484
7493
|
onSelectItem,
|
|
7485
7494
|
selectedItems,
|
|
7486
|
-
|
|
7487
|
-
|
|
7495
|
+
isSelectedItemsListLoading,
|
|
7496
|
+
isSearchResultsLoading,
|
|
7488
7497
|
onRemoveAllSelectedItems,
|
|
7489
|
-
searchResultListLoading,
|
|
7490
7498
|
list,
|
|
7491
7499
|
isMulti,
|
|
7492
7500
|
localeOptions,
|
package/dist/index.mjs
CHANGED
|
@@ -4528,14 +4528,14 @@ function VariableField({
|
|
|
4528
4528
|
}) {
|
|
4529
4529
|
const { variables } = useVariables(true);
|
|
4530
4530
|
const varCount = Object.keys(variables).length;
|
|
4531
|
-
const variableSelector = (varCount > 0 || (selectVariableMenuOptions == null ? void 0 : selectVariableMenuOptions.showAddVariableMenuOption)) && !disableVariables ? /* @__PURE__ */ jsx37(
|
|
4531
|
+
const variableSelector = (varCount > 0 || (selectVariableMenuOptions == null ? void 0 : selectVariableMenuOptions.showAddVariableMenuOption)) && !disableVariables ? /* @__PURE__ */ jsx37("div", { "data-testid": "label-var-menu", children: /* @__PURE__ */ jsx37(
|
|
4532
4532
|
VariablesComposerVariableMenu,
|
|
4533
4533
|
{
|
|
4534
4534
|
...selectVariableMenuOptions,
|
|
4535
4535
|
buttonCss: [variableBindButton2, selectVariableMenuOptions == null ? void 0 : selectVariableMenuOptions.buttonCss],
|
|
4536
4536
|
buttonProps: isActive ? { "aria-pressed": "true" } : void 0
|
|
4537
4537
|
}
|
|
4538
|
-
) : null;
|
|
4538
|
+
) }) : null;
|
|
4539
4539
|
return /* @__PURE__ */ jsxs20("div", { "data-testid": "variable-field", children: [
|
|
4540
4540
|
/* @__PURE__ */ jsxs20("label", { htmlFor: id, css: labelText, "data-testid": "field-name", children: [
|
|
4541
4541
|
variableSelector,
|
|
@@ -4942,7 +4942,7 @@ function InputVariablesOverlayMenu({
|
|
|
4942
4942
|
if (disabled) {
|
|
4943
4943
|
return /* @__PURE__ */ jsx40(Fragment10, { children });
|
|
4944
4944
|
}
|
|
4945
|
-
return /* @__PURE__ */ jsxs23("div", { css: menuContainer, children: [
|
|
4945
|
+
return /* @__PURE__ */ jsxs23("div", { css: menuContainer, "data-testid": "inline-var-menu", children: [
|
|
4946
4946
|
children,
|
|
4947
4947
|
/* @__PURE__ */ jsx40(
|
|
4948
4948
|
VariablesComposerVariableMenu,
|
|
@@ -6477,6 +6477,11 @@ var ObjectSearchListItem = ({
|
|
|
6477
6477
|
isMulti,
|
|
6478
6478
|
disabled,
|
|
6479
6479
|
children,
|
|
6480
|
+
editLink,
|
|
6481
|
+
editLinkIcon,
|
|
6482
|
+
createdAt,
|
|
6483
|
+
publishStatus,
|
|
6484
|
+
publishedAt,
|
|
6480
6485
|
...props
|
|
6481
6486
|
}) => {
|
|
6482
6487
|
const { onSelectItem, selectedListItems, isMulti: globalIsMulti } = useObjectSearchContext();
|
|
@@ -6751,9 +6756,9 @@ function ObjectSearchResultList({
|
|
|
6751
6756
|
multiSelectId,
|
|
6752
6757
|
disableDnD = false,
|
|
6753
6758
|
getContainerForDnDReparenting,
|
|
6754
|
-
whenNothingSelected
|
|
6759
|
+
whenNothingSelected
|
|
6755
6760
|
}) {
|
|
6756
|
-
const { selectedListItems, onRemoveAllSelectedItems, onSelectItem } = useObjectSearchContext();
|
|
6761
|
+
const { selectedListItems, onRemoveAllSelectedItems, onSelectItem, isSelectedItemsListLoading } = useObjectSearchContext();
|
|
6757
6762
|
const handleRemoveAllSelectedItems = () => {
|
|
6758
6763
|
onRemoveAllSelectedItems();
|
|
6759
6764
|
onRemoveAllSelected == null ? void 0 : onRemoveAllSelected();
|
|
@@ -6789,6 +6794,9 @@ function ObjectSearchResultList({
|
|
|
6789
6794
|
}
|
|
6790
6795
|
);
|
|
6791
6796
|
};
|
|
6797
|
+
const showLoading = isSelectedItemsListLoading;
|
|
6798
|
+
const showEmptyResults = !showLoading && !selectedListItems.length;
|
|
6799
|
+
const showResults = !showLoading && !showEmptyResults;
|
|
6792
6800
|
return /* @__PURE__ */ jsxs37(Fragment13, { children: [
|
|
6793
6801
|
/* @__PURE__ */ jsxs37("div", { role: "group", css: ObjectSearchResultListContainer, children: [
|
|
6794
6802
|
!resultLabelOverride ? /* @__PURE__ */ jsxs37("div", { role: "note", css: ObjectSearchResultListCounterContainer, children: [
|
|
@@ -6810,7 +6818,9 @@ function ObjectSearchResultList({
|
|
|
6810
6818
|
)
|
|
6811
6819
|
] })
|
|
6812
6820
|
] }),
|
|
6813
|
-
|
|
6821
|
+
showLoading ? /* @__PURE__ */ jsx63(Fragment13, { children: Array.from(Array(3).keys()).map((i) => /* @__PURE__ */ jsx63(ObjectSearchListItemLoadingSkeleton, {}, i)) }) : null,
|
|
6822
|
+
showEmptyResults ? whenNothingSelected : null,
|
|
6823
|
+
showResults ? /* @__PURE__ */ jsx63(DragDropContext, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ jsx63(
|
|
6814
6824
|
Droppable3,
|
|
6815
6825
|
{
|
|
6816
6826
|
droppableId: multiSelectId != null ? multiSelectId : "canvas-multi-select",
|
|
@@ -6832,7 +6842,7 @@ function ObjectSearchResultList({
|
|
|
6832
6842
|
provided.placeholder
|
|
6833
6843
|
] })
|
|
6834
6844
|
}
|
|
6835
|
-
) })
|
|
6845
|
+
) }) : null
|
|
6836
6846
|
] });
|
|
6837
6847
|
}
|
|
6838
6848
|
|
|
@@ -7289,14 +7299,14 @@ import { jsx as jsx69 } from "@emotion/react/jsx-runtime";
|
|
|
7289
7299
|
var ControlledObjectSearchProvider = ({
|
|
7290
7300
|
selectedItems,
|
|
7291
7301
|
searchResultItems,
|
|
7292
|
-
|
|
7293
|
-
|
|
7294
|
-
searchResultItemsLoading,
|
|
7295
|
-
onQueryChange,
|
|
7302
|
+
isSelectedItemsListLoading,
|
|
7303
|
+
isSearchResultsLoading,
|
|
7296
7304
|
onSelectItemsChange,
|
|
7297
7305
|
isMulti = false,
|
|
7298
7306
|
children,
|
|
7299
|
-
|
|
7307
|
+
onQueryChange = () => {
|
|
7308
|
+
},
|
|
7309
|
+
query = {},
|
|
7300
7310
|
enableFilterByLocale,
|
|
7301
7311
|
localeOptions,
|
|
7302
7312
|
dynamicEntryId
|
|
@@ -7339,9 +7349,8 @@ var ControlledObjectSearchProvider = ({
|
|
|
7339
7349
|
selectedListItems: selectedItems != null ? selectedItems : [],
|
|
7340
7350
|
onRemoveAllSelectedItems,
|
|
7341
7351
|
list,
|
|
7342
|
-
|
|
7343
|
-
|
|
7344
|
-
searchResultListLoading,
|
|
7352
|
+
isSelectedItemsListLoading,
|
|
7353
|
+
isListLoading: isSearchResultsLoading,
|
|
7345
7354
|
isMulti,
|
|
7346
7355
|
localeOptions,
|
|
7347
7356
|
enableFilterByLocale,
|
|
@@ -7353,10 +7362,9 @@ var ControlledObjectSearchProvider = ({
|
|
|
7353
7362
|
querySearchDeferred,
|
|
7354
7363
|
onSelectItem,
|
|
7355
7364
|
selectedItems,
|
|
7356
|
-
|
|
7357
|
-
|
|
7365
|
+
isSelectedItemsListLoading,
|
|
7366
|
+
isSearchResultsLoading,
|
|
7358
7367
|
onRemoveAllSelectedItems,
|
|
7359
|
-
searchResultListLoading,
|
|
7360
7368
|
list,
|
|
7361
7369
|
isMulti,
|
|
7362
7370
|
localeOptions,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/mesh-sdk-react",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.141.1-alpha.5+4c722bef9c",
|
|
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.141.1-alpha.5+4c722bef9c",
|
|
54
|
+
"@uniformdev/design-system": "19.141.1-alpha.5+4c722bef9c",
|
|
55
|
+
"@uniformdev/mesh-sdk": "19.141.1-alpha.5+4c722bef9c",
|
|
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": "4c722bef9cfbf90b8981cec47fadec37b02a3c12"
|
|
90
90
|
}
|