@mercurjs/dashboard-shared 2.3.1 → 2.3.2-canary.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +245 -60
- package/dist/index.js +7729 -6091
- package/package.json +9 -8
package/dist/index.d.ts
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import { QueryKey, UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
-
import { ProductChangeActionDTO, HttpTypes, AttributeType, ProductAttributeBatchInput, ProductAttributeDTO, OfferDTO } from '@mercurjs/types';
|
|
1
|
+
import { QueryKey, UseQueryOptions, QueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { ProductChangeActionDTO, HttpTypes as HttpTypes$1, AttributeType, ProductAttributeBatchInput, ProductAttributeDTO, OfferDTO } from '@mercurjs/types';
|
|
3
|
+
import { HttpTypes } from '@medusajs/types';
|
|
4
|
+
import { z, ZodObject } from 'zod';
|
|
3
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
6
|
import * as React$1 from 'react';
|
|
5
|
-
import React__default, { ReactNode, PropsWithChildren, ComponentPropsWithoutRef, CSSProperties, ComponentType, Ref, RefCallback } from 'react';
|
|
6
|
-
import { Tooltip, Heading, Text, DataTableColumnDef, DataTableFilter, DataTableCommand, DataTableEmptyStateProps, DataTableRowSelectionState, DataTableRow, Drawer, FocusModal, ProgressStatus } from '@medusajs/ui';
|
|
7
|
+
import React__default, { ReactNode, PropsWithChildren, ComponentPropsWithoutRef, CSSProperties, ComponentType, ComponentProps, ForwardRefExoticComponent, Ref, RefAttributes, RefCallback } from 'react';
|
|
8
|
+
import { Tooltip, Heading, Text, DataTableColumnDef, DataTableFilter, DataTableCommand, DataTableEmptyStateProps, DataTableRowSelectionState, DataTableRow, Select, Input, Table, Drawer, FocusModal, ProgressStatus } from '@medusajs/ui';
|
|
7
9
|
import * as react_hook_form from 'react-hook-form';
|
|
8
10
|
import { FieldValues, FieldPath, ControllerProps, UseFormReturn, Control, UseFormProps } from 'react-hook-form';
|
|
9
11
|
import { Label, Slot } from 'radix-ui';
|
|
10
12
|
import { Link, Path } from 'react-router-dom';
|
|
11
13
|
import { UniqueIdentifier } from '@dnd-kit/core';
|
|
12
14
|
import * as _tanstack_react_table from '@tanstack/react-table';
|
|
13
|
-
import { CellContext, Row, ColumnDef, ColumnDefTemplate, HeaderContext, Table, RowSelectionState, OnChangeFn } from '@tanstack/react-table';
|
|
15
|
+
import { CellContext, Row, ColumnDef, ColumnDefTemplate, HeaderContext, Table as Table$1, RowSelectionState, OnChangeFn } from '@tanstack/react-table';
|
|
14
16
|
import { TFunction } from 'i18next';
|
|
15
|
-
import { z, ZodObject } from 'zod';
|
|
16
17
|
import { ClientError } from '@mercurjs/client';
|
|
18
|
+
import * as react_currency_input_field from 'react-currency-input-field';
|
|
17
19
|
import { CustomFieldsConfig, NavItemOverride, CustomFormField, CustomDisplayField, SectionAction, CustomListExtension } from '@mercurjs/dashboard-sdk';
|
|
18
20
|
|
|
19
21
|
type TQueryKey<TKey, TListQuery = any, TDetailQuery = string> = {
|
|
@@ -93,6 +95,130 @@ declare const formatFieldValue: (value: unknown, field?: string, booleanLabels?:
|
|
|
93
95
|
declare const buildProductChangeView: (actions: ProductChangeActionDTO[]) => ProductChangeView;
|
|
94
96
|
declare const productChangeViewHasContent: (view: ProductChangeView) => boolean;
|
|
95
97
|
|
|
98
|
+
declare const isSameAddress: (a?: HttpTypes.AdminOrderAddress | null, b?: HttpTypes.AdminOrderAddress | null) => boolean;
|
|
99
|
+
declare const getFormattedAddress: ({ address, }: {
|
|
100
|
+
address?: {
|
|
101
|
+
first_name?: string | null;
|
|
102
|
+
last_name?: string | null;
|
|
103
|
+
company?: string | null;
|
|
104
|
+
address_1?: string | null;
|
|
105
|
+
address_2?: string | null;
|
|
106
|
+
city?: string | null;
|
|
107
|
+
postal_code?: string | null;
|
|
108
|
+
province?: string | null;
|
|
109
|
+
country_code?: string | null;
|
|
110
|
+
country?: {
|
|
111
|
+
display_name?: string | null;
|
|
112
|
+
} | null;
|
|
113
|
+
} | null;
|
|
114
|
+
}) => string[];
|
|
115
|
+
declare const getFormattedCountry: (countryCode: string | null | undefined) => string;
|
|
116
|
+
|
|
117
|
+
interface StaticCountry extends Required<Omit<HttpTypes.AdminRegionCountry, "id">> {
|
|
118
|
+
}
|
|
119
|
+
declare function getCountryByIso2(iso2: string | null): StaticCountry | undefined;
|
|
120
|
+
declare const countries: StaticCountry[];
|
|
121
|
+
|
|
122
|
+
/** This file is auto-generated. Do not modify it manually. */
|
|
123
|
+
type CurrencyInfo = {
|
|
124
|
+
code: string;
|
|
125
|
+
name: string;
|
|
126
|
+
symbol_native: string;
|
|
127
|
+
decimal_digits: number;
|
|
128
|
+
};
|
|
129
|
+
declare const currencies: Record<string, CurrencyInfo>;
|
|
130
|
+
declare function getCurrencySymbol(code: string): string;
|
|
131
|
+
|
|
132
|
+
declare const getDecimalDigits: (currency: string) => number;
|
|
133
|
+
/**
|
|
134
|
+
* Returns a formatted amount based on the currency code using the browser's locale
|
|
135
|
+
* @param amount - The amount to format
|
|
136
|
+
* @param currencyCode - The currency code to format the amount in
|
|
137
|
+
* @returns - The formatted amount
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* getFormattedAmount(10, "usd") // '$10.00' if the browser's locale is en-US
|
|
141
|
+
* getFormattedAmount(10, "usd") // '10,00 $' if the browser's locale is fr-FR
|
|
142
|
+
*/
|
|
143
|
+
declare const getLocaleAmount: (amount: number, currencyCode: string) => string;
|
|
144
|
+
declare const getNativeSymbol: (currencyCode: string) => string;
|
|
145
|
+
/**
|
|
146
|
+
* In some cases we want to display the amount with the currency code and symbol,
|
|
147
|
+
* in the format of "symbol amount currencyCode". This breaks from the
|
|
148
|
+
* user's locale and is only used in cases where we want to display the
|
|
149
|
+
* currency code and symbol explicitly, e.g. for totals.
|
|
150
|
+
*/
|
|
151
|
+
declare const getStylizedAmount: (amount: number, currencyCode: string) => string;
|
|
152
|
+
/**
|
|
153
|
+
* Returns true if the amount is less than the rounding error for the currency
|
|
154
|
+
* @param amount - The amount to check
|
|
155
|
+
* @param currencyCode - The currency code to check the amount in
|
|
156
|
+
* @returns - True if the amount is less than the rounding error, false otherwise
|
|
157
|
+
*
|
|
158
|
+
* For example returns true if amount is < 0.005 for a USD | EUR etc.
|
|
159
|
+
*/
|
|
160
|
+
declare const isAmountLessThenRoundingError: (amount: number, currencyCode: string) => boolean;
|
|
161
|
+
|
|
162
|
+
declare const queryClient: QueryClient;
|
|
163
|
+
|
|
164
|
+
declare const AddressSchema: z.ZodObject<{
|
|
165
|
+
first_name: z.ZodString;
|
|
166
|
+
last_name: z.ZodString;
|
|
167
|
+
company: z.ZodOptional<z.ZodString>;
|
|
168
|
+
address_1: z.ZodString;
|
|
169
|
+
address_2: z.ZodOptional<z.ZodString>;
|
|
170
|
+
city: z.ZodString;
|
|
171
|
+
postal_code: z.ZodString;
|
|
172
|
+
province: z.ZodOptional<z.ZodString>;
|
|
173
|
+
country_code: z.ZodString;
|
|
174
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
175
|
+
}, "strip", z.ZodTypeAny, {
|
|
176
|
+
first_name: string;
|
|
177
|
+
last_name: string;
|
|
178
|
+
address_1: string;
|
|
179
|
+
city: string;
|
|
180
|
+
postal_code: string;
|
|
181
|
+
country_code: string;
|
|
182
|
+
address_2?: string | undefined;
|
|
183
|
+
province?: string | undefined;
|
|
184
|
+
company?: string | undefined;
|
|
185
|
+
phone?: string | undefined;
|
|
186
|
+
}, {
|
|
187
|
+
first_name: string;
|
|
188
|
+
last_name: string;
|
|
189
|
+
address_1: string;
|
|
190
|
+
city: string;
|
|
191
|
+
postal_code: string;
|
|
192
|
+
country_code: string;
|
|
193
|
+
address_2?: string | undefined;
|
|
194
|
+
province?: string | undefined;
|
|
195
|
+
company?: string | undefined;
|
|
196
|
+
phone?: string | undefined;
|
|
197
|
+
}>;
|
|
198
|
+
declare const EmailSchema: z.ZodObject<{
|
|
199
|
+
email: z.ZodString;
|
|
200
|
+
}, "strip", z.ZodTypeAny, {
|
|
201
|
+
email: string;
|
|
202
|
+
}, {
|
|
203
|
+
email: string;
|
|
204
|
+
}>;
|
|
205
|
+
declare const TransferOwnershipSchema: z.ZodEffects<z.ZodObject<{
|
|
206
|
+
current_owner_id: z.ZodString;
|
|
207
|
+
new_owner_id: z.ZodString;
|
|
208
|
+
}, "strip", z.ZodTypeAny, {
|
|
209
|
+
current_owner_id: string;
|
|
210
|
+
new_owner_id: string;
|
|
211
|
+
}, {
|
|
212
|
+
current_owner_id: string;
|
|
213
|
+
new_owner_id: string;
|
|
214
|
+
}>, {
|
|
215
|
+
current_owner_id: string;
|
|
216
|
+
new_owner_id: string;
|
|
217
|
+
}, {
|
|
218
|
+
current_owner_id: string;
|
|
219
|
+
new_owner_id: string;
|
|
220
|
+
}>;
|
|
221
|
+
|
|
96
222
|
type Action = {
|
|
97
223
|
icon: ReactNode;
|
|
98
224
|
label: string;
|
|
@@ -212,16 +338,16 @@ declare const ConfirmPrompt: ({ open, onOpenChange, variant, title, description,
|
|
|
212
338
|
|
|
213
339
|
declare const CustomerInfo: {
|
|
214
340
|
ID: ({ data }: {
|
|
215
|
-
data: HttpTypes.AdminOrder;
|
|
341
|
+
data: HttpTypes$1.AdminOrder;
|
|
216
342
|
}) => react_jsx_runtime.JSX.Element;
|
|
217
343
|
Company: ({ data }: {
|
|
218
|
-
data: HttpTypes.AdminOrder;
|
|
344
|
+
data: HttpTypes$1.AdminOrder;
|
|
219
345
|
}) => react_jsx_runtime.JSX.Element | null;
|
|
220
346
|
Contact: ({ data }: {
|
|
221
|
-
data: HttpTypes.AdminOrder;
|
|
347
|
+
data: HttpTypes$1.AdminOrder;
|
|
222
348
|
}) => react_jsx_runtime.JSX.Element;
|
|
223
349
|
Addresses: ({ data }: {
|
|
224
|
-
data: HttpTypes.AdminOrder;
|
|
350
|
+
data: HttpTypes$1.AdminOrder;
|
|
225
351
|
}) => react_jsx_runtime.JSX.Element;
|
|
226
352
|
};
|
|
227
353
|
|
|
@@ -709,8 +835,8 @@ declare function createDataGridHelper<TData, TFieldValues extends FieldValues>()
|
|
|
709
835
|
|
|
710
836
|
type CreateDataGridPriceColumnsProps<TData, TFieldValues extends FieldValues> = {
|
|
711
837
|
currencies?: string[];
|
|
712
|
-
regions?: HttpTypes.AdminRegion[];
|
|
713
|
-
pricePreferences?: HttpTypes.AdminPricePreference[];
|
|
838
|
+
regions?: HttpTypes$1.AdminRegion[];
|
|
839
|
+
pricePreferences?: HttpTypes$1.AdminPricePreference[];
|
|
714
840
|
isReadyOnly?: (context: FieldContext<TData>) => boolean;
|
|
715
841
|
getFieldName: (context: FieldContext<TData>, value: string) => FieldPath<TFieldValues> | null;
|
|
716
842
|
t: TFunction;
|
|
@@ -802,52 +928,10 @@ type QueryProps = {
|
|
|
802
928
|
};
|
|
803
929
|
declare const Query: ({ placeholder }: QueryProps) => react_jsx_runtime.JSX.Element;
|
|
804
930
|
|
|
805
|
-
declare const AddressSchema: z.ZodObject<{
|
|
806
|
-
first_name: z.ZodString;
|
|
807
|
-
last_name: z.ZodString;
|
|
808
|
-
company: z.ZodOptional<z.ZodString>;
|
|
809
|
-
address_1: z.ZodString;
|
|
810
|
-
address_2: z.ZodOptional<z.ZodString>;
|
|
811
|
-
city: z.ZodString;
|
|
812
|
-
postal_code: z.ZodString;
|
|
813
|
-
province: z.ZodOptional<z.ZodString>;
|
|
814
|
-
country_code: z.ZodString;
|
|
815
|
-
phone: z.ZodOptional<z.ZodString>;
|
|
816
|
-
}, "strip", z.ZodTypeAny, {
|
|
817
|
-
first_name: string;
|
|
818
|
-
last_name: string;
|
|
819
|
-
address_1: string;
|
|
820
|
-
city: string;
|
|
821
|
-
postal_code: string;
|
|
822
|
-
country_code: string;
|
|
823
|
-
company?: string | undefined;
|
|
824
|
-
address_2?: string | undefined;
|
|
825
|
-
province?: string | undefined;
|
|
826
|
-
phone?: string | undefined;
|
|
827
|
-
}, {
|
|
828
|
-
first_name: string;
|
|
829
|
-
last_name: string;
|
|
830
|
-
address_1: string;
|
|
831
|
-
city: string;
|
|
832
|
-
postal_code: string;
|
|
833
|
-
country_code: string;
|
|
834
|
-
company?: string | undefined;
|
|
835
|
-
address_2?: string | undefined;
|
|
836
|
-
province?: string | undefined;
|
|
837
|
-
phone?: string | undefined;
|
|
838
|
-
}>;
|
|
839
|
-
declare const EmailSchema: z.ZodObject<{
|
|
840
|
-
email: z.ZodString;
|
|
841
|
-
}, "strip", z.ZodTypeAny, {
|
|
842
|
-
email: string;
|
|
843
|
-
}, {
|
|
844
|
-
email: string;
|
|
845
|
-
}>;
|
|
846
|
-
|
|
847
931
|
type AddressFieldValues = z.infer<typeof AddressSchema>;
|
|
848
932
|
type AddressFormProps = {
|
|
849
933
|
control: Control<AddressFieldValues>;
|
|
850
|
-
countries?: HttpTypes.AdminRegionCountry[];
|
|
934
|
+
countries?: HttpTypes$1.AdminRegionCountry[];
|
|
851
935
|
layout: "grid" | "stack";
|
|
852
936
|
};
|
|
853
937
|
declare const AddressForm: ({ control, countries, layout, }: AddressFormProps) => react_jsx_runtime.JSX.Element;
|
|
@@ -914,6 +998,93 @@ type AttributeValueInputProps = {
|
|
|
914
998
|
};
|
|
915
999
|
declare const AttributeValueInput: ({ type, value, onChange, availableValues, placeholder, }: AttributeValueInputProps) => react_jsx_runtime.JSX.Element;
|
|
916
1000
|
|
|
1001
|
+
type ChipInputProps = {
|
|
1002
|
+
value?: string[];
|
|
1003
|
+
onChange?: (value: string[]) => void;
|
|
1004
|
+
onBlur?: () => void;
|
|
1005
|
+
name?: string;
|
|
1006
|
+
disabled?: boolean;
|
|
1007
|
+
allowDuplicates?: boolean;
|
|
1008
|
+
showRemove?: boolean;
|
|
1009
|
+
variant?: "base" | "contrast";
|
|
1010
|
+
placeholder?: string;
|
|
1011
|
+
className?: string;
|
|
1012
|
+
};
|
|
1013
|
+
declare const ChipInput: React$1.ForwardRefExoticComponent<ChipInputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
1014
|
+
|
|
1015
|
+
type ComboboxOption = {
|
|
1016
|
+
value: string;
|
|
1017
|
+
label: string;
|
|
1018
|
+
disabled?: boolean;
|
|
1019
|
+
};
|
|
1020
|
+
type Value = string[] | string;
|
|
1021
|
+
interface ComboboxProps<T extends Value = Value> extends Omit<ComponentPropsWithoutRef<"input">, "onChange" | "value"> {
|
|
1022
|
+
value?: T;
|
|
1023
|
+
onChange?: (value?: T) => void;
|
|
1024
|
+
searchValue?: string;
|
|
1025
|
+
onSearchValueChange?: (value: string) => void;
|
|
1026
|
+
options: ComboboxOption[];
|
|
1027
|
+
fetchNextPage?: () => void;
|
|
1028
|
+
isFetchingNextPage?: boolean;
|
|
1029
|
+
onCreateOption?: (value: string) => void;
|
|
1030
|
+
noResultsPlaceholder?: ReactNode;
|
|
1031
|
+
allowClear?: boolean;
|
|
1032
|
+
forceHideInput?: boolean;
|
|
1033
|
+
}
|
|
1034
|
+
declare const Combobox: <T extends Value = string>(props: ComboboxProps<T> & React$1.RefAttributes<HTMLInputElement>) => ReactNode;
|
|
1035
|
+
|
|
1036
|
+
type CountrySelectProps = ComponentPropsWithoutRef<typeof Select> & {
|
|
1037
|
+
placeholder?: string;
|
|
1038
|
+
defaultValue?: string;
|
|
1039
|
+
onChange?: (value: string) => void;
|
|
1040
|
+
};
|
|
1041
|
+
declare const CountrySelect: ComponentType<CountrySelectProps>;
|
|
1042
|
+
|
|
1043
|
+
type HandleInputProps = ComponentProps<typeof Input> & {
|
|
1044
|
+
prefix?: string;
|
|
1045
|
+
};
|
|
1046
|
+
declare const HandleInput: ComponentType<HandleInputProps>;
|
|
1047
|
+
|
|
1048
|
+
type InputProps = ComponentProps<typeof Input>;
|
|
1049
|
+
declare const DeprecatedPercentageInput: ForwardRefExoticComponent<InputProps>;
|
|
1050
|
+
declare const PercentageInput: ForwardRefExoticComponent<Omit<Pick<Omit<React$1.DetailedHTMLProps<React$1.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
|
|
1051
|
+
ref?: React$1.RefObject<HTMLInputElement> | ((instance: HTMLInputElement | null) => void | React$1.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React$1.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | null | undefined;
|
|
1052
|
+
}, "list" | "title" | "name" | "is" | "style" | "type" | "ref" | "content" | "onClick" | "form" | "slot" | "pattern" | "key" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "exportparts" | "part" | "children" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "size" | "autoComplete" | "minLength" | "readOnly" | "required" | "multiple" | "accept" | "src" | "alt" | "height" | "max" | "min" | "width" | "capture" | "checked"> & {
|
|
1053
|
+
allowDecimals?: boolean;
|
|
1054
|
+
allowNegativeValue?: boolean;
|
|
1055
|
+
id?: string;
|
|
1056
|
+
maxLength?: number;
|
|
1057
|
+
className?: string;
|
|
1058
|
+
customInput?: React$1.ElementType;
|
|
1059
|
+
decimalsLimit?: number;
|
|
1060
|
+
decimalScale?: number;
|
|
1061
|
+
defaultValue?: number | string;
|
|
1062
|
+
disabled?: boolean;
|
|
1063
|
+
fixedDecimalLength?: number;
|
|
1064
|
+
onValueChange?: (value: string | undefined, name?: string | undefined, values?: react_currency_input_field.CurrencyInputOnChangeValues) => void;
|
|
1065
|
+
placeholder?: string;
|
|
1066
|
+
prefix?: string;
|
|
1067
|
+
suffix?: string;
|
|
1068
|
+
step?: number;
|
|
1069
|
+
decimalSeparator?: string;
|
|
1070
|
+
groupSeparator?: string;
|
|
1071
|
+
disableGroupSeparators?: boolean;
|
|
1072
|
+
disableAbbreviations?: boolean;
|
|
1073
|
+
intlConfig?: react_currency_input_field.IntlConfig;
|
|
1074
|
+
transformRawValue?: (rawValue: string) => string;
|
|
1075
|
+
formatValueOnBlur?: boolean;
|
|
1076
|
+
value?: string | number;
|
|
1077
|
+
}, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
|
|
1078
|
+
|
|
1079
|
+
type ProvinceSelectProps = ComponentPropsWithoutRef<typeof Select> & {
|
|
1080
|
+
placeholder?: string;
|
|
1081
|
+
defaultValue?: string;
|
|
1082
|
+
country_code: string;
|
|
1083
|
+
valueAs?: "iso_2" | "name";
|
|
1084
|
+
onChange?: (value: string) => void;
|
|
1085
|
+
};
|
|
1086
|
+
declare const ProvinceSelect: ComponentType<ProvinceSelectProps>;
|
|
1087
|
+
|
|
917
1088
|
interface PageProps<TData> {
|
|
918
1089
|
children: ReactNode;
|
|
919
1090
|
data?: TData;
|
|
@@ -931,6 +1102,9 @@ declare const TwoColumnPage: (<TData>({ children, data, showJSON, showMetadata,
|
|
|
931
1102
|
Sidebar: ({ children, className, ...props }: ComponentPropsWithoutRef<"div">) => react_jsx_runtime.JSX.Element;
|
|
932
1103
|
};
|
|
933
1104
|
|
|
1105
|
+
type LocalizedTablePaginationProps = Omit<ComponentPropsWithoutRef<typeof Table.Pagination>, "translations">;
|
|
1106
|
+
declare const LocalizedTablePagination: React$1.ForwardRefExoticComponent<LocalizedTablePaginationProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1107
|
+
|
|
934
1108
|
type RouteModalFormProps<TFieldValues extends FieldValues> = PropsWithChildren<{
|
|
935
1109
|
form: UseFormReturn<TFieldValues>;
|
|
936
1110
|
blockSearchParams?: boolean;
|
|
@@ -1123,7 +1297,7 @@ interface DataTableRootProps<TData> {
|
|
|
1123
1297
|
/**
|
|
1124
1298
|
* The table instance to render
|
|
1125
1299
|
*/
|
|
1126
|
-
table: Table<TData>;
|
|
1300
|
+
table: Table$1<TData>;
|
|
1127
1301
|
/**
|
|
1128
1302
|
* The columns to render
|
|
1129
1303
|
*/
|
|
@@ -1261,6 +1435,17 @@ type HeaderProps = {
|
|
|
1261
1435
|
declare const TextCell: ({ text, align, maxWidth }: CellProps) => react_jsx_runtime.JSX.Element;
|
|
1262
1436
|
declare const TextHeader: ({ text, align }: HeaderProps) => react_jsx_runtime.JSX.Element;
|
|
1263
1437
|
|
|
1438
|
+
declare const ErrorBoundary: () => react_jsx_runtime.JSX.Element;
|
|
1439
|
+
|
|
1440
|
+
declare function genericForwardRef<T, P = {}>(render: (props: P, ref: Ref<T>) => ReactNode): (props: P & RefAttributes<T>) => ReactNode;
|
|
1441
|
+
|
|
1442
|
+
/**
|
|
1443
|
+
* A form that can only be submitted when using the meta or control key.
|
|
1444
|
+
*/
|
|
1445
|
+
declare const KeyboundForm: React__default.ForwardRefExoticComponent<React__default.FormHTMLAttributes<HTMLFormElement> & React__default.RefAttributes<HTMLFormElement>>;
|
|
1446
|
+
|
|
1447
|
+
declare const VisuallyHidden: ({ children }: PropsWithChildren) => react_jsx_runtime.JSX.Element;
|
|
1448
|
+
|
|
1264
1449
|
declare const useCombinedRefs: <T>(...refs: (Ref<T> | undefined)[]) => RefCallback<T>;
|
|
1265
1450
|
|
|
1266
1451
|
/**
|
|
@@ -1685,12 +1870,12 @@ declare const buildOfferGridData: (offers: OfferDTO[], products: ProductWithVari
|
|
|
1685
1870
|
variantIdByOffer: Record<string, string>;
|
|
1686
1871
|
};
|
|
1687
1872
|
|
|
1688
|
-
declare const getPriceListStatus: (t: TFunction<"translation">, priceList: HttpTypes.AdminPriceList) => {
|
|
1873
|
+
declare const getPriceListStatus: (t: TFunction<"translation">, priceList: HttpTypes$1.AdminPriceList) => {
|
|
1689
1874
|
color: "green" | "grey" | "orange" | "red";
|
|
1690
1875
|
text: string;
|
|
1691
1876
|
status: string;
|
|
1692
1877
|
};
|
|
1693
|
-
declare const isProductRow: (row: HttpTypes.AdminProduct | HttpTypes.AdminProductVariant) => row is HttpTypes.AdminProduct;
|
|
1878
|
+
declare const isProductRow: (row: HttpTypes$1.AdminProduct | HttpTypes$1.AdminProductVariant) => row is HttpTypes$1.AdminProduct;
|
|
1694
1879
|
type OfferCurrencyPrice = {
|
|
1695
1880
|
amount?: string | number;
|
|
1696
1881
|
};
|
|
@@ -1705,7 +1890,7 @@ type ExtractableOffers = Record<string, ExtractableOffer>;
|
|
|
1705
1890
|
* carries its `offer_id` rule so the override is scoped to that seller's offer
|
|
1706
1891
|
* and never leaks onto another seller's offer of the same variant.
|
|
1707
1892
|
*/
|
|
1708
|
-
declare const extractPricesFromOffers: (offers: ExtractableOffers, regions: HttpTypes.AdminRegion[]) => {
|
|
1893
|
+
declare const extractPricesFromOffers: (offers: ExtractableOffers, regions: HttpTypes$1.AdminRegion[]) => {
|
|
1709
1894
|
amount: number;
|
|
1710
1895
|
rules: {
|
|
1711
1896
|
region_id?: string | undefined;
|
|
@@ -1715,4 +1900,4 @@ declare const extractPricesFromOffers: (offers: ExtractableOffers, regions: Http
|
|
|
1715
1900
|
variant_id: string;
|
|
1716
1901
|
}[];
|
|
1717
1902
|
|
|
1718
|
-
export { type Action, type ActionGroup, ActionMenu, AddressForm, type AttributeChange, type AttributeChangeKind, AttributeValueInput, BadgeListSummary, ChipGroup, CodeCell, CodeHeader, type Command, ConditionalTooltip, ConfirmPrompt, type ConfirmPromptProps, type CoreNavItem, CreatedAtCell, CreatedAtHeader, type CustomFieldsModule, CustomerInfo, DataGrid, DataTable, DateCell, DateHeader, DateRangeDisplay, DisplayExtensionZone, type DisplayExtensionZoneProps, DisplayField, type DisplayFieldProps, DisplaySection, type DisplaySectionField, type DisplaySectionProps, type EditAttributeAttribute, EditAttributeForm, type EditAttributeFormProps, EmailCell, EmailForm, EmailHeader, type ExtendableTable, ExtensionProvider, type ExtensionProviderProps, ExtensionRegistry, type ExtractableOffer, type ExtractableOffers, type FieldDiff, FilePreview, type FileType, FileUpload, type FileUploadProps, type Filter, FilterGroup, Form, FormExtensionZone, type FormExtensionZoneProps, GeneralSectionSkeleton, HeadingSkeleton, IconAvatar, IconButtonSkeleton, ImageAvatar, type ImageRef, IncludesTaxTooltip, InfiniteList, JsonViewSection, JsonViewSectionSkeleton, LinkButton, ListBadge, ListSummary, Listicle, type ListicleProps, type MediaDiff, MetadataForm, MetadataSection, MoneyAmountCell, NameCell, NameHeader, type NavigationModule, NoRecords, type NoRecordsProps, NoResults, type NoResultsProps, OrderBy, PlaceholderCell, PriceListDateStatus, type PriceListGridGroupRow, type PriceListGridOfferRow, type PriceListGridRow, PriceListStatus, PriceListType, type ProductAttributeBatchPayload, ProductAttributeSection, type ProductAttributeSectionProps, type ProductChangeAttribute, ProductChangePanel, type ProductChangePanelProps, type ProductChangeProduct, type ProductChangeResolvers, type ProductChangeVariant, type ProductChangeView, ProgressBar, Query, REFERENCE_FIELDS, type ReferenceField, type ResolvedAttribute, type ResolvedDisplays, type ResolvedFormField, RouteDrawer, RouteFocusModal, SectionRow, type SectionRowProps, SegmentedControl, type SegmentedControlOption, SidebarLink, type SidebarLinkProps, SingleColumnPage, SingleColumnPageSkeleton, Skeleton, SortableList, SortableTree, StackedDrawer, StackedFocusModal, StatusCell, SwitchBox, type TQueryKey, type TabDefinition, TabbedForm, TableFooterSkeleton, TableSectionSkeleton, TableSkeleton, TextCell, TextHeader, TextSkeleton, Thumbnail, TwoColumnPage, TwoColumnPageSkeleton, type UseExtendableFormProps, type UseExtendableTableProps, type UseQueryOptionsWrapper, type VariantGroup, type Widget, type WidgetModule, type WidgetPlacement, WidgetZone, type WidgetZoneProps, type ZoneWidgets, _DataTable, applyNavOverrides, buildAdditionalDataDefaults, buildAdditionalDataSchema, buildOfferGridData, buildProductChangeView, createDataGridHelper, createDataGridPriceColumns, createFormHelper, extractPricesFromOffers, extractReferenceIds, formatFieldValue, getExtensionRegistry, getLinkQuery, getPriceListStatus, humanizeFieldName, isImageList, isPriceListGroupRow, isProductRow, isReferenceField, linkFields, productChangeViewHasContent, queryKeysFactory, useCombinedRefs, useCommandHistory, useDataTable, useDate, useDisplayFieldOverride, useDocumentDirection, useExtendableForm, useExtendableTable, useExtension, useLinkQuery, useQueryParams, useRouteModal, useStackedModal, useTabManagement, useTabbedForm, withLinkFields };
|
|
1903
|
+
export { type Action, type ActionGroup, ActionMenu, AddressForm, AddressSchema, type AttributeChange, type AttributeChangeKind, AttributeValueInput, BadgeListSummary, ChipGroup, ChipInput, CodeCell, CodeHeader, Combobox, type Command, ConditionalTooltip, ConfirmPrompt, type ConfirmPromptProps, type CoreNavItem, CountrySelect, CreatedAtCell, CreatedAtHeader, type CurrencyInfo, type CustomFieldsModule, CustomerInfo, DataGrid, DataTable, DateCell, DateHeader, DateRangeDisplay, DeprecatedPercentageInput, DisplayExtensionZone, type DisplayExtensionZoneProps, DisplayField, type DisplayFieldProps, DisplaySection, type DisplaySectionField, type DisplaySectionProps, type EditAttributeAttribute, EditAttributeForm, type EditAttributeFormProps, EmailCell, EmailForm, EmailHeader, EmailSchema, ErrorBoundary, type ExtendableTable, ExtensionProvider, type ExtensionProviderProps, ExtensionRegistry, type ExtractableOffer, type ExtractableOffers, type FieldDiff, FilePreview, type FileType, FileUpload, type FileUploadProps, type Filter, FilterGroup, Form, FormExtensionZone, type FormExtensionZoneProps, GeneralSectionSkeleton, HandleInput, HeadingSkeleton, IconAvatar, IconButtonSkeleton, ImageAvatar, type ImageRef, IncludesTaxTooltip, InfiniteList, JsonViewSection, JsonViewSectionSkeleton, KeyboundForm, LinkButton, ListBadge, ListSummary, Listicle, type ListicleProps, LocalizedTablePagination, type MediaDiff, MetadataForm, MetadataSection, MoneyAmountCell, NameCell, NameHeader, type NavigationModule, NoRecords, type NoRecordsProps, NoResults, type NoResultsProps, OrderBy, PercentageInput, PlaceholderCell, PriceListDateStatus, type PriceListGridGroupRow, type PriceListGridOfferRow, type PriceListGridRow, PriceListStatus, PriceListType, type ProductAttributeBatchPayload, ProductAttributeSection, type ProductAttributeSectionProps, type ProductChangeAttribute, ProductChangePanel, type ProductChangePanelProps, type ProductChangeProduct, type ProductChangeResolvers, type ProductChangeVariant, type ProductChangeView, ProgressBar, ProvinceSelect, Query, REFERENCE_FIELDS, type ReferenceField, type ResolvedAttribute, type ResolvedDisplays, type ResolvedFormField, RouteDrawer, RouteFocusModal, SectionRow, type SectionRowProps, SegmentedControl, type SegmentedControlOption, SidebarLink, type SidebarLinkProps, SingleColumnPage, SingleColumnPageSkeleton, Skeleton, SortableList, SortableTree, StackedDrawer, StackedFocusModal, type StaticCountry, StatusCell, SwitchBox, type TQueryKey, type TabDefinition, TabbedForm, TableFooterSkeleton, TableSectionSkeleton, TableSkeleton, TextCell, TextHeader, TextSkeleton, Thumbnail, TransferOwnershipSchema, TwoColumnPage, TwoColumnPageSkeleton, type UseExtendableFormProps, type UseExtendableTableProps, type UseQueryOptionsWrapper, type VariantGroup, VisuallyHidden, type Widget, type WidgetModule, type WidgetPlacement, WidgetZone, type WidgetZoneProps, type ZoneWidgets, _DataTable, applyNavOverrides, buildAdditionalDataDefaults, buildAdditionalDataSchema, buildOfferGridData, buildProductChangeView, countries, createDataGridHelper, createDataGridPriceColumns, createFormHelper, currencies, extractPricesFromOffers, extractReferenceIds, formatFieldValue, genericForwardRef, getCountryByIso2, getCurrencySymbol, getDecimalDigits, getExtensionRegistry, getFormattedAddress, getFormattedCountry, getLinkQuery, getLocaleAmount, getNativeSymbol, getPriceListStatus, getStylizedAmount, humanizeFieldName, isAmountLessThenRoundingError, isImageList, isPriceListGroupRow, isProductRow, isReferenceField, isSameAddress, linkFields, productChangeViewHasContent, queryClient, queryKeysFactory, useCombinedRefs, useCommandHistory, useDataTable, useDate, useDisplayFieldOverride, useDocumentDirection, useExtendableForm, useExtendableTable, useExtension, useLinkQuery, useQueryParams, useRouteModal, useStackedModal, useTabManagement, useTabbedForm, withLinkFields };
|