@dropins/storefront-account 0.1.0-alpha9 → 1.0.0-beta2
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/api/createCustomerAddress/graphql/createCustomerAddress.graphql.d.ts +1 -1
- package/api/fragments.d.ts +4 -0
- package/api/getAttributesForm/graphql/getAttributesForm.graphql.d.ts +1 -1
- package/api/getCountries/getCountries.d.ts +6 -2
- package/api/getCountries/graphql/getCountries.graphql.d.ts +1 -1
- package/api/getCustomer/graphql/getCustomer.graphql.d.ts +1 -1
- package/api/getCustomerAddress/graphql/getCustomerAddress.graphql.d.ts +1 -1
- package/api/getOrderHistoryList/getOrderHistoryList.d.ts +2 -2
- package/api/getOrderHistoryList/graphql/getOrderHistoryList.graphql.d.ts +1 -1
- package/api/getRegions/getRegions.d.ts +4 -1
- package/api/getStoreConfig/getStoreConfig.d.ts +4 -0
- package/api/getStoreConfig/graphql/getStoreConfig.graphql.d.ts +2 -0
- package/api/getStoreConfig/index.d.ts +2 -0
- package/api/graphql/CustomerAddressFragment.graphql.d.ts +2 -0
- package/api/graphql/CustomerFragment.graphql.d.ts +2 -0
- package/api/graphql/OrderSummaryFragment.graphql.d.ts +2 -0
- package/api/index.d.ts +4 -0
- package/api/initialize/initialize.d.ts +7 -1
- package/api/removeCustomerAddress/graphql/removeCustomerAddress.graphql.d.ts +1 -1
- package/api/updateCustomer/graphql/updateCustomer.graphql.d.ts +2 -0
- package/api/updateCustomer/index.d.ts +2 -0
- package/api/updateCustomer/updateCustomer.d.ts +2 -0
- package/api/updateCustomerAddress/graphql/updateCustomerAddress.graphql.d.ts +1 -1
- package/api/updateCustomerEmail/graphql/updateCustomerEmail.graphql.d.ts +2 -0
- package/api/updateCustomerEmail/index.d.ts +2 -0
- package/api/updateCustomerEmail/updateCustomerEmail.d.ts +5 -0
- package/api/updateCustomerPassword/graphql/updateCustomerPassword.graphql.d.ts +2 -0
- package/api/updateCustomerPassword/index.d.ts +2 -0
- package/api/updateCustomerPassword/updateCustomerPassword.d.ts +4 -0
- package/api.js +3 -9
- package/chunks/CustomerInformationCard.js +3 -0
- package/chunks/getOrderHistoryList.js +123 -76
- package/chunks/getStoreConfig.js +12 -0
- package/chunks/removeCustomerAddress.js +90 -4
- package/chunks/updateCustomer.js +57 -0
- package/components/ChangePassword/ChangePassword.d.ts +5 -0
- package/components/ChangePassword/index.d.ts +3 -0
- package/components/CustomerInformationCard/CustomerInformationCard.d.ts +5 -0
- package/components/CustomerInformationCard/index.d.ts +3 -0
- package/components/EditCustomerInformation/EditCustomerInformation.d.ts +5 -0
- package/components/EditCustomerInformation/index.d.ts +3 -0
- package/components/Form/Form.d.ts +4 -3
- package/components/index.d.ts +3 -0
- package/configs/defaultAttributePreset.config.d.ts +1 -0
- package/configs/mockDefaultAddress.config.d.ts +9 -40
- package/configs/mockOrdersList.config.d.ts +110 -2
- package/containers/AddressForm.js +3 -1
- package/containers/Addresses.js +3 -1
- package/containers/CustomerInformation/CustomerInformation.d.ts +5 -0
- package/containers/CustomerInformation/index.d.ts +3 -0
- package/containers/CustomerInformation.d.ts +3 -0
- package/containers/CustomerInformation.js +3 -0
- package/containers/OrdersList.js +3 -1
- package/containers/index.d.ts +1 -0
- package/data/models/customer-address.d.ts +3 -3
- package/data/models/customer.d.ts +9 -2
- package/data/models/index.d.ts +1 -0
- package/data/models/order-history-list.d.ts +20 -4
- package/data/models/region.d.ts +1 -0
- package/data/models/store-config.d.ts +6 -0
- package/data/transforms/index.d.ts +1 -0
- package/data/transforms/transform-countries.d.ts +6 -2
- package/data/transforms/transform-customer-address.d.ts +0 -1
- package/data/transforms/transform-order-history-list.d.ts +2 -2
- package/data/transforms/transform-store-config.d.ts +5 -0
- package/hooks/components/useChangePassword.d.ts +26 -0
- package/hooks/components/useForm.d.ts +7 -5
- package/hooks/components/usePasswordValidationMessage.d.ts +16 -0
- package/hooks/containers/useAddressForm.d.ts +18 -7
- package/hooks/containers/useAddresses.d.ts +3 -1
- package/hooks/containers/useCustomerInformation.d.ts +50 -0
- package/hooks/containers/useGetStoreConfigs.d.ts +7 -0
- package/hooks/containers/useOrderSelectList.d.ts +2 -0
- package/hooks/containers/useOrdersList.d.ts +8 -3
- package/hooks/useInLineAlert.d.ts +7 -0
- package/hooks/useIsMobile.d.ts +2 -0
- package/i18n/en_US.json.d.ts +109 -43
- package/lib/areRequiredFieldsValid.d.ts +6 -0
- package/lib/getFieldsConfig.d.ts +1 -22
- package/lib/getFormValuesFromRef.d.ts +5 -0
- package/lib/initializeFormDataAndErrors.d.ts +10 -0
- package/lib/normalizeAttributes.d.ts +1 -1
- package/lib/normalizeGetAddressData.d.ts +6 -0
- package/lib/prepareNormalizedData.d.ts +21 -0
- package/lib/sortingAddressesList.d.ts +5 -0
- package/lib/transformDefaultValuesAddresses.d.ts +11 -0
- package/lib/transformSessionData.d.ts +6 -0
- package/lib/validationChangePassword.d.ts +17 -0
- package/lib/validationFields.d.ts +2 -1
- package/lib/validationUniqueSymbolsPassword.d.ts +2 -0
- package/package.json +1 -1
- package/render.js +5 -3
- package/types/addressForm.types.d.ts +11 -6
- package/types/addresses.types.d.ts +41 -7
- package/types/api/getCountries.types.d.ts +4 -0
- package/types/api/getCustomer.types.d.ts +10 -0
- package/types/api/getCustomerAddress.type.d.ts +5 -1
- package/types/api/getOrderHistoryList.types.d.ts +17 -0
- package/types/api/storeConfig.types.d.ts +14 -0
- package/types/api/updateCustomerPassword.types.d.ts +15 -0
- package/types/customerInformation.types.d.ts +61 -0
- package/types/form.types.d.ts +24 -8
- package/types/index.d.ts +4 -1
- package/types/notification.types.d.ts +19 -0
- package/types/ordersList.types.d.ts +18 -2
- package/chunks/AddressFormWrapper.js +0 -1
- package/chunks/AddressFormWrapper2.js +0 -1
- package/chunks/checkIsFunction.js +0 -1
- package/chunks/convertCase.js +0 -1
- package/chunks/transform-customer-address.js +0 -1
- package/chunks/updateCustomerAddress.js +0 -78
- package/hooks/api/useCountryRegionOptions.d.ts +0 -7
- package/types/translations.types.d.ts +0 -9
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
export interface CustomerDataModelShort {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
firstName: string;
|
|
3
|
+
lastName: string;
|
|
4
|
+
middleName: string;
|
|
5
|
+
dateOfBirth: string;
|
|
6
|
+
prefix: string;
|
|
7
|
+
gender: 1 | 2 | string;
|
|
8
|
+
suffix: string;
|
|
4
9
|
email: string;
|
|
10
|
+
createdAt: string;
|
|
11
|
+
[key: string]: string | boolean | number;
|
|
5
12
|
}
|
|
6
13
|
//# sourceMappingURL=customer.d.ts.map
|
package/data/models/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CustomerAddressesModel } from './customer-address';
|
|
2
|
+
import { ReturnProps } from '../../types';
|
|
2
3
|
|
|
3
4
|
export type ProductImage = {
|
|
4
5
|
url: string;
|
|
@@ -7,6 +8,9 @@ export type Product = {
|
|
|
7
8
|
smallImage: ProductImage;
|
|
8
9
|
};
|
|
9
10
|
export type OrderItem = {
|
|
11
|
+
quantityOrdered?: number;
|
|
12
|
+
quantityShipped?: number;
|
|
13
|
+
quantityInvoiced?: number;
|
|
10
14
|
status: string;
|
|
11
15
|
productName: string;
|
|
12
16
|
id: string;
|
|
@@ -36,18 +40,30 @@ export type OrderTotals = {
|
|
|
36
40
|
totalTax: MoneyAmount;
|
|
37
41
|
totalShipping: MoneyAmount;
|
|
38
42
|
};
|
|
43
|
+
export type ShipmentsTracingModel = {
|
|
44
|
+
carrier: string;
|
|
45
|
+
number: string;
|
|
46
|
+
title: string;
|
|
47
|
+
};
|
|
48
|
+
export type ShipmentsModel = {
|
|
49
|
+
id: string;
|
|
50
|
+
number: string;
|
|
51
|
+
tracking: ShipmentsTracingModel[];
|
|
52
|
+
};
|
|
39
53
|
export type OrderDetails = {
|
|
54
|
+
status: string;
|
|
40
55
|
token: string;
|
|
41
|
-
billingAddress: CustomerAddressesModel;
|
|
42
56
|
carrier: string;
|
|
43
57
|
email: string;
|
|
44
58
|
id: string;
|
|
45
|
-
items: OrderItem[];
|
|
46
59
|
number: string;
|
|
47
60
|
orderDate: string;
|
|
61
|
+
items: OrderItem[];
|
|
62
|
+
returns: ReturnProps[];
|
|
63
|
+
shipments: ShipmentsModel[];
|
|
48
64
|
paymentMethods: PaymentMethod[];
|
|
49
65
|
shippingAddress: CustomerAddressesModel;
|
|
50
|
-
|
|
66
|
+
billingAddress: CustomerAddressesModel;
|
|
51
67
|
total: OrderTotals;
|
|
52
68
|
};
|
|
53
69
|
export type PaginationInfo = {
|
|
@@ -55,7 +71,7 @@ export type PaginationInfo = {
|
|
|
55
71
|
pageSize: number;
|
|
56
72
|
totalPages: number;
|
|
57
73
|
};
|
|
58
|
-
export interface
|
|
74
|
+
export interface OrderHistoryModel {
|
|
59
75
|
items: OrderDetails[];
|
|
60
76
|
pageInfo: PaginationInfo;
|
|
61
77
|
totalCount: number;
|
package/data/models/region.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { CountriesFormResponse } from '../../types';
|
|
2
2
|
import { Country } from '../models';
|
|
3
3
|
|
|
4
|
-
export declare const transformCountries: (response: CountriesFormResponse) =>
|
|
5
|
-
]
|
|
4
|
+
export declare const transformCountries: (response: CountriesFormResponse) => {
|
|
5
|
+
availableCountries: Country[] | [
|
|
6
|
+
];
|
|
7
|
+
countriesWithRequiredRegion: string[];
|
|
8
|
+
optionalZipCountries: string[];
|
|
9
|
+
};
|
|
6
10
|
//# sourceMappingURL=transform-countries.d.ts.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { CustomerAddressesModel } from '../models';
|
|
2
2
|
import { AddressResponse, UserAddressesProps } from '../../types';
|
|
3
3
|
|
|
4
|
-
export declare const expandArraysInObject: (inputObject: UserAddressesProps) => Record<string, unknown>;
|
|
5
4
|
export declare const transformSingleAddress: (addressData: UserAddressesProps) => CustomerAddressesModel;
|
|
6
5
|
export declare const transformMultipleAddresses: (response: AddressResponse) => CustomerAddressesModel[] | [
|
|
7
6
|
];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OrderHistoryListResponse } from '../../types';
|
|
2
|
-
import {
|
|
2
|
+
import { OrderHistoryModel } from '../models';
|
|
3
3
|
|
|
4
|
-
export declare const transformOrderHistoryList: (response: OrderHistoryListResponse) =>
|
|
4
|
+
export declare const transformOrderHistoryList: (response: OrderHistoryListResponse) => OrderHistoryModel | null;
|
|
5
5
|
//# sourceMappingURL=transform-order-history-list.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { UseChangePasswordProps } from '../../types';
|
|
2
|
+
|
|
3
|
+
export declare const DEFAULT_ERRORS_STATE: {
|
|
4
|
+
currentPassword: string;
|
|
5
|
+
newPassword: string;
|
|
6
|
+
confirmPassword: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const useChangePassword: ({ passwordConfigs, handleSetInLineAlert, handleHideChangePassword, }: UseChangePasswordProps) => {
|
|
9
|
+
hideChangePassword: () => void;
|
|
10
|
+
handleOnBlurPassword: (event: Event) => void;
|
|
11
|
+
handleConfirmPasswordChange: (value: string) => void;
|
|
12
|
+
handleNewPasswordChange: (value: string) => void;
|
|
13
|
+
handleCurrentPasswordChange: (value: string) => void;
|
|
14
|
+
mutationChangePassword: (event: Event) => void;
|
|
15
|
+
currentPassword: string;
|
|
16
|
+
newPassword: string;
|
|
17
|
+
confirmPassword: string;
|
|
18
|
+
passwordErrors: {
|
|
19
|
+
currentPassword: string;
|
|
20
|
+
newPassword: string;
|
|
21
|
+
confirmPassword: string;
|
|
22
|
+
};
|
|
23
|
+
submitLoading: boolean;
|
|
24
|
+
isClickSubmit: boolean;
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=useChangePassword.d.ts.map
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { useFormProps } from '../../types';
|
|
2
2
|
|
|
3
|
-
export declare const useForm: ({ fieldsConfig, onSubmit,
|
|
4
|
-
|
|
3
|
+
export declare const useForm: ({ fieldsConfig, onSubmit, onChange, setInputChange, formName, isWaitingForResponse, }: useFormProps) => {
|
|
4
|
+
isDataValid: boolean;
|
|
5
|
+
formData: Record<string, string | number>;
|
|
5
6
|
errors: Record<string, string>;
|
|
6
7
|
formRef: import('preact').RefObject<HTMLFormElement>;
|
|
7
|
-
handleInputChange: (event: Event) => void;
|
|
8
|
-
|
|
9
|
-
handleBlur: (event: Event) => void;
|
|
8
|
+
handleInputChange: (event: Event, errorsProp: Record<string, string>) => void;
|
|
9
|
+
onFocus: (event: Event) => void;
|
|
10
|
+
handleBlur: (event: Event, errorsProp: Record<string, string>) => void;
|
|
10
11
|
handleSubmit: (event: SubmitEvent) => void;
|
|
12
|
+
handleValidationSubmit: (disableShowError?: boolean) => boolean;
|
|
11
13
|
};
|
|
12
14
|
//# sourceMappingURL=useForm.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ValidateLengthConfigProps, statusTypes } from '../../types';
|
|
2
|
+
|
|
3
|
+
interface UsePasswordValidationMessageProps {
|
|
4
|
+
passwordConfigs: {
|
|
5
|
+
minLength: number;
|
|
6
|
+
requiredCharacterClasses: number;
|
|
7
|
+
} | null;
|
|
8
|
+
isClickSubmit: boolean;
|
|
9
|
+
password: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const usePasswordValidationMessage: ({ passwordConfigs, isClickSubmit, password, }: UsePasswordValidationMessageProps) => {
|
|
12
|
+
isValidUniqueSymbols: statusTypes;
|
|
13
|
+
defaultLengthMessage: ValidateLengthConfigProps | undefined;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=usePasswordValidationMessage.d.ts.map
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { CustomerAddressesModel, RegionTransform } from '../../data/models';
|
|
2
|
+
import { useAddressFormProps } from '../../types';
|
|
3
3
|
import { VNode } from 'preact';
|
|
4
4
|
import { HTMLAttributes } from 'preact/compat';
|
|
5
5
|
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const useAddressForm: ({ addressFormId, billingCheckBoxValue, shippingCheckBoxValue, showShippingCheckBox, showBillingCheckBox,
|
|
6
|
+
export declare const findNonEmptyObject: (obj1: Record<string, unknown> | undefined, obj2: CustomerAddressesModel | undefined) => CustomerAddressesModel | Record<string, unknown>;
|
|
7
|
+
export declare const useAddressForm: ({ showFormLoader, showSaveCheckBox, saveCheckBoxValue, addressFormId, billingCheckBoxValue, shippingCheckBoxValue, showShippingCheckBox, showBillingCheckBox, inputsDefaultValueSet, onCloseBtnClick, onSuccess, onError, formName, }: useAddressFormProps) => {
|
|
8
|
+
isWaitingForResponse: boolean;
|
|
9
|
+
regionOptions: [] | RegionTransform[];
|
|
10
|
+
saveCheckBoxAddress: boolean;
|
|
8
11
|
inLineAlert: {
|
|
9
12
|
text: string;
|
|
10
13
|
type: 'success' | 'warning' | 'error';
|
|
@@ -12,9 +15,17 @@ export declare const useAddressForm: ({ addressFormId, billingCheckBoxValue, shi
|
|
|
12
15
|
};
|
|
13
16
|
addressId: string;
|
|
14
17
|
submitLoading: boolean;
|
|
15
|
-
normalizeFieldsConfig:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
normalizeFieldsConfig: {
|
|
19
|
+
customUpperCode: string;
|
|
20
|
+
defaultValue?: string | number | boolean | undefined;
|
|
21
|
+
options?: any[] | undefined;
|
|
22
|
+
required?: boolean | undefined;
|
|
23
|
+
disabled?: boolean | undefined;
|
|
24
|
+
}[];
|
|
25
|
+
handleSaveCheckBoxAddress: (event: Event) => void;
|
|
26
|
+
handleUpdateAddress: (event: Event, valid: boolean) => Promise<void | null | undefined>;
|
|
27
|
+
handleCreateAddress: (event: Event, valid: boolean) => Promise<void | null | undefined>;
|
|
18
28
|
handleOnCloseForm: () => void;
|
|
29
|
+
handleInputChange: (values: Record<string, string | number | boolean>) => void;
|
|
19
30
|
};
|
|
20
31
|
//# sourceMappingURL=useAddressForm.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CustomerAddressesModel } from '../../data/models';
|
|
2
2
|
import { KeysSortOrderProps, useAddressesProps } from '../../types';
|
|
3
3
|
|
|
4
|
-
export declare const useAddresses: ({ minifiedView, routeAddressesPage, onSuccess, }: useAddressesProps) => {
|
|
4
|
+
export declare const useAddresses: ({ selectShipping, selectBilling, defaultSelectAddressId, onAddressData, minifiedView, routeAddressesPage, onSuccess, }: useAddressesProps) => {
|
|
5
5
|
keysSortOrder: [] | KeysSortOrderProps[];
|
|
6
6
|
submitLoading: boolean;
|
|
7
7
|
isModalRendered: boolean;
|
|
@@ -18,5 +18,7 @@ export declare const useAddresses: ({ minifiedView, routeAddressesPage, onSucces
|
|
|
18
18
|
closeNewAddressForm: () => void;
|
|
19
19
|
redirectToAddressesRoute: () => void;
|
|
20
20
|
handleOnSuccess: () => Promise<void>;
|
|
21
|
+
handleSelectAddressOption: (event: Event, item?: {} | CustomerAddressesModel | undefined) => void;
|
|
22
|
+
selectedAddressOption: string;
|
|
21
23
|
};
|
|
22
24
|
//# sourceMappingURL=useAddresses.d.ts.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { UseCustomerInformationProps } from '../../types';
|
|
2
|
+
|
|
3
|
+
export declare const useCustomerInformation: ({ handleSetInLineAlert, }: UseCustomerInformationProps) => {
|
|
4
|
+
createdAt: string;
|
|
5
|
+
errorPasswordEmpty: boolean;
|
|
6
|
+
passwordValue: string;
|
|
7
|
+
showPasswordOnEmailChange: boolean;
|
|
8
|
+
orderedCustomerData: {
|
|
9
|
+
name: string;
|
|
10
|
+
orderNumber: number | undefined;
|
|
11
|
+
value: any;
|
|
12
|
+
label: string | null | undefined;
|
|
13
|
+
}[];
|
|
14
|
+
loading: boolean;
|
|
15
|
+
normalizeFieldsConfig: {
|
|
16
|
+
defaultValue: any;
|
|
17
|
+
code?: string | undefined;
|
|
18
|
+
name?: string | undefined;
|
|
19
|
+
id?: string | undefined;
|
|
20
|
+
required?: boolean | undefined;
|
|
21
|
+
label?: string | undefined;
|
|
22
|
+
options?: {
|
|
23
|
+
is_default: boolean;
|
|
24
|
+
label: string;
|
|
25
|
+
value: string;
|
|
26
|
+
}[] | undefined;
|
|
27
|
+
entityType?: string | undefined;
|
|
28
|
+
className?: string | undefined;
|
|
29
|
+
fieldType?: import('../../data/models').FieldEnumList | undefined;
|
|
30
|
+
multilineCount?: number | undefined;
|
|
31
|
+
isUnique?: boolean | undefined;
|
|
32
|
+
orderNumber: number;
|
|
33
|
+
isHidden?: boolean | undefined;
|
|
34
|
+
customUpperCode: string;
|
|
35
|
+
validateRules: Record<string, string>[];
|
|
36
|
+
}[];
|
|
37
|
+
submitLoading: boolean;
|
|
38
|
+
showEditForm: boolean;
|
|
39
|
+
showChangePassword: boolean;
|
|
40
|
+
handleShowChangePassword: () => void;
|
|
41
|
+
handleHideChangePassword: (clearStates?: () => void) => void;
|
|
42
|
+
handleShowEditForm: () => void;
|
|
43
|
+
handleHideEditForm: (clearStates?: () => void) => void;
|
|
44
|
+
handleUpdateCustomerInformation: (event: Event, valid: boolean) => Promise<void>;
|
|
45
|
+
handleInputChange: (value: Record<string, string | number | boolean>) => void;
|
|
46
|
+
handleSetPassword: (value: string) => void;
|
|
47
|
+
handleOnBlurPassword: (event: Event) => void;
|
|
48
|
+
renderAlertMessage: (type: 'success' | 'error', message?: string) => void;
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=useCustomerInformation.d.ts.map
|
|
@@ -4,7 +4,9 @@ export declare const useOrderSelectList: () => {
|
|
|
4
4
|
text: string;
|
|
5
5
|
}[];
|
|
6
6
|
selectedDate: string;
|
|
7
|
+
selectedPage: number;
|
|
7
8
|
handleSelectDate: (event: Event) => void;
|
|
9
|
+
setSelectedPage: import('preact/hooks').Dispatch<import('preact/hooks').StateUpdater<number>>;
|
|
8
10
|
handleSetFirstOrderDate: (date: string) => void;
|
|
9
11
|
};
|
|
10
12
|
//# sourceMappingURL=useOrderSelectList.d.ts.map
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { OrderDetails } from '../../data/models';
|
|
2
|
-
import {
|
|
2
|
+
import { UseOrdersListProps } from '../../types';
|
|
3
3
|
|
|
4
|
-
export declare const useOrdersList: ({ ordersInMinifiedView, minifiedView, pageSize, selectedDate, handleSetFirstOrderDate, }:
|
|
4
|
+
export declare const useOrdersList: ({ ordersInMinifiedView, minifiedView, pageSize, selectedDate, selectedPage, handleSetFirstOrderDate, }: UseOrdersListProps) => {
|
|
5
5
|
loading: boolean;
|
|
6
6
|
orderHistoryListItems: OrderDetails[];
|
|
7
|
-
pageInfo: {
|
|
7
|
+
pageInfo: {
|
|
8
|
+
totalPages: number;
|
|
9
|
+
currentPage: number;
|
|
10
|
+
pageSize: number;
|
|
11
|
+
};
|
|
12
|
+
placeholderImage: string;
|
|
8
13
|
};
|
|
9
14
|
//# sourceMappingURL=useOrdersList.d.ts.map
|
package/i18n/en_US.json.d.ts
CHANGED
|
@@ -1,56 +1,65 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
"Account": {
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"minifiedView": {
|
|
4
|
+
"CustomerInformation": {
|
|
5
|
+
"containerTitle": "Account settings",
|
|
6
|
+
"genderMale":"Male",
|
|
7
|
+
"genderFemale":"Female",
|
|
8
|
+
"changePassword": {
|
|
9
|
+
"passwordValidationMessage": {
|
|
10
|
+
"chartTwoSymbols": "Use characters and numbers or symbols",
|
|
11
|
+
"chartThreeSymbols": "Use characters, numbers and symbols",
|
|
12
|
+
"chartFourSymbols": "Use uppercase characters, lowercase characters, numbers and symbols",
|
|
13
|
+
"messageLengthPassword": "At least {minLength} characters long",
|
|
14
|
+
"passwordMismatch": "Passwords do not match. Please make sure both password fields are identical",
|
|
15
|
+
"incorrectCurrentPassword": "The current password you entered is incorrect. Please check and try again.",
|
|
16
|
+
"passwordUpdateMessage": "Your password has been updated"
|
|
17
|
+
},
|
|
18
|
+
"containerTitle": "Change password",
|
|
19
|
+
"currentPassword": {
|
|
20
|
+
"placeholder": "Password",
|
|
21
|
+
"floatingLabel": "Password"
|
|
22
|
+
},
|
|
23
|
+
"newPassword": {
|
|
24
|
+
"placeholder": "New Password",
|
|
25
|
+
"floatingLabel": "New Password"
|
|
26
|
+
},
|
|
27
|
+
"confirmPassword": {
|
|
28
|
+
"placeholder": "Confirm new password",
|
|
29
|
+
"floatingLabel": "Confirm new password"
|
|
30
|
+
},
|
|
31
|
+
"buttonSecondary": "Cancel",
|
|
32
|
+
"buttonPrimary": "Save"
|
|
7
33
|
},
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"fullSizeView": {
|
|
13
|
-
"Addresses": {
|
|
14
|
-
"message": "No saved addresses"
|
|
34
|
+
"customerInformationCard": {
|
|
35
|
+
"buttonSecondary": "Change password",
|
|
36
|
+
"buttonPrimary": "Edit",
|
|
37
|
+
"accountCreation": "Account creation date"
|
|
15
38
|
},
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"orderNumber": "Order number:",
|
|
27
|
-
"itemsAmount": "items"
|
|
39
|
+
"editCustomerInformation": {
|
|
40
|
+
"containerTitle": "Edit details",
|
|
41
|
+
"buttonSecondary": "Cancel",
|
|
42
|
+
"buttonPrimary": "Save",
|
|
43
|
+
"accountSuccess": "Your account information has been updated.",
|
|
44
|
+
"accountError": "Your account information has not been updated.",
|
|
45
|
+
"passwordField": {
|
|
46
|
+
"placeholder": "Password",
|
|
47
|
+
"floatingLabel": "Password"
|
|
48
|
+
}
|
|
28
49
|
}
|
|
29
50
|
},
|
|
30
|
-
"
|
|
31
|
-
"containerTitle": "Your orders",
|
|
32
|
-
"titleSelectOrder": "Date order placed",
|
|
33
|
-
"OrdersListCard": {
|
|
34
|
-
"orderNumber": "Order number:",
|
|
35
|
-
"itemsAmount": "items"
|
|
36
|
-
},
|
|
37
|
-
"OrdersListSelectDate":{
|
|
38
|
-
"pastSixMonths": "Past 6 months",
|
|
39
|
-
"currentYear": "Current year",
|
|
40
|
-
"viewAll": "View all"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
"Addresses": {
|
|
45
|
-
"minifiedView": {
|
|
51
|
+
"Addresses": {
|
|
46
52
|
"containerTitle": "Addresses",
|
|
47
53
|
"editAddressFormTitle": "Edit address",
|
|
54
|
+
"differentAddressFormTitle": "Deliver to new address",
|
|
48
55
|
"viewAllAddressesButton": "View address list",
|
|
56
|
+
"differentAddressButton": "Use a different address",
|
|
49
57
|
"addressCard": {
|
|
50
58
|
"actionRemove": "Remove",
|
|
51
59
|
"actionEdit": "Edit",
|
|
52
60
|
"cardLabelShipping": "Shipping",
|
|
53
|
-
"cardLabelBilling": "Billing"
|
|
61
|
+
"cardLabelBilling": "Billing",
|
|
62
|
+
"defaultLabelText": "DEFAULT"
|
|
54
63
|
},
|
|
55
64
|
"removeAddressModal": {
|
|
56
65
|
"title": "Remove address",
|
|
@@ -59,16 +68,47 @@ declare const _default: {
|
|
|
59
68
|
"actionConfirm": "Remove"
|
|
60
69
|
}
|
|
61
70
|
},
|
|
62
|
-
"
|
|
71
|
+
"OrdersList": {
|
|
72
|
+
"containerTitle": "Recent orders",
|
|
73
|
+
"viewAllOrdersButton": "View all orders",
|
|
74
|
+
"ariaLabelLink": "Redirect to full order information",
|
|
75
|
+
"dateOrderPlaced": "Date order placed",
|
|
76
|
+
"OrdersListCard": {
|
|
77
|
+
"orderNumber": "Order number:",
|
|
78
|
+
"itemsAmount": "items",
|
|
79
|
+
"carrier": "Carrier:",
|
|
80
|
+
"returns": "Return(s):",
|
|
81
|
+
"orderDate": "Placed on"
|
|
82
|
+
},
|
|
83
|
+
"OrdersListSelectDate": {
|
|
84
|
+
"pastSixMonths": "Past 6 months",
|
|
85
|
+
"currentYear": "Current year",
|
|
86
|
+
"viewAll": "View all"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"EmptyList": {
|
|
90
|
+
"Addresses": {
|
|
91
|
+
"message": "No saved addresses"
|
|
92
|
+
},
|
|
93
|
+
"OrdersList": {
|
|
94
|
+
"message": "No orders"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"fullSizeView": {
|
|
99
|
+
"Addresses": {
|
|
63
100
|
"containerTitle": "Addresses",
|
|
64
101
|
"editAddressFormTitle": "Edit address",
|
|
102
|
+
"differentAddressFormTitle": "Deliver to new address",
|
|
65
103
|
"newAddressFormTitle": "Add address",
|
|
66
104
|
"addNewAddressButton": "Create new",
|
|
105
|
+
"differentAddressButton": "Use a different address",
|
|
67
106
|
"addressCard": {
|
|
68
107
|
"actionRemove": "Remove",
|
|
69
108
|
"actionEdit": "Edit",
|
|
70
109
|
"cardLabelShipping": "Shipping",
|
|
71
|
-
"cardLabelBilling": "Billing"
|
|
110
|
+
"cardLabelBilling": "Billing",
|
|
111
|
+
"defaultLabelText": "DEFAULT"
|
|
72
112
|
},
|
|
73
113
|
"removeAddressModal": {
|
|
74
114
|
"title": "Remove address",
|
|
@@ -76,6 +116,31 @@ declare const _default: {
|
|
|
76
116
|
"actionCancel": "Cancel",
|
|
77
117
|
"actionConfirm": "Remove"
|
|
78
118
|
}
|
|
119
|
+
},
|
|
120
|
+
"OrdersList": {
|
|
121
|
+
"containerTitle": "Your orders",
|
|
122
|
+
"ariaLabelLink": "Redirect to full order information",
|
|
123
|
+
"dateOrderPlaced": "Date order placed",
|
|
124
|
+
"OrdersListCard": {
|
|
125
|
+
"orderNumber": "Order number:",
|
|
126
|
+
"itemsAmount": "items",
|
|
127
|
+
"carrier": "Carrier:",
|
|
128
|
+
"returns": "Return(s):",
|
|
129
|
+
"orderDate": "Placed on"
|
|
130
|
+
},
|
|
131
|
+
"OrdersListSelectDate": {
|
|
132
|
+
"pastSixMonths": "Past 6 months",
|
|
133
|
+
"currentYear": "Current year",
|
|
134
|
+
"viewAll": "View all"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"EmptyList": {
|
|
138
|
+
"Addresses": {
|
|
139
|
+
"message": "No saved addresses"
|
|
140
|
+
},
|
|
141
|
+
"OrdersList": {
|
|
142
|
+
"message": "No orders"
|
|
143
|
+
}
|
|
79
144
|
}
|
|
80
145
|
},
|
|
81
146
|
"AddressForm": {
|
|
@@ -83,7 +148,8 @@ declare const _default: {
|
|
|
83
148
|
"secondaryButton": "Cancel",
|
|
84
149
|
"primaryButton": "Save",
|
|
85
150
|
"defaultShippingLabel": "Set as default shipping address",
|
|
86
|
-
"defaultBillingLabel": "Set as default billing address"
|
|
151
|
+
"defaultBillingLabel": "Set as default billing address",
|
|
152
|
+
"saveAddressBook": "Save in address book"
|
|
87
153
|
}
|
|
88
154
|
},
|
|
89
155
|
"FormText": {
|
package/lib/getFieldsConfig.d.ts
CHANGED
|
@@ -1,25 +1,4 @@
|
|
|
1
1
|
import { AttributesFormModel } from '../data/models';
|
|
2
2
|
|
|
3
|
-
export declare const getFieldsConfig: (itemValues: Record<string, any>, attributesFormList: AttributesFormModel[]) =>
|
|
4
|
-
code?: string | undefined;
|
|
5
|
-
name?: string | undefined;
|
|
6
|
-
id?: string | undefined;
|
|
7
|
-
required?: boolean | undefined;
|
|
8
|
-
label?: string | undefined;
|
|
9
|
-
options?: {
|
|
10
|
-
is_default: boolean;
|
|
11
|
-
label: string;
|
|
12
|
-
value: string;
|
|
13
|
-
}[] | undefined;
|
|
14
|
-
entityType?: string | undefined;
|
|
15
|
-
className?: string | undefined;
|
|
16
|
-
defaultValue?: string | number | boolean | undefined;
|
|
17
|
-
fieldType?: import('../data/models').FieldEnumList | undefined;
|
|
18
|
-
multilineCount?: number | undefined;
|
|
19
|
-
isUnique?: boolean | undefined;
|
|
20
|
-
orderNumber: number;
|
|
21
|
-
isHidden?: boolean | undefined;
|
|
22
|
-
customUpperCode: string;
|
|
23
|
-
validateRules: Record<string, string>[];
|
|
24
|
-
}[];
|
|
3
|
+
export declare const getFieldsConfig: (itemValues: Record<string, any>, attributesFormList: AttributesFormModel[]) => any[];
|
|
25
4
|
//# sourceMappingURL=getFieldsConfig.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const _default: (fieldsConfig: Array<{
|
|
2
|
+
customUpperCode?: string;
|
|
3
|
+
required?: boolean;
|
|
4
|
+
defaultValue?: unknown;
|
|
5
|
+
}>) => {
|
|
6
|
+
initialData: Record<string, unknown>;
|
|
7
|
+
errorList: Record<string, string>;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
//# sourceMappingURL=initializeFormDataAndErrors.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const normalizeAttributes: (input: Record<string, any
|
|
1
|
+
export declare const normalizeAttributes: (input: Record<string, any>, type?: string) => Record<string, any>;
|
|
2
2
|
//# sourceMappingURL=normalizeAttributes.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const dictionary: Record<string, string>;
|
|
2
|
+
export declare const groupMultilineFields: (inputObj: Record<string, any>) => Record<string, any>;
|
|
3
|
+
export declare const separateKeys: (inputData: Record<string, any>) => Record<keyof typeof dictionary, unknown>;
|
|
4
|
+
declare const _default: (fields?: Record<string, any>, isForm?: boolean) => Record<string, unknown>;
|
|
5
|
+
export default _default;
|
|
6
|
+
//# sourceMappingURL=normalizeGetAddressData.d.ts.map
|