@uniformdev/mesh-sdk-react 18.31.1-alpha.22 → 18.32.1-alpha.26

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 CHANGED
@@ -574,15 +574,11 @@ type EntrySearchContainerProps = {
574
574
  resultList?: ReactNode;
575
575
  /** allows any child element */
576
576
  children?: ReactNode;
577
- /** function for the save action */
578
- onSave?: () => void;
579
- /** function fort he cancel action */
580
- onCancel?: () => void;
581
577
  };
582
578
  /**
583
579
  * @description Entry search container is an opinionated layout for search parameters and retrieved results
584
580
  * @example <EntrySearchContainer searchFilters={<>your component</>} resultList={<>your result list component<>} onSave={yourSaveAction} onCancel={yourCancelAction} /> */
585
- declare const EntrySearchContainer: ({ searchFilters, resultList, onSave, onCancel, children, }: EntrySearchContainerProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
581
+ declare const EntrySearchContainer: ({ searchFilters, resultList, children }: EntrySearchContainerProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
586
582
 
587
583
  type EntrySearchFilterProps = {
588
584
  /** shows or hides the required content type select option */
@@ -630,7 +626,7 @@ declare const EntrySearchFilterContainer: ({ label, children }: EntrySearchFilte
630
626
 
631
627
  type SearchQueryProps = {
632
628
  /** sets the content type in the search context */
633
- contentType: string | undefined;
629
+ contentType?: string;
634
630
  /** sets the keyword search in the search context */
635
631
  keyword?: string;
636
632
  };
@@ -647,7 +643,7 @@ type SelectedItemProps<TProps extends SelectedItemExtendedProps = SelectedItemEx
647
643
  /** sets the subtitle value */
648
644
  subtitle?: string;
649
645
  /** sets the content type value */
650
- contentType?: string;
646
+ contentType?: string | string[];
651
647
  /** sets the created date value using TimeAgo to transform the date */
652
648
  createdAt?: TDate;
653
649
  /** sets the image src */
@@ -820,6 +816,8 @@ type EntrySearchResultListProps<TRenderComponent extends SelectedItemProps = Sel
820
816
  * @default false
821
817
  */
822
818
  disableDnD?: boolean;
819
+ /** sets the draggable id value */
820
+ multiSelectId?: string;
823
821
  };
824
822
  /**
825
823
  * @description An opinionated result list UI component that has built in drag and drop functionality and removal of all selected items from context.
@@ -827,7 +825,7 @@ type EntrySearchResultListProps<TRenderComponent extends SelectedItemProps = Sel
827
825
  * maintain drag and drop functionality
828
826
  * @example <EntrySearchResultList id="my-id" title="title" renderResultComponent={(values) => <CustomComponent {...values} />} />
829
827
  */
830
- declare const EntrySearchResultList: ({ resultLabelText, removeButtonText, onRemoveAllSelected, hideRemoveButton, additionalButtons, renderResultComponent, disableDnD, }: EntrySearchResultListProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
828
+ declare const EntrySearchResultList: ({ resultLabelText, removeButtonText, onRemoveAllSelected, hideRemoveButton, additionalButtons, renderResultComponent, multiSelectId, disableDnD, }: EntrySearchResultListProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
831
829
 
832
830
  type QueryFilterSearchProps = {
833
831
  /** sets the count value */
package/dist/index.esm.js CHANGED
@@ -3919,35 +3919,15 @@ var DataRefreshButton = ({
3919
3919
  };
3920
3920
 
3921
3921
  // src/components/EntrySearch/EntrySearchContainer.tsx
3922
- import { Button as Button4, Container, IconsProvider, ScrollableList, VerticalRhythm } from "@uniformdev/design-system";
3923
-
3924
- // src/components/EntrySearch/styles/EntrySearchContainer.styles.ts
3925
- import { css as css26 } from "@emotion/react";
3926
- var EntrySearchBtnGroup = css26`
3927
- align-items: center;
3928
- display: flex;
3929
- gap: var(--spacing-sm);
3930
- `;
3931
-
3932
- // src/components/EntrySearch/EntrySearchContainer.tsx
3922
+ import { Container, IconsProvider, ScrollableList, VerticalRhythm } from "@uniformdev/design-system";
3933
3923
  import { jsx as jsx45, jsxs as jsxs26 } from "@emotion/react/jsx-runtime";
3934
- var EntrySearchContainer = ({
3935
- searchFilters,
3936
- resultList,
3937
- onSave,
3938
- onCancel,
3939
- children
3940
- }) => {
3924
+ var EntrySearchContainer = ({ searchFilters, resultList, children }) => {
3941
3925
  return /* @__PURE__ */ jsx45(IconsProvider, { children: /* @__PURE__ */ jsxs26(VerticalRhythm, { children: [
3942
3926
  /* @__PURE__ */ jsx45(Container, { backgroundColor: "gray-50", padding: "var(--spacing-base)", border: true, children: /* @__PURE__ */ jsxs26(VerticalRhythm, { children: [
3943
3927
  searchFilters,
3944
3928
  !resultList ? null : /* @__PURE__ */ jsx45(ScrollableList, { role: "list", children: resultList })
3945
3929
  ] }) }),
3946
- children,
3947
- !onSave && !onCancel ? null : /* @__PURE__ */ jsxs26("div", { css: EntrySearchBtnGroup, children: [
3948
- !onSave ? null : /* @__PURE__ */ jsx45(Button4, { buttonType: "primary", onClick: onSave, children: "Save" }),
3949
- !onCancel ? null : /* @__PURE__ */ jsx45(Button4, { buttonType: "ghostDestructive", onClick: onCancel, children: "Cancel" })
3950
- ] })
3930
+ children
3951
3931
  ] }) });
3952
3932
  };
3953
3933
 
@@ -3984,7 +3964,13 @@ var EntrySearchProvider = ({ currentlySelectedItems, children }) => {
3984
3964
  const [list, setList] = useState9({});
3985
3965
  const onSetQuery = useCallback(
3986
3966
  (value) => {
3987
- setQuery(value);
3967
+ if (Array.isArray(value.contentType) && value.contentType.length > 0) {
3968
+ return setQuery({
3969
+ ...value,
3970
+ contentType: value.contentType[0].id
3971
+ });
3972
+ }
3973
+ return setQuery(value);
3988
3974
  },
3989
3975
  [setQuery]
3990
3976
  );
@@ -4033,8 +4019,8 @@ var useEntrySearchContext = () => {
4033
4019
  };
4034
4020
 
4035
4021
  // src/components/EntrySearch/styles/EntrySearchFilterContainer.styles.ts
4036
- import { css as css27 } from "@emotion/react";
4037
- var EntrySearchFilterContainerLabel = css27`
4022
+ import { css as css26 } from "@emotion/react";
4023
+ var EntrySearchFilterContainerLabel = css26`
4038
4024
  align-items: center;
4039
4025
  display: flex;
4040
4026
  font-size: var(--fs-sm);
@@ -4042,14 +4028,14 @@ var EntrySearchFilterContainerLabel = css27`
4042
4028
  line-height: 1rem;
4043
4029
  margin-bottom: var(--spacing-sm);
4044
4030
  `;
4045
- var EntrySearchFilterContainer = css27`
4031
+ var EntrySearchFilterContainer = css26`
4046
4032
  display: grid;
4047
4033
  gap: var(--spacing-base);
4048
4034
  `;
4049
- var EntrySearchFilterDropdownAndTextSearch = css27`
4035
+ var EntrySearchFilterDropdownAndTextSearch = css26`
4050
4036
  grid-template-columns: 0.5fr 1fr;
4051
4037
  `;
4052
- var EntrySearchFilterGrid = (gridColumns) => css27`
4038
+ var EntrySearchFilterGrid = (gridColumns) => css26`
4053
4039
  display: grid;
4054
4040
  grid-template-columns: ${gridColumns};
4055
4041
  gap: var(--spacing-base);
@@ -4067,7 +4053,7 @@ var EntrySearchFilter = ({
4067
4053
  }) => {
4068
4054
  const { query, onSetQuery } = useEntrySearchContext();
4069
4055
  const [searchState, setSearchState] = useState10({
4070
- contentType: "any",
4056
+ contentType: "",
4071
4057
  keyword: ""
4072
4058
  });
4073
4059
  const handleFilterChange = (value) => {
@@ -4090,7 +4076,7 @@ var EntrySearchFilter = ({
4090
4076
  return { name: option == null ? void 0 : option.name, label: (_a = option.label) != null ? _a : option == null ? void 0 : option.name, id: option.id };
4091
4077
  }) : []
4092
4078
  ],
4093
- value: searchState.contentType
4079
+ value: query.contentType
4094
4080
  }
4095
4081
  ),
4096
4082
  /* @__PURE__ */ jsx47(
@@ -4120,9 +4106,9 @@ var EntrySearchFilterContainer2 = ({ label, children }) => {
4120
4106
  import { Popover } from "@uniformdev/design-system";
4121
4107
 
4122
4108
  // src/components/EntrySearch/styles/EntrySearchListItem.styles.ts
4123
- import { css as css28 } from "@emotion/react";
4109
+ import { css as css27 } from "@emotion/react";
4124
4110
  import { skeletonLoading } from "@uniformdev/design-system";
4125
- var EntryListItemContainer = css28`
4111
+ var EntryListItemContainer = css27`
4126
4112
  align-items: center;
4127
4113
  border: 1px solid var(--gray-300);
4128
4114
  border-radius: var(--rounded-base);
@@ -4135,7 +4121,7 @@ var EntryListItemContainer = css28`
4135
4121
  display: none;
4136
4122
  }
4137
4123
  `;
4138
- var EntryListItemLoading = css28`
4124
+ var EntryListItemLoading = css27`
4139
4125
  animation: ${skeletonLoading} 1s linear infinite alternate;
4140
4126
  border-color: transparent;
4141
4127
  min-height: 42px;
@@ -4159,31 +4145,31 @@ var EntryListItemLoading = css28`
4159
4145
  width: 1rem;
4160
4146
  }
4161
4147
  `;
4162
- var EntryListItemHeadingGroup = css28`
4148
+ var EntryListItemHeadingGroup = css27`
4163
4149
  align-items: center;
4164
4150
  display: grid;
4165
4151
  `;
4166
- var EntryListItemTitle = css28`
4152
+ var EntryListItemTitle = css27`
4167
4153
  color: var(--brand-secondary-1);
4168
4154
  display: block;
4169
4155
  font-size: var(--fs-sm);
4170
4156
  `;
4171
- var EntryListItemSubtitle = css28`
4157
+ var EntryListItemSubtitle = css27`
4172
4158
  color: var(--gray-500);
4173
4159
  display: block;
4174
4160
  font-size: var(--fs-xs);
4175
4161
  line-height: 1;
4176
4162
  `;
4177
- var EntryListItemInfoContainer = css28`
4163
+ var EntryListItemInfoContainer = css27`
4178
4164
  align-items: center;
4179
4165
  display: flex;
4180
4166
  justify-content: center;
4181
4167
  `;
4182
- var EntryListItemControlledContent = css28`
4168
+ var EntryListItemControlledContent = css27`
4183
4169
  display: flex;
4184
4170
  gap: var(--spacing-sm);
4185
4171
  `;
4186
- var EntryListItemUnControlledContent = css28`
4172
+ var EntryListItemUnControlledContent = css27`
4187
4173
  margin-top: var(--spacing-sm);
4188
4174
  grid-column: 1 / -1;
4189
4175
  `;
@@ -4230,12 +4216,12 @@ var EntrySearchListItemLoadingSkeleton = () => {
4230
4216
  };
4231
4217
 
4232
4218
  // src/components/EntrySearch/EntrySearchResultItem.tsx
4233
- import { Badge, Button as Button5, Popover as Popover2 } from "@uniformdev/design-system";
4219
+ import { Badge, Button as Button4, Popover as Popover2 } from "@uniformdev/design-system";
4234
4220
  import { format as timeagoFormat } from "timeago.js";
4235
4221
 
4236
4222
  // src/components/EntrySearch/styles/EntrySearchResultItem.styles.ts
4237
- import { css as css29 } from "@emotion/react";
4238
- var EntrySearchResultItemContainer = css29`
4223
+ import { css as css28 } from "@emotion/react";
4224
+ var EntrySearchResultItemContainer = css28`
4239
4225
  align-items: center;
4240
4226
  border: 1px solid var(--gray-300);
4241
4227
  border-radius: var(--rounded-base);
@@ -4251,7 +4237,7 @@ var EntrySearchResultItemContainer = css29`
4251
4237
  }
4252
4238
  }
4253
4239
  `;
4254
- var EntrySearchDragHandle = css29`
4240
+ var EntrySearchDragHandle = css28`
4255
4241
  border-left: 2px dotted var(--gray-300);
4256
4242
  border-right: 2px dotted var(--gray-300);
4257
4243
  position: absolute;
@@ -4260,35 +4246,35 @@ var EntrySearchDragHandle = css29`
4260
4246
  transition: opacity var(--duration-fast) var(--timing-ease-out);
4261
4247
  opacity: 0;
4262
4248
  `;
4263
- var EntrySearchResultItemSubtitle = css29`
4249
+ var EntrySearchResultItemSubtitle = css28`
4264
4250
  color: var(--gray-500);
4265
4251
  display: block;
4266
4252
  font-size: var(--fs-xs);
4267
4253
  line-height: 1;
4268
4254
  `;
4269
- var EntrySearchResultItemTitle = css29`
4255
+ var EntrySearchResultItemTitle = css28`
4270
4256
  align-items: center;
4271
4257
  color: var(--brand-secondary-1);
4272
4258
  display: flex;
4273
4259
  gap: var(--spacing-xs);
4274
4260
  `;
4275
- var EntrySearchResultItemTimeStamp = css29`
4261
+ var EntrySearchResultItemTimeStamp = css28`
4276
4262
  color: var(--gray-500);
4277
4263
  font-size: var(--fs-xs);
4278
4264
  `;
4279
- var EntrySearchAuthorStateGroup = css29`
4265
+ var EntrySearchAuthorStateGroup = css28`
4280
4266
  align-items: center;
4281
4267
  display: flex;
4282
4268
  gap: var(--spacing-sm);
4283
4269
  `;
4284
- var EntrySearchUpdateGroup = css29`
4270
+ var EntrySearchUpdateGroup = css28`
4285
4271
  display: grid;
4286
4272
  `;
4287
- var EntrySearchContentContainer = css29`
4273
+ var EntrySearchContentContainer = css28`
4288
4274
  display: flex;
4289
4275
  gap: var(--spacing-base);
4290
4276
  `;
4291
- var EntrySearchImage = css29`
4277
+ var EntrySearchImage = css28`
4292
4278
  width: 56px;
4293
4279
  object-fit: contain;
4294
4280
  `;
@@ -4346,15 +4332,15 @@ var EntrySearchResultItem = ({
4346
4332
  ] }) }),
4347
4333
  !editLink && hideRemoveButton ? null : /* @__PURE__ */ jsxs30("div", { css: EntrySearchAuthorStateGroup, children: [
4348
4334
  !editLink ? null : /* @__PURE__ */ jsx50(LinkButton, { text: "Edit", href: editLink, icon: editLinkIcon }),
4349
- hideRemoveButton ? null : /* @__PURE__ */ jsx50(Button5, { buttonType: "ghostDestructive", onClick: onRemoveItem, children: "Remove" })
4335
+ hideRemoveButton ? null : /* @__PURE__ */ jsx50(Button4, { buttonType: "ghostDestructive", onClick: onRemoveItem, children: "Remove" })
4350
4336
  ] })
4351
4337
  ] });
4352
4338
  };
4353
4339
 
4354
4340
  // src/components/EntrySearch/styles/EntrySearchResultItemButton.styles.ts
4355
- import { css as css30 } from "@emotion/react";
4341
+ import { css as css29 } from "@emotion/react";
4356
4342
  import { button as button2 } from "@uniformdev/design-system";
4357
- var ButtonStyles = css30`
4343
+ var ButtonStyles = css29`
4358
4344
  ${button2}
4359
4345
  background: transparent;
4360
4346
  border: 1px solid var(--brand-secondary-1);
@@ -4381,7 +4367,7 @@ var ButtonStyles = css30`
4381
4367
  text-decoration: none;
4382
4368
  }
4383
4369
  `;
4384
- var ButtonIcon = css30`
4370
+ var ButtonIcon = css29`
4385
4371
  width: 1rem;
4386
4372
  height: 1rem;
4387
4373
  `;
@@ -4410,23 +4396,31 @@ var LinkButton = ({
4410
4396
  };
4411
4397
 
4412
4398
  // src/components/EntrySearch/EntrySearchResultList.tsx
4413
- import { Button as Button6, Counter, VerticalRhythm as VerticalRhythm2 } from "@uniformdev/design-system";
4399
+ import { Button as Button5, Counter } from "@uniformdev/design-system";
4414
4400
  import { DragDropContext as DragDropContext3, Draggable as Draggable3, Droppable as Droppable3 } from "react-beautiful-dnd";
4415
4401
 
4416
4402
  // src/components/EntrySearch/styles/EntrySearchResultList.styles.ts
4417
- import { css as css31 } from "@emotion/react";
4418
- var EntrySearchResultListContainer = css31`
4403
+ import { css as css30 } from "@emotion/react";
4404
+ var EntrySearchResultListContainer = css30`
4419
4405
  align-items: center;
4420
4406
  display: flex;
4421
4407
  gap: var(--spacing-sm);
4422
4408
  justify-content: space-between;
4423
4409
  `;
4424
- var EntrySearchResultListCounterContainer = css31`
4410
+ var EntrySearchDragContainer = css30`
4411
+ margin: 0 0 var(--spacing-sm);
4412
+
4413
+ // &[data-dragging='true'] {
4414
+ // left: auto !important;
4415
+ // top: auto !important;
4416
+ // }
4417
+ `;
4418
+ var EntrySearchResultListCounterContainer = css30`
4425
4419
  align-items: center;
4426
4420
  display: flex;
4427
4421
  gap: var(--spacing-sm);
4428
4422
  `;
4429
- var EntrySearchResultListTitle = css31`
4423
+ var EntrySearchResultListTitle = css30`
4430
4424
  font-weight: var(--fw-bold);
4431
4425
  line-height: 1;
4432
4426
  `;
@@ -4440,6 +4434,7 @@ var EntrySearchResultList = ({
4440
4434
  hideRemoveButton = false,
4441
4435
  additionalButtons,
4442
4436
  renderResultComponent = (value) => /* @__PURE__ */ jsx52(EntrySearchResultItem, { ...value, disableDnD }),
4437
+ multiSelectId,
4443
4438
  disableDnD = false
4444
4439
  }) => {
4445
4440
  const { selectedListItems, onRemoveAllSelectedItems, onSelectItem } = useEntrySearchContext();
@@ -4467,7 +4462,7 @@ var EntrySearchResultList = ({
4467
4462
  /* @__PURE__ */ jsxs32("div", { css: EntrySearchResultListCounterContainer, children: [
4468
4463
  additionalButtons,
4469
4464
  hideRemoveButton ? null : /* @__PURE__ */ jsx52(
4470
- Button6,
4465
+ Button5,
4471
4466
  {
4472
4467
  buttonType: "ghostDestructive",
4473
4468
  size: "xs",
@@ -4478,29 +4473,21 @@ var EntrySearchResultList = ({
4478
4473
  )
4479
4474
  ] })
4480
4475
  ] }),
4481
- !selectedListItems.length ? null : /* @__PURE__ */ jsx52(DragDropContext3, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ jsx52(Droppable3, { droppableId: "canvas-multi-select", children: (provided) => /* @__PURE__ */ jsxs32("div", { ...provided.droppableProps, ref: provided.innerRef, children: [
4482
- /* @__PURE__ */ jsx52(VerticalRhythm2, { gap: "sm", children: selectedListItems.map((item, i) => {
4476
+ !selectedListItems.length ? null : /* @__PURE__ */ jsx52(DragDropContext3, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ jsx52(Droppable3, { droppableId: multiSelectId != null ? multiSelectId : "canvas-multi-select", children: (provided) => /* @__PURE__ */ jsxs32("div", { ...provided.droppableProps, ref: provided.innerRef, children: [
4477
+ selectedListItems.map((item, i) => {
4483
4478
  const renderListItem = renderResultComponent(item);
4484
- return /* @__PURE__ */ jsx52(
4485
- Draggable3,
4479
+ return /* @__PURE__ */ jsx52(Draggable3, { draggableId: item.id, index: i, isDragDisabled: disableDnD, children: (provided2, snapshot) => /* @__PURE__ */ jsx52(
4480
+ "div",
4486
4481
  {
4487
- draggableId: item.title,
4488
- index: i,
4489
- isDragDisabled: disableDnD,
4490
- children: (provided2, snapshot) => /* @__PURE__ */ jsx52(
4491
- "div",
4492
- {
4493
- ref: provided2.innerRef,
4494
- "data-dragging": snapshot.isDragging,
4495
- ...provided2.draggableProps,
4496
- ...provided2.dragHandleProps,
4497
- children: renderListItem
4498
- }
4499
- )
4500
- },
4501
- item.title
4502
- );
4503
- }) }),
4482
+ css: EntrySearchDragContainer,
4483
+ ref: provided2.innerRef,
4484
+ "data-dragging": snapshot.isDragging,
4485
+ ...provided2.draggableProps,
4486
+ ...provided2.dragHandleProps,
4487
+ children: renderListItem
4488
+ }
4489
+ ) }, item.id);
4490
+ }),
4504
4491
  provided.placeholder
4505
4492
  ] }) }) })
4506
4493
  ] });
@@ -4721,7 +4708,7 @@ function createLocationValidator(setValue, validate) {
4721
4708
  // src/index.ts
4722
4709
  import {
4723
4710
  AddListButton as AddListButton2,
4724
- Button as Button7,
4711
+ Button as Button6,
4725
4712
  Callout as Callout4,
4726
4713
  Heading,
4727
4714
  Input as Input8,
@@ -4758,7 +4745,7 @@ import {
4758
4745
  export * from "@uniformdev/mesh-sdk";
4759
4746
  export {
4760
4747
  AddListButton2 as AddListButton,
4761
- Button7 as Button,
4748
+ Button6 as Button,
4762
4749
  Callout4 as Callout,
4763
4750
  DamSelectedItem,
4764
4751
  DataRefreshButton,
package/dist/index.js CHANGED
@@ -4075,45 +4075,25 @@ var DataRefreshButton = ({
4075
4075
 
4076
4076
  // src/components/EntrySearch/EntrySearchContainer.tsx
4077
4077
  var import_design_system24 = require("@uniformdev/design-system");
4078
-
4079
- // src/components/EntrySearch/styles/EntrySearchContainer.styles.ts
4080
- var import_react39 = require("@emotion/react");
4081
- var EntrySearchBtnGroup = import_react39.css`
4082
- align-items: center;
4083
- display: flex;
4084
- gap: var(--spacing-sm);
4085
- `;
4086
-
4087
- // src/components/EntrySearch/EntrySearchContainer.tsx
4088
4078
  var import_jsx_runtime45 = require("@emotion/react/jsx-runtime");
4089
- var EntrySearchContainer = ({
4090
- searchFilters,
4091
- resultList,
4092
- onSave,
4093
- onCancel,
4094
- children
4095
- }) => {
4079
+ var EntrySearchContainer = ({ searchFilters, resultList, children }) => {
4096
4080
  return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_design_system24.IconsProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_design_system24.VerticalRhythm, { children: [
4097
4081
  /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_design_system24.Container, { backgroundColor: "gray-50", padding: "var(--spacing-base)", border: true, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_design_system24.VerticalRhythm, { children: [
4098
4082
  searchFilters,
4099
4083
  !resultList ? null : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_design_system24.ScrollableList, { role: "list", children: resultList })
4100
4084
  ] }) }),
4101
- children,
4102
- !onSave && !onCancel ? null : /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { css: EntrySearchBtnGroup, children: [
4103
- !onSave ? null : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_design_system24.Button, { buttonType: "primary", onClick: onSave, children: "Save" }),
4104
- !onCancel ? null : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_design_system24.Button, { buttonType: "ghostDestructive", onClick: onCancel, children: "Cancel" })
4105
- ] })
4085
+ children
4106
4086
  ] }) });
4107
4087
  };
4108
4088
 
4109
4089
  // src/components/EntrySearch/EntrySearchFilter.tsx
4110
4090
  var import_design_system25 = require("@uniformdev/design-system");
4111
- var import_react42 = require("react");
4091
+ var import_react41 = require("react");
4112
4092
 
4113
4093
  // src/components/EntrySearch/hooks/EntrySearchContext.tsx
4114
- var import_react40 = require("react");
4094
+ var import_react39 = require("react");
4115
4095
  var import_jsx_runtime46 = require("@emotion/react/jsx-runtime");
4116
- var EntrySearchContext = (0, import_react40.createContext)({
4096
+ var EntrySearchContext = (0, import_react39.createContext)({
4117
4097
  onSetQuery: () => {
4118
4098
  },
4119
4099
  onSelectItem: () => {
@@ -4130,20 +4110,26 @@ var EntrySearchContext = (0, import_react40.createContext)({
4130
4110
  }
4131
4111
  });
4132
4112
  var EntrySearchProvider = ({ currentlySelectedItems, children }) => {
4133
- const [query, setQuery] = (0, import_react40.useState)({
4113
+ const [query, setQuery] = (0, import_react39.useState)({
4134
4114
  contentType: "",
4135
4115
  keyword: ""
4136
4116
  });
4137
- const querySearchDeferred = (0, import_react40.useDeferredValue)(query);
4138
- const [selectedItems, setSelectedItems] = (0, import_react40.useState)(currentlySelectedItems != null ? currentlySelectedItems : []);
4139
- const [list, setList] = (0, import_react40.useState)({});
4140
- const onSetQuery = (0, import_react40.useCallback)(
4117
+ const querySearchDeferred = (0, import_react39.useDeferredValue)(query);
4118
+ const [selectedItems, setSelectedItems] = (0, import_react39.useState)(currentlySelectedItems != null ? currentlySelectedItems : []);
4119
+ const [list, setList] = (0, import_react39.useState)({});
4120
+ const onSetQuery = (0, import_react39.useCallback)(
4141
4121
  (value) => {
4142
- setQuery(value);
4122
+ if (Array.isArray(value.contentType) && value.contentType.length > 0) {
4123
+ return setQuery({
4124
+ ...value,
4125
+ contentType: value.contentType[0].id
4126
+ });
4127
+ }
4128
+ return setQuery(value);
4143
4129
  },
4144
4130
  [setQuery]
4145
4131
  );
4146
- const onSelectItem = (0, import_react40.useCallback)(
4132
+ const onSelectItem = (0, import_react39.useCallback)(
4147
4133
  (selectedResult) => {
4148
4134
  if (Array.isArray(selectedResult)) {
4149
4135
  setSelectedItems(selectedResult);
@@ -4157,10 +4143,10 @@ var EntrySearchProvider = ({ currentlySelectedItems, children }) => {
4157
4143
  },
4158
4144
  [setSelectedItems, selectedItems]
4159
4145
  );
4160
- const onRemoveAllSelectedItems = (0, import_react40.useCallback)(() => {
4146
+ const onRemoveAllSelectedItems = (0, import_react39.useCallback)(() => {
4161
4147
  setSelectedItems([]);
4162
4148
  }, [setSelectedItems]);
4163
- const onSetList = (0, import_react40.useCallback)(
4149
+ const onSetList = (0, import_react39.useCallback)(
4164
4150
  (value) => {
4165
4151
  setList(value);
4166
4152
  },
@@ -4183,13 +4169,13 @@ var EntrySearchProvider = ({ currentlySelectedItems, children }) => {
4183
4169
  );
4184
4170
  };
4185
4171
  var useEntrySearchContext = () => {
4186
- const contextValues = (0, import_react40.useContext)(EntrySearchContext);
4172
+ const contextValues = (0, import_react39.useContext)(EntrySearchContext);
4187
4173
  return { ...contextValues };
4188
4174
  };
4189
4175
 
4190
4176
  // src/components/EntrySearch/styles/EntrySearchFilterContainer.styles.ts
4191
- var import_react41 = require("@emotion/react");
4192
- var EntrySearchFilterContainerLabel = import_react41.css`
4177
+ var import_react40 = require("@emotion/react");
4178
+ var EntrySearchFilterContainerLabel = import_react40.css`
4193
4179
  align-items: center;
4194
4180
  display: flex;
4195
4181
  font-size: var(--fs-sm);
@@ -4197,14 +4183,14 @@ var EntrySearchFilterContainerLabel = import_react41.css`
4197
4183
  line-height: 1rem;
4198
4184
  margin-bottom: var(--spacing-sm);
4199
4185
  `;
4200
- var EntrySearchFilterContainer = import_react41.css`
4186
+ var EntrySearchFilterContainer = import_react40.css`
4201
4187
  display: grid;
4202
4188
  gap: var(--spacing-base);
4203
4189
  `;
4204
- var EntrySearchFilterDropdownAndTextSearch = import_react41.css`
4190
+ var EntrySearchFilterDropdownAndTextSearch = import_react40.css`
4205
4191
  grid-template-columns: 0.5fr 1fr;
4206
4192
  `;
4207
- var EntrySearchFilterGrid = (gridColumns) => import_react41.css`
4193
+ var EntrySearchFilterGrid = (gridColumns) => import_react40.css`
4208
4194
  display: grid;
4209
4195
  grid-template-columns: ${gridColumns};
4210
4196
  gap: var(--spacing-base);
@@ -4221,8 +4207,8 @@ var EntrySearchFilter = ({
4221
4207
  selectOptions
4222
4208
  }) => {
4223
4209
  const { query, onSetQuery } = useEntrySearchContext();
4224
- const [searchState, setSearchState] = (0, import_react42.useState)({
4225
- contentType: "any",
4210
+ const [searchState, setSearchState] = (0, import_react41.useState)({
4211
+ contentType: "",
4226
4212
  keyword: ""
4227
4213
  });
4228
4214
  const handleFilterChange = (value) => {
@@ -4245,7 +4231,7 @@ var EntrySearchFilter = ({
4245
4231
  return { name: option == null ? void 0 : option.name, label: (_a = option.label) != null ? _a : option == null ? void 0 : option.name, id: option.id };
4246
4232
  }) : []
4247
4233
  ],
4248
- value: searchState.contentType
4234
+ value: query.contentType
4249
4235
  }
4250
4236
  ),
4251
4237
  /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
@@ -4275,9 +4261,9 @@ var EntrySearchFilterContainer2 = ({ label, children }) => {
4275
4261
  var import_design_system27 = require("@uniformdev/design-system");
4276
4262
 
4277
4263
  // src/components/EntrySearch/styles/EntrySearchListItem.styles.ts
4278
- var import_react43 = require("@emotion/react");
4264
+ var import_react42 = require("@emotion/react");
4279
4265
  var import_design_system26 = require("@uniformdev/design-system");
4280
- var EntryListItemContainer = import_react43.css`
4266
+ var EntryListItemContainer = import_react42.css`
4281
4267
  align-items: center;
4282
4268
  border: 1px solid var(--gray-300);
4283
4269
  border-radius: var(--rounded-base);
@@ -4290,7 +4276,7 @@ var EntryListItemContainer = import_react43.css`
4290
4276
  display: none;
4291
4277
  }
4292
4278
  `;
4293
- var EntryListItemLoading = import_react43.css`
4279
+ var EntryListItemLoading = import_react42.css`
4294
4280
  animation: ${import_design_system26.skeletonLoading} 1s linear infinite alternate;
4295
4281
  border-color: transparent;
4296
4282
  min-height: 42px;
@@ -4314,31 +4300,31 @@ var EntryListItemLoading = import_react43.css`
4314
4300
  width: 1rem;
4315
4301
  }
4316
4302
  `;
4317
- var EntryListItemHeadingGroup = import_react43.css`
4303
+ var EntryListItemHeadingGroup = import_react42.css`
4318
4304
  align-items: center;
4319
4305
  display: grid;
4320
4306
  `;
4321
- var EntryListItemTitle = import_react43.css`
4307
+ var EntryListItemTitle = import_react42.css`
4322
4308
  color: var(--brand-secondary-1);
4323
4309
  display: block;
4324
4310
  font-size: var(--fs-sm);
4325
4311
  `;
4326
- var EntryListItemSubtitle = import_react43.css`
4312
+ var EntryListItemSubtitle = import_react42.css`
4327
4313
  color: var(--gray-500);
4328
4314
  display: block;
4329
4315
  font-size: var(--fs-xs);
4330
4316
  line-height: 1;
4331
4317
  `;
4332
- var EntryListItemInfoContainer = import_react43.css`
4318
+ var EntryListItemInfoContainer = import_react42.css`
4333
4319
  align-items: center;
4334
4320
  display: flex;
4335
4321
  justify-content: center;
4336
4322
  `;
4337
- var EntryListItemControlledContent = import_react43.css`
4323
+ var EntryListItemControlledContent = import_react42.css`
4338
4324
  display: flex;
4339
4325
  gap: var(--spacing-sm);
4340
4326
  `;
4341
- var EntryListItemUnControlledContent = import_react43.css`
4327
+ var EntryListItemUnControlledContent = import_react42.css`
4342
4328
  margin-top: var(--spacing-sm);
4343
4329
  grid-column: 1 / -1;
4344
4330
  `;
@@ -4389,8 +4375,8 @@ var import_design_system28 = require("@uniformdev/design-system");
4389
4375
  var import_timeago3 = require("timeago.js");
4390
4376
 
4391
4377
  // src/components/EntrySearch/styles/EntrySearchResultItem.styles.ts
4392
- var import_react44 = require("@emotion/react");
4393
- var EntrySearchResultItemContainer = import_react44.css`
4378
+ var import_react43 = require("@emotion/react");
4379
+ var EntrySearchResultItemContainer = import_react43.css`
4394
4380
  align-items: center;
4395
4381
  border: 1px solid var(--gray-300);
4396
4382
  border-radius: var(--rounded-base);
@@ -4406,7 +4392,7 @@ var EntrySearchResultItemContainer = import_react44.css`
4406
4392
  }
4407
4393
  }
4408
4394
  `;
4409
- var EntrySearchDragHandle = import_react44.css`
4395
+ var EntrySearchDragHandle = import_react43.css`
4410
4396
  border-left: 2px dotted var(--gray-300);
4411
4397
  border-right: 2px dotted var(--gray-300);
4412
4398
  position: absolute;
@@ -4415,35 +4401,35 @@ var EntrySearchDragHandle = import_react44.css`
4415
4401
  transition: opacity var(--duration-fast) var(--timing-ease-out);
4416
4402
  opacity: 0;
4417
4403
  `;
4418
- var EntrySearchResultItemSubtitle = import_react44.css`
4404
+ var EntrySearchResultItemSubtitle = import_react43.css`
4419
4405
  color: var(--gray-500);
4420
4406
  display: block;
4421
4407
  font-size: var(--fs-xs);
4422
4408
  line-height: 1;
4423
4409
  `;
4424
- var EntrySearchResultItemTitle = import_react44.css`
4410
+ var EntrySearchResultItemTitle = import_react43.css`
4425
4411
  align-items: center;
4426
4412
  color: var(--brand-secondary-1);
4427
4413
  display: flex;
4428
4414
  gap: var(--spacing-xs);
4429
4415
  `;
4430
- var EntrySearchResultItemTimeStamp = import_react44.css`
4416
+ var EntrySearchResultItemTimeStamp = import_react43.css`
4431
4417
  color: var(--gray-500);
4432
4418
  font-size: var(--fs-xs);
4433
4419
  `;
4434
- var EntrySearchAuthorStateGroup = import_react44.css`
4420
+ var EntrySearchAuthorStateGroup = import_react43.css`
4435
4421
  align-items: center;
4436
4422
  display: flex;
4437
4423
  gap: var(--spacing-sm);
4438
4424
  `;
4439
- var EntrySearchUpdateGroup = import_react44.css`
4425
+ var EntrySearchUpdateGroup = import_react43.css`
4440
4426
  display: grid;
4441
4427
  `;
4442
- var EntrySearchContentContainer = import_react44.css`
4428
+ var EntrySearchContentContainer = import_react43.css`
4443
4429
  display: flex;
4444
4430
  gap: var(--spacing-base);
4445
4431
  `;
4446
- var EntrySearchImage = import_react44.css`
4432
+ var EntrySearchImage = import_react43.css`
4447
4433
  width: 56px;
4448
4434
  object-fit: contain;
4449
4435
  `;
@@ -4507,9 +4493,9 @@ var EntrySearchResultItem = ({
4507
4493
  };
4508
4494
 
4509
4495
  // src/components/EntrySearch/styles/EntrySearchResultItemButton.styles.ts
4510
- var import_react45 = require("@emotion/react");
4496
+ var import_react44 = require("@emotion/react");
4511
4497
  var import_design_system29 = require("@uniformdev/design-system");
4512
- var ButtonStyles = import_react45.css`
4498
+ var ButtonStyles = import_react44.css`
4513
4499
  ${import_design_system29.button}
4514
4500
  background: transparent;
4515
4501
  border: 1px solid var(--brand-secondary-1);
@@ -4536,7 +4522,7 @@ var ButtonStyles = import_react45.css`
4536
4522
  text-decoration: none;
4537
4523
  }
4538
4524
  `;
4539
- var ButtonIcon = import_react45.css`
4525
+ var ButtonIcon = import_react44.css`
4540
4526
  width: 1rem;
4541
4527
  height: 1rem;
4542
4528
  `;
@@ -4569,19 +4555,27 @@ var import_design_system30 = require("@uniformdev/design-system");
4569
4555
  var import_react_beautiful_dnd3 = require("react-beautiful-dnd");
4570
4556
 
4571
4557
  // src/components/EntrySearch/styles/EntrySearchResultList.styles.ts
4572
- var import_react46 = require("@emotion/react");
4573
- var EntrySearchResultListContainer = import_react46.css`
4558
+ var import_react45 = require("@emotion/react");
4559
+ var EntrySearchResultListContainer = import_react45.css`
4574
4560
  align-items: center;
4575
4561
  display: flex;
4576
4562
  gap: var(--spacing-sm);
4577
4563
  justify-content: space-between;
4578
4564
  `;
4579
- var EntrySearchResultListCounterContainer = import_react46.css`
4565
+ var EntrySearchDragContainer = import_react45.css`
4566
+ margin: 0 0 var(--spacing-sm);
4567
+
4568
+ // &[data-dragging='true'] {
4569
+ // left: auto !important;
4570
+ // top: auto !important;
4571
+ // }
4572
+ `;
4573
+ var EntrySearchResultListCounterContainer = import_react45.css`
4580
4574
  align-items: center;
4581
4575
  display: flex;
4582
4576
  gap: var(--spacing-sm);
4583
4577
  `;
4584
- var EntrySearchResultListTitle = import_react46.css`
4578
+ var EntrySearchResultListTitle = import_react45.css`
4585
4579
  font-weight: var(--fw-bold);
4586
4580
  line-height: 1;
4587
4581
  `;
@@ -4595,6 +4589,7 @@ var EntrySearchResultList = ({
4595
4589
  hideRemoveButton = false,
4596
4590
  additionalButtons,
4597
4591
  renderResultComponent = (value) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(EntrySearchResultItem, { ...value, disableDnD }),
4592
+ multiSelectId,
4598
4593
  disableDnD = false
4599
4594
  }) => {
4600
4595
  const { selectedListItems, onRemoveAllSelectedItems, onSelectItem } = useEntrySearchContext();
@@ -4633,29 +4628,21 @@ var EntrySearchResultList = ({
4633
4628
  )
4634
4629
  ] })
4635
4630
  ] }),
4636
- !selectedListItems.length ? null : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react_beautiful_dnd3.DragDropContext, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react_beautiful_dnd3.Droppable, { droppableId: "canvas-multi-select", children: (provided) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { ...provided.droppableProps, ref: provided.innerRef, children: [
4637
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_design_system30.VerticalRhythm, { gap: "sm", children: selectedListItems.map((item, i) => {
4631
+ !selectedListItems.length ? null : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react_beautiful_dnd3.DragDropContext, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react_beautiful_dnd3.Droppable, { droppableId: multiSelectId != null ? multiSelectId : "canvas-multi-select", children: (provided) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { ...provided.droppableProps, ref: provided.innerRef, children: [
4632
+ selectedListItems.map((item, i) => {
4638
4633
  const renderListItem = renderResultComponent(item);
4639
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4640
- import_react_beautiful_dnd3.Draggable,
4634
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react_beautiful_dnd3.Draggable, { draggableId: item.id, index: i, isDragDisabled: disableDnD, children: (provided2, snapshot) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4635
+ "div",
4641
4636
  {
4642
- draggableId: item.title,
4643
- index: i,
4644
- isDragDisabled: disableDnD,
4645
- children: (provided2, snapshot) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4646
- "div",
4647
- {
4648
- ref: provided2.innerRef,
4649
- "data-dragging": snapshot.isDragging,
4650
- ...provided2.draggableProps,
4651
- ...provided2.dragHandleProps,
4652
- children: renderListItem
4653
- }
4654
- )
4655
- },
4656
- item.title
4657
- );
4658
- }) }),
4637
+ css: EntrySearchDragContainer,
4638
+ ref: provided2.innerRef,
4639
+ "data-dragging": snapshot.isDragging,
4640
+ ...provided2.draggableProps,
4641
+ ...provided2.dragHandleProps,
4642
+ children: renderListItem
4643
+ }
4644
+ ) }, item.id);
4645
+ }),
4659
4646
  provided.placeholder
4660
4647
  ] }) }) })
