@medusajs/dashboard 2.22.1 → 2.22.2-preview-20261028132907
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/components.d.mts +53 -54
- package/dist/components.d.ts +53 -54
- package/dist/hooks.d.mts +7 -7
- package/dist/hooks.d.ts +7 -7
- package/dist/lib.d.mts +2 -2
- package/dist/lib.d.ts +2 -2
- package/package.json +13 -13
- package/src/components/inputs/combobox/__tests__/combobox.spec.tsx +6 -1
package/dist/components.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import React__default, { ReactNode, PropsWithChildren, ComponentPropsWithoutRef, ForwardRefExoticComponent, PropsWithoutRef, ComponentProps, RefAttributes, ElementRef } from 'react';
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import react__default, { ReactNode, PropsWithChildren, ComponentPropsWithoutRef, ForwardRefExoticComponent, PropsWithoutRef, ComponentProps, RefAttributes, ElementRef } from 'react';
|
|
4
3
|
import { L as LayoutControlSize, a as LayoutComponentProps } from './types-DYXLoDeW.mjs';
|
|
5
4
|
import { Layouts, SectionNameFor } from '@medusajs/admin-shared';
|
|
6
5
|
import { T as TableAdapter } from './table-adapters-DnG5KPvi.mjs';
|
|
@@ -24,7 +23,7 @@ type LayoutEntryProps = {
|
|
|
24
23
|
* component name is unstable (subject to rename or minification), ensuring
|
|
25
24
|
* any saved user preferences survive refactors.
|
|
26
25
|
*/
|
|
27
|
-
declare function LayoutEntry({ children }: LayoutEntryProps):
|
|
26
|
+
declare function LayoutEntry({ children }: LayoutEntryProps): react.JSX.Element;
|
|
28
27
|
declare namespace LayoutEntry {
|
|
29
28
|
var displayName: string;
|
|
30
29
|
}
|
|
@@ -100,7 +99,7 @@ interface ConfigurableDataTableProps<TData> {
|
|
|
100
99
|
layout?: "fill" | "auto";
|
|
101
100
|
actions?: DataTableActionProps$1[];
|
|
102
101
|
}
|
|
103
|
-
declare function ConfigurableDataTable<TData>({ adapter, heading, subHeading, pageSize: pageSizeProp, queryPrefix: queryPrefixProp, layout, actions, }: ConfigurableDataTableProps<TData>):
|
|
102
|
+
declare function ConfigurableDataTable<TData>({ adapter, heading, subHeading, pageSize: pageSizeProp, queryPrefix: queryPrefixProp, layout, actions, }: ConfigurableDataTableProps<TData>): react.JSX.Element;
|
|
104
103
|
|
|
105
104
|
type Action = {
|
|
106
105
|
icon: ReactNode;
|
|
@@ -124,30 +123,30 @@ type ActionMenuProps = PropsWithChildren<{
|
|
|
124
123
|
groups: ActionGroup[];
|
|
125
124
|
variant?: "transparent" | "primary";
|
|
126
125
|
}>;
|
|
127
|
-
declare const ActionMenu: ({ groups, variant, children, }: ActionMenuProps) =>
|
|
126
|
+
declare const ActionMenu: ({ groups, variant, children, }: ActionMenuProps) => react.JSX.Element;
|
|
128
127
|
|
|
129
128
|
type ConditionalTooltipProps = PropsWithChildren<ComponentPropsWithoutRef<typeof Tooltip> & {
|
|
130
129
|
showTooltip?: boolean;
|
|
131
130
|
}>;
|
|
132
|
-
declare const ConditionalTooltip: ({ children, showTooltip, ...props }: ConditionalTooltipProps) => string | number | boolean | Iterable<
|
|
131
|
+
declare const ConditionalTooltip: ({ children, showTooltip, ...props }: ConditionalTooltipProps) => string | number | boolean | Iterable<react.ReactNode> | react.JSX.Element | null | undefined;
|
|
133
132
|
|
|
134
133
|
type DisplayIdProps = {
|
|
135
134
|
id: string;
|
|
136
135
|
className?: string;
|
|
137
136
|
};
|
|
138
|
-
declare function DisplayId({ id, className }: DisplayIdProps):
|
|
137
|
+
declare function DisplayId({ id, className }: DisplayIdProps): react.JSX.Element;
|
|
139
138
|
|
|
140
|
-
declare const Form: (<TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>({ children, watch, getValues, getFieldState, setError, clearErrors, setValue, setValues, trigger, formState, resetField, reset, resetDefaultValues, handleSubmit, unregister, control, register, setFocus, subscribe, }: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) =>
|
|
141
|
-
Item:
|
|
142
|
-
Label:
|
|
139
|
+
declare const Form: (<TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>({ children, watch, getValues, getFieldState, setError, clearErrors, setValue, setValues, trigger, formState, resetField, reset, resetDefaultValues, handleSubmit, unregister, control, register, setFocus, subscribe, }: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => react__default.JSX.Element) & {
|
|
140
|
+
Item: react__default.ForwardRefExoticComponent<react__default.HTMLAttributes<HTMLDivElement> & react__default.RefAttributes<HTMLDivElement>>;
|
|
141
|
+
Label: react__default.ForwardRefExoticComponent<Omit<Label.LabelProps & react__default.RefAttributes<HTMLLabelElement>, "ref"> & {
|
|
143
142
|
optional?: boolean;
|
|
144
143
|
tooltip?: ReactNode;
|
|
145
144
|
icon?: ReactNode;
|
|
146
|
-
} &
|
|
147
|
-
Control:
|
|
148
|
-
Hint:
|
|
149
|
-
ErrorMessage:
|
|
150
|
-
Field: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) =>
|
|
145
|
+
} & react__default.RefAttributes<HTMLLabelElement>>;
|
|
146
|
+
Control: react__default.ForwardRefExoticComponent<Omit<Slot.SlotProps & react__default.RefAttributes<HTMLElement>, "ref"> & react__default.RefAttributes<HTMLElement>>;
|
|
147
|
+
Hint: react__default.ForwardRefExoticComponent<react__default.HTMLAttributes<HTMLParagraphElement> & react__default.RefAttributes<HTMLParagraphElement>>;
|
|
148
|
+
ErrorMessage: react__default.ForwardRefExoticComponent<react__default.HTMLAttributes<HTMLParagraphElement> & react__default.RefAttributes<HTMLParagraphElement>>;
|
|
149
|
+
Field: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => react__default.JSX.Element;
|
|
151
150
|
};
|
|
152
151
|
|
|
153
152
|
type IconAvatarProps = PropsWithChildren<{
|
|
@@ -160,27 +159,27 @@ type IconAvatarProps = PropsWithChildren<{
|
|
|
160
159
|
*
|
|
161
160
|
* The `<Avatar/>` component from `@medusajs/ui` does not support passing an icon as a child.
|
|
162
161
|
*/
|
|
163
|
-
declare const IconAvatar: ({ size, variant, children, className, }: IconAvatarProps) =>
|
|
162
|
+
declare const IconAvatar: ({ size, variant, children, className, }: IconAvatarProps) => react.JSX.Element;
|
|
164
163
|
|
|
165
164
|
type JsonViewSectionProps = {
|
|
166
165
|
data: object;
|
|
167
166
|
title?: string;
|
|
168
167
|
};
|
|
169
|
-
declare const JsonViewSection: ({ data }: JsonViewSectionProps) =>
|
|
168
|
+
declare const JsonViewSection: ({ data }: JsonViewSectionProps) => react.JSX.Element;
|
|
170
169
|
|
|
171
170
|
interface ListicleProps {
|
|
172
171
|
labelKey: string;
|
|
173
172
|
descriptionKey: string;
|
|
174
173
|
children?: ReactNode;
|
|
175
174
|
}
|
|
176
|
-
declare const Listicle: ({ labelKey, descriptionKey, children, }: ListicleProps) =>
|
|
175
|
+
declare const Listicle: ({ labelKey, descriptionKey, children, }: ListicleProps) => react.JSX.Element;
|
|
177
176
|
|
|
178
177
|
type NoResultsProps = {
|
|
179
178
|
title?: string;
|
|
180
179
|
message?: string;
|
|
181
180
|
className?: string;
|
|
182
181
|
};
|
|
183
|
-
declare const NoResults: ({ title, message, className }: NoResultsProps) =>
|
|
182
|
+
declare const NoResults: ({ title, message, className }: NoResultsProps) => react__default.JSX.Element;
|
|
184
183
|
type ActionProps = {
|
|
185
184
|
action?: {
|
|
186
185
|
to: string;
|
|
@@ -192,16 +191,16 @@ type NoRecordsProps = {
|
|
|
192
191
|
message?: string;
|
|
193
192
|
className?: string;
|
|
194
193
|
buttonVariant?: string;
|
|
195
|
-
icon?:
|
|
194
|
+
icon?: react__default.ReactNode;
|
|
196
195
|
} & ActionProps;
|
|
197
|
-
declare const NoRecords: ({ title, message, action, className, buttonVariant, icon, }: NoRecordsProps) =>
|
|
196
|
+
declare const NoRecords: ({ title, message, action, className, buttonVariant, icon, }: NoRecordsProps) => react__default.JSX.Element;
|
|
198
197
|
|
|
199
198
|
type SectionRowProps = {
|
|
200
199
|
title: string;
|
|
201
200
|
value?: ReactNode | string | null;
|
|
202
201
|
actions?: ReactNode;
|
|
203
202
|
};
|
|
204
|
-
declare const SectionRow: ({ title, value, actions }: SectionRowProps) =>
|
|
203
|
+
declare const SectionRow: ({ title, value, actions }: SectionRowProps) => react.JSX.Element;
|
|
205
204
|
|
|
206
205
|
interface SidebarLinkProps {
|
|
207
206
|
to: string;
|
|
@@ -209,19 +208,19 @@ interface SidebarLinkProps {
|
|
|
209
208
|
descriptionKey: string;
|
|
210
209
|
icon: ReactNode;
|
|
211
210
|
}
|
|
212
|
-
declare const SidebarLink: ({ to, labelKey, descriptionKey, icon, }: SidebarLinkProps) =>
|
|
211
|
+
declare const SidebarLink: ({ to, labelKey, descriptionKey, icon, }: SidebarLinkProps) => react.JSX.Element;
|
|
213
212
|
|
|
214
213
|
type ThumbnailProps = {
|
|
215
214
|
src?: string | null;
|
|
216
215
|
alt?: string;
|
|
217
216
|
size?: "small" | "base";
|
|
218
217
|
};
|
|
219
|
-
declare const Thumbnail: ({ src, alt, size }: ThumbnailProps) =>
|
|
218
|
+
declare const Thumbnail: ({ src, alt, size }: ThumbnailProps) => react.JSX.Element;
|
|
220
219
|
|
|
221
220
|
/**
|
|
222
221
|
* A form that can only be submitted when using the meta or control key.
|
|
223
222
|
*/
|
|
224
|
-
declare const KeyboundForm:
|
|
223
|
+
declare const KeyboundForm: react__default.ForwardRefExoticComponent<react__default.FormHTMLAttributes<HTMLFormElement> & react__default.RefAttributes<HTMLFormElement>>;
|
|
225
224
|
|
|
226
225
|
type ComboboxOption = {
|
|
227
226
|
value: string;
|
|
@@ -244,15 +243,15 @@ interface ComboboxProps<T extends Value = Value> extends Omit<ComponentPropsWith
|
|
|
244
243
|
forceHideInput?: boolean;
|
|
245
244
|
displayMode?: "count" | "chips";
|
|
246
245
|
}
|
|
247
|
-
declare const Combobox: <T extends Value = string>(props: ComboboxProps<T> &
|
|
246
|
+
declare const Combobox: <T extends Value = string>(props: ComboboxProps<T> & react.RefAttributes<HTMLInputElement>) => ReactNode;
|
|
248
247
|
|
|
249
|
-
declare const CountrySelect:
|
|
248
|
+
declare const CountrySelect: react.ForwardRefExoticComponent<Omit<Omit<ComboboxProps<Value> & react.RefAttributes<HTMLInputElement>, "ref">, "value" | "options" | "onChange" | "multiple"> & {
|
|
250
249
|
placeholder?: string;
|
|
251
250
|
defaultValue?: string;
|
|
252
251
|
allowClear?: boolean;
|
|
253
252
|
value?: string;
|
|
254
253
|
onChange?: (value: string | undefined) => void;
|
|
255
|
-
} &
|
|
254
|
+
} & react.RefAttributes<HTMLInputElement>>;
|
|
256
255
|
|
|
257
256
|
type HandleInputProps = ComponentProps<typeof Input>;
|
|
258
257
|
declare const HandleInput: ForwardRefExoticComponent<PropsWithoutRef<HandleInputProps> & RefAttributes<ElementRef<typeof Input>>>;
|
|
@@ -321,9 +320,9 @@ interface DataTableProps<TData> {
|
|
|
321
320
|
visible: string[];
|
|
322
321
|
order: string[];
|
|
323
322
|
};
|
|
324
|
-
filterBarContent?:
|
|
323
|
+
filterBarContent?: react__default.ReactNode;
|
|
325
324
|
}
|
|
326
|
-
declare const DataTable: <TData>({ data, columns, filters, commands, action, actions, actionMenu, getRowId, rowCount, enablePagination, enableSearch, autoFocusSearch, rowHref, heading, headingLevel, subHeading, prefix, pageSize, emptyState, rowSelection, isLoading, layout, enableColumnVisibility, initialColumnVisibility, onColumnVisibilityChange, columnOrder, onColumnOrderChange, enableViewSelector, entity, currentColumns, filterBarContent, }: DataTableProps<TData>) =>
|
|
325
|
+
declare const DataTable: <TData>({ data, columns, filters, commands, action, actions, actionMenu, getRowId, rowCount, enablePagination, enableSearch, autoFocusSearch, rowHref, heading, headingLevel, subHeading, prefix, pageSize, emptyState, rowSelection, isLoading, layout, enableColumnVisibility, initialColumnVisibility, onColumnVisibilityChange, columnOrder, onColumnOrderChange, enableViewSelector, entity, currentColumns, filterBarContent, }: DataTableProps<TData>) => react__default.JSX.Element;
|
|
327
326
|
|
|
328
327
|
type DataGridColumnType = "text" | "multiline-text" | "number" | "boolean" | "togglable-number";
|
|
329
328
|
interface DataGridCellProps<TData = unknown, TValue = any> {
|
|
@@ -371,27 +370,27 @@ interface DataGridRootProps<TData, TFieldValues extends FieldValues = FieldValue
|
|
|
371
370
|
interface DataGridProps<TData, TFieldValues extends FieldValues = FieldValues> extends DataGridRootProps<TData, TFieldValues> {
|
|
372
371
|
isLoading?: boolean;
|
|
373
372
|
}
|
|
374
|
-
declare const DataGrid: (<TData, TFieldValues extends FieldValues = FieldValues>({ isLoading, totalRowCount, onFetchMore, isFetchingMore, hasNextPage, ...props }: DataGridProps<TData, TFieldValues>) =>
|
|
373
|
+
declare const DataGrid: (<TData, TFieldValues extends FieldValues = FieldValues>({ isLoading, totalRowCount, onFetchMore, isFetchingMore, hasNextPage, ...props }: DataGridProps<TData, TFieldValues>) => react.JSX.Element) & {
|
|
375
374
|
BooleanCell: <TData, TValue = any>({ context, disabled, }: DataGridCellProps<TData, TValue> & {
|
|
376
375
|
disabled?: boolean;
|
|
377
|
-
}) =>
|
|
378
|
-
TextCell: <TData, TValue = any>({ context, }: DataGridCellProps<TData, TValue>) =>
|
|
379
|
-
MultilineCell: <TData, TValue = any>({ context, }: DataGridCellProps<TData, TValue>) =>
|
|
376
|
+
}) => react.JSX.Element;
|
|
377
|
+
TextCell: <TData, TValue = any>({ context, }: DataGridCellProps<TData, TValue>) => react.JSX.Element;
|
|
378
|
+
MultilineCell: <TData, TValue = any>({ context, }: DataGridCellProps<TData, TValue>) => react.JSX.Element;
|
|
380
379
|
ExpandableTextCell: <TData, TValue = any>({ context, fieldLabel, }: DataGridCellProps<TData, TValue> & {
|
|
381
380
|
fieldLabel?: string;
|
|
382
|
-
}) =>
|
|
381
|
+
}) => react.JSX.Element;
|
|
383
382
|
NumberCell: <TData, TValue = any>({ context, ...rest }: DataGridCellProps<TData, TValue> & {
|
|
384
383
|
min?: number;
|
|
385
384
|
max?: number;
|
|
386
385
|
placeholder?: string;
|
|
387
|
-
}) =>
|
|
388
|
-
CurrencyCell: <TData, TValue = any>({ context, code, }: DataGridCurrencyCellProps<TData, TValue>) =>
|
|
386
|
+
}) => react.JSX.Element;
|
|
387
|
+
CurrencyCell: <TData, TValue = any>({ context, code, }: DataGridCurrencyCellProps<TData, TValue>) => react.JSX.Element;
|
|
389
388
|
ReadonlyCell: <TData, TValue = any>({ context, color, children, isMultiLine, }: DataGridCellProps<TData, TValue> & {
|
|
390
|
-
children?:
|
|
389
|
+
children?: react.ReactNode | undefined;
|
|
391
390
|
} & {
|
|
392
391
|
color?: "muted" | "normal";
|
|
393
392
|
isMultiLine?: boolean;
|
|
394
|
-
}) =>
|
|
393
|
+
}) => react.JSX.Element;
|
|
395
394
|
};
|
|
396
395
|
|
|
397
396
|
type DataGridHelperColumnsProps<TData, TFieldValues extends FieldValues> = {
|
|
@@ -459,38 +458,38 @@ declare const createDataGridPriceColumns: <TData, TFieldValues extends FieldValu
|
|
|
459
458
|
type ProductCellProps = {
|
|
460
459
|
product: Pick<HttpTypes.AdminProduct, "thumbnail" | "title">;
|
|
461
460
|
};
|
|
462
|
-
declare const ProductCell: ({ product }: ProductCellProps) =>
|
|
463
|
-
declare const ProductHeader: () =>
|
|
461
|
+
declare const ProductCell: ({ product }: ProductCellProps) => react.JSX.Element;
|
|
462
|
+
declare const ProductHeader: () => react.JSX.Element;
|
|
464
463
|
|
|
465
464
|
type ProductStatusCellProps = {
|
|
466
465
|
status?: HttpTypes.AdminProductStatus;
|
|
467
466
|
};
|
|
468
|
-
declare const ProductStatusCell: ({ status }: ProductStatusCellProps) =>
|
|
469
|
-
declare const ProductStatusHeader: () =>
|
|
467
|
+
declare const ProductStatusCell: ({ status }: ProductStatusCellProps) => react.JSX.Element;
|
|
468
|
+
declare const ProductStatusHeader: () => react.JSX.Element;
|
|
470
469
|
|
|
471
470
|
type SalesChannelsCellProps = {
|
|
472
471
|
salesChannels?: SalesChannelDTO[] | null;
|
|
473
472
|
};
|
|
474
|
-
declare const SalesChannelsCell: ({ salesChannels, }: SalesChannelsCellProps) =>
|
|
475
|
-
declare const SalesChannelHeader: () =>
|
|
473
|
+
declare const SalesChannelsCell: ({ salesChannels, }: SalesChannelsCellProps) => react.JSX.Element;
|
|
474
|
+
declare const SalesChannelHeader: () => react.JSX.Element;
|
|
476
475
|
|
|
477
476
|
type VariantCellProps = {
|
|
478
477
|
variants?: HttpTypes.AdminProductVariant[] | null;
|
|
479
478
|
};
|
|
480
|
-
declare const VariantCell: ({ variants }: VariantCellProps) =>
|
|
481
|
-
declare const VariantHeader: () =>
|
|
479
|
+
declare const VariantCell: ({ variants }: VariantCellProps) => react.JSX.Element;
|
|
480
|
+
declare const VariantHeader: () => react.JSX.Element;
|
|
482
481
|
|
|
483
482
|
type RouteModalFormProps<TFieldValues extends FieldValues> = PropsWithChildren<{
|
|
484
483
|
form: UseFormReturn<TFieldValues>;
|
|
485
484
|
blockSearchParams?: boolean;
|
|
486
485
|
onClose?: (isSubmitSuccessful: boolean) => void;
|
|
487
486
|
}>;
|
|
488
|
-
declare const RouteModalForm: <TFieldValues extends FieldValues = any>({ form, blockSearchParams: blockSearch, children, onClose, }: RouteModalFormProps<TFieldValues>) =>
|
|
487
|
+
declare const RouteModalForm: <TFieldValues extends FieldValues = any>({ form, blockSearchParams: blockSearch, children, onClose, }: RouteModalFormProps<TFieldValues>) => react.JSX.Element;
|
|
489
488
|
|
|
490
489
|
type RouteDrawerProps = PropsWithChildren<{
|
|
491
490
|
prev?: string | Partial<Path> | number;
|
|
492
491
|
}>;
|
|
493
|
-
declare const Root$3: ({ prev, children }: RouteDrawerProps) =>
|
|
492
|
+
declare const Root$3: ({ prev, children }: RouteDrawerProps) => react.JSX.Element;
|
|
494
493
|
/**
|
|
495
494
|
* Drawer that is used to render a form on a separate route.
|
|
496
495
|
*
|
|
@@ -510,7 +509,7 @@ declare const RouteDrawer: RouteDrawerComponent;
|
|
|
510
509
|
type RouteFocusModalProps = PropsWithChildren<{
|
|
511
510
|
prev?: string | Partial<Path> | number;
|
|
512
511
|
}>;
|
|
513
|
-
declare const Root$2: ({ prev, children }: RouteFocusModalProps) =>
|
|
512
|
+
declare const Root$2: ({ prev, children }: RouteFocusModalProps) => react.JSX.Element;
|
|
514
513
|
/**
|
|
515
514
|
* FocusModal that is used to render a form on a separate route.
|
|
516
515
|
*
|
|
@@ -546,7 +545,7 @@ type StackedDrawerProps = PropsWithChildren<{
|
|
|
546
545
|
/**
|
|
547
546
|
* A stacked modal that can be rendered above a parent modal.
|
|
548
547
|
*/
|
|
549
|
-
declare const Root$1: ({ id, children }: StackedDrawerProps) =>
|
|
548
|
+
declare const Root$1: ({ id, children }: StackedDrawerProps) => react.JSX.Element;
|
|
550
549
|
type StackedDrawerContentProps = ComponentPropsWithoutRef<typeof Drawer.Content>;
|
|
551
550
|
declare const Content$1: ForwardRefExoticComponent<PropsWithoutRef<StackedDrawerContentProps> & RefAttributes<HTMLDivElement>>;
|
|
552
551
|
type StackedDrawerComponent = typeof Root$1 & {
|
|
@@ -575,7 +574,7 @@ type StackedFocusModalProps = PropsWithChildren<{
|
|
|
575
574
|
/**
|
|
576
575
|
* A stacked modal that can be rendered above a parent modal.
|
|
577
576
|
*/
|
|
578
|
-
declare const Root: ({ id, onOpenChangeCallback, children, }: StackedFocusModalProps) =>
|
|
577
|
+
declare const Root: ({ id, onOpenChangeCallback, children, }: StackedFocusModalProps) => react.JSX.Element;
|
|
579
578
|
type StackedFocusModalContentProps = ComponentPropsWithoutRef<typeof FocusModal.Content>;
|
|
580
579
|
declare const Content: ForwardRefExoticComponent<PropsWithoutRef<StackedFocusModalContentProps> & RefAttributes<HTMLDivElement>>;
|
|
581
580
|
type StackedFocusModalComponent = typeof Root & {
|
|
@@ -598,7 +597,7 @@ declare const useStackedModal: () => {
|
|
|
598
597
|
};
|
|
599
598
|
|
|
600
599
|
type LayoutComposerProps<TLayoutId extends Layouts, TData> = Omit<LayoutComposerProps$1<TLayoutId, TData>, "customizeId" | "controlSize">;
|
|
601
|
-
declare const LayoutComposer: (<TLayoutId extends Layouts, TData>({ widgetsZonePrefix, preferredLayoutId, sections, data, hasOutlet, disableWidgets, }: LayoutComposerProps<TLayoutId, TData>) =>
|
|
600
|
+
declare const LayoutComposer: (<TLayoutId extends Layouts, TData>({ widgetsZonePrefix, preferredLayoutId, sections, data, hasOutlet, disableWidgets, }: LayoutComposerProps<TLayoutId, TData>) => react.JSX.Element) & {
|
|
602
601
|
Entry: typeof LayoutEntry;
|
|
603
602
|
};
|
|
604
603
|
|
package/dist/components.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import React__default, { ReactNode, PropsWithChildren, ComponentPropsWithoutRef, ForwardRefExoticComponent, PropsWithoutRef, ComponentProps, RefAttributes, ElementRef } from 'react';
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import react__default, { ReactNode, PropsWithChildren, ComponentPropsWithoutRef, ForwardRefExoticComponent, PropsWithoutRef, ComponentProps, RefAttributes, ElementRef } from 'react';
|
|
4
3
|
import { L as LayoutControlSize, a as LayoutComponentProps } from './types-DYXLoDeW.js';
|
|
5
4
|
import { Layouts, SectionNameFor } from '@medusajs/admin-shared';
|
|
6
5
|
import { T as TableAdapter } from './table-adapters-DnG5KPvi.js';
|
|
@@ -24,7 +23,7 @@ type LayoutEntryProps = {
|
|
|
24
23
|
* component name is unstable (subject to rename or minification), ensuring
|
|
25
24
|
* any saved user preferences survive refactors.
|
|
26
25
|
*/
|
|
27
|
-
declare function LayoutEntry({ children }: LayoutEntryProps):
|
|
26
|
+
declare function LayoutEntry({ children }: LayoutEntryProps): react.JSX.Element;
|
|
28
27
|
declare namespace LayoutEntry {
|
|
29
28
|
var displayName: string;
|
|
30
29
|
}
|
|
@@ -100,7 +99,7 @@ interface ConfigurableDataTableProps<TData> {
|
|
|
100
99
|
layout?: "fill" | "auto";
|
|
101
100
|
actions?: DataTableActionProps$1[];
|
|
102
101
|
}
|
|
103
|
-
declare function ConfigurableDataTable<TData>({ adapter, heading, subHeading, pageSize: pageSizeProp, queryPrefix: queryPrefixProp, layout, actions, }: ConfigurableDataTableProps<TData>):
|
|
102
|
+
declare function ConfigurableDataTable<TData>({ adapter, heading, subHeading, pageSize: pageSizeProp, queryPrefix: queryPrefixProp, layout, actions, }: ConfigurableDataTableProps<TData>): react.JSX.Element;
|
|
104
103
|
|
|
105
104
|
type Action = {
|
|
106
105
|
icon: ReactNode;
|
|
@@ -124,30 +123,30 @@ type ActionMenuProps = PropsWithChildren<{
|
|
|
124
123
|
groups: ActionGroup[];
|
|
125
124
|
variant?: "transparent" | "primary";
|
|
126
125
|
}>;
|
|
127
|
-
declare const ActionMenu: ({ groups, variant, children, }: ActionMenuProps) =>
|
|
126
|
+
declare const ActionMenu: ({ groups, variant, children, }: ActionMenuProps) => react.JSX.Element;
|
|
128
127
|
|
|
129
128
|
type ConditionalTooltipProps = PropsWithChildren<ComponentPropsWithoutRef<typeof Tooltip> & {
|
|
130
129
|
showTooltip?: boolean;
|
|
131
130
|
}>;
|
|
132
|
-
declare const ConditionalTooltip: ({ children, showTooltip, ...props }: ConditionalTooltipProps) => string | number | boolean | Iterable<
|
|
131
|
+
declare const ConditionalTooltip: ({ children, showTooltip, ...props }: ConditionalTooltipProps) => string | number | boolean | Iterable<react.ReactNode> | react.JSX.Element | null | undefined;
|
|
133
132
|
|
|
134
133
|
type DisplayIdProps = {
|
|
135
134
|
id: string;
|
|
136
135
|
className?: string;
|
|
137
136
|
};
|
|
138
|
-
declare function DisplayId({ id, className }: DisplayIdProps):
|
|
137
|
+
declare function DisplayId({ id, className }: DisplayIdProps): react.JSX.Element;
|
|
139
138
|
|
|
140
|
-
declare const Form: (<TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>({ children, watch, getValues, getFieldState, setError, clearErrors, setValue, setValues, trigger, formState, resetField, reset, resetDefaultValues, handleSubmit, unregister, control, register, setFocus, subscribe, }: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) =>
|
|
141
|
-
Item:
|
|
142
|
-
Label:
|
|
139
|
+
declare const Form: (<TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>({ children, watch, getValues, getFieldState, setError, clearErrors, setValue, setValues, trigger, formState, resetField, reset, resetDefaultValues, handleSubmit, unregister, control, register, setFocus, subscribe, }: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => react__default.JSX.Element) & {
|
|
140
|
+
Item: react__default.ForwardRefExoticComponent<react__default.HTMLAttributes<HTMLDivElement> & react__default.RefAttributes<HTMLDivElement>>;
|
|
141
|
+
Label: react__default.ForwardRefExoticComponent<Omit<Label.LabelProps & react__default.RefAttributes<HTMLLabelElement>, "ref"> & {
|
|
143
142
|
optional?: boolean;
|
|
144
143
|
tooltip?: ReactNode;
|
|
145
144
|
icon?: ReactNode;
|
|
146
|
-
} &
|
|
147
|
-
Control:
|
|
148
|
-
Hint:
|
|
149
|
-
ErrorMessage:
|
|
150
|
-
Field: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) =>
|
|
145
|
+
} & react__default.RefAttributes<HTMLLabelElement>>;
|
|
146
|
+
Control: react__default.ForwardRefExoticComponent<Omit<Slot.SlotProps & react__default.RefAttributes<HTMLElement>, "ref"> & react__default.RefAttributes<HTMLElement>>;
|
|
147
|
+
Hint: react__default.ForwardRefExoticComponent<react__default.HTMLAttributes<HTMLParagraphElement> & react__default.RefAttributes<HTMLParagraphElement>>;
|
|
148
|
+
ErrorMessage: react__default.ForwardRefExoticComponent<react__default.HTMLAttributes<HTMLParagraphElement> & react__default.RefAttributes<HTMLParagraphElement>>;
|
|
149
|
+
Field: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => react__default.JSX.Element;
|
|
151
150
|
};
|
|
152
151
|
|
|
153
152
|
type IconAvatarProps = PropsWithChildren<{
|
|
@@ -160,27 +159,27 @@ type IconAvatarProps = PropsWithChildren<{
|
|
|
160
159
|
*
|
|
161
160
|
* The `<Avatar/>` component from `@medusajs/ui` does not support passing an icon as a child.
|
|
162
161
|
*/
|
|
163
|
-
declare const IconAvatar: ({ size, variant, children, className, }: IconAvatarProps) =>
|
|
162
|
+
declare const IconAvatar: ({ size, variant, children, className, }: IconAvatarProps) => react.JSX.Element;
|
|
164
163
|
|
|
165
164
|
type JsonViewSectionProps = {
|
|
166
165
|
data: object;
|
|
167
166
|
title?: string;
|
|
168
167
|
};
|
|
169
|
-
declare const JsonViewSection: ({ data }: JsonViewSectionProps) =>
|
|
168
|
+
declare const JsonViewSection: ({ data }: JsonViewSectionProps) => react.JSX.Element;
|
|
170
169
|
|
|
171
170
|
interface ListicleProps {
|
|
172
171
|
labelKey: string;
|
|
173
172
|
descriptionKey: string;
|
|
174
173
|
children?: ReactNode;
|
|
175
174
|
}
|
|
176
|
-
declare const Listicle: ({ labelKey, descriptionKey, children, }: ListicleProps) =>
|
|
175
|
+
declare const Listicle: ({ labelKey, descriptionKey, children, }: ListicleProps) => react.JSX.Element;
|
|
177
176
|
|
|
178
177
|
type NoResultsProps = {
|
|
179
178
|
title?: string;
|
|
180
179
|
message?: string;
|
|
181
180
|
className?: string;
|
|
182
181
|
};
|
|
183
|
-
declare const NoResults: ({ title, message, className }: NoResultsProps) =>
|
|
182
|
+
declare const NoResults: ({ title, message, className }: NoResultsProps) => react__default.JSX.Element;
|
|
184
183
|
type ActionProps = {
|
|
185
184
|
action?: {
|
|
186
185
|
to: string;
|
|
@@ -192,16 +191,16 @@ type NoRecordsProps = {
|
|
|
192
191
|
message?: string;
|
|
193
192
|
className?: string;
|
|
194
193
|
buttonVariant?: string;
|
|
195
|
-
icon?:
|
|
194
|
+
icon?: react__default.ReactNode;
|
|
196
195
|
} & ActionProps;
|
|
197
|
-
declare const NoRecords: ({ title, message, action, className, buttonVariant, icon, }: NoRecordsProps) =>
|
|
196
|
+
declare const NoRecords: ({ title, message, action, className, buttonVariant, icon, }: NoRecordsProps) => react__default.JSX.Element;
|
|
198
197
|
|
|
199
198
|
type SectionRowProps = {
|
|
200
199
|
title: string;
|
|
201
200
|
value?: ReactNode | string | null;
|
|
202
201
|
actions?: ReactNode;
|
|
203
202
|
};
|
|
204
|
-
declare const SectionRow: ({ title, value, actions }: SectionRowProps) =>
|
|
203
|
+
declare const SectionRow: ({ title, value, actions }: SectionRowProps) => react.JSX.Element;
|
|
205
204
|
|
|
206
205
|
interface SidebarLinkProps {
|
|
207
206
|
to: string;
|
|
@@ -209,19 +208,19 @@ interface SidebarLinkProps {
|
|
|
209
208
|
descriptionKey: string;
|
|
210
209
|
icon: ReactNode;
|
|
211
210
|
}
|
|
212
|
-
declare const SidebarLink: ({ to, labelKey, descriptionKey, icon, }: SidebarLinkProps) =>
|
|
211
|
+
declare const SidebarLink: ({ to, labelKey, descriptionKey, icon, }: SidebarLinkProps) => react.JSX.Element;
|
|
213
212
|
|
|
214
213
|
type ThumbnailProps = {
|
|
215
214
|
src?: string | null;
|
|
216
215
|
alt?: string;
|
|
217
216
|
size?: "small" | "base";
|
|
218
217
|
};
|
|
219
|
-
declare const Thumbnail: ({ src, alt, size }: ThumbnailProps) =>
|
|
218
|
+
declare const Thumbnail: ({ src, alt, size }: ThumbnailProps) => react.JSX.Element;
|
|
220
219
|
|
|
221
220
|
/**
|
|
222
221
|
* A form that can only be submitted when using the meta or control key.
|
|
223
222
|
*/
|
|
224
|
-
declare const KeyboundForm:
|
|
223
|
+
declare const KeyboundForm: react__default.ForwardRefExoticComponent<react__default.FormHTMLAttributes<HTMLFormElement> & react__default.RefAttributes<HTMLFormElement>>;
|
|
225
224
|
|
|
226
225
|
type ComboboxOption = {
|
|
227
226
|
value: string;
|
|
@@ -244,15 +243,15 @@ interface ComboboxProps<T extends Value = Value> extends Omit<ComponentPropsWith
|
|
|
244
243
|
forceHideInput?: boolean;
|
|
245
244
|
displayMode?: "count" | "chips";
|
|
246
245
|
}
|
|
247
|
-
declare const Combobox: <T extends Value = string>(props: ComboboxProps<T> &
|
|
246
|
+
declare const Combobox: <T extends Value = string>(props: ComboboxProps<T> & react.RefAttributes<HTMLInputElement>) => ReactNode;
|
|
248
247
|
|
|
249
|
-
declare const CountrySelect:
|
|
248
|
+
declare const CountrySelect: react.ForwardRefExoticComponent<Omit<Omit<ComboboxProps<Value> & react.RefAttributes<HTMLInputElement>, "ref">, "value" | "options" | "onChange" | "multiple"> & {
|
|
250
249
|
placeholder?: string;
|
|
251
250
|
defaultValue?: string;
|
|
252
251
|
allowClear?: boolean;
|
|
253
252
|
value?: string;
|
|
254
253
|
onChange?: (value: string | undefined) => void;
|
|
255
|
-
} &
|
|
254
|
+
} & react.RefAttributes<HTMLInputElement>>;
|
|
256
255
|
|
|
257
256
|
type HandleInputProps = ComponentProps<typeof Input>;
|
|
258
257
|
declare const HandleInput: ForwardRefExoticComponent<PropsWithoutRef<HandleInputProps> & RefAttributes<ElementRef<typeof Input>>>;
|
|
@@ -321,9 +320,9 @@ interface DataTableProps<TData> {
|
|
|
321
320
|
visible: string[];
|
|
322
321
|
order: string[];
|
|
323
322
|
};
|
|
324
|
-
filterBarContent?:
|
|
323
|
+
filterBarContent?: react__default.ReactNode;
|
|
325
324
|
}
|
|
326
|
-
declare const DataTable: <TData>({ data, columns, filters, commands, action, actions, actionMenu, getRowId, rowCount, enablePagination, enableSearch, autoFocusSearch, rowHref, heading, headingLevel, subHeading, prefix, pageSize, emptyState, rowSelection, isLoading, layout, enableColumnVisibility, initialColumnVisibility, onColumnVisibilityChange, columnOrder, onColumnOrderChange, enableViewSelector, entity, currentColumns, filterBarContent, }: DataTableProps<TData>) =>
|
|
325
|
+
declare const DataTable: <TData>({ data, columns, filters, commands, action, actions, actionMenu, getRowId, rowCount, enablePagination, enableSearch, autoFocusSearch, rowHref, heading, headingLevel, subHeading, prefix, pageSize, emptyState, rowSelection, isLoading, layout, enableColumnVisibility, initialColumnVisibility, onColumnVisibilityChange, columnOrder, onColumnOrderChange, enableViewSelector, entity, currentColumns, filterBarContent, }: DataTableProps<TData>) => react__default.JSX.Element;
|
|
327
326
|
|
|
328
327
|
type DataGridColumnType = "text" | "multiline-text" | "number" | "boolean" | "togglable-number";
|
|
329
328
|
interface DataGridCellProps<TData = unknown, TValue = any> {
|
|
@@ -371,27 +370,27 @@ interface DataGridRootProps<TData, TFieldValues extends FieldValues = FieldValue
|
|
|
371
370
|
interface DataGridProps<TData, TFieldValues extends FieldValues = FieldValues> extends DataGridRootProps<TData, TFieldValues> {
|
|
372
371
|
isLoading?: boolean;
|
|
373
372
|
}
|
|
374
|
-
declare const DataGrid: (<TData, TFieldValues extends FieldValues = FieldValues>({ isLoading, totalRowCount, onFetchMore, isFetchingMore, hasNextPage, ...props }: DataGridProps<TData, TFieldValues>) =>
|
|
373
|
+
declare const DataGrid: (<TData, TFieldValues extends FieldValues = FieldValues>({ isLoading, totalRowCount, onFetchMore, isFetchingMore, hasNextPage, ...props }: DataGridProps<TData, TFieldValues>) => react.JSX.Element) & {
|
|
375
374
|
BooleanCell: <TData, TValue = any>({ context, disabled, }: DataGridCellProps<TData, TValue> & {
|
|
376
375
|
disabled?: boolean;
|
|
377
|
-
}) =>
|
|
378
|
-
TextCell: <TData, TValue = any>({ context, }: DataGridCellProps<TData, TValue>) =>
|
|
379
|
-
MultilineCell: <TData, TValue = any>({ context, }: DataGridCellProps<TData, TValue>) =>
|
|
376
|
+
}) => react.JSX.Element;
|
|
377
|
+
TextCell: <TData, TValue = any>({ context, }: DataGridCellProps<TData, TValue>) => react.JSX.Element;
|
|
378
|
+
MultilineCell: <TData, TValue = any>({ context, }: DataGridCellProps<TData, TValue>) => react.JSX.Element;
|
|
380
379
|
ExpandableTextCell: <TData, TValue = any>({ context, fieldLabel, }: DataGridCellProps<TData, TValue> & {
|
|
381
380
|
fieldLabel?: string;
|
|
382
|
-
}) =>
|
|
381
|
+
}) => react.JSX.Element;
|
|
383
382
|
NumberCell: <TData, TValue = any>({ context, ...rest }: DataGridCellProps<TData, TValue> & {
|
|
384
383
|
min?: number;
|
|
385
384
|
max?: number;
|
|
386
385
|
placeholder?: string;
|
|
387
|
-
}) =>
|
|
388
|
-
CurrencyCell: <TData, TValue = any>({ context, code, }: DataGridCurrencyCellProps<TData, TValue>) =>
|
|
386
|
+
}) => react.JSX.Element;
|
|
387
|
+
CurrencyCell: <TData, TValue = any>({ context, code, }: DataGridCurrencyCellProps<TData, TValue>) => react.JSX.Element;
|
|
389
388
|
ReadonlyCell: <TData, TValue = any>({ context, color, children, isMultiLine, }: DataGridCellProps<TData, TValue> & {
|
|
390
|
-
children?:
|
|
389
|
+
children?: react.ReactNode | undefined;
|
|
391
390
|
} & {
|
|
392
391
|
color?: "muted" | "normal";
|
|
393
392
|
isMultiLine?: boolean;
|
|
394
|
-
}) =>
|
|
393
|
+
}) => react.JSX.Element;
|
|
395
394
|
};
|
|
396
395
|
|
|
397
396
|
type DataGridHelperColumnsProps<TData, TFieldValues extends FieldValues> = {
|
|
@@ -459,38 +458,38 @@ declare const createDataGridPriceColumns: <TData, TFieldValues extends FieldValu
|
|
|
459
458
|
type ProductCellProps = {
|
|
460
459
|
product: Pick<HttpTypes.AdminProduct, "thumbnail" | "title">;
|
|
461
460
|
};
|
|
462
|
-
declare const ProductCell: ({ product }: ProductCellProps) =>
|
|
463
|
-
declare const ProductHeader: () =>
|
|
461
|
+
declare const ProductCell: ({ product }: ProductCellProps) => react.JSX.Element;
|
|
462
|
+
declare const ProductHeader: () => react.JSX.Element;
|
|
464
463
|
|
|
465
464
|
type ProductStatusCellProps = {
|
|
466
465
|
status?: HttpTypes.AdminProductStatus;
|
|
467
466
|
};
|
|
468
|
-
declare const ProductStatusCell: ({ status }: ProductStatusCellProps) =>
|
|
469
|
-
declare const ProductStatusHeader: () =>
|
|
467
|
+
declare const ProductStatusCell: ({ status }: ProductStatusCellProps) => react.JSX.Element;
|
|
468
|
+
declare const ProductStatusHeader: () => react.JSX.Element;
|
|
470
469
|
|
|
471
470
|
type SalesChannelsCellProps = {
|
|
472
471
|
salesChannels?: SalesChannelDTO[] | null;
|
|
473
472
|
};
|
|
474
|
-
declare const SalesChannelsCell: ({ salesChannels, }: SalesChannelsCellProps) =>
|
|
475
|
-
declare const SalesChannelHeader: () =>
|
|
473
|
+
declare const SalesChannelsCell: ({ salesChannels, }: SalesChannelsCellProps) => react.JSX.Element;
|
|
474
|
+
declare const SalesChannelHeader: () => react.JSX.Element;
|
|
476
475
|
|
|
477
476
|
type VariantCellProps = {
|
|
478
477
|
variants?: HttpTypes.AdminProductVariant[] | null;
|
|
479
478
|
};
|
|
480
|
-
declare const VariantCell: ({ variants }: VariantCellProps) =>
|
|
481
|
-
declare const VariantHeader: () =>
|
|
479
|
+
declare const VariantCell: ({ variants }: VariantCellProps) => react.JSX.Element;
|
|
480
|
+
declare const VariantHeader: () => react.JSX.Element;
|
|
482
481
|
|
|
483
482
|
type RouteModalFormProps<TFieldValues extends FieldValues> = PropsWithChildren<{
|
|
484
483
|
form: UseFormReturn<TFieldValues>;
|
|
485
484
|
blockSearchParams?: boolean;
|
|
486
485
|
onClose?: (isSubmitSuccessful: boolean) => void;
|
|
487
486
|
}>;
|
|
488
|
-
declare const RouteModalForm: <TFieldValues extends FieldValues = any>({ form, blockSearchParams: blockSearch, children, onClose, }: RouteModalFormProps<TFieldValues>) =>
|
|
487
|
+
declare const RouteModalForm: <TFieldValues extends FieldValues = any>({ form, blockSearchParams: blockSearch, children, onClose, }: RouteModalFormProps<TFieldValues>) => react.JSX.Element;
|
|
489
488
|
|
|
490
489
|
type RouteDrawerProps = PropsWithChildren<{
|
|
491
490
|
prev?: string | Partial<Path> | number;
|
|
492
491
|
}>;
|
|
493
|
-
declare const Root$3: ({ prev, children }: RouteDrawerProps) =>
|
|
492
|
+
declare const Root$3: ({ prev, children }: RouteDrawerProps) => react.JSX.Element;
|
|
494
493
|
/**
|
|
495
494
|
* Drawer that is used to render a form on a separate route.
|
|
496
495
|
*
|
|
@@ -510,7 +509,7 @@ declare const RouteDrawer: RouteDrawerComponent;
|
|
|
510
509
|
type RouteFocusModalProps = PropsWithChildren<{
|
|
511
510
|
prev?: string | Partial<Path> | number;
|
|
512
511
|
}>;
|
|
513
|
-
declare const Root$2: ({ prev, children }: RouteFocusModalProps) =>
|
|
512
|
+
declare const Root$2: ({ prev, children }: RouteFocusModalProps) => react.JSX.Element;
|
|
514
513
|
/**
|
|
515
514
|
* FocusModal that is used to render a form on a separate route.
|
|
516
515
|
*
|
|
@@ -546,7 +545,7 @@ type StackedDrawerProps = PropsWithChildren<{
|
|
|
546
545
|
/**
|
|
547
546
|
* A stacked modal that can be rendered above a parent modal.
|
|
548
547
|
*/
|
|
549
|
-
declare const Root$1: ({ id, children }: StackedDrawerProps) =>
|
|
548
|
+
declare const Root$1: ({ id, children }: StackedDrawerProps) => react.JSX.Element;
|
|
550
549
|
type StackedDrawerContentProps = ComponentPropsWithoutRef<typeof Drawer.Content>;
|
|
551
550
|
declare const Content$1: ForwardRefExoticComponent<PropsWithoutRef<StackedDrawerContentProps> & RefAttributes<HTMLDivElement>>;
|
|
552
551
|
type StackedDrawerComponent = typeof Root$1 & {
|
|
@@ -575,7 +574,7 @@ type StackedFocusModalProps = PropsWithChildren<{
|
|
|
575
574
|
/**
|
|
576
575
|
* A stacked modal that can be rendered above a parent modal.
|
|
577
576
|
*/
|
|
578
|
-
declare const Root: ({ id, onOpenChangeCallback, children, }: StackedFocusModalProps) =>
|
|
577
|
+
declare const Root: ({ id, onOpenChangeCallback, children, }: StackedFocusModalProps) => react.JSX.Element;
|
|
579
578
|
type StackedFocusModalContentProps = ComponentPropsWithoutRef<typeof FocusModal.Content>;
|
|
580
579
|
declare const Content: ForwardRefExoticComponent<PropsWithoutRef<StackedFocusModalContentProps> & RefAttributes<HTMLDivElement>>;
|
|
581
580
|
type StackedFocusModalComponent = typeof Root & {
|
|
@@ -598,7 +597,7 @@ declare const useStackedModal: () => {
|
|
|
598
597
|
};
|
|
599
598
|
|
|
600
599
|
type LayoutComposerProps<TLayoutId extends Layouts, TData> = Omit<LayoutComposerProps$1<TLayoutId, TData>, "customizeId" | "controlSize">;
|
|
601
|
-
declare const LayoutComposer: (<TLayoutId extends Layouts, TData>({ widgetsZonePrefix, preferredLayoutId, sections, data, hasOutlet, disableWidgets, }: LayoutComposerProps<TLayoutId, TData>) =>
|
|
600
|
+
declare const LayoutComposer: (<TLayoutId extends Layouts, TData>({ widgetsZonePrefix, preferredLayoutId, sections, data, hasOutlet, disableWidgets, }: LayoutComposerProps<TLayoutId, TData>) => react.JSX.Element) & {
|
|
602
601
|
Entry: typeof LayoutEntry;
|
|
603
602
|
};
|
|
604
603
|
|
package/dist/hooks.d.mts
CHANGED
|
@@ -4,7 +4,7 @@ import * as _tanstack_query_core from '@tanstack/query-core';
|
|
|
4
4
|
import { InfiniteData } from '@tanstack/query-core';
|
|
5
5
|
import { FetchError } from '@medusajs/js-sdk';
|
|
6
6
|
import { HttpTypes, PaginatedResponse, AdminSalesChannelResponse, AdminSalesChannelListResponse } from '@medusajs/types';
|
|
7
|
-
import * as
|
|
7
|
+
import * as react from 'react';
|
|
8
8
|
import { DataTableColumnDef, DataTableFilter, DataTableEmptyStateProps } from '@medusajs/ui';
|
|
9
9
|
import * as _tanstack_table_core from '@tanstack/table-core';
|
|
10
10
|
|
|
@@ -3189,7 +3189,7 @@ declare const useComboboxData: <TResponse extends ComboboxExternalData, TParams
|
|
|
3189
3189
|
promise: Promise<_tanstack_query_core.InfiniteData<TResponse, unknown>>;
|
|
3190
3190
|
options: TOption[];
|
|
3191
3191
|
searchValue: string;
|
|
3192
|
-
onSearchValueChange:
|
|
3192
|
+
onSearchValueChange: react.Dispatch<react.SetStateAction<string>>;
|
|
3193
3193
|
disabled: boolean;
|
|
3194
3194
|
} | {
|
|
3195
3195
|
error: null;
|
|
@@ -3226,7 +3226,7 @@ declare const useComboboxData: <TResponse extends ComboboxExternalData, TParams
|
|
|
3226
3226
|
promise: Promise<_tanstack_query_core.InfiniteData<TResponse, unknown>>;
|
|
3227
3227
|
options: TOption[];
|
|
3228
3228
|
searchValue: string;
|
|
3229
|
-
onSearchValueChange:
|
|
3229
|
+
onSearchValueChange: react.Dispatch<react.SetStateAction<string>>;
|
|
3230
3230
|
disabled: boolean;
|
|
3231
3231
|
} | {
|
|
3232
3232
|
error: Error;
|
|
@@ -3263,7 +3263,7 @@ declare const useComboboxData: <TResponse extends ComboboxExternalData, TParams
|
|
|
3263
3263
|
promise: Promise<_tanstack_query_core.InfiniteData<TResponse, unknown>>;
|
|
3264
3264
|
options: TOption[];
|
|
3265
3265
|
searchValue: string;
|
|
3266
|
-
onSearchValueChange:
|
|
3266
|
+
onSearchValueChange: react.Dispatch<react.SetStateAction<string>>;
|
|
3267
3267
|
disabled: boolean;
|
|
3268
3268
|
} | {
|
|
3269
3269
|
error: null;
|
|
@@ -3300,7 +3300,7 @@ declare const useComboboxData: <TResponse extends ComboboxExternalData, TParams
|
|
|
3300
3300
|
promise: Promise<_tanstack_query_core.InfiniteData<TResponse, unknown>>;
|
|
3301
3301
|
options: TOption[];
|
|
3302
3302
|
searchValue: string;
|
|
3303
|
-
onSearchValueChange:
|
|
3303
|
+
onSearchValueChange: react.Dispatch<react.SetStateAction<string>>;
|
|
3304
3304
|
disabled: boolean;
|
|
3305
3305
|
} | {
|
|
3306
3306
|
error: null;
|
|
@@ -3337,7 +3337,7 @@ declare const useComboboxData: <TResponse extends ComboboxExternalData, TParams
|
|
|
3337
3337
|
promise: Promise<_tanstack_query_core.InfiniteData<TResponse, unknown>>;
|
|
3338
3338
|
options: TOption[];
|
|
3339
3339
|
searchValue: string;
|
|
3340
|
-
onSearchValueChange:
|
|
3340
|
+
onSearchValueChange: react.Dispatch<react.SetStateAction<string>>;
|
|
3341
3341
|
disabled: boolean;
|
|
3342
3342
|
};
|
|
3343
3343
|
|
|
@@ -3355,7 +3355,7 @@ declare const useDate: () => {
|
|
|
3355
3355
|
*/
|
|
3356
3356
|
declare const useDebouncedSearch: () => {
|
|
3357
3357
|
searchValue: string;
|
|
3358
|
-
onSearchValueChange:
|
|
3358
|
+
onSearchValueChange: react.Dispatch<react.SetStateAction<string>>;
|
|
3359
3359
|
query: string | undefined;
|
|
3360
3360
|
};
|
|
3361
3361
|
|
package/dist/hooks.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import * as _tanstack_query_core from '@tanstack/query-core';
|
|
|
4
4
|
import { InfiniteData } from '@tanstack/query-core';
|
|
5
5
|
import { FetchError } from '@medusajs/js-sdk';
|
|
6
6
|
import { HttpTypes, PaginatedResponse, AdminSalesChannelResponse, AdminSalesChannelListResponse } from '@medusajs/types';
|
|
7
|
-
import * as
|
|
7
|
+
import * as react from 'react';
|
|
8
8
|
import { DataTableColumnDef, DataTableFilter, DataTableEmptyStateProps } from '@medusajs/ui';
|
|
9
9
|
import * as _tanstack_table_core from '@tanstack/table-core';
|
|
10
10
|
|
|
@@ -3189,7 +3189,7 @@ declare const useComboboxData: <TResponse extends ComboboxExternalData, TParams
|
|
|
3189
3189
|
promise: Promise<_tanstack_query_core.InfiniteData<TResponse, unknown>>;
|
|
3190
3190
|
options: TOption[];
|
|
3191
3191
|
searchValue: string;
|
|
3192
|
-
onSearchValueChange:
|
|
3192
|
+
onSearchValueChange: react.Dispatch<react.SetStateAction<string>>;
|
|
3193
3193
|
disabled: boolean;
|
|
3194
3194
|
} | {
|
|
3195
3195
|
error: null;
|
|
@@ -3226,7 +3226,7 @@ declare const useComboboxData: <TResponse extends ComboboxExternalData, TParams
|
|
|
3226
3226
|
promise: Promise<_tanstack_query_core.InfiniteData<TResponse, unknown>>;
|
|
3227
3227
|
options: TOption[];
|
|
3228
3228
|
searchValue: string;
|
|
3229
|
-
onSearchValueChange:
|
|
3229
|
+
onSearchValueChange: react.Dispatch<react.SetStateAction<string>>;
|
|
3230
3230
|
disabled: boolean;
|
|
3231
3231
|
} | {
|
|
3232
3232
|
error: Error;
|
|
@@ -3263,7 +3263,7 @@ declare const useComboboxData: <TResponse extends ComboboxExternalData, TParams
|
|
|
3263
3263
|
promise: Promise<_tanstack_query_core.InfiniteData<TResponse, unknown>>;
|
|
3264
3264
|
options: TOption[];
|
|
3265
3265
|
searchValue: string;
|
|
3266
|
-
onSearchValueChange:
|
|
3266
|
+
onSearchValueChange: react.Dispatch<react.SetStateAction<string>>;
|
|
3267
3267
|
disabled: boolean;
|
|
3268
3268
|
} | {
|
|
3269
3269
|
error: null;
|
|
@@ -3300,7 +3300,7 @@ declare const useComboboxData: <TResponse extends ComboboxExternalData, TParams
|
|
|
3300
3300
|
promise: Promise<_tanstack_query_core.InfiniteData<TResponse, unknown>>;
|
|
3301
3301
|
options: TOption[];
|
|
3302
3302
|
searchValue: string;
|
|
3303
|
-
onSearchValueChange:
|
|
3303
|
+
onSearchValueChange: react.Dispatch<react.SetStateAction<string>>;
|
|
3304
3304
|
disabled: boolean;
|
|
3305
3305
|
} | {
|
|
3306
3306
|
error: null;
|
|
@@ -3337,7 +3337,7 @@ declare const useComboboxData: <TResponse extends ComboboxExternalData, TParams
|
|
|
3337
3337
|
promise: Promise<_tanstack_query_core.InfiniteData<TResponse, unknown>>;
|
|
3338
3338
|
options: TOption[];
|
|
3339
3339
|
searchValue: string;
|
|
3340
|
-
onSearchValueChange:
|
|
3340
|
+
onSearchValueChange: react.Dispatch<react.SetStateAction<string>>;
|
|
3341
3341
|
disabled: boolean;
|
|
3342
3342
|
};
|
|
3343
3343
|
|
|
@@ -3355,7 +3355,7 @@ declare const useDate: () => {
|
|
|
3355
3355
|
*/
|
|
3356
3356
|
declare const useDebouncedSearch: () => {
|
|
3357
3357
|
searchValue: string;
|
|
3358
|
-
onSearchValueChange:
|
|
3358
|
+
onSearchValueChange: react.Dispatch<react.SetStateAction<string>>;
|
|
3359
3359
|
query: string | undefined;
|
|
3360
3360
|
};
|
|
3361
3361
|
|
package/dist/lib.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import react__default from 'react';
|
|
2
2
|
import { HttpTypes } from '@medusajs/types';
|
|
3
3
|
import { TFunction } from 'i18next';
|
|
4
4
|
export { T as TableAdapter, c as createTableAdapter } from './table-adapters-DnG5KPvi.mjs';
|
|
@@ -6,7 +6,7 @@ import { FieldValues, UseFormReturn, FieldPath } from 'react-hook-form';
|
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
import '@medusajs/ui';
|
|
8
8
|
|
|
9
|
-
type CellRenderer<TData = any> = (value: any, row: TData, column: HttpTypes.AdminColumn, t: TFunction) =>
|
|
9
|
+
type CellRenderer<TData = any> = (value: any, row: TData, column: HttpTypes.AdminColumn, t: TFunction) => react__default.ReactNode;
|
|
10
10
|
type CellAlignment = "left" | "center" | "right";
|
|
11
11
|
/**
|
|
12
12
|
* Render modes that ship with a built-in cell renderer.
|
package/dist/lib.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import react__default from 'react';
|
|
2
2
|
import { HttpTypes } from '@medusajs/types';
|
|
3
3
|
import { TFunction } from 'i18next';
|
|
4
4
|
export { T as TableAdapter, c as createTableAdapter } from './table-adapters-DnG5KPvi.js';
|
|
@@ -6,7 +6,7 @@ import { FieldValues, UseFormReturn, FieldPath } from 'react-hook-form';
|
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
import '@medusajs/ui';
|
|
8
8
|
|
|
9
|
-
type CellRenderer<TData = any> = (value: any, row: TData, column: HttpTypes.AdminColumn, t: TFunction) =>
|
|
9
|
+
type CellRenderer<TData = any> = (value: any, row: TData, column: HttpTypes.AdminColumn, t: TFunction) => react__default.ReactNode;
|
|
10
10
|
type CellAlignment = "left" | "center" | "right";
|
|
11
11
|
/**
|
|
12
12
|
* Render modes that ship with a built-in cell renderer.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medusajs/dashboard",
|
|
3
|
-
"version": "2.22.
|
|
3
|
+
"version": "2.22.2-preview-20261028132907",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"typecheck": "tsgo --noEmit -p tsconfig.typecheck.json",
|
|
@@ -66,21 +66,21 @@
|
|
|
66
66
|
"mcpServer": "https://docs.medusajs.com/mcp",
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@ariakit/react": "^0.4.15",
|
|
69
|
-
"@babel/runtime": "^7.
|
|
69
|
+
"@babel/runtime": "^7.29.10",
|
|
70
70
|
"@dnd-kit/core": "^6.1.0",
|
|
71
71
|
"@dnd-kit/sortable": "^8.0.0",
|
|
72
72
|
"@dnd-kit/utilities": "^3.2.2",
|
|
73
73
|
"@hookform/error-message": "^2.0.1",
|
|
74
74
|
"@hookform/resolvers": "5.5.7",
|
|
75
|
-
"@medusajs/admin-shared": "2.22.
|
|
76
|
-
"@medusajs/icons": "2.22.
|
|
77
|
-
"@medusajs/js-sdk": "2.22.
|
|
78
|
-
"@medusajs/ui": "4.2.
|
|
75
|
+
"@medusajs/admin-shared": "2.22.2-preview-20261028132907",
|
|
76
|
+
"@medusajs/icons": "2.22.2-preview-20261028132907",
|
|
77
|
+
"@medusajs/js-sdk": "2.22.2-preview-20261028132907",
|
|
78
|
+
"@medusajs/ui": "4.2.9-preview-20261028132907",
|
|
79
79
|
"@radix-ui/react-dialog": "1.1.4",
|
|
80
80
|
"@radix-ui/react-dismissable-layer": "1.1.4",
|
|
81
81
|
"@tanstack/react-query": "5.64.2",
|
|
82
82
|
"@tanstack/react-table": "8.20.5",
|
|
83
|
-
"@tanstack/react-virtual": "^3.
|
|
83
|
+
"@tanstack/react-virtual": "^3.14.22",
|
|
84
84
|
"@uiw/react-json-view": "^2.0.0-alpha.17",
|
|
85
85
|
"bignumber.js": "^9.1.2",
|
|
86
86
|
"cmdk": "^0.2.0",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"match-sorter": "^6.3.4",
|
|
94
94
|
"motion": "^11.15.0",
|
|
95
95
|
"qrcode": "^1.5.4",
|
|
96
|
-
"qs": "^6.
|
|
96
|
+
"qs": "^6.16.1",
|
|
97
97
|
"radix-ui": "1.1.2",
|
|
98
98
|
"react": "^18.3.1",
|
|
99
99
|
"react-country-flag": "^3.1.0",
|
|
@@ -104,13 +104,13 @@
|
|
|
104
104
|
"react-i18next": "13.5.0",
|
|
105
105
|
"react-jwt": "^1.2.0",
|
|
106
106
|
"react-router-dom": "7.18.2",
|
|
107
|
-
"zod": "4.
|
|
107
|
+
"zod": "4.6.6"
|
|
108
108
|
},
|
|
109
109
|
"devDependencies": {
|
|
110
|
-
"@medusajs/admin-shared": "2.22.
|
|
111
|
-
"@medusajs/admin-vite-plugin": "2.22.
|
|
112
|
-
"@medusajs/types": "2.22.
|
|
113
|
-
"@medusajs/ui-preset": "2.22.
|
|
110
|
+
"@medusajs/admin-shared": "2.22.2-preview-20261028132907",
|
|
111
|
+
"@medusajs/admin-vite-plugin": "2.22.2-preview-20261028132907",
|
|
112
|
+
"@medusajs/types": "2.22.2-preview-20261028132907",
|
|
113
|
+
"@medusajs/ui-preset": "2.22.2-preview-20261028132907",
|
|
114
114
|
"@types/qrcode": "^1.5.5",
|
|
115
115
|
"@typescript/native-preview": "^7.0.0-dev.20260423.1",
|
|
116
116
|
"eslint": "8",
|
|
@@ -48,11 +48,16 @@ Object.defineProperty(window, "IntersectionObserver", {
|
|
|
48
48
|
value: MockIntersectionObserver,
|
|
49
49
|
})
|
|
50
50
|
|
|
51
|
+
// jsdom has no layout, so Ariakit treats every element as hidden and can't scroll
|
|
52
|
+
// the active option into view, which drops keystrokes while typing.
|
|
53
|
+
HTMLElement.prototype.checkVisibility = () => true
|
|
54
|
+
HTMLElement.prototype.scrollIntoView = vi.fn()
|
|
55
|
+
|
|
51
56
|
afterEach(() => {
|
|
52
57
|
cleanup()
|
|
53
58
|
})
|
|
54
59
|
|
|
55
|
-
describe("Combobox", () => {
|
|
60
|
+
describe("Combobox", { timeout: 15_000 }, () => {
|
|
56
61
|
it("should allow typing in search input in controlled mode", async () => {
|
|
57
62
|
const user = userEvent.setup()
|
|
58
63
|
|