@vtex/order-items
Advanced tools
Comparing version 0.3.0 to 0.3.1-0
@@ -10,2 +10,4 @@ # Changelog | ||
## [0.3.1-0] - 2021-03-29 | ||
## [0.2.0] - 2021-03-23 | ||
@@ -12,0 +14,0 @@ |
/*! | ||
* @vtex/order-items v0.3.0 | ||
* @vtex/order-items v0.3.1-0 | ||
* (c) VTEX | ||
@@ -381,8 +381,12 @@ * Released under the MIT License. | ||
else { | ||
setOrderForm((prevOrderForm) => ({ | ||
...prevOrderForm, | ||
messages: { | ||
...orderForm.messages, | ||
}, | ||
})); | ||
setOrderForm((prevOrderForm) => { | ||
var _a; | ||
return ({ | ||
...prevOrderForm, | ||
messages: { | ||
...orderForm.messages, | ||
generalMessages: (_a = orderForm.messages) === null || _a === void 0 ? void 0 : _a.generalMessages, | ||
}, | ||
}); | ||
}); | ||
} | ||
@@ -647,3 +651,3 @@ }, (error) => { | ||
}; | ||
return { OrderItemsProvider, useOrderItems }; | ||
return { OrderItemsProvider }; | ||
} | ||
@@ -663,3 +667,3 @@ | ||
export { createOrderItemsProvider }; | ||
export { createOrderItemsProvider, useOrderItems }; | ||
//# sourceMappingURL=index.esm.js.map |
/*! | ||
* @vtex/order-items v0.3.0 | ||
* @vtex/order-items v0.3.1-0 | ||
* (c) VTEX | ||
@@ -410,8 +410,12 @@ * Released under the MIT License. | ||
else { | ||
setOrderForm((prevOrderForm) => ({ | ||
...prevOrderForm, | ||
messages: { | ||
...orderForm.messages, | ||
}, | ||
})); | ||
setOrderForm((prevOrderForm) => { | ||
var _a; | ||
return ({ | ||
...prevOrderForm, | ||
messages: { | ||
...orderForm.messages, | ||
generalMessages: (_a = orderForm.messages) === null || _a === void 0 ? void 0 : _a.generalMessages, | ||
}, | ||
}); | ||
}); | ||
} | ||
@@ -676,3 +680,3 @@ }, (error) => { | ||
}; | ||
return { OrderItemsProvider, useOrderItems }; | ||
return { OrderItemsProvider }; | ||
} | ||
@@ -693,2 +697,3 @@ | ||
exports.createOrderItemsProvider = createOrderItemsProvider; | ||
exports.useOrderItems = useOrderItems; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@vtex/order-items", | ||
"version": "0.3.0", | ||
"version": "0.3.1-0", | ||
"description": "", | ||
@@ -15,7 +15,8 @@ "cdn": "dist/index.umd.js", | ||
"build": "rollup --config ./rollup.config.js", | ||
"prepublishOnly": "yarn build" | ||
"prepublishOnly": "yarn clean; yarn build", | ||
"clean": "rm -rf dist types" | ||
}, | ||
"dependencies": { | ||
"@types/uuid": "^8.3.0", | ||
"@vtex/order-manager": "^0.2.0", | ||
"@vtex/order-manager": "^0.2.1-0", | ||
"react": "17.0.1", | ||
@@ -22,0 +23,0 @@ "uuid": "^8.3.2" |
@@ -27,2 +27,3 @@ import type { CatalogItem } from '../typings'; | ||
priceTags: never[]; | ||
unitMultiplier: null; | ||
}[]; | ||
@@ -29,0 +30,0 @@ marketingData: null; |
/// <reference types="react" /> | ||
import type { OrderForm } from '../typings'; | ||
declare const OrderFormProvider: import("react").FC<{}>, useOrderForm: () => import("@vtex/order-manager").Context<OrderForm>; | ||
import { useOrderForm } from '@vtex/order-manager'; | ||
declare const OrderFormProvider: import("react").FC<{}>; | ||
export { OrderFormProvider, useOrderForm }; | ||
//# sourceMappingURL=OrderFormProvider.d.ts.map |
/// <reference types="react" /> | ||
declare const OrderItemsProvider: import("react").FC<{}>, useOrderItems: () => import("../modules/OrderItemsContext").Context; | ||
declare const OrderItemsProvider: import("react").FC<{}>, useOrderItems: any; | ||
export { OrderItemsProvider, useOrderItems }; | ||
//# sourceMappingURL=OrderItems.d.ts.map |
@@ -6,3 +6,2 @@ /// <reference types="react" /> | ||
OrderItemsProvider: import("react").FC<{}>; | ||
useOrderItems: () => import("./modules/OrderItemsContext").Context; | ||
}; | ||
@@ -9,0 +8,0 @@ declare const _default: { |
export { createOrderItemsProvider } from './createOrderItems'; | ||
export { useOrderItems } from './modules/OrderItemsContext'; | ||
//# sourceMappingURL=index.d.ts.map |
import type { FC } from 'react'; | ||
import type { Context, useOrderQueue as useOrderQueueType, useQueueStatus as useQueueStatusType } from '@vtex/order-manager'; | ||
import type { Context as OrderItemsContextType } from './OrderItemsContext'; | ||
import type { useOrderQueue as useOrderQueueType, useQueueStatus as useQueueStatusType, OrderFormContext } from '@vtex/order-manager'; | ||
import type { OrderForm } from '../typings'; | ||
@@ -10,3 +9,3 @@ import type { CreateAddItemsParams } from './createUseAddItems'; | ||
export interface OrderItemsProviderProps<O extends OrderForm> extends CreateUseSetManualPriceParams<O>, CreateUseUpdateQuantityParams<O>, CreateAddItemsParams<O> { | ||
useOrderForm: () => Context<O>; | ||
useOrderForm: () => OrderFormContext<O>; | ||
useLogger: UseLogger; | ||
@@ -18,4 +17,3 @@ useOrderQueue: typeof useOrderQueueType; | ||
OrderItemsProvider: FC<{}>; | ||
useOrderItems: () => OrderItemsContextType; | ||
}; | ||
//# sourceMappingURL=createOrderItems.d.ts.map |
@@ -1,2 +0,2 @@ | ||
import type { Context } from '@vtex/order-manager'; | ||
import type { OrderFormContext } from '@vtex/order-manager'; | ||
import type { AddItemsMutationVariables } from './localOrderQueue'; | ||
@@ -11,3 +11,3 @@ import type { FakeUniqueIdMap, Item, MarketingData, OrderForm, OrderFormItemInput } from '../typings'; | ||
useMutateAddItems: () => AddItemsMutate<O>; | ||
useOrderForm: () => Context<O>; | ||
useOrderForm: () => OrderFormContext<O>; | ||
} | ||
@@ -14,0 +14,0 @@ export declare function createUseAddItems<O extends OrderForm>({ useMutateAddItems, useOrderForm, }: CreateAddItemsParams<O>): (fakeUniqueIdMapRef: React.MutableRefObject<FakeUniqueIdMap>) => ({ mutationInputItems, mutationInputMarketingData, orderFormItems, salesChannel, }: { |
@@ -1,2 +0,2 @@ | ||
import type { Context } from '@vtex/order-manager'; | ||
import type { OrderFormContext } from '@vtex/order-manager'; | ||
import type { OrderForm, FakeUniqueIdMap, Item, UpdateQuantityInput } from '../typings'; | ||
@@ -12,3 +12,3 @@ interface UpdateQuantityData<O extends OrderForm> { | ||
useMutateUpdateQuantity: () => UpdateQuantityMutation<O>; | ||
useOrderForm: () => Context<O>; | ||
useOrderForm: () => OrderFormContext<O>; | ||
} | ||
@@ -15,0 +15,0 @@ export declare function createUseUpdateQuantity<O extends OrderForm>({ useMutateUpdateQuantity, useOrderForm, }: CreateUseUpdateQuantityParams<O>): (fakeUniqueIdMapRef: React.MutableRefObject<FakeUniqueIdMap>) => ({ items, orderFormItems, id, }: { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
247917
63
2997
+ Added@vtex/order-manager@0.2.1-0(transitive)
- Removed@vtex/order-manager@0.2.0(transitive)
Updated@vtex/order-manager@^0.2.1-0