@uniformdev/mesh-sdk-react 19.22.0 → 19.22.1-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +84 -54
- package/dist/index.js +88 -58
- package/dist/index.mjs +84 -54
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -766,6 +766,8 @@ type SelectedItemProps<TExtraProps = unknown> = {
|
|
|
766
766
|
metadata?: Record<string, string>;
|
|
767
767
|
/** allows for child react elements to be nested in the popover */
|
|
768
768
|
popoverData?: ReactNode;
|
|
769
|
+
/** disable or enable drag and drop functionality */
|
|
770
|
+
disableDnD?: boolean;
|
|
769
771
|
} & TExtraProps;
|
|
770
772
|
type ItemListProps<TListItemExtraProps = unknown> = {
|
|
771
773
|
items?: Array<SelectedItemProps<TListItemExtraProps>>;
|
package/dist/index.esm.js
CHANGED
|
@@ -4548,6 +4548,7 @@ var DataRefreshButton = ({
|
|
|
4548
4548
|
|
|
4549
4549
|
// src/components/ObjectSearch/ObjectSearchContainer.tsx
|
|
4550
4550
|
init_emotion_jsx_shim();
|
|
4551
|
+
import { css as css28 } from "@emotion/react";
|
|
4551
4552
|
|
|
4552
4553
|
// ../canvas/dist/index.mjs
|
|
4553
4554
|
init_emotion_jsx_shim();
|
|
@@ -5834,7 +5835,19 @@ var ObjectSearchContainer = ({
|
|
|
5834
5835
|
const { flatVariables } = useVariables(true);
|
|
5835
5836
|
const body = /* @__PURE__ */ jsxs29(VerticalRhythm, { children: [
|
|
5836
5837
|
searchFilters,
|
|
5837
|
-
!resultList ? null : /* @__PURE__ */ jsx49(
|
|
5838
|
+
!resultList ? null : /* @__PURE__ */ jsx49(
|
|
5839
|
+
ScrollableList,
|
|
5840
|
+
{
|
|
5841
|
+
role: "list",
|
|
5842
|
+
css: css28`
|
|
5843
|
+
> div {
|
|
5844
|
+
transition: max-height var(--duration-slow) var(--timing-ease-out);
|
|
5845
|
+
max-height: ${selectedListItems.length === 0 ? "50vh" : "184px"};
|
|
5846
|
+
}
|
|
5847
|
+
`,
|
|
5848
|
+
children: resultList
|
|
5849
|
+
}
|
|
5850
|
+
)
|
|
5838
5851
|
] });
|
|
5839
5852
|
const handleSelectedVariableChange = (selectedValue) => {
|
|
5840
5853
|
var _a2;
|
|
@@ -5885,8 +5898,8 @@ import { useState as useState13 } from "react";
|
|
|
5885
5898
|
|
|
5886
5899
|
// src/components/ObjectSearch/styles/ObjectSearchFilterContainer.styles.ts
|
|
5887
5900
|
init_emotion_jsx_shim();
|
|
5888
|
-
import { css as
|
|
5889
|
-
var ObjectSearchFilterContainerLabel =
|
|
5901
|
+
import { css as css29 } from "@emotion/react";
|
|
5902
|
+
var ObjectSearchFilterContainerLabel = css29`
|
|
5890
5903
|
align-items: center;
|
|
5891
5904
|
display: flex;
|
|
5892
5905
|
font-size: var(--fs-sm);
|
|
@@ -5894,14 +5907,14 @@ var ObjectSearchFilterContainerLabel = css28`
|
|
|
5894
5907
|
line-height: 1rem;
|
|
5895
5908
|
margin-bottom: var(--spacing-sm);
|
|
5896
5909
|
`;
|
|
5897
|
-
var ObjectSearchFilterContainer =
|
|
5910
|
+
var ObjectSearchFilterContainer = css29`
|
|
5898
5911
|
display: grid;
|
|
5899
5912
|
gap: var(--spacing-base);
|
|
5900
5913
|
`;
|
|
5901
|
-
var ObjectSearchFilterDropdownAndTextSearch =
|
|
5914
|
+
var ObjectSearchFilterDropdownAndTextSearch = css29`
|
|
5902
5915
|
grid-template-columns: 0.5fr 1fr;
|
|
5903
5916
|
`;
|
|
5904
|
-
var ObjectSearchFilterGrid = (gridColumns) =>
|
|
5917
|
+
var ObjectSearchFilterGrid = (gridColumns) => css29`
|
|
5905
5918
|
display: grid;
|
|
5906
5919
|
grid-template-columns: ${gridColumns};
|
|
5907
5920
|
gap: var(--spacing-base);
|
|
@@ -5971,26 +5984,22 @@ var ObjectSearchFilterContainer2 = ({ label, children }) => {
|
|
|
5971
5984
|
|
|
5972
5985
|
// src/components/ObjectSearch/ObjectSearchListItem.tsx
|
|
5973
5986
|
init_emotion_jsx_shim();
|
|
5974
|
-
import { Popover } from "@uniformdev/design-system";
|
|
5987
|
+
import { Chip, Popover } from "@uniformdev/design-system";
|
|
5975
5988
|
|
|
5976
5989
|
// src/components/ObjectSearch/styles/ObjectSearchListItem.styles.ts
|
|
5977
5990
|
init_emotion_jsx_shim();
|
|
5978
|
-
import { css as
|
|
5991
|
+
import { css as css30 } from "@emotion/react";
|
|
5979
5992
|
import { skeletonLoading } from "@uniformdev/design-system";
|
|
5980
|
-
var ObjectListItemContainer =
|
|
5993
|
+
var ObjectListItemContainer = css30`
|
|
5981
5994
|
align-items: center;
|
|
5982
5995
|
border: 1px solid var(--gray-300);
|
|
5983
5996
|
border-radius: var(--rounded-base);
|
|
5984
5997
|
background: var(--white);
|
|
5985
5998
|
display: grid;
|
|
5986
|
-
grid-template-columns: 1fr
|
|
5999
|
+
grid-template-columns: 1fr auto;
|
|
5987
6000
|
padding: var(--spacing-sm);
|
|
5988
|
-
|
|
5989
|
-
&[hidden] {
|
|
5990
|
-
display: none;
|
|
5991
|
-
}
|
|
5992
6001
|
`;
|
|
5993
|
-
var ObjectListItemLoading =
|
|
6002
|
+
var ObjectListItemLoading = css30`
|
|
5994
6003
|
animation: ${skeletonLoading} 1s linear infinite alternate;
|
|
5995
6004
|
border-color: transparent;
|
|
5996
6005
|
min-height: 42px;
|
|
@@ -6014,31 +6023,32 @@ var ObjectListItemLoading = css29`
|
|
|
6014
6023
|
width: 1rem;
|
|
6015
6024
|
}
|
|
6016
6025
|
`;
|
|
6017
|
-
var ObjectListItemHeadingGroup =
|
|
6026
|
+
var ObjectListItemHeadingGroup = css30`
|
|
6018
6027
|
align-items: center;
|
|
6019
6028
|
display: grid;
|
|
6020
6029
|
`;
|
|
6021
|
-
var ObjectListItemTitle =
|
|
6030
|
+
var ObjectListItemTitle = css30`
|
|
6022
6031
|
color: var(--brand-secondary-1);
|
|
6023
6032
|
display: block;
|
|
6024
6033
|
font-size: var(--fs-sm);
|
|
6025
6034
|
`;
|
|
6026
|
-
var ObjectListItemSubtitle =
|
|
6035
|
+
var ObjectListItemSubtitle = css30`
|
|
6027
6036
|
color: var(--gray-500);
|
|
6028
6037
|
display: block;
|
|
6029
6038
|
font-size: var(--fs-xs);
|
|
6030
6039
|
line-height: 1;
|
|
6031
6040
|
`;
|
|
6032
|
-
var ObjectListItemInfoContainer =
|
|
6041
|
+
var ObjectListItemInfoContainer = css30`
|
|
6033
6042
|
align-items: center;
|
|
6034
6043
|
display: flex;
|
|
6044
|
+
gap: var(--spacing-sm);
|
|
6035
6045
|
justify-content: center;
|
|
6036
6046
|
`;
|
|
6037
|
-
var ObjectListItemControlledContent =
|
|
6047
|
+
var ObjectListItemControlledContent = css30`
|
|
6038
6048
|
display: flex;
|
|
6039
6049
|
gap: var(--spacing-sm);
|
|
6040
6050
|
`;
|
|
6041
|
-
var ObjectListItemUnControlledContent =
|
|
6051
|
+
var ObjectListItemUnControlledContent = css30`
|
|
6042
6052
|
margin-top: var(--spacing-sm);
|
|
6043
6053
|
grid-column: 1 / -1;
|
|
6044
6054
|
`;
|
|
@@ -6066,8 +6076,8 @@ var ObjectSearchListItem = ({
|
|
|
6066
6076
|
}
|
|
6067
6077
|
return onSelectItem([selectedItem]);
|
|
6068
6078
|
};
|
|
6069
|
-
const
|
|
6070
|
-
return /* @__PURE__ */ jsxs32("div", { role: "listitem",
|
|
6079
|
+
const selected = selectedListItems.some((item) => item.id === id);
|
|
6080
|
+
return /* @__PURE__ */ jsxs32("div", { role: "listitem", css: ObjectListItemContainer, children: [
|
|
6071
6081
|
/* @__PURE__ */ jsxs32("div", { role: "button", onClick: handleSelectItem, css: ObjectListItemControlledContent, children: [
|
|
6072
6082
|
!image ? null : /* @__PURE__ */ jsx52("img", { ...image, loading: (image == null ? void 0 : image.width) && image.height ? "lazy" : "eager" }),
|
|
6073
6083
|
/* @__PURE__ */ jsxs32("div", { role: "heading", css: ObjectListItemHeadingGroup, children: [
|
|
@@ -6075,7 +6085,10 @@ var ObjectSearchListItem = ({
|
|
|
6075
6085
|
/* @__PURE__ */ jsx52("span", { css: ObjectListItemTitle, children: title })
|
|
6076
6086
|
] })
|
|
6077
6087
|
] }),
|
|
6078
|
-
!popoverData ? null : /* @__PURE__ */
|
|
6088
|
+
!popoverData ? null : /* @__PURE__ */ jsxs32("div", { css: ObjectListItemInfoContainer, children: [
|
|
6089
|
+
selected ? /* @__PURE__ */ jsx52(Chip, { text: "selected", size: "xs" }) : null,
|
|
6090
|
+
/* @__PURE__ */ jsx52(Popover, { baseId: title, ariaLabel: title, buttonText: `See ${title} details`, iconColor: "default", children: popoverData })
|
|
6091
|
+
] }),
|
|
6079
6092
|
!children ? null : /* @__PURE__ */ jsx52("div", { css: ObjectListItemUnControlledContent, children })
|
|
6080
6093
|
] });
|
|
6081
6094
|
};
|
|
@@ -6093,9 +6106,9 @@ init_emotion_jsx_shim();
|
|
|
6093
6106
|
|
|
6094
6107
|
// src/components/ObjectSearch/styles/ObjectSearchResultItemButton.styles.ts
|
|
6095
6108
|
init_emotion_jsx_shim();
|
|
6096
|
-
import { css as
|
|
6109
|
+
import { css as css31 } from "@emotion/react";
|
|
6097
6110
|
import { button as button2 } from "@uniformdev/design-system";
|
|
6098
|
-
var ButtonStyles =
|
|
6111
|
+
var ButtonStyles = css31`
|
|
6099
6112
|
${button2}
|
|
6100
6113
|
background: transparent;
|
|
6101
6114
|
border: 1px solid var(--brand-secondary-1);
|
|
@@ -6122,7 +6135,7 @@ var ButtonStyles = css30`
|
|
|
6122
6135
|
text-decoration: none;
|
|
6123
6136
|
}
|
|
6124
6137
|
`;
|
|
6125
|
-
var ButtonIcon =
|
|
6138
|
+
var ButtonIcon = css31`
|
|
6126
6139
|
width: 1rem;
|
|
6127
6140
|
height: 1rem;
|
|
6128
6141
|
`;
|
|
@@ -6152,8 +6165,8 @@ var LinkButton = ({
|
|
|
6152
6165
|
|
|
6153
6166
|
// src/components/ObjectSearch/styles/ObjectSearchResultItem.styles.ts
|
|
6154
6167
|
init_emotion_jsx_shim();
|
|
6155
|
-
import { css as
|
|
6156
|
-
var ObjectSearchResultItemContainer =
|
|
6168
|
+
import { css as css32 } from "@emotion/react";
|
|
6169
|
+
var ObjectSearchResultItemContainer = css32`
|
|
6157
6170
|
align-items: center;
|
|
6158
6171
|
border: 1px solid var(--gray-300);
|
|
6159
6172
|
border-radius: var(--rounded-base);
|
|
@@ -6169,7 +6182,7 @@ var ObjectSearchResultItemContainer = css31`
|
|
|
6169
6182
|
}
|
|
6170
6183
|
}
|
|
6171
6184
|
`;
|
|
6172
|
-
var ObjectSearchDragHandle =
|
|
6185
|
+
var ObjectSearchDragHandle = css32`
|
|
6173
6186
|
border-left: 2px dotted var(--gray-300);
|
|
6174
6187
|
border-right: 2px dotted var(--gray-300);
|
|
6175
6188
|
position: absolute;
|
|
@@ -6178,35 +6191,35 @@ var ObjectSearchDragHandle = css31`
|
|
|
6178
6191
|
transition: opacity var(--duration-fast) var(--timing-ease-out);
|
|
6179
6192
|
opacity: 0;
|
|
6180
6193
|
`;
|
|
6181
|
-
var ObjectSearchResultItemSubtitle =
|
|
6194
|
+
var ObjectSearchResultItemSubtitle = css32`
|
|
6182
6195
|
color: var(--gray-500);
|
|
6183
6196
|
display: block;
|
|
6184
6197
|
font-size: var(--fs-xs);
|
|
6185
6198
|
line-height: 1;
|
|
6186
6199
|
`;
|
|
6187
|
-
var ObjectSearchResultItemTitle =
|
|
6200
|
+
var ObjectSearchResultItemTitle = css32`
|
|
6188
6201
|
align-items: center;
|
|
6189
6202
|
color: var(--brand-secondary-1);
|
|
6190
6203
|
display: flex;
|
|
6191
6204
|
gap: var(--spacing-xs);
|
|
6192
6205
|
`;
|
|
6193
|
-
var ObjectSearchResultItemTimeStamp =
|
|
6206
|
+
var ObjectSearchResultItemTimeStamp = css32`
|
|
6194
6207
|
color: var(--gray-500);
|
|
6195
6208
|
font-size: var(--fs-xs);
|
|
6196
6209
|
`;
|
|
6197
|
-
var ObjectSearchAuthorStateGroup =
|
|
6210
|
+
var ObjectSearchAuthorStateGroup = css32`
|
|
6198
6211
|
align-items: center;
|
|
6199
6212
|
display: flex;
|
|
6200
6213
|
gap: var(--spacing-sm);
|
|
6201
6214
|
`;
|
|
6202
|
-
var ObjectSearchUpdateGroup =
|
|
6215
|
+
var ObjectSearchUpdateGroup = css32`
|
|
6203
6216
|
display: grid;
|
|
6204
6217
|
`;
|
|
6205
|
-
var ObjectSearchContentContainer =
|
|
6218
|
+
var ObjectSearchContentContainer = css32`
|
|
6206
6219
|
display: flex;
|
|
6207
6220
|
gap: var(--spacing-base);
|
|
6208
6221
|
`;
|
|
6209
|
-
var ObjectSearchImage =
|
|
6222
|
+
var ObjectSearchImage = css32`
|
|
6210
6223
|
width: 56px;
|
|
6211
6224
|
object-fit: contain;
|
|
6212
6225
|
`;
|
|
@@ -6276,22 +6289,26 @@ import { DragDropContext as DragDropContext3, Draggable as Draggable3, Droppable
|
|
|
6276
6289
|
|
|
6277
6290
|
// src/components/ObjectSearch/styles/ObjectSearchResultList.styles.ts
|
|
6278
6291
|
init_emotion_jsx_shim();
|
|
6279
|
-
import { css as
|
|
6280
|
-
var ObjectSearchResultListContainer =
|
|
6292
|
+
import { css as css33 } from "@emotion/react";
|
|
6293
|
+
var ObjectSearchResultListContainer = css33`
|
|
6281
6294
|
align-items: center;
|
|
6282
6295
|
display: flex;
|
|
6283
6296
|
gap: var(--spacing-sm);
|
|
6284
6297
|
justify-content: space-between;
|
|
6285
6298
|
`;
|
|
6286
|
-
var ObjectSearchDragContainer =
|
|
6299
|
+
var ObjectSearchDragContainer = css33`
|
|
6287
6300
|
margin: 0 0 var(--spacing-sm);
|
|
6288
6301
|
`;
|
|
6289
|
-
var
|
|
6302
|
+
var ObjectSearchContainerDragging = css33`
|
|
6303
|
+
box-shadow: var(--shadow-base);
|
|
6304
|
+
opacity: var(--opacity-50);
|
|
6305
|
+
`;
|
|
6306
|
+
var ObjectSearchResultListCounterContainer = css33`
|
|
6290
6307
|
align-items: center;
|
|
6291
6308
|
display: flex;
|
|
6292
6309
|
gap: var(--spacing-sm);
|
|
6293
6310
|
`;
|
|
6294
|
-
var ObjectSearchResultListTitle =
|
|
6311
|
+
var ObjectSearchResultListTitle = css33`
|
|
6295
6312
|
font-weight: var(--fw-bold);
|
|
6296
6313
|
line-height: 1;
|
|
6297
6314
|
`;
|
|
@@ -6304,7 +6321,7 @@ function ObjectSearchResultList({
|
|
|
6304
6321
|
onRemoveAllSelected,
|
|
6305
6322
|
hideRemoveButton = false,
|
|
6306
6323
|
additionalButtons,
|
|
6307
|
-
renderResultComponent = (value) => /* @__PURE__ */ jsx55(ObjectSearchResultItem, { ...value
|
|
6324
|
+
renderResultComponent = (value) => /* @__PURE__ */ jsx55(ObjectSearchResultItem, { ...value }),
|
|
6308
6325
|
multiSelectId,
|
|
6309
6326
|
disableDnD = false,
|
|
6310
6327
|
whenNothingSelected = null
|
|
@@ -6347,18 +6364,31 @@ function ObjectSearchResultList({
|
|
|
6347
6364
|
] }),
|
|
6348
6365
|
!selectedListItems.length ? whenNothingSelected : /* @__PURE__ */ jsx55(DragDropContext3, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ jsx55(Droppable3, { droppableId: multiSelectId != null ? multiSelectId : "canvas-multi-select", children: (provided) => /* @__PURE__ */ jsxs35("div", { ...provided.droppableProps, ref: provided.innerRef, children: [
|
|
6349
6366
|
selectedListItems.map((item, i2) => {
|
|
6350
|
-
const
|
|
6351
|
-
|
|
6352
|
-
|
|
6367
|
+
const itemValues = selectedListItems.length === 1 ? { ...item, disableDnD: true } : { ...item, disableDnD };
|
|
6368
|
+
const renderListItem = renderResultComponent(itemValues);
|
|
6369
|
+
return /* @__PURE__ */ jsx55(
|
|
6370
|
+
Draggable3,
|
|
6353
6371
|
{
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
|
|
6372
|
+
draggableId: item.id,
|
|
6373
|
+
index: i2,
|
|
6374
|
+
isDragDisabled: selectedListItems.length === 1 || disableDnD,
|
|
6375
|
+
children: (provided2, snapshot) => /* @__PURE__ */ jsx55(
|
|
6376
|
+
"div",
|
|
6377
|
+
{
|
|
6378
|
+
css: [
|
|
6379
|
+
ObjectSearchDragContainer,
|
|
6380
|
+
snapshot.isDragging ? ObjectSearchContainerDragging : void 0
|
|
6381
|
+
],
|
|
6382
|
+
ref: provided2.innerRef,
|
|
6383
|
+
"data-dragging": snapshot.isDragging,
|
|
6384
|
+
...provided2.draggableProps,
|
|
6385
|
+
...provided2.dragHandleProps,
|
|
6386
|
+
children: renderListItem
|
|
6387
|
+
}
|
|
6388
|
+
)
|
|
6389
|
+
},
|
|
6390
|
+
item.id
|
|
6391
|
+
);
|
|
6362
6392
|
}),
|
|
6363
6393
|
provided.placeholder
|
|
6364
6394
|
] }) }) })
|
package/dist/index.js
CHANGED
|
@@ -4676,6 +4676,7 @@ var DataRefreshButton = ({
|
|
|
4676
4676
|
|
|
4677
4677
|
// src/components/ObjectSearch/ObjectSearchContainer.tsx
|
|
4678
4678
|
init_emotion_jsx_shim();
|
|
4679
|
+
var import_react44 = require("@emotion/react");
|
|
4679
4680
|
|
|
4680
4681
|
// ../canvas/dist/index.mjs
|
|
4681
4682
|
init_emotion_jsx_shim();
|
|
@@ -5955,7 +5956,19 @@ var ObjectSearchContainer = ({
|
|
|
5955
5956
|
const { flatVariables } = useVariables(true);
|
|
5956
5957
|
const body = /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_design_system25.VerticalRhythm, { children: [
|
|
5957
5958
|
searchFilters,
|
|
5958
|
-
!resultList ? null : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
5959
|
+
!resultList ? null : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
5960
|
+
import_design_system25.ScrollableList,
|
|
5961
|
+
{
|
|
5962
|
+
role: "list",
|
|
5963
|
+
css: import_react44.css`
|
|
5964
|
+
> div {
|
|
5965
|
+
transition: max-height var(--duration-slow) var(--timing-ease-out);
|
|
5966
|
+
max-height: ${selectedListItems.length === 0 ? "50vh" : "184px"};
|
|
5967
|
+
}
|
|
5968
|
+
`,
|
|
5969
|
+
children: resultList
|
|
5970
|
+
}
|
|
5971
|
+
)
|
|
5959
5972
|
] });
|
|
5960
5973
|
const handleSelectedVariableChange = (selectedValue) => {
|
|
5961
5974
|
var _a2;
|
|
@@ -6002,12 +6015,12 @@ var ObjectSearchContainer = ({
|
|
|
6002
6015
|
// src/components/ObjectSearch/ObjectSearchFilter.tsx
|
|
6003
6016
|
init_emotion_jsx_shim();
|
|
6004
6017
|
var import_design_system26 = require("@uniformdev/design-system");
|
|
6005
|
-
var
|
|
6018
|
+
var import_react46 = require("react");
|
|
6006
6019
|
|
|
6007
6020
|
// src/components/ObjectSearch/styles/ObjectSearchFilterContainer.styles.ts
|
|
6008
6021
|
init_emotion_jsx_shim();
|
|
6009
|
-
var
|
|
6010
|
-
var ObjectSearchFilterContainerLabel =
|
|
6022
|
+
var import_react45 = require("@emotion/react");
|
|
6023
|
+
var ObjectSearchFilterContainerLabel = import_react45.css`
|
|
6011
6024
|
align-items: center;
|
|
6012
6025
|
display: flex;
|
|
6013
6026
|
font-size: var(--fs-sm);
|
|
@@ -6015,14 +6028,14 @@ var ObjectSearchFilterContainerLabel = import_react44.css`
|
|
|
6015
6028
|
line-height: 1rem;
|
|
6016
6029
|
margin-bottom: var(--spacing-sm);
|
|
6017
6030
|
`;
|
|
6018
|
-
var ObjectSearchFilterContainer =
|
|
6031
|
+
var ObjectSearchFilterContainer = import_react45.css`
|
|
6019
6032
|
display: grid;
|
|
6020
6033
|
gap: var(--spacing-base);
|
|
6021
6034
|
`;
|
|
6022
|
-
var ObjectSearchFilterDropdownAndTextSearch =
|
|
6035
|
+
var ObjectSearchFilterDropdownAndTextSearch = import_react45.css`
|
|
6023
6036
|
grid-template-columns: 0.5fr 1fr;
|
|
6024
6037
|
`;
|
|
6025
|
-
var ObjectSearchFilterGrid = (gridColumns) =>
|
|
6038
|
+
var ObjectSearchFilterGrid = (gridColumns) => import_react45.css`
|
|
6026
6039
|
display: grid;
|
|
6027
6040
|
grid-template-columns: ${gridColumns};
|
|
6028
6041
|
gap: var(--spacing-base);
|
|
@@ -6039,7 +6052,7 @@ var ObjectSearchFilter = ({
|
|
|
6039
6052
|
selectOptions
|
|
6040
6053
|
}) => {
|
|
6041
6054
|
const { query, onSetQuery } = useObjectSearchContext();
|
|
6042
|
-
const [searchState, setSearchState] = (0,
|
|
6055
|
+
const [searchState, setSearchState] = (0, import_react46.useState)({
|
|
6043
6056
|
contentType: "",
|
|
6044
6057
|
keyword: ""
|
|
6045
6058
|
});
|
|
@@ -6096,22 +6109,18 @@ var import_design_system28 = require("@uniformdev/design-system");
|
|
|
6096
6109
|
|
|
6097
6110
|
// src/components/ObjectSearch/styles/ObjectSearchListItem.styles.ts
|
|
6098
6111
|
init_emotion_jsx_shim();
|
|
6099
|
-
var
|
|
6112
|
+
var import_react47 = require("@emotion/react");
|
|
6100
6113
|
var import_design_system27 = require("@uniformdev/design-system");
|
|
6101
|
-
var ObjectListItemContainer =
|
|
6114
|
+
var ObjectListItemContainer = import_react47.css`
|
|
6102
6115
|
align-items: center;
|
|
6103
6116
|
border: 1px solid var(--gray-300);
|
|
6104
6117
|
border-radius: var(--rounded-base);
|
|
6105
6118
|
background: var(--white);
|
|
6106
6119
|
display: grid;
|
|
6107
|
-
grid-template-columns: 1fr
|
|
6120
|
+
grid-template-columns: 1fr auto;
|
|
6108
6121
|
padding: var(--spacing-sm);
|
|
6109
|
-
|
|
6110
|
-
&[hidden] {
|
|
6111
|
-
display: none;
|
|
6112
|
-
}
|
|
6113
6122
|
`;
|
|
6114
|
-
var ObjectListItemLoading =
|
|
6123
|
+
var ObjectListItemLoading = import_react47.css`
|
|
6115
6124
|
animation: ${import_design_system27.skeletonLoading} 1s linear infinite alternate;
|
|
6116
6125
|
border-color: transparent;
|
|
6117
6126
|
min-height: 42px;
|
|
@@ -6135,31 +6144,32 @@ var ObjectListItemLoading = import_react46.css`
|
|
|
6135
6144
|
width: 1rem;
|
|
6136
6145
|
}
|
|
6137
6146
|
`;
|
|
6138
|
-
var ObjectListItemHeadingGroup =
|
|
6147
|
+
var ObjectListItemHeadingGroup = import_react47.css`
|
|
6139
6148
|
align-items: center;
|
|
6140
6149
|
display: grid;
|
|
6141
6150
|
`;
|
|
6142
|
-
var ObjectListItemTitle =
|
|
6151
|
+
var ObjectListItemTitle = import_react47.css`
|
|
6143
6152
|
color: var(--brand-secondary-1);
|
|
6144
6153
|
display: block;
|
|
6145
6154
|
font-size: var(--fs-sm);
|
|
6146
6155
|
`;
|
|
6147
|
-
var ObjectListItemSubtitle =
|
|
6156
|
+
var ObjectListItemSubtitle = import_react47.css`
|
|
6148
6157
|
color: var(--gray-500);
|
|
6149
6158
|
display: block;
|
|
6150
6159
|
font-size: var(--fs-xs);
|
|
6151
6160
|
line-height: 1;
|
|
6152
6161
|
`;
|
|
6153
|
-
var ObjectListItemInfoContainer =
|
|
6162
|
+
var ObjectListItemInfoContainer = import_react47.css`
|
|
6154
6163
|
align-items: center;
|
|
6155
6164
|
display: flex;
|
|
6165
|
+
gap: var(--spacing-sm);
|
|
6156
6166
|
justify-content: center;
|
|
6157
6167
|
`;
|
|
6158
|
-
var ObjectListItemControlledContent =
|
|
6168
|
+
var ObjectListItemControlledContent = import_react47.css`
|
|
6159
6169
|
display: flex;
|
|
6160
6170
|
gap: var(--spacing-sm);
|
|
6161
6171
|
`;
|
|
6162
|
-
var ObjectListItemUnControlledContent =
|
|
6172
|
+
var ObjectListItemUnControlledContent = import_react47.css`
|
|
6163
6173
|
margin-top: var(--spacing-sm);
|
|
6164
6174
|
grid-column: 1 / -1;
|
|
6165
6175
|
`;
|
|
@@ -6187,8 +6197,8 @@ var ObjectSearchListItem = ({
|
|
|
6187
6197
|
}
|
|
6188
6198
|
return onSelectItem([selectedItem]);
|
|
6189
6199
|
};
|
|
6190
|
-
const
|
|
6191
|
-
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { role: "listitem",
|
|
6200
|
+
const selected = selectedListItems.some((item) => item.id === id);
|
|
6201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { role: "listitem", css: ObjectListItemContainer, children: [
|
|
6192
6202
|
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { role: "button", onClick: handleSelectItem, css: ObjectListItemControlledContent, children: [
|
|
6193
6203
|
!image ? null : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("img", { ...image, loading: (image == null ? void 0 : image.width) && image.height ? "lazy" : "eager" }),
|
|
6194
6204
|
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { role: "heading", css: ObjectListItemHeadingGroup, children: [
|
|
@@ -6196,7 +6206,10 @@ var ObjectSearchListItem = ({
|
|
|
6196
6206
|
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { css: ObjectListItemTitle, children: title })
|
|
6197
6207
|
] })
|
|
6198
6208
|
] }),
|
|
6199
|
-
!popoverData ? null : /* @__PURE__ */ (0, import_jsx_runtime52.
|
|
6209
|
+
!popoverData ? null : /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { css: ObjectListItemInfoContainer, children: [
|
|
6210
|
+
selected ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_design_system28.Chip, { text: "selected", size: "xs" }) : null,
|
|
6211
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_design_system28.Popover, { baseId: title, ariaLabel: title, buttonText: `See ${title} details`, iconColor: "default", children: popoverData })
|
|
6212
|
+
] }),
|
|
6200
6213
|
!children ? null : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { css: ObjectListItemUnControlledContent, children })
|
|
6201
6214
|
] });
|
|
6202
6215
|
};
|
|
@@ -6214,9 +6227,9 @@ init_emotion_jsx_shim();
|
|
|
6214
6227
|
|
|
6215
6228
|
// src/components/ObjectSearch/styles/ObjectSearchResultItemButton.styles.ts
|
|
6216
6229
|
init_emotion_jsx_shim();
|
|
6217
|
-
var
|
|
6230
|
+
var import_react48 = require("@emotion/react");
|
|
6218
6231
|
var import_design_system29 = require("@uniformdev/design-system");
|
|
6219
|
-
var ButtonStyles =
|
|
6232
|
+
var ButtonStyles = import_react48.css`
|
|
6220
6233
|
${import_design_system29.button}
|
|
6221
6234
|
background: transparent;
|
|
6222
6235
|
border: 1px solid var(--brand-secondary-1);
|
|
@@ -6243,7 +6256,7 @@ var ButtonStyles = import_react47.css`
|
|
|
6243
6256
|
text-decoration: none;
|
|
6244
6257
|
}
|
|
6245
6258
|
`;
|
|
6246
|
-
var ButtonIcon =
|
|
6259
|
+
var ButtonIcon = import_react48.css`
|
|
6247
6260
|
width: 1rem;
|
|
6248
6261
|
height: 1rem;
|
|
6249
6262
|
`;
|
|
@@ -6273,8 +6286,8 @@ var LinkButton = ({
|
|
|
6273
6286
|
|
|
6274
6287
|
// src/components/ObjectSearch/styles/ObjectSearchResultItem.styles.ts
|
|
6275
6288
|
init_emotion_jsx_shim();
|
|
6276
|
-
var
|
|
6277
|
-
var ObjectSearchResultItemContainer =
|
|
6289
|
+
var import_react49 = require("@emotion/react");
|
|
6290
|
+
var ObjectSearchResultItemContainer = import_react49.css`
|
|
6278
6291
|
align-items: center;
|
|
6279
6292
|
border: 1px solid var(--gray-300);
|
|
6280
6293
|
border-radius: var(--rounded-base);
|
|
@@ -6290,7 +6303,7 @@ var ObjectSearchResultItemContainer = import_react48.css`
|
|
|
6290
6303
|
}
|
|
6291
6304
|
}
|
|
6292
6305
|
`;
|
|
6293
|
-
var ObjectSearchDragHandle =
|
|
6306
|
+
var ObjectSearchDragHandle = import_react49.css`
|
|
6294
6307
|
border-left: 2px dotted var(--gray-300);
|
|
6295
6308
|
border-right: 2px dotted var(--gray-300);
|
|
6296
6309
|
position: absolute;
|
|
@@ -6299,35 +6312,35 @@ var ObjectSearchDragHandle = import_react48.css`
|
|
|
6299
6312
|
transition: opacity var(--duration-fast) var(--timing-ease-out);
|
|
6300
6313
|
opacity: 0;
|
|
6301
6314
|
`;
|
|
6302
|
-
var ObjectSearchResultItemSubtitle =
|
|
6315
|
+
var ObjectSearchResultItemSubtitle = import_react49.css`
|
|
6303
6316
|
color: var(--gray-500);
|
|
6304
6317
|
display: block;
|
|
6305
6318
|
font-size: var(--fs-xs);
|
|
6306
6319
|
line-height: 1;
|
|
6307
6320
|
`;
|
|
6308
|
-
var ObjectSearchResultItemTitle =
|
|
6321
|
+
var ObjectSearchResultItemTitle = import_react49.css`
|
|
6309
6322
|
align-items: center;
|
|
6310
6323
|
color: var(--brand-secondary-1);
|
|
6311
6324
|
display: flex;
|
|
6312
6325
|
gap: var(--spacing-xs);
|
|
6313
6326
|
`;
|
|
6314
|
-
var ObjectSearchResultItemTimeStamp =
|
|
6327
|
+
var ObjectSearchResultItemTimeStamp = import_react49.css`
|
|
6315
6328
|
color: var(--gray-500);
|
|
6316
6329
|
font-size: var(--fs-xs);
|
|
6317
6330
|
`;
|
|
6318
|
-
var ObjectSearchAuthorStateGroup =
|
|
6331
|
+
var ObjectSearchAuthorStateGroup = import_react49.css`
|
|
6319
6332
|
align-items: center;
|
|
6320
6333
|
display: flex;
|
|
6321
6334
|
gap: var(--spacing-sm);
|
|
6322
6335
|
`;
|
|
6323
|
-
var ObjectSearchUpdateGroup =
|
|
6336
|
+
var ObjectSearchUpdateGroup = import_react49.css`
|
|
6324
6337
|
display: grid;
|
|
6325
6338
|
`;
|
|
6326
|
-
var ObjectSearchContentContainer =
|
|
6339
|
+
var ObjectSearchContentContainer = import_react49.css`
|
|
6327
6340
|
display: flex;
|
|
6328
6341
|
gap: var(--spacing-base);
|
|
6329
6342
|
`;
|
|
6330
|
-
var ObjectSearchImage =
|
|
6343
|
+
var ObjectSearchImage = import_react49.css`
|
|
6331
6344
|
width: 56px;
|
|
6332
6345
|
object-fit: contain;
|
|
6333
6346
|
`;
|
|
@@ -6397,22 +6410,26 @@ var import_react_beautiful_dnd3 = require("react-beautiful-dnd");
|
|
|
6397
6410
|
|
|
6398
6411
|
// src/components/ObjectSearch/styles/ObjectSearchResultList.styles.ts
|
|
6399
6412
|
init_emotion_jsx_shim();
|
|
6400
|
-
var
|
|
6401
|
-
var ObjectSearchResultListContainer =
|
|
6413
|
+
var import_react50 = require("@emotion/react");
|
|
6414
|
+
var ObjectSearchResultListContainer = import_react50.css`
|
|
6402
6415
|
align-items: center;
|
|
6403
6416
|
display: flex;
|
|
6404
6417
|
gap: var(--spacing-sm);
|
|
6405
6418
|
justify-content: space-between;
|
|
6406
6419
|
`;
|
|
6407
|
-
var ObjectSearchDragContainer =
|
|
6420
|
+
var ObjectSearchDragContainer = import_react50.css`
|
|
6408
6421
|
margin: 0 0 var(--spacing-sm);
|
|
6409
6422
|
`;
|
|
6410
|
-
var
|
|
6423
|
+
var ObjectSearchContainerDragging = import_react50.css`
|
|
6424
|
+
box-shadow: var(--shadow-base);
|
|
6425
|
+
opacity: var(--opacity-50);
|
|
6426
|
+
`;
|
|
6427
|
+
var ObjectSearchResultListCounterContainer = import_react50.css`
|
|
6411
6428
|
align-items: center;
|
|
6412
6429
|
display: flex;
|
|
6413
6430
|
gap: var(--spacing-sm);
|
|
6414
6431
|
`;
|
|
6415
|
-
var ObjectSearchResultListTitle =
|
|
6432
|
+
var ObjectSearchResultListTitle = import_react50.css`
|
|
6416
6433
|
font-weight: var(--fw-bold);
|
|
6417
6434
|
line-height: 1;
|
|
6418
6435
|
`;
|
|
@@ -6425,7 +6442,7 @@ function ObjectSearchResultList({
|
|
|
6425
6442
|
onRemoveAllSelected,
|
|
6426
6443
|
hideRemoveButton = false,
|
|
6427
6444
|
additionalButtons,
|
|
6428
|
-
renderResultComponent = (value) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ObjectSearchResultItem, { ...value
|
|
6445
|
+
renderResultComponent = (value) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ObjectSearchResultItem, { ...value }),
|
|
6429
6446
|
multiSelectId,
|
|
6430
6447
|
disableDnD = false,
|
|
6431
6448
|
whenNothingSelected = null
|
|
@@ -6468,18 +6485,31 @@ function ObjectSearchResultList({
|
|
|
6468
6485
|
] }),
|
|
6469
6486
|
!selectedListItems.length ? whenNothingSelected : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react_beautiful_dnd3.DragDropContext, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react_beautiful_dnd3.Droppable, { droppableId: multiSelectId != null ? multiSelectId : "canvas-multi-select", children: (provided) => /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { ...provided.droppableProps, ref: provided.innerRef, children: [
|
|
6470
6487
|
selectedListItems.map((item, i2) => {
|
|
6471
|
-
const
|
|
6472
|
-
|
|
6473
|
-
|
|
6488
|
+
const itemValues = selectedListItems.length === 1 ? { ...item, disableDnD: true } : { ...item, disableDnD };
|
|
6489
|
+
const renderListItem = renderResultComponent(itemValues);
|
|
6490
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
6491
|
+
import_react_beautiful_dnd3.Draggable,
|
|
6474
6492
|
{
|
|
6475
|
-
|
|
6476
|
-
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
|
|
6480
|
-
|
|
6481
|
-
|
|
6482
|
-
|
|
6493
|
+
draggableId: item.id,
|
|
6494
|
+
index: i2,
|
|
6495
|
+
isDragDisabled: selectedListItems.length === 1 || disableDnD,
|
|
6496
|
+
children: (provided2, snapshot) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
6497
|
+
"div",
|
|
6498
|
+
{
|
|
6499
|
+
css: [
|
|
6500
|
+
ObjectSearchDragContainer,
|
|
6501
|
+
snapshot.isDragging ? ObjectSearchContainerDragging : void 0
|
|
6502
|
+
],
|
|
6503
|
+
ref: provided2.innerRef,
|
|
6504
|
+
"data-dragging": snapshot.isDragging,
|
|
6505
|
+
...provided2.draggableProps,
|
|
6506
|
+
...provided2.dragHandleProps,
|
|
6507
|
+
children: renderListItem
|
|
6508
|
+
}
|
|
6509
|
+
)
|
|
6510
|
+
},
|
|
6511
|
+
item.id
|
|
6512
|
+
);
|
|
6483
6513
|
}),
|
|
6484
6514
|
provided.placeholder
|
|
6485
6515
|
] }) }) })
|
|
@@ -6489,7 +6519,7 @@ function ObjectSearchResultList({
|
|
|
6489
6519
|
// src/components/ObjectSearch/QueryFilter.tsx
|
|
6490
6520
|
init_emotion_jsx_shim();
|
|
6491
6521
|
var import_design_system32 = require("@uniformdev/design-system");
|
|
6492
|
-
var
|
|
6522
|
+
var import_react51 = require("react");
|
|
6493
6523
|
var import_jsx_runtime56 = require("@emotion/react/jsx-runtime");
|
|
6494
6524
|
var QueryFilter = ({
|
|
6495
6525
|
requireContentType,
|
|
@@ -6521,7 +6551,7 @@ var QueryFilter = ({
|
|
|
6521
6551
|
}) => {
|
|
6522
6552
|
var _a, _b, _c, _d;
|
|
6523
6553
|
const { query, onSetQuery } = useObjectSearchContext();
|
|
6524
|
-
const [queryState, setQueryState] = (0,
|
|
6554
|
+
const [queryState, setQueryState] = (0, import_react51.useState)({
|
|
6525
6555
|
contentType: "",
|
|
6526
6556
|
keyword: "",
|
|
6527
6557
|
count: countValue != null ? countValue : 5,
|
|
@@ -6532,7 +6562,7 @@ var QueryFilter = ({
|
|
|
6532
6562
|
setQueryState((prev) => ({ ...prev, ...value }));
|
|
6533
6563
|
onSetQuery({ ...query, ...value });
|
|
6534
6564
|
};
|
|
6535
|
-
(0,
|
|
6565
|
+
(0, import_react51.useEffect)(() => {
|
|
6536
6566
|
onSetQuery(queryState);
|
|
6537
6567
|
}, [onSetQuery, queryState]);
|
|
6538
6568
|
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("fieldset", { children: [
|
package/dist/index.mjs
CHANGED
|
@@ -4548,6 +4548,7 @@ var DataRefreshButton = ({
|
|
|
4548
4548
|
|
|
4549
4549
|
// src/components/ObjectSearch/ObjectSearchContainer.tsx
|
|
4550
4550
|
init_emotion_jsx_shim();
|
|
4551
|
+
import { css as css28 } from "@emotion/react";
|
|
4551
4552
|
|
|
4552
4553
|
// ../canvas/dist/index.mjs
|
|
4553
4554
|
init_emotion_jsx_shim();
|
|
@@ -5834,7 +5835,19 @@ var ObjectSearchContainer = ({
|
|
|
5834
5835
|
const { flatVariables } = useVariables(true);
|
|
5835
5836
|
const body = /* @__PURE__ */ jsxs29(VerticalRhythm, { children: [
|
|
5836
5837
|
searchFilters,
|
|
5837
|
-
!resultList ? null : /* @__PURE__ */ jsx49(
|
|
5838
|
+
!resultList ? null : /* @__PURE__ */ jsx49(
|
|
5839
|
+
ScrollableList,
|
|
5840
|
+
{
|
|
5841
|
+
role: "list",
|
|
5842
|
+
css: css28`
|
|
5843
|
+
> div {
|
|
5844
|
+
transition: max-height var(--duration-slow) var(--timing-ease-out);
|
|
5845
|
+
max-height: ${selectedListItems.length === 0 ? "50vh" : "184px"};
|
|
5846
|
+
}
|
|
5847
|
+
`,
|
|
5848
|
+
children: resultList
|
|
5849
|
+
}
|
|
5850
|
+
)
|
|
5838
5851
|
] });
|
|
5839
5852
|
const handleSelectedVariableChange = (selectedValue) => {
|
|
5840
5853
|
var _a2;
|
|
@@ -5885,8 +5898,8 @@ import { useState as useState13 } from "react";
|
|
|
5885
5898
|
|
|
5886
5899
|
// src/components/ObjectSearch/styles/ObjectSearchFilterContainer.styles.ts
|
|
5887
5900
|
init_emotion_jsx_shim();
|
|
5888
|
-
import { css as
|
|
5889
|
-
var ObjectSearchFilterContainerLabel =
|
|
5901
|
+
import { css as css29 } from "@emotion/react";
|
|
5902
|
+
var ObjectSearchFilterContainerLabel = css29`
|
|
5890
5903
|
align-items: center;
|
|
5891
5904
|
display: flex;
|
|
5892
5905
|
font-size: var(--fs-sm);
|
|
@@ -5894,14 +5907,14 @@ var ObjectSearchFilterContainerLabel = css28`
|
|
|
5894
5907
|
line-height: 1rem;
|
|
5895
5908
|
margin-bottom: var(--spacing-sm);
|
|
5896
5909
|
`;
|
|
5897
|
-
var ObjectSearchFilterContainer =
|
|
5910
|
+
var ObjectSearchFilterContainer = css29`
|
|
5898
5911
|
display: grid;
|
|
5899
5912
|
gap: var(--spacing-base);
|
|
5900
5913
|
`;
|
|
5901
|
-
var ObjectSearchFilterDropdownAndTextSearch =
|
|
5914
|
+
var ObjectSearchFilterDropdownAndTextSearch = css29`
|
|
5902
5915
|
grid-template-columns: 0.5fr 1fr;
|
|
5903
5916
|
`;
|
|
5904
|
-
var ObjectSearchFilterGrid = (gridColumns) =>
|
|
5917
|
+
var ObjectSearchFilterGrid = (gridColumns) => css29`
|
|
5905
5918
|
display: grid;
|
|
5906
5919
|
grid-template-columns: ${gridColumns};
|
|
5907
5920
|
gap: var(--spacing-base);
|
|
@@ -5971,26 +5984,22 @@ var ObjectSearchFilterContainer2 = ({ label, children }) => {
|
|
|
5971
5984
|
|
|
5972
5985
|
// src/components/ObjectSearch/ObjectSearchListItem.tsx
|
|
5973
5986
|
init_emotion_jsx_shim();
|
|
5974
|
-
import { Popover } from "@uniformdev/design-system";
|
|
5987
|
+
import { Chip, Popover } from "@uniformdev/design-system";
|
|
5975
5988
|
|
|
5976
5989
|
// src/components/ObjectSearch/styles/ObjectSearchListItem.styles.ts
|
|
5977
5990
|
init_emotion_jsx_shim();
|
|
5978
|
-
import { css as
|
|
5991
|
+
import { css as css30 } from "@emotion/react";
|
|
5979
5992
|
import { skeletonLoading } from "@uniformdev/design-system";
|
|
5980
|
-
var ObjectListItemContainer =
|
|
5993
|
+
var ObjectListItemContainer = css30`
|
|
5981
5994
|
align-items: center;
|
|
5982
5995
|
border: 1px solid var(--gray-300);
|
|
5983
5996
|
border-radius: var(--rounded-base);
|
|
5984
5997
|
background: var(--white);
|
|
5985
5998
|
display: grid;
|
|
5986
|
-
grid-template-columns: 1fr
|
|
5999
|
+
grid-template-columns: 1fr auto;
|
|
5987
6000
|
padding: var(--spacing-sm);
|
|
5988
|
-
|
|
5989
|
-
&[hidden] {
|
|
5990
|
-
display: none;
|
|
5991
|
-
}
|
|
5992
6001
|
`;
|
|
5993
|
-
var ObjectListItemLoading =
|
|
6002
|
+
var ObjectListItemLoading = css30`
|
|
5994
6003
|
animation: ${skeletonLoading} 1s linear infinite alternate;
|
|
5995
6004
|
border-color: transparent;
|
|
5996
6005
|
min-height: 42px;
|
|
@@ -6014,31 +6023,32 @@ var ObjectListItemLoading = css29`
|
|
|
6014
6023
|
width: 1rem;
|
|
6015
6024
|
}
|
|
6016
6025
|
`;
|
|
6017
|
-
var ObjectListItemHeadingGroup =
|
|
6026
|
+
var ObjectListItemHeadingGroup = css30`
|
|
6018
6027
|
align-items: center;
|
|
6019
6028
|
display: grid;
|
|
6020
6029
|
`;
|
|
6021
|
-
var ObjectListItemTitle =
|
|
6030
|
+
var ObjectListItemTitle = css30`
|
|
6022
6031
|
color: var(--brand-secondary-1);
|
|
6023
6032
|
display: block;
|
|
6024
6033
|
font-size: var(--fs-sm);
|
|
6025
6034
|
`;
|
|
6026
|
-
var ObjectListItemSubtitle =
|
|
6035
|
+
var ObjectListItemSubtitle = css30`
|
|
6027
6036
|
color: var(--gray-500);
|
|
6028
6037
|
display: block;
|
|
6029
6038
|
font-size: var(--fs-xs);
|
|
6030
6039
|
line-height: 1;
|
|
6031
6040
|
`;
|
|
6032
|
-
var ObjectListItemInfoContainer =
|
|
6041
|
+
var ObjectListItemInfoContainer = css30`
|
|
6033
6042
|
align-items: center;
|
|
6034
6043
|
display: flex;
|
|
6044
|
+
gap: var(--spacing-sm);
|
|
6035
6045
|
justify-content: center;
|
|
6036
6046
|
`;
|
|
6037
|
-
var ObjectListItemControlledContent =
|
|
6047
|
+
var ObjectListItemControlledContent = css30`
|
|
6038
6048
|
display: flex;
|
|
6039
6049
|
gap: var(--spacing-sm);
|
|
6040
6050
|
`;
|
|
6041
|
-
var ObjectListItemUnControlledContent =
|
|
6051
|
+
var ObjectListItemUnControlledContent = css30`
|
|
6042
6052
|
margin-top: var(--spacing-sm);
|
|
6043
6053
|
grid-column: 1 / -1;
|
|
6044
6054
|
`;
|
|
@@ -6066,8 +6076,8 @@ var ObjectSearchListItem = ({
|
|
|
6066
6076
|
}
|
|
6067
6077
|
return onSelectItem([selectedItem]);
|
|
6068
6078
|
};
|
|
6069
|
-
const
|
|
6070
|
-
return /* @__PURE__ */ jsxs32("div", { role: "listitem",
|
|
6079
|
+
const selected = selectedListItems.some((item) => item.id === id);
|
|
6080
|
+
return /* @__PURE__ */ jsxs32("div", { role: "listitem", css: ObjectListItemContainer, children: [
|
|
6071
6081
|
/* @__PURE__ */ jsxs32("div", { role: "button", onClick: handleSelectItem, css: ObjectListItemControlledContent, children: [
|
|
6072
6082
|
!image ? null : /* @__PURE__ */ jsx52("img", { ...image, loading: (image == null ? void 0 : image.width) && image.height ? "lazy" : "eager" }),
|
|
6073
6083
|
/* @__PURE__ */ jsxs32("div", { role: "heading", css: ObjectListItemHeadingGroup, children: [
|
|
@@ -6075,7 +6085,10 @@ var ObjectSearchListItem = ({
|
|
|
6075
6085
|
/* @__PURE__ */ jsx52("span", { css: ObjectListItemTitle, children: title })
|
|
6076
6086
|
] })
|
|
6077
6087
|
] }),
|
|
6078
|
-
!popoverData ? null : /* @__PURE__ */
|
|
6088
|
+
!popoverData ? null : /* @__PURE__ */ jsxs32("div", { css: ObjectListItemInfoContainer, children: [
|
|
6089
|
+
selected ? /* @__PURE__ */ jsx52(Chip, { text: "selected", size: "xs" }) : null,
|
|
6090
|
+
/* @__PURE__ */ jsx52(Popover, { baseId: title, ariaLabel: title, buttonText: `See ${title} details`, iconColor: "default", children: popoverData })
|
|
6091
|
+
] }),
|
|
6079
6092
|
!children ? null : /* @__PURE__ */ jsx52("div", { css: ObjectListItemUnControlledContent, children })
|
|
6080
6093
|
] });
|
|
6081
6094
|
};
|
|
@@ -6093,9 +6106,9 @@ init_emotion_jsx_shim();
|
|
|
6093
6106
|
|
|
6094
6107
|
// src/components/ObjectSearch/styles/ObjectSearchResultItemButton.styles.ts
|
|
6095
6108
|
init_emotion_jsx_shim();
|
|
6096
|
-
import { css as
|
|
6109
|
+
import { css as css31 } from "@emotion/react";
|
|
6097
6110
|
import { button as button2 } from "@uniformdev/design-system";
|
|
6098
|
-
var ButtonStyles =
|
|
6111
|
+
var ButtonStyles = css31`
|
|
6099
6112
|
${button2}
|
|
6100
6113
|
background: transparent;
|
|
6101
6114
|
border: 1px solid var(--brand-secondary-1);
|
|
@@ -6122,7 +6135,7 @@ var ButtonStyles = css30`
|
|
|
6122
6135
|
text-decoration: none;
|
|
6123
6136
|
}
|
|
6124
6137
|
`;
|
|
6125
|
-
var ButtonIcon =
|
|
6138
|
+
var ButtonIcon = css31`
|
|
6126
6139
|
width: 1rem;
|
|
6127
6140
|
height: 1rem;
|
|
6128
6141
|
`;
|
|
@@ -6152,8 +6165,8 @@ var LinkButton = ({
|
|
|
6152
6165
|
|
|
6153
6166
|
// src/components/ObjectSearch/styles/ObjectSearchResultItem.styles.ts
|
|
6154
6167
|
init_emotion_jsx_shim();
|
|
6155
|
-
import { css as
|
|
6156
|
-
var ObjectSearchResultItemContainer =
|
|
6168
|
+
import { css as css32 } from "@emotion/react";
|
|
6169
|
+
var ObjectSearchResultItemContainer = css32`
|
|
6157
6170
|
align-items: center;
|
|
6158
6171
|
border: 1px solid var(--gray-300);
|
|
6159
6172
|
border-radius: var(--rounded-base);
|
|
@@ -6169,7 +6182,7 @@ var ObjectSearchResultItemContainer = css31`
|
|
|
6169
6182
|
}
|
|
6170
6183
|
}
|
|
6171
6184
|
`;
|
|
6172
|
-
var ObjectSearchDragHandle =
|
|
6185
|
+
var ObjectSearchDragHandle = css32`
|
|
6173
6186
|
border-left: 2px dotted var(--gray-300);
|
|
6174
6187
|
border-right: 2px dotted var(--gray-300);
|
|
6175
6188
|
position: absolute;
|
|
@@ -6178,35 +6191,35 @@ var ObjectSearchDragHandle = css31`
|
|
|
6178
6191
|
transition: opacity var(--duration-fast) var(--timing-ease-out);
|
|
6179
6192
|
opacity: 0;
|
|
6180
6193
|
`;
|
|
6181
|
-
var ObjectSearchResultItemSubtitle =
|
|
6194
|
+
var ObjectSearchResultItemSubtitle = css32`
|
|
6182
6195
|
color: var(--gray-500);
|
|
6183
6196
|
display: block;
|
|
6184
6197
|
font-size: var(--fs-xs);
|
|
6185
6198
|
line-height: 1;
|
|
6186
6199
|
`;
|
|
6187
|
-
var ObjectSearchResultItemTitle =
|
|
6200
|
+
var ObjectSearchResultItemTitle = css32`
|
|
6188
6201
|
align-items: center;
|
|
6189
6202
|
color: var(--brand-secondary-1);
|
|
6190
6203
|
display: flex;
|
|
6191
6204
|
gap: var(--spacing-xs);
|
|
6192
6205
|
`;
|
|
6193
|
-
var ObjectSearchResultItemTimeStamp =
|
|
6206
|
+
var ObjectSearchResultItemTimeStamp = css32`
|
|
6194
6207
|
color: var(--gray-500);
|
|
6195
6208
|
font-size: var(--fs-xs);
|
|
6196
6209
|
`;
|
|
6197
|
-
var ObjectSearchAuthorStateGroup =
|
|
6210
|
+
var ObjectSearchAuthorStateGroup = css32`
|
|
6198
6211
|
align-items: center;
|
|
6199
6212
|
display: flex;
|
|
6200
6213
|
gap: var(--spacing-sm);
|
|
6201
6214
|
`;
|
|
6202
|
-
var ObjectSearchUpdateGroup =
|
|
6215
|
+
var ObjectSearchUpdateGroup = css32`
|
|
6203
6216
|
display: grid;
|
|
6204
6217
|
`;
|
|
6205
|
-
var ObjectSearchContentContainer =
|
|
6218
|
+
var ObjectSearchContentContainer = css32`
|
|
6206
6219
|
display: flex;
|
|
6207
6220
|
gap: var(--spacing-base);
|
|
6208
6221
|
`;
|
|
6209
|
-
var ObjectSearchImage =
|
|
6222
|
+
var ObjectSearchImage = css32`
|
|
6210
6223
|
width: 56px;
|
|
6211
6224
|
object-fit: contain;
|
|
6212
6225
|
`;
|
|
@@ -6276,22 +6289,26 @@ import { DragDropContext as DragDropContext3, Draggable as Draggable3, Droppable
|
|
|
6276
6289
|
|
|
6277
6290
|
// src/components/ObjectSearch/styles/ObjectSearchResultList.styles.ts
|
|
6278
6291
|
init_emotion_jsx_shim();
|
|
6279
|
-
import { css as
|
|
6280
|
-
var ObjectSearchResultListContainer =
|
|
6292
|
+
import { css as css33 } from "@emotion/react";
|
|
6293
|
+
var ObjectSearchResultListContainer = css33`
|
|
6281
6294
|
align-items: center;
|
|
6282
6295
|
display: flex;
|
|
6283
6296
|
gap: var(--spacing-sm);
|
|
6284
6297
|
justify-content: space-between;
|
|
6285
6298
|
`;
|
|
6286
|
-
var ObjectSearchDragContainer =
|
|
6299
|
+
var ObjectSearchDragContainer = css33`
|
|
6287
6300
|
margin: 0 0 var(--spacing-sm);
|
|
6288
6301
|
`;
|
|
6289
|
-
var
|
|
6302
|
+
var ObjectSearchContainerDragging = css33`
|
|
6303
|
+
box-shadow: var(--shadow-base);
|
|
6304
|
+
opacity: var(--opacity-50);
|
|
6305
|
+
`;
|
|
6306
|
+
var ObjectSearchResultListCounterContainer = css33`
|
|
6290
6307
|
align-items: center;
|
|
6291
6308
|
display: flex;
|
|
6292
6309
|
gap: var(--spacing-sm);
|
|
6293
6310
|
`;
|
|
6294
|
-
var ObjectSearchResultListTitle =
|
|
6311
|
+
var ObjectSearchResultListTitle = css33`
|
|
6295
6312
|
font-weight: var(--fw-bold);
|
|
6296
6313
|
line-height: 1;
|
|
6297
6314
|
`;
|
|
@@ -6304,7 +6321,7 @@ function ObjectSearchResultList({
|
|
|
6304
6321
|
onRemoveAllSelected,
|
|
6305
6322
|
hideRemoveButton = false,
|
|
6306
6323
|
additionalButtons,
|
|
6307
|
-
renderResultComponent = (value) => /* @__PURE__ */ jsx55(ObjectSearchResultItem, { ...value
|
|
6324
|
+
renderResultComponent = (value) => /* @__PURE__ */ jsx55(ObjectSearchResultItem, { ...value }),
|
|
6308
6325
|
multiSelectId,
|
|
6309
6326
|
disableDnD = false,
|
|
6310
6327
|
whenNothingSelected = null
|
|
@@ -6347,18 +6364,31 @@ function ObjectSearchResultList({
|
|
|
6347
6364
|
] }),
|
|
6348
6365
|
!selectedListItems.length ? whenNothingSelected : /* @__PURE__ */ jsx55(DragDropContext3, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ jsx55(Droppable3, { droppableId: multiSelectId != null ? multiSelectId : "canvas-multi-select", children: (provided) => /* @__PURE__ */ jsxs35("div", { ...provided.droppableProps, ref: provided.innerRef, children: [
|
|
6349
6366
|
selectedListItems.map((item, i2) => {
|
|
6350
|
-
const
|
|
6351
|
-
|
|
6352
|
-
|
|
6367
|
+
const itemValues = selectedListItems.length === 1 ? { ...item, disableDnD: true } : { ...item, disableDnD };
|
|
6368
|
+
const renderListItem = renderResultComponent(itemValues);
|
|
6369
|
+
return /* @__PURE__ */ jsx55(
|
|
6370
|
+
Draggable3,
|
|
6353
6371
|
{
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
|
|
6372
|
+
draggableId: item.id,
|
|
6373
|
+
index: i2,
|
|
6374
|
+
isDragDisabled: selectedListItems.length === 1 || disableDnD,
|
|
6375
|
+
children: (provided2, snapshot) => /* @__PURE__ */ jsx55(
|
|
6376
|
+
"div",
|
|
6377
|
+
{
|
|
6378
|
+
css: [
|
|
6379
|
+
ObjectSearchDragContainer,
|
|
6380
|
+
snapshot.isDragging ? ObjectSearchContainerDragging : void 0
|
|
6381
|
+
],
|
|
6382
|
+
ref: provided2.innerRef,
|
|
6383
|
+
"data-dragging": snapshot.isDragging,
|
|
6384
|
+
...provided2.draggableProps,
|
|
6385
|
+
...provided2.dragHandleProps,
|
|
6386
|
+
children: renderListItem
|
|
6387
|
+
}
|
|
6388
|
+
)
|
|
6389
|
+
},
|
|
6390
|
+
item.id
|
|
6391
|
+
);
|
|
6362
6392
|
}),
|
|
6363
6393
|
provided.placeholder
|
|
6364
6394
|
] }) }) })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/mesh-sdk-react",
|
|
3
|
-
"version": "19.22.
|
|
3
|
+
"version": "19.22.1-alpha.8+a8f730b12",
|
|
4
4
|
"description": "Uniform Mesh Framework SDK for React",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@hookform/resolvers": "^3.0.1",
|
|
47
|
-
"@uniformdev/design-system": "19.22.
|
|
48
|
-
"@uniformdev/mesh-sdk": "19.22.
|
|
47
|
+
"@uniformdev/design-system": "19.22.1-alpha.8+a8f730b12",
|
|
48
|
+
"@uniformdev/mesh-sdk": "19.22.1-alpha.8+a8f730b12",
|
|
49
49
|
"mitt": "^3.0.0",
|
|
50
50
|
"react-beautiful-dnd": "13.1.1",
|
|
51
51
|
"react-hook-form": "^7.43.9",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"publishConfig": {
|
|
78
78
|
"access": "public"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "a8f730b12035a4d7c2e6a704d3777ff12df52ffc"
|
|
81
81
|
}
|