4661
4648
  ] });
@@ -4663,7 +4650,7 @@ var EntrySearchResultList = ({
4663
4650
 
4664
4651
  // src/components/EntrySearch/QueryFilter.tsx
4665
4652
  var import_design_system31 = require("@uniformdev/design-system");
4666
- var import_react47 = require("react");
4653
+ var import_react46 = require("react");
4667
4654
  var import_jsx_runtime53 = require("@emotion/react/jsx-runtime");
4668
4655
  var QueryFilter = ({
4669
4656
  requireContentType,
@@ -4694,7 +4681,7 @@ var QueryFilter = ({
4694
4681
  }) => {
4695
4682
  var _a, _b;
4696
4683
  const { query, onSetQuery } = useEntrySearchContext();
4697
- const [queryState, setQueryState] = (0, import_react47.useState)({
4684
+ const [queryState, setQueryState] = (0, import_react46.useState)({
4698
4685
  contentType: "",
4699
4686
  keyword: "",
4700
4687
  count: countValue != null ? countValue : 5,
@@ -4705,7 +4692,7 @@ var QueryFilter = ({
4705
4692
  setQueryState((prev) => ({ ...prev, ...value }));
4706
4693
  onSetQuery({ ...query, ...value });
4707
4694
  };
4708
- (0, import_react47.useEffect)(() => {
4695
+ (0, import_react46.useEffect)(() => {
4709
4696
  onSetQuery(queryState);
4710
4697
  }, [onSetQuery, queryState]);
4711
4698
  return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("fieldset", { children: [
@@ -4794,12 +4781,12 @@ var import_design_system32 = require("@uniformdev/design-system");
4794
4781
 
4795
4782
  // src/hooks/useInitializeUniformMeshSdk.ts
4796
4783
  var import_mesh_sdk = require("@uniformdev/mesh-sdk");
4797
- var import_react48 = require("react");
4784
+ var import_react47 = require("react");
4798
4785
  var useInitializeUniformMeshSdk = ({ autoResizingDisabled } = {}) => {
4799
- const [error, setError] = (0, import_react48.useState)();
4800
- const [sdk, setSdk] = (0, import_react48.useState)();
4801
- const initializationInProgress = (0, import_react48.useRef)(false);
4802
- (0, import_react48.useEffect)(
4786
+ const [error, setError] = (0, import_react47.useState)();
4787
+ const [sdk, setSdk] = (0, import_react47.useState)();
4788
+ const initializationInProgress = (0, import_react47.useRef)(false);
4789
+ (0, import_react47.useEffect)(
4803
4790
  () => {
4804
4791
  if (typeof window === "undefined" || sdk) {
4805
4792
  return;
package/dist/index.mjs CHANGED
@@ -3919,35 +3919,15 @@ var DataRefreshButton = ({
3919
3919
  };
3920
3920
 
3921
3921
  // src/components/EntrySearch/EntrySearchContainer.tsx
3922
- import { Button as Button4, Container, IconsProvider, ScrollableList, VerticalRhythm } from "@uniformdev/design-system";
3923
-
3924
- // src/components/EntrySearch/styles/EntrySearchContainer.styles.ts
3925
- import { css as css26 } from "@emotion/react";
3926
- var EntrySearchBtnGroup = css26`
3927
- align-items: center;
3928
- display: flex;
3929
- gap: var(--spacing-sm);
3930
- `;
3931
-
3932
- // src/components/EntrySearch/EntrySearchContainer.tsx
3922
+ import { Container, IconsProvider, ScrollableList, VerticalRhythm } from "@uniformdev/design-system";
3933
3923
  import { jsx as jsx45, jsxs as jsxs26 } from "@emotion/react/jsx-runtime";
3934
- var EntrySearchContainer = ({
3935
- searchFilters,
3936
- resultList,
3937
- onSave,
3938
- onCancel,
3939
- children
3940
- }) => {
3924
+ var EntrySearchContainer = ({ searchFilters, resultList, children }) => {
3941
3925
  return /* @__PURE__ */ jsx45(IconsProvider, { children: /* @__PURE__ */ jsxs26(VerticalRhythm, { children: [
3942
3926
  /* @__PURE__ */ jsx45(Container, { backgroundColor: "gray-50", padding: "var(--spacing-base)", border: true, children: /* @__PURE__ */ jsxs26(VerticalRhythm, { children: [
3943
3927
  searchFilters,
3944
3928
  !resultList ? null : /* @__PURE__ */ jsx45(ScrollableList, { role: "list", children: resultList })
3945
3929
  ] }) }),
3946
- children,
3947
- !onSave && !onCancel ? null : /* @__PURE__ */ jsxs26("div", { css: EntrySearchBtnGroup, children: [
3948
- !onSave ? null : /* @__PURE__ */ jsx45(Button4, { buttonType: "primary", onClick: onSave, children: "Save" }),
3949
- !onCancel ? null : /* @__PURE__ */ jsx45(Button4, { buttonType: "ghostDestructive", onClick: onCancel, children: "Cancel" })
3950
- ] })
3930
+ children
3951
3931
  ] }) });
3952
3932
  };
3953
3933
 
@@ -3984,7 +3964,13 @@ var EntrySearchProvider = ({ currentlySelectedItems, children }) => {
3984
3964
  const [list, setList] = useState9({});
3985
3965
  const onSetQuery = useCallback(
3986
3966
  (value) => {
3987
- setQuery(value);
3967
+ if (Array.isArray(value.contentType) && value.contentType.length > 0) {
3968
+ return setQuery({
3969
+ ...value,
3970
+ contentType: value.contentType[0].id
3971
+ });
3972
+ }
3973
+ return setQuery(value);
3988
3974
  },
3989
3975
  [setQuery]
3990
3976
  );
@@ -4033,8 +4019,8 @@ var useEntrySearchContext = () => {
4033
4019
  };
4034
4020
 
4035
4021
  // src/components/EntrySearch/styles/EntrySearchFilterContainer.styles.ts
4036
- import { css as css27 } from "@emotion/react";
4037
- var EntrySearchFilterContainerLabel = css27`
4022
+ import { css as css26 } from "@emotion/react";
4023
+ var EntrySearchFilterContainerLabel = css26`
4038
4024
  align-items: center;
4039
4025
  display: flex;
4040
4026
  font-size: var(--fs-sm);
@@ -4042,14 +4028,14 @@ var EntrySearchFilterContainerLabel = css27`
4042
4028
  line-height: 1rem;
4043
4029
  margin-bottom: var(--spacing-sm);
4044
4030
  `;
4045
- var EntrySearchFilterContainer = css27`
4031
+ var EntrySearchFilterContainer = css26`
4046
4032
  display: grid;
4047
4033
  gap: var(--spacing-base);
4048
4034
  `;
4049
- var EntrySearchFilterDropdownAndTextSearch = css27`
4035
+ var EntrySearchFilterDropdownAndTextSearch = css26`
4050
4036
  grid-template-columns: 0.5fr 1fr;
4051
4037
  `;
4052
- var EntrySearchFilterGrid = (gridColumns) => css27`
4038
+ var EntrySearchFilterGrid = (gridColumns) => css26`
4053
4039
  display: grid;
4054
4040
  grid-template-columns: ${gridColumns};
4055
4041
  gap: var(--spacing-base);
@@ -4067,7 +4053,7 @@ var EntrySearchFilter = ({
4067
4053
  }) => {
4068
4054
  const { query, onSetQuery } = useEntrySearchContext();
4069
4055
  const [searchState, setSearchState] = useState10({
4070
- contentType: "any",
4056
+ contentType: "",
4071
4057
  keyword: ""
4072
4058
  });
4073
4059
  const handleFilterChange = (value) => {
@@ -4090,7 +4076,7 @@ var EntrySearchFilter = ({
4090
4076
  return { name: option == null ? void 0 : option.name, label: (_a = option.label) != null ? _a : option == null ? void 0 : option.name, id: option.id };
4091
4077
  }) : []
4092
4078
  ],
4093
- value: searchState.contentType
4079
+ value: query.contentType
4094
4080
  }
4095
4081
  ),
4096
4082
  /* @__PURE__ */ jsx47(
@@ -4120,9 +4106,9 @@ var EntrySearchFilterContainer2 = ({ label, children }) => {
4120
4106
  import { Popover } from "@uniformdev/design-system";
4121
4107
 
4122
4108
  // src/components/EntrySearch/styles/EntrySearchListItem.styles.ts
4123
- import { css as css28 } from "@emotion/react";
4109
+ import { css as css27 } from "@emotion/react";
4124
4110
  import { skeletonLoading } from "@uniformdev/design-system";
4125
- var EntryListItemContainer = css28`
4111
+ var EntryListItemContainer = css27`
4126
4112
  align-items: center;
4127
4113
  border: 1px solid var(--gray-300);
4128
4114
  border-radius: var(--rounded-base);
@@ -4135,7 +4121,7 @@ var EntryListItemContainer = css28`
4135
4121
  display: none;
4136
4122
  }
4137
4123
  `;
4138
- var EntryListItemLoading = css28`
4124
+ var EntryListItemLoading = css27`
4139
4125
  animation: ${skeletonLoading} 1s linear infinite alternate;
4140
4126
  border-color: transparent;
4141
4127
  min-height: 42px;
@@ -4159,31 +4145,31 @@ var EntryListItemLoading = css28`
4159
4145
  width: 1rem;
4160
4146
  }
4161
4147
  `;
4162
- var EntryListItemHeadingGroup = css28`
4148
+ var EntryListItemHeadingGroup = css27`
4163
4149
  align-items: center;
4164
4150
  display: grid;
4165
4151
  `;
4166
- var EntryListItemTitle = css28`
4152
+ var EntryListItemTitle = css27`
4167
4153
  color: var(--brand-secondary-1);
4168
4154
  display: block;
4169
4155
  font-size: var(--fs-sm);
4170
4156
  `;
4171
- var EntryListItemSubtitle = css28`
4157
+ var EntryListItemSubtitle = css27`
4172
4158
  color: var(--gray-500);
4173
4159
  display: block;
4174
4160
  font-size: var(--fs-xs);
4175
4161
  line-height: 1;
4176
4162
  `;
4177
- var EntryListItemInfoContainer = css28`
4163
+ var EntryListItemInfoContainer = css27`
4178
4164
  align-items: center;
4179
4165
  display: flex;
4180
4166
  justify-content: center;
4181
4167
  `;
4182
- var EntryListItemControlledContent = css28`
4168
+ var EntryListItemControlledContent = css27`
4183
4169
  display: flex;
4184
4170
  gap: var(--spacing-sm);
4185
4171
  `;
4186
- var EntryListItemUnControlledContent = css28`
4172
+ var EntryListItemUnControlledContent = css27`
4187
4173
  margin-top: var(--spacing-sm);
4188
4174
  grid-column: 1 / -1;
4189
4175
  `;
@@ -4230,12 +4216,12 @@ var EntrySearchListItemLoadingSkeleton = () => {
4230
4216
  };
4231
4217
 
4232
4218
  // src/components/EntrySearch/EntrySearchResultItem.tsx
4233
- import { Badge, Button as Button5, Popover as Popover2 } from "@uniformdev/design-system";
4219
+ import { Badge, Button as Button4, Popover as Popover2 } from "@uniformdev/design-system";
4234
4220
  import { format as timeagoFormat } from "timeago.js";
4235
4221
 
4236
4222
  // src/components/EntrySearch/styles/EntrySearchResultItem.styles.ts
4237
- import { css as css29 } from "@emotion/react";
4238
- var EntrySearchResultItemContainer = css29`
4223
+ import { css as css28 } from "@emotion/react";
4224
+ var EntrySearchResultItemContainer = css28`
4239
4225
  align-items: center;
4240
4226
  border: 1px solid var(--gray-300);
4241
4227
  border-radius: var(--rounded-base);
@@ -4251,7 +4237,7 @@ var EntrySearchResultItemContainer = css29`
4251
4237
  }
4252
4238
  }
4253
4239
  `;
4254
- var EntrySearchDragHandle = css29`
4240
+ var EntrySearchDragHandle = css28`
4255
4241
  border-left: 2px dotted var(--gray-300);
4256
4242
  border-right: 2px dotted var(--gray-300);
4257
4243
  position: absolute;
@@ -4260,35 +4246,35 @@ var EntrySearchDragHandle = css29`
4260
4246
  transition: opacity var(--duration-fast) var(--timing-ease-out);
4261
4247
  opacity: 0;
4262
4248
  `;
4263
- var EntrySearchResultItemSubtitle = css29`
4249
+ var EntrySearchResultItemSubtitle = css28`
4264
4250
  color: var(--gray-500);
4265
4251
  display: block;
4266
4252
  font-size: var(--fs-xs);
4267
4253
  line-height: 1;
4268
4254
  `;
4269
- var EntrySearchResultItemTitle = css29`
4255
+ var EntrySearchResultItemTitle = css28`
4270
4256
  align-items: center;
4271
4257
  color: var(--brand-secondary-1);
4272
4258
  display: flex;
4273
4259
  gap: var(--spacing-xs);
4274
4260
  `;
4275
- var EntrySearchResultItemTimeStamp = css29`
4261
+ var EntrySearchResultItemTimeStamp = css28`
4276
4262
  color: var(--gray-500);
4277
4263
  font-size: var(--fs-xs);
4278
4264
  `;
4279
- var EntrySearchAuthorStateGroup = css29`
4265
+ var EntrySearchAuthorStateGroup = css28`
4280
4266
  align-items: center;
4281
4267
  display: flex;
4282
4268
  gap: var(--spacing-sm);
4283
4269
  `;
4284
- var EntrySearchUpdateGroup = css29`
4270
+ var EntrySearchUpdateGroup = css28`
4285
4271
  display: grid;
4286
4272
  `;
4287
- var EntrySearchContentContainer = css29`
4273
+ var EntrySearchContentContainer = css28`
4288
4274
  display: flex;
4289
4275
  gap: var(--spacing-base);
4290
4276
  `;
4291
- var EntrySearchImage = css29`
4277
+ var EntrySearchImage = css28`
4292
4278
  width: 56px;
4293
4279
  object-fit: contain;
4294
4280
  `;
@@ -4346,15 +4332,15 @@ var EntrySearchResultItem = ({
4346
4332
  ] }) }),
4347
4333
  !editLink && hideRemoveButton ? null : /* @__PURE__ */ jsxs30("div", { css: EntrySearchAuthorStateGroup, children: [
4348
4334
  !editLink ? null : /* @__PURE__ */ jsx50(LinkButton, { text: "Edit", href: editLink, icon: editLinkIcon }),
4349
- hideRemoveButton ? null : /* @__PURE__ */ jsx50(Button5, { buttonType: "ghostDestructive", onClick: onRemoveItem, children: "Remove" })
4335
+ hideRemoveButton ? null : /* @__PURE__ */ jsx50(Button4, { buttonType: "ghostDestructive", onClick: onRemoveItem, children: "Remove" })
4350
4336
  ] })
4351
4337
  ] });
4352
4338
  };
4353
4339
 
4354
4340
  // src/components/EntrySearch/styles/EntrySearchResultItemButton.styles.ts
4355
- import { css as css30 } from "@emotion/react";
4341
+ import { css as css29 } from "@emotion/react";
4356
4342
  import { button as button2 } from "@uniformdev/design-system";
4357
- var ButtonStyles = css30`
4343
+ var ButtonStyles = css29`
4358
4344
  ${button2}
4359
4345
  background: transparent;
4360
4346
  border: 1px solid var(--brand-secondary-1);
@@ -4381,7 +4367,7 @@ var ButtonStyles = css30`
4381
4367
  text-decoration: none;
4382
4368
  }
4383
4369
  `;
4384
- var ButtonIcon = css30`
4370
+ var ButtonIcon = css29`
4385
4371
  width: 1rem;
4386
4372
  height: 1rem;
4387
4373
  `;
@@ -4410,23 +4396,31 @@ var LinkButton = ({
4410
4396
  };
4411
4397
 
4412
4398
  // src/components/EntrySearch/EntrySearchResultList.tsx
4413
- import { Button as Button6, Counter, VerticalRhythm as VerticalRhythm2 } from "@uniformdev/design-system";
4399
+ import { Button as Button5, Counter } from "@uniformdev/design-system";
4414
4400
  import { DragDropContext as DragDropContext3, Draggable as Draggable3, Droppable as Droppable3 } from "react-beautiful-dnd";
4415
4401
 
4416
4402
  // src/components/EntrySearch/styles/EntrySearchResultList.styles.ts
4417
- import { css as css31 } from "@emotion/react";
4418
- var EntrySearchResultListContainer = css31`
4403
+ import { css as css30 } from "@emotion/react";
4404
+ var EntrySearchResultListContainer = css30`
4419
4405
  align-items: center;
4420
4406
  display: flex;
4421
4407
  gap: var(--spacing-sm);
4422
4408
  justify-content: space-between;
4423
4409
  `;
4424
- var EntrySearchResultListCounterContainer = css31`
4410
+ var EntrySearchDragContainer = css30`
4411
+ margin: 0 0 var(--spacing-sm);
4412
+
4413
+ // &[data-dragging='true'] {
4414
+ // left: auto !important;
4415
+ // top: auto !important;
4416
+ // }
4417
+ `;
4418
+ var EntrySearchResultListCounterContainer = css30`
4425
4419
  align-items: center;
4426
4420
  display: flex;
4427
4421
  gap: var(--spacing-sm);
4428
4422
  `;
4429
- var EntrySearchResultListTitle = css31`
4423
+ var EntrySearchResultListTitle = css30`
4430
4424
  font-weight: var(--fw-bold);
4431
4425
  line-height: 1;
4432
4426
  `;
@@ -4440,6 +4434,7 @@ var EntrySearchResultList = ({
4440
4434
  hideRemoveButton = false,
4441
4435
  additionalButtons,
4442
4436
  renderResultComponent = (value) => /* @__PURE__ */ jsx52(EntrySearchResultItem, { ...value, disableDnD }),
4437
+ multiSelectId,
4443
4438
  disableDnD = false
4444
4439
  }) => {
4445
4440
  const { selectedListItems, onRemoveAllSelectedItems, onSelectItem } = useEntrySearchContext();
@@ -4467,7 +4462,7 @@ var EntrySearchResultList = ({
4467
4462
  /* @__PURE__ */ jsxs32("div", { css: EntrySearchResultListCounterContainer, children: [
4468
4463
  additionalButtons,
4469
4464
  hideRemoveButton ? null : /* @__PURE__ */ jsx52(
4470
- Button6,
4465
+ Button5,
4471
4466
  {
4472
4467
  buttonType: "ghostDestructive",
4473
4468
  size: "xs",
@@ -4478,29 +4473,21 @@ var EntrySearchResultList = ({
4478
4473
  )
4479
4474
  ] })
4480
4475
  ] }),
4481
- !selectedListItems.length ? null : /* @__PURE__ */ jsx52(DragDropContext3, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ jsx52(Droppable3, { droppableId: "canvas-multi-select", children: (provided) => /* @__PURE__ */ jsxs32("div", { ...provided.droppableProps, ref: provided.innerRef, children: [
4482
- /* @__PURE__ */ jsx52(VerticalRhythm2, { gap: "sm", children: selectedListItems.map((item, i) => {
4476
+ !selectedListItems.length ? null : /* @__PURE__ */ jsx52(DragDropContext3, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ jsx52(Droppable3, { droppableId: multiSelectId != null ? multiSelectId : "canvas-multi-select", children: (provided) => /* @__PURE__ */ jsxs32("div", { ...provided.droppableProps, ref: provided.innerRef, children: [
4477
+ selectedListItems.map((item, i) => {
4483
4478
  const renderListItem = renderResultComponent(item);
4484
- return /* @__PURE__ */ jsx52(
4485
- Draggable3,
4479
+ return /* @__PURE__ */ jsx52(Draggable3, { draggableId: item.id, index: i, isDragDisabled: disableDnD, children: (provided2, snapshot) => /* @__PURE__ */ jsx52(
4480
+ "div",
4486
4481
  {
4487
- draggableId: item.title,
4488
- index: i,
4489
- isDragDisabled: disableDnD,
4490
- children: (provided2, snapshot) => /* @__PURE__ */ jsx52(
4491
- "div",
4492
- {
4493
- ref: provided2.innerRef,
4494
- "data-dragging": snapshot.isDragging,
4495
- ...provided2.draggableProps,
4496
- ...provided2.dragHandleProps,
4497
- children: renderListItem
4498
- }
4499
- )
4500
- },
4501
- item.title
4502
- );
4503
- }) }),
4482
+ css: EntrySearchDragContainer,
4483
+ ref: provided2.innerRef,
4484
+ "data-dragging": snapshot.isDragging,
4485
+ ...provided2.draggableProps,
4486
+ ...provided2.dragHandleProps,
4487
+ children: renderListItem
4488
+ }
4489
+ ) }, item.id);
4490
+ }),
4504
4491
  provided.placeholder
4505
4492
  ] }) }) })
4506
4493
  ] });
@@ -4721,7 +4708,7 @@ function createLocationValidator(setValue, validate) {
4721
4708
  // src/index.ts
4722
4709
  import {
4723
4710
  AddListButton as AddListButton2,
4724
- Button as Button7,
4711
+ Button as Button6,
4725
4712
  Callout as Callout4,
4726
4713
  Heading,
4727
4714
  Input as Input8,
@@ -4758,7 +4745,7 @@ import {
4758
4745
  export * from "@uniformdev/mesh-sdk";
4759
4746
  export {
4760
4747
  AddListButton2 as AddListButton,
4761
- Button7 as Button,
4748
+ Button6 as Button,
4762
4749
  Callout4 as Callout,
4763
4750
  DamSelectedItem,
4764
4751
  DataRefreshButton,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/mesh-sdk-react",
3
- "version": "18.31.1-alpha.22+342a682db",
3
+ "version": "18.32.1-alpha.26+371f15eeb",
4
4
  "description": "Uniform Mesh Framework SDK for React",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -43,8 +43,8 @@
43
43
  "document": "api-extractor run --local"
44
44
  },
45
45
  "dependencies": {
46
- "@uniformdev/design-system": "18.31.1-alpha.22+342a682db",
47
- "@uniformdev/mesh-sdk": "18.31.1-alpha.22+342a682db",
46
+ "@uniformdev/design-system": "18.32.1-alpha.26+371f15eeb",
47
+ "@uniformdev/mesh-sdk": "18.32.1-alpha.26+371f15eeb",
48
48
  "formik": "^2.2.9",
49
49
  "react-beautiful-dnd": "13.1.1",
50
50
  "react-icons": "4.8.0",
@@ -73,5 +73,5 @@
73
73
  "publishConfig": {
74
74
  "access": "public"
75
75
  },
76
- "gitHead": "342a682dbc05a6b97b4d529b7604daa62f7d1066"
76
+ "gitHead": "371f15eeb2def5acf3000d0e6efb6567c1ec3395"
77
77
  }