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:
parent
72d4df482e
commit
8d16513eab
52 changed files with 114 additions and 112 deletions
5
.changeset/hip-owls-knock.md
Normal file
5
.changeset/hip-owls-knock.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
"saleor-dashboard": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Enable method signature style ESLint rule
|
|
@ -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",
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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 = ({
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -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<
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -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> = ({
|
||||||
|
|
|
@ -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 => {
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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 => {
|
||||||
|
|
|
@ -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 => {
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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> = ({
|
||||||
|
|
|
@ -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 => {
|
||||||
|
|
|
@ -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 => {
|
||||||
|
|
|
@ -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 }) => {
|
||||||
|
|
|
@ -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 => {
|
||||||
|
|
|
@ -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 => {
|
||||||
|
|
|
@ -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 => {
|
||||||
|
|
|
@ -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> = ({
|
||||||
|
|
|
@ -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 => {
|
||||||
|
|
|
@ -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 => {
|
||||||
|
|
|
@ -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<
|
||||||
|
|
|
@ -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 => {
|
||||||
|
|
|
@ -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 => {
|
||||||
|
|
|
@ -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>;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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<
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -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<
|
||||||
|
|
|
@ -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<
|
||||||
|
|
|
@ -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 => {
|
||||||
|
|
|
@ -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<
|
||||||
|
|
|
@ -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 = [
|
||||||
|
|
|
@ -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<
|
||||||
|
|
|
@ -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<
|
||||||
|
|
|
@ -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<
|
||||||
|
|
|
@ -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<
|
||||||
|
|
|
@ -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> = ({
|
||||||
|
|
|
@ -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> = ({
|
||||||
|
|
|
@ -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> = ({
|
||||||
|
|
|
@ -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> = ({
|
||||||
|
|
|
@ -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<
|
||||||
|
|
|
@ -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> = ({
|
||||||
|
|
|
@ -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> = ({
|
||||||
|
|
|
@ -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 => {
|
||||||
|
|
|
@ -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> = ({
|
||||||
|
|
|
@ -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<
|
||||||
|
|
|
@ -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<
|
||||||
|
|
|
@ -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> = ({
|
||||||
|
|
|
@ -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> = ({
|
||||||
|
|
Loading…
Reference in a new issue