@open-tender/cloud 0.4.444 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -41,7 +41,7 @@ export declare const submitOrder: import("@reduxjs/toolkit").AsyncThunk<Order, {
|
|
|
41
41
|
fulfilledMeta?: unknown;
|
|
42
42
|
rejectedMeta?: unknown;
|
|
43
43
|
}>;
|
|
44
|
-
export declare const updateForm: import("@reduxjs/toolkit").AsyncThunk<CheckoutState
|
|
44
|
+
export declare const updateForm: import("@reduxjs/toolkit").AsyncThunk<Partial<CheckoutState>, Partial<CheckoutForm>, {
|
|
45
45
|
state: AppState;
|
|
46
46
|
rejectValue: CheckoutErrorMessages;
|
|
47
47
|
dispatch?: Dispatch<import("redux").AnyAction> | undefined;
|
|
@@ -186,8 +186,10 @@ exports.updateForm = (0, toolkit_1.createAsyncThunk)(CheckoutActionType.UpdateFo
|
|
|
186
186
|
if (tenders)
|
|
187
187
|
delete errors.tenders;
|
|
188
188
|
const form = Object.assign(Object.assign({}, checkout.form), payload);
|
|
189
|
-
return
|
|
190
|
-
|
|
189
|
+
return {
|
|
190
|
+
form,
|
|
191
|
+
errors
|
|
192
|
+
};
|
|
191
193
|
}));
|
|
192
194
|
exports.submitOrderPay = (0, toolkit_1.createAsyncThunk)(CheckoutActionType.SubmitOrderPay, (showAlert = false, { dispatch, getState, rejectWithValue }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
193
195
|
const { api } = getState().config;
|
|
@@ -276,9 +278,7 @@ const checkoutSlice = (0, toolkit_1.createSlice)({
|
|
|
276
278
|
extraReducers: builder => {
|
|
277
279
|
builder
|
|
278
280
|
.addCase(exports.validateOrder.fulfilled, (state, action) => {
|
|
279
|
-
|
|
280
|
-
newState.loading === 'idle';
|
|
281
|
-
return newState;
|
|
281
|
+
return Object.assign(Object.assign(Object.assign({}, state), action.payload), { loading: 'idle', error: null });
|
|
282
282
|
})
|
|
283
283
|
.addCase(exports.validateOrder.pending, state => {
|
|
284
284
|
state.loading = 'pending';
|
|
@@ -41,7 +41,7 @@ export declare const submitOrder: import("@reduxjs/toolkit").AsyncThunk<Order, {
|
|
|
41
41
|
fulfilledMeta?: unknown;
|
|
42
42
|
rejectedMeta?: unknown;
|
|
43
43
|
}>;
|
|
44
|
-
export declare const updateForm: import("@reduxjs/toolkit").AsyncThunk<CheckoutState
|
|
44
|
+
export declare const updateForm: import("@reduxjs/toolkit").AsyncThunk<Partial<CheckoutState>, Partial<CheckoutForm>, {
|
|
45
45
|
state: AppState;
|
|
46
46
|
rejectValue: CheckoutErrorMessages;
|
|
47
47
|
dispatch?: Dispatch<import("redux").AnyAction> | undefined;
|
|
@@ -182,8 +182,10 @@ export const updateForm = createAsyncThunk(CheckoutActionType.UpdateForm, (paylo
|
|
|
182
182
|
if (tenders)
|
|
183
183
|
delete errors.tenders;
|
|
184
184
|
const form = Object.assign(Object.assign({}, checkout.form), payload);
|
|
185
|
-
return
|
|
186
|
-
|
|
185
|
+
return {
|
|
186
|
+
form,
|
|
187
|
+
errors
|
|
188
|
+
};
|
|
187
189
|
}));
|
|
188
190
|
export const submitOrderPay = createAsyncThunk(CheckoutActionType.SubmitOrderPay, (showAlert = false, { dispatch, getState, rejectWithValue }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
189
191
|
const { api } = getState().config;
|
|
@@ -272,9 +274,7 @@ const checkoutSlice = createSlice({
|
|
|
272
274
|
extraReducers: builder => {
|
|
273
275
|
builder
|
|
274
276
|
.addCase(validateOrder.fulfilled, (state, action) => {
|
|
275
|
-
|
|
276
|
-
newState.loading === 'idle';
|
|
277
|
-
return newState;
|
|
277
|
+
return Object.assign(Object.assign(Object.assign({}, state), action.payload), { loading: 'idle', error: null });
|
|
278
278
|
})
|
|
279
279
|
.addCase(validateOrder.pending, state => {
|
|
280
280
|
state.loading = 'pending';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/cloud",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "A library of hooks, reducers, utility functions, and types for use with Open Tender applications that utilize our cloud-based Order API.",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|