Enable method signature style ESLint rule (#3849)

* Remove redundant rules handled by prettier

* Turn on method-signature-style

* Auto-lint files according to method-signature-style rule

* Add changeset
This commit is contained in:
Michał Droń 2023-07-05 11:19:58 +02:00 committed by GitHub
parent 72d4df482e
commit 8d16513eab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
52 changed files with 114 additions and 112 deletions

View file

@ -0,0 +1,5 @@
---
"saleor-dashboard": patch
---
Enable method signature style ESLint rule

View file

@ -64,9 +64,6 @@
// These rules should be reviewed - tracked in // These rules should be reviewed - tracked in
// Tracked in https://github.com/saleor/saleor-dashboard/issues/3813 // Tracked in https://github.com/saleor/saleor-dashboard/issues/3813
"@typescript-eslint/consistent-type-imports": "off", "@typescript-eslint/consistent-type-imports": "off",
"@typescript-eslint/indent": "off",
"@typescript-eslint/member-delimiter-style": "off",
"@typescript-eslint/method-signature-style": "off",
"@typescript-eslint/no-confusing-void-expression": "off", "@typescript-eslint/no-confusing-void-expression": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off", "@typescript-eslint/no-unnecessary-type-assertion": "off",
"@typescript-eslint/prefer-reduce-type-parameter": "off", "@typescript-eslint/prefer-reduce-type-parameter": "off",

View file

@ -22,7 +22,7 @@ interface Props {
refetch?: () => void; refetch?: () => void;
dashboardVersion: string; dashboardVersion: string;
coreVersion?: string; coreVersion?: string;
onError?(): void; onError?: () => void;
} }
const getOrigin = (url: string) => new URL(url).origin; const getOrigin = (url: string) => new URL(url).origin;

View file

@ -10,8 +10,8 @@ const messages = AppPermissionsDialogMessages.confirmation;
interface Props { interface Props {
removedPermissions: PermissionEnum[]; removedPermissions: PermissionEnum[];
addedPermissions: PermissionEnum[]; addedPermissions: PermissionEnum[];
onBack(): void; onBack: () => void;
onApprove(): void; onApprove: () => void;
} }
export const AppPermissionsDialogConfirmation = ({ export const AppPermissionsDialogConfirmation = ({

View file

@ -10,9 +10,9 @@ const messages = AppPermissionsDialogMessages.permissionsPicker;
interface AppPermissionsDialogPermissionPickerProps { interface AppPermissionsDialogPermissionPickerProps {
allPermissions: AppPermission[]; allPermissions: AppPermission[];
selected: PermissionEnum[]; selected: PermissionEnum[];
onSubmit(): void; onSubmit: () => void;
onChange(codes: PermissionEnum[]): void; onChange: (codes: PermissionEnum[]) => void;
onClose(): void; onClose: () => void;
} }
/** /**

View file

@ -9,7 +9,7 @@ import { messages } from "./messages";
import { useStyles } from "./styles"; import { useStyles } from "./styles";
interface InstallWithManifestFormButtonProps { interface InstallWithManifestFormButtonProps {
onSubmitted(manifestUrl: string): void; onSubmitted: (manifestUrl: string) => void;
} }
export const InstallWithManifestFormButton: React.FC< export const InstallWithManifestFormButton: React.FC<

View file

@ -21,11 +21,11 @@ export interface Extension {
label: string; label: string;
mount: AppExtensionMountEnum; mount: AppExtensionMountEnum;
url: string; url: string;
open(): void; open: () => void;
} }
export interface ExtensionWithParams extends Omit<Extension, "open"> { export interface ExtensionWithParams extends Omit<Extension, "open"> {
open(params: AppDetailsUrlMountQueryParams): void; open: (params: AppDetailsUrlMountQueryParams) => void;
} }
export const extensionMountPoints = { export const extensionMountPoints = {

View file

@ -20,7 +20,7 @@ export interface CategoryCreatePageProps {
disabled: boolean; disabled: boolean;
saveButtonBarState: ConfirmButtonTransitionState; saveButtonBarState: ConfirmButtonTransitionState;
backUrl: string; backUrl: string;
onSubmit(data: CategoryCreateData); onSubmit: (data: CategoryCreateData) => any;
} }
export const CategoryCreatePage: React.FC<CategoryCreatePageProps> = ({ export const CategoryCreatePage: React.FC<CategoryCreatePageProps> = ({

View file

@ -31,8 +31,8 @@ const useStyles = makeStyles(
export interface CategoryDeleteDialogProps { export interface CategoryDeleteDialogProps {
open: boolean; open: boolean;
name: string; name: string;
onClose(); onClose: () => any;
onConfirm(); onConfirm: () => any;
} }
const CategoryDeleteDialog: React.FC<CategoryDeleteDialogProps> = props => { const CategoryDeleteDialog: React.FC<CategoryDeleteDialogProps> = props => {

View file

@ -45,8 +45,8 @@ export interface CategoryUpdatePageProps {
onProductsDelete: () => void; onProductsDelete: () => void;
onSelectProductsIds: (ids: number[], clearSelection: () => void) => void; onSelectProductsIds: (ids: number[], clearSelection: () => void) => void;
onSelectCategoriesIds: (ids: number[], clearSelection: () => void) => void; onSelectCategoriesIds: (ids: number[], clearSelection: () => void) => void;
onImageUpload(file: File); onImageUpload: (file: File) => any;
onDelete(); onDelete: () => any;
} }
const CategoriesTab = Tab(CategoryPageTab.categories); const CategoriesTab = Tab(CategoryPageTab.categories);

View file

@ -16,7 +16,7 @@ export interface ActionDialogProps extends DialogProps {
title: string; title: string;
variant?: ActionDialogVariant; variant?: ActionDialogVariant;
backButtonText?: string; backButtonText?: string;
onConfirm(); onConfirm: () => any;
} }
const ActionDialog: React.FC<ActionDialogProps> = props => { const ActionDialog: React.FC<ActionDialogProps> = props => {

View file

@ -18,7 +18,7 @@ interface DialogButtonsProps {
children?: React.ReactNode; children?: React.ReactNode;
showBackButton?: boolean; showBackButton?: boolean;
backButtonText?: string; backButtonText?: string;
onConfirm(); onConfirm: () => any;
} }
const DialogButtons: React.FC<DialogButtonsProps> = props => { const DialogButtons: React.FC<DialogButtonsProps> = props => {

View file

@ -32,8 +32,8 @@ interface AddressEditProps {
data: AddressTypeInput; data: AddressTypeInput;
disabled?: boolean; disabled?: boolean;
errors: Array<AccountErrorFragment | OrderErrorFragment>; errors: Array<AccountErrorFragment | OrderErrorFragment>;
onChange(event: React.ChangeEvent<any>); onChange: (event: React.ChangeEvent<any>) => any;
onCountryChange(event: React.ChangeEvent<any>); onCountryChange: (event: React.ChangeEvent<any>) => any;
} }
const PossibleFormFields = { const PossibleFormFields = {

View file

@ -18,7 +18,7 @@ import { useStyles } from "./styles";
interface Option { interface Option {
label: string; label: string;
disabled?: boolean; disabled?: boolean;
onSelect(e: React.MouseEvent<HTMLLIElement, MouseEvent>): void; onSelect: (e: React.MouseEvent<HTMLLIElement, MouseEvent>) => void;
} }
export interface ButtonWithSelectProps export interface ButtonWithSelectProps

View file

@ -11,7 +11,7 @@ export interface ControlledCheckboxProps {
disabled?: boolean; disabled?: boolean;
checkedIcon?: React.ReactNode; checkedIcon?: React.ReactNode;
testId?: string; testId?: string;
onChange(event: any); onChange: (event: any) => any;
} }
export const ControlledCheckbox: React.FC<ControlledCheckboxProps> = ({ export const ControlledCheckbox: React.FC<ControlledCheckboxProps> = ({

View file

@ -20,7 +20,7 @@ interface ControlledSwitchProps {
name: string; name: string;
secondLabel?: string | React.ReactNode; secondLabel?: string | React.ReactNode;
uncheckedLabel?: string | React.ReactNode; uncheckedLabel?: string | React.ReactNode;
onChange?(event: React.ChangeEvent<any>); onChange?: (event: React.ChangeEvent<any>) => any;
} }
export const ControlledSwitch: React.FC<ControlledSwitchProps> = props => { export const ControlledSwitch: React.FC<ControlledSwitchProps> = props => {

View file

@ -50,7 +50,7 @@ interface EditableTableCellProps {
focused?: boolean; focused?: boolean;
InputProps?: TextFieldProps; InputProps?: TextFieldProps;
value: string; value: string;
onConfirm(value: string): any; onConfirm: (value: string) => any;
} }
export const EditableTableCell: React.FC<EditableTableCellProps> = props => { export const EditableTableCell: React.FC<EditableTableCellProps> = props => {

View file

@ -6,7 +6,7 @@ import React from "react";
import { useIntl } from "react-intl"; import { useIntl } from "react-intl";
export interface FilterCardProps { export interface FilterCardProps {
handleClear(); handleClear: () => any;
} }
const FilterCard: React.FC<FilterCardProps> = ({ children, handleClear }) => { const FilterCard: React.FC<FilterCardProps> = ({ children, handleClear }) => {

View file

@ -44,7 +44,7 @@ interface MultiSelectFieldProps {
name?: string; name?: string;
selectProps?: SelectProps; selectProps?: SelectProps;
value?: string[]; value?: string[];
onChange(event: any); onChange: (event: any) => any;
} }
export const MultiSelectField: React.FC<MultiSelectFieldProps> = props => { export const MultiSelectField: React.FC<MultiSelectFieldProps> = props => {

View file

@ -21,7 +21,7 @@ interface PhoneFieldProps {
number: string; number: string;
prefixes: string[]; prefixes: string[];
label?: string; label?: string;
onChange(event: React.ChangeEvent<any>); onChange: (event: React.ChangeEvent<any>) => any;
} }
const PhoneField: React.FC<PhoneFieldProps> = props => { const PhoneField: React.FC<PhoneFieldProps> = props => {

View file

@ -43,7 +43,7 @@ export interface PriceFieldProps {
inputProps?: InputProps["inputProps"]; inputProps?: InputProps["inputProps"];
InputLabelProps?: InputLabelProps; InputLabelProps?: InputLabelProps;
required?: boolean; required?: boolean;
onChange(event: any); onChange: (event: any) => any;
} }
export const PriceField: React.FC<PriceFieldProps> = props => { export const PriceField: React.FC<PriceFieldProps> = props => {

View file

@ -34,7 +34,7 @@ interface RowNumberSelectProps {
choices: number[]; choices: number[];
className?: string; className?: string;
rowNumber: number; rowNumber: number;
onChange(value: number); onChange: (value: number) => any;
} }
const RowNumberSelect: React.FC<RowNumberSelectProps> = ({ const RowNumberSelect: React.FC<RowNumberSelectProps> = ({

View file

@ -54,8 +54,8 @@ interface SeoFormProps {
slug: string; slug: string;
slugPlaceholder?: string; slugPlaceholder?: string;
titlePlaceholder: string; titlePlaceholder: string;
onChange(event: any); onChange: (event: any) => any;
onClick?(); onClick?: () => any;
} }
export const SeoForm: React.FC<SeoFormProps> = props => { export const SeoForm: React.FC<SeoFormProps> = props => {

View file

@ -60,7 +60,7 @@ interface SingleSelectFieldProps {
placeholder?: string; placeholder?: string;
value?: string; value?: string;
InputProps?: OutlinedInputProps; InputProps?: OutlinedInputProps;
onChange(event: any); onChange: (event: any) => any;
} }
export const SingleSelectField: React.FC<SingleSelectFieldProps> = props => { export const SingleSelectField: React.FC<SingleSelectFieldProps> = props => {

View file

@ -58,8 +58,8 @@ export interface TablePaginationActionsProps {
hasNextPage: boolean; hasNextPage: boolean;
hasPreviousPage: boolean; hasPreviousPage: boolean;
nextIconButtonProps?: any; nextIconButtonProps?: any;
onNextPage(event); onNextPage: (event) => any;
onPreviousPage(event); onPreviousPage: (event) => any;
} }
export const TablePaginationActions: React.FC< export const TablePaginationActions: React.FC<

View file

@ -67,8 +67,8 @@ interface TimelineAddNoteProps {
disabled?: boolean; disabled?: boolean;
message: string; message: string;
reset: () => void; reset: () => void;
onChange(event: React.ChangeEvent<any>); onChange: (event: React.ChangeEvent<any>) => any;
onSubmit(event: React.FormEvent<any>); onSubmit: (event: React.FormEvent<any>) => any;
} }
export const Timeline: React.FC<TimelineProps> = props => { export const Timeline: React.FC<TimelineProps> = props => {

View file

@ -26,8 +26,8 @@ export interface CustomerCreateAddressProps {
data: AddressTypeInput; data: AddressTypeInput;
disabled: boolean; disabled: boolean;
errors: AccountErrorFragment[]; errors: AccountErrorFragment[];
onChange(event: React.ChangeEvent<any>); onChange: (event: React.ChangeEvent<any>) => any;
onCountryChange(event: React.ChangeEvent<any>); onCountryChange: (event: React.ChangeEvent<any>) => any;
} }
const CustomerCreateAddress: React.FC<CustomerCreateAddressProps> = props => { const CustomerCreateAddress: React.FC<CustomerCreateAddressProps> = props => {

View file

@ -1,9 +1,9 @@
import { FlagList } from "./availableFlags"; import { FlagList } from "./availableFlags";
export interface Strategy { export interface Strategy {
fetchAll(): Promise<FlagList>; fetchAll: () => Promise<FlagList>;
} }
export interface PersistableStrategy extends Strategy { export interface PersistableStrategy extends Strategy {
store?(flags: FlagList): Promise<void>; store?: (flags: FlagList) => Promise<void>;
} }

View file

@ -44,7 +44,7 @@ export interface OrderChangeWarehouseDialogProps {
line: OrderFulfillLineFragment; line: OrderFulfillLineFragment;
currentWarehouseId: string; currentWarehouseId: string;
onConfirm: (warehouse: WarehouseFragment) => void; onConfirm: (warehouse: WarehouseFragment) => void;
onClose(); onClose: () => any;
} }
export const OrderChangeWarehouseDialog: React.FC< export const OrderChangeWarehouseDialog: React.FC<

View file

@ -64,10 +64,10 @@ export interface OrderCustomerAddressesEditDialogProps {
customerAddresses?: AddressFragment[]; customerAddresses?: AddressFragment[];
defaultShippingAddress?: Node; defaultShippingAddress?: Node;
defaultBillingAddress?: Node; defaultBillingAddress?: Node;
onClose(); onClose: () => any;
onConfirm( onConfirm: (
data: Partial<OrderCustomerAddressesEditDialogOutput>, data: Partial<OrderCustomerAddressesEditDialogOutput>,
): SubmitPromise<any[]>; ) => SubmitPromise<any[]>;
} }
const defaultSearchState: OrderCustomerSearchAddressState = { const defaultSearchState: OrderCustomerSearchAddressState = {

View file

@ -35,7 +35,7 @@ export interface OrderCustomerAddressesSearchProps {
customerAddresses: AddressFragment[]; customerAddresses: AddressFragment[];
onChangeCustomerShippingAddress: (customerAddress: AddressFragment) => void; onChangeCustomerShippingAddress: (customerAddress: AddressFragment) => void;
onChangeCustomerBillingAddress: (customerAddress: AddressFragment) => void; onChangeCustomerBillingAddress: (customerAddress: AddressFragment) => void;
exitSearch(); exitSearch: () => any;
} }
const OrderCustomerAddressesSearch: React.FC< const OrderCustomerAddressesSearch: React.FC<

View file

@ -25,7 +25,7 @@ import { useStyles } from "./styles";
export interface OrderCustomerChangeDialogProps { export interface OrderCustomerChangeDialogProps {
open: boolean; open: boolean;
onConfirm: (data: OrderCustomerChangeData) => void; onConfirm: (data: OrderCustomerChangeData) => void;
onClose(); onClose: () => any;
} }
const OrderCustomerChangeDialog: React.FC< const OrderCustomerChangeDialog: React.FC<

View file

@ -64,27 +64,27 @@ export interface OrderDetailsPageProps {
) => void; ) => void;
onOrderLineRemove?: (id: string) => void; onOrderLineRemove?: (id: string) => void;
onShippingMethodEdit?: () => void; onShippingMethodEdit?: () => void;
onBillingAddressEdit(); onBillingAddressEdit: () => any;
onFulfillmentApprove(id: string); onFulfillmentApprove: (id: string) => any;
onFulfillmentCancel(id: string); onFulfillmentCancel: (id: string) => any;
onFulfillmentTrackingNumberUpdate(id: string); onFulfillmentTrackingNumberUpdate: (id: string) => any;
onOrderFulfill(); onOrderFulfill: () => any;
onProductClick?(id: string); onProductClick?: (id: string) => any;
onPaymentCapture(); onPaymentCapture: () => any;
onMarkAsPaid(); onMarkAsPaid: () => any;
onPaymentRefund(); onPaymentRefund: () => any;
onPaymentVoid(); onPaymentVoid: () => any;
onShippingAddressEdit(); onShippingAddressEdit: () => any;
onOrderCancel(); onOrderCancel: () => any;
onNoteAdd(data: HistoryFormData); onNoteAdd: (data: HistoryFormData) => any;
onProfileView(); onProfileView: () => any;
onOrderReturn(); onOrderReturn: () => any;
onInvoiceClick(invoiceId: string); onInvoiceClick: (invoiceId: string) => any;
onInvoiceGenerate(); onInvoiceGenerate: () => any;
onInvoiceSend(invoiceId: string); onInvoiceSend: (invoiceId: string) => any;
onTransactionAction(transactionId: string, actionType: TransactionActionEnum); onTransactionAction: (transactionId: string, actionType: TransactionActionEnum) => any;
onAddManualTransaction(); onAddManualTransaction: () => any;
onSubmit(data: MetadataIdSchema): SubmitPromise; onSubmit: (data: MetadataIdSchema) => SubmitPromise;
} }
const OrderDetailsPage: React.FC<OrderDetailsPageProps> = props => { const OrderDetailsPage: React.FC<OrderDetailsPageProps> = props => {

View file

@ -27,8 +27,8 @@ export interface OrderFulfillStockExceededDialogProps {
open: boolean; open: boolean;
formsetData: OrderFulfillStockFormsetData; formsetData: OrderFulfillStockFormsetData;
confirmButtonState: ConfirmButtonTransitionState; confirmButtonState: ConfirmButtonTransitionState;
onSubmit(); onSubmit: () => any;
onClose(); onClose: () => any;
} }
const OrderFulfillStockExceededDialog: React.FC< const OrderFulfillStockExceededDialog: React.FC<

View file

@ -17,8 +17,8 @@ interface AcionButtonsProps {
orderIsPaid?: boolean; orderIsPaid?: boolean;
fulfillmentAllowUnpaid: boolean; fulfillmentAllowUnpaid: boolean;
hasTransactions: boolean; hasTransactions: boolean;
onTrackingCodeAdd(); onTrackingCodeAdd: () => any;
onApprove(); onApprove: () => any;
} }
const statusesToShow = [ const statusesToShow = [

View file

@ -29,8 +29,8 @@ export interface OrderFulfillmentAcceptDialogProps {
confirmButtonState: ConfirmButtonTransitionState; confirmButtonState: ConfirmButtonTransitionState;
errors: OrderErrorFragment[]; errors: OrderErrorFragment[];
open: boolean; open: boolean;
onClose(): void; onClose: () => void;
onConfirm(data: OrderFulfillmentAcceptDialogFormData): void; onConfirm: (data: OrderFulfillmentAcceptDialogFormData) => void;
} }
const OrderFulfillmentAcceptDialog: React.FC< const OrderFulfillmentAcceptDialog: React.FC<

View file

@ -46,8 +46,8 @@ export interface OrderFulfillmentCancelDialogProps {
errors: OrderErrorFragment[]; errors: OrderErrorFragment[];
open: boolean; open: boolean;
warehouses: WarehouseFragment[]; warehouses: WarehouseFragment[];
onClose(); onClose: () => any;
onConfirm(data: OrderFulfillmentCancelDialogFormData); onConfirm: (data: OrderFulfillmentCancelDialogFormData) => any;
} }
const OrderFulfillmentCancelDialog: React.FC< const OrderFulfillmentCancelDialog: React.FC<

View file

@ -31,8 +31,8 @@ export interface OrderFulfillmentTrackingDialogProps {
errors: OrderErrorFragment[]; errors: OrderErrorFragment[];
open: boolean; open: boolean;
trackingNumber: string; trackingNumber: string;
onClose(); onClose: () => any;
onConfirm(data: FormData); onConfirm: (data: FormData) => any;
} }
const OrderFulfillmentTrackingDialog: React.FC< const OrderFulfillmentTrackingDialog: React.FC<

View file

@ -14,12 +14,12 @@ import { OrderTransactionsWrapper } from "./OrderTransactionsWrapper";
export interface OrderPaymentOrTransactionProps { export interface OrderPaymentOrTransactionProps {
order: OrderDetailsFragment; order: OrderDetailsFragment;
shop: OrderDetailsQuery["shop"]; shop: OrderDetailsQuery["shop"];
onTransactionAction(transactionId: string, actionType: TransactionActionEnum); onTransactionAction: (transactionId: string, actionType: TransactionActionEnum) => any;
onPaymentCapture(); onPaymentCapture: () => any;
onPaymentVoid(); onPaymentVoid: () => any;
onPaymentRefund(); onPaymentRefund: () => any;
onMarkAsPaid(); onMarkAsPaid: () => any;
onAddManualTransaction(); onAddManualTransaction: () => any;
} }
export const OrderPaymentOrTransaction: React.FC< export const OrderPaymentOrTransaction: React.FC<

View file

@ -20,11 +20,11 @@ import { getFilteredPayments } from "./utils";
interface OrderTransactionsWrapper { interface OrderTransactionsWrapper {
order: OrderDetailsFragment; order: OrderDetailsFragment;
shop: OrderDetailsQuery["shop"]; shop: OrderDetailsQuery["shop"];
onTransactionAction(transactionId: string, actionType: TransactionActionEnum); onTransactionAction: (transactionId: string, actionType: TransactionActionEnum) => any;
onPaymentCapture(); onPaymentCapture: () => any;
onMarkAsPaid(); onMarkAsPaid: () => any;
onPaymentVoid(); onPaymentVoid: () => any;
onAddManualTransaction(); onAddManualTransaction: () => any;
} }
export const OrderTransactionsWrapper: React.FC<OrderTransactionsWrapper> = ({ export const OrderTransactionsWrapper: React.FC<OrderTransactionsWrapper> = ({

View file

@ -22,8 +22,8 @@ export interface OrderPaymentVoidDialogProps {
confirmButtonState: ConfirmButtonTransitionState; confirmButtonState: ConfirmButtonTransitionState;
errors: OrderErrorFragment[]; errors: OrderErrorFragment[];
open: boolean; open: boolean;
onClose?(); onClose?: () => any;
onConfirm?(); onConfirm?: () => any;
} }
const OrderPaymentVoidDialog: React.FC<OrderPaymentVoidDialogProps> = ({ const OrderPaymentVoidDialog: React.FC<OrderPaymentVoidDialogProps> = ({

View file

@ -103,7 +103,7 @@ interface OrderReturnRefundLinesCardProps {
itemsSelections: FormsetReplacementData; itemsSelections: FormsetReplacementData;
itemsQuantities: FormsetQuantityData; itemsQuantities: FormsetQuantityData;
onChangeSelected: FormsetChange<boolean>; onChangeSelected: FormsetChange<boolean>;
onSetMaxQuantity(); onSetMaxQuantity: () => any;
} }
const ItemsCard: React.FC<OrderReturnRefundLinesCardProps> = ({ const ItemsCard: React.FC<OrderReturnRefundLinesCardProps> = ({

View file

@ -44,7 +44,7 @@ interface OrderReturnRefundLinesCardProps {
itemsSelections: FormsetReplacementData; itemsSelections: FormsetReplacementData;
itemsQuantities: FormsetQuantityData; itemsQuantities: FormsetQuantityData;
onChangeSelected: FormsetChange<boolean>; onChangeSelected: FormsetChange<boolean>;
onSetMaxQuantity(); onSetMaxQuantity: () => any;
} }
export const ItemsCard: React.FC<OrderReturnRefundLinesCardProps> = ({ export const ItemsCard: React.FC<OrderReturnRefundLinesCardProps> = ({

View file

@ -66,8 +66,8 @@ export interface OrderShippingMethodEditDialogProps {
open: boolean; open: boolean;
shippingMethod: string; shippingMethod: string;
shippingMethods?: OrderDetailsFragment["shippingMethods"]; shippingMethods?: OrderDetailsFragment["shippingMethods"];
onClose(); onClose: () => any;
onSubmit?(data: FormData); onSubmit?: (data: FormData) => any;
} }
const OrderShippingMethodEditDialog: React.FC< const OrderShippingMethodEditDialog: React.FC<

View file

@ -95,7 +95,7 @@ interface ProductCreatePageProps {
onAttributeSelectBlur: () => void; onAttributeSelectBlur: () => void;
onCloseDialog: (currentParams?: ProductCreateUrlQueryParams) => void; onCloseDialog: (currentParams?: ProductCreateUrlQueryParams) => void;
onSelectProductType: (productTypeId: string) => void; onSelectProductType: (productTypeId: string) => void;
onSubmit?(data: ProductCreateData); onSubmit?: (data: ProductCreateData) => any;
} }
export const ProductCreatePage: React.FC<ProductCreatePageProps> = ({ export const ProductCreatePage: React.FC<ProductCreatePageProps> = ({

View file

@ -20,7 +20,7 @@ interface ProductDetailsFormProps {
disabled?: boolean; disabled?: boolean;
errors: ProductErrorFragment[]; errors: ProductErrorFragment[];
onChange(event: any); onChange: (event: any) => any;
} }
export const ProductDetailsForm: React.FC<ProductDetailsFormProps> = ({ export const ProductDetailsForm: React.FC<ProductDetailsFormProps> = ({

View file

@ -71,8 +71,8 @@ interface ProductMediaProps {
getImageEditUrl: (id: string) => string; getImageEditUrl: (id: string) => string;
onImageDelete: (id: string) => () => void; onImageDelete: (id: string) => () => void;
onImageReorder?: ReorderAction; onImageReorder?: ReorderAction;
onImageUpload(file: File); onImageUpload: (file: File) => any;
openMediaUrlModal(); openMediaUrlModal: () => any;
} }
const ProductMedia: React.FC<ProductMediaProps> = props => { const ProductMedia: React.FC<ProductMediaProps> = props => {

View file

@ -113,11 +113,11 @@ export interface ProductUpdatePageProps {
onSubmit: (data: ProductUpdateSubmitData) => SubmitPromise; onSubmit: (data: ProductUpdateSubmitData) => SubmitPromise;
onVariantShow: (id: string) => void; onVariantShow: (id: string) => void;
onAttributeSelectBlur: () => void; onAttributeSelectBlur: () => void;
onDelete(); onDelete: () => any;
onImageReorder?(event: { oldIndex: number; newIndex: number }); onImageReorder?: (event: { oldIndex: number; newIndex: number }) => any;
onImageUpload(file: File); onImageUpload: (file: File) => any;
onMediaUrlUpload(mediaUrl: string); onMediaUrlUpload: (mediaUrl: string) => any;
onSeoClick?(); onSeoClick?: () => any;
} }
export const ProductUpdatePage: React.FC<ProductUpdatePageProps> = ({ export const ProductUpdatePage: React.FC<ProductUpdatePageProps> = ({

View file

@ -32,8 +32,8 @@ export interface ProductVariantDeleteDialogProps {
confirmButtonState: ConfirmButtonTransitionState; confirmButtonState: ConfirmButtonTransitionState;
open: boolean; open: boolean;
name: string; name: string;
onClose?(); onClose?: () => any;
onConfirm?(); onConfirm?: () => any;
} }
const ProductVariantDeleteDialog: React.FC< const ProductVariantDeleteDialog: React.FC<

View file

@ -62,7 +62,7 @@ interface ProductVariantMediaProps {
media?: ProductMediaFragment[]; media?: ProductMediaFragment[];
placeholderImage?: string; placeholderImage?: string;
disabled: boolean; disabled: boolean;
onImageAdd(); onImageAdd: () => any;
} }
export const ProductVariantMedia: React.FC< export const ProductVariantMedia: React.FC<

View file

@ -118,10 +118,10 @@ interface ProductVariantPageProps {
variantDeactivatePreoderButtonState: ConfirmButtonTransitionState; variantDeactivatePreoderButtonState: ConfirmButtonTransitionState;
onVariantReorder: ReorderAction; onVariantReorder: ReorderAction;
onAttributeSelectBlur: () => void; onAttributeSelectBlur: () => void;
onDelete(); onDelete: () => any;
onSubmit(data: ProductVariantUpdateSubmitData); onSubmit: (data: ProductVariantUpdateSubmitData) => any;
onSetDefaultVariant(); onSetDefaultVariant: () => any;
onWarehouseConfigure(); onWarehouseConfigure: () => any;
} }
const ProductVariantPage: React.FC<ProductVariantPageProps> = ({ const ProductVariantPage: React.FC<ProductVariantPageProps> = ({

View file

@ -59,7 +59,7 @@ export interface StaffDetailsPageProps extends SearchPageProps {
onDelete: () => void; onDelete: () => void;
onImageDelete: () => void; onImageDelete: () => void;
onSubmit: (data: StaffDetailsFormData) => SubmitPromise; onSubmit: (data: StaffDetailsFormData) => SubmitPromise;
onImageUpload(file: File); onImageUpload: (file: File) => any;
} }
const StaffDetailsPage: React.FC<StaffDetailsPageProps> = ({ const StaffDetailsPage: React.FC<StaffDetailsPageProps> = ({