@open-tender/cloud 0.1.61 → 0.1.63
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/dist/cjs/slices/config.d.ts +65 -1
- package/dist/cjs/slices/config.js +4 -3
- package/dist/cjs/slices/customer/order.d.ts +67 -1
- package/dist/cjs/slices/customer/order.js +4 -3
- package/dist/cjs/slices/orderFulfillment.d.ts +1 -5
- package/dist/cjs/slices/orderFulfillment.js +5 -4
- package/dist/esm/slices/config.d.ts +65 -1
- package/dist/esm/slices/config.js +5 -3
- package/dist/esm/slices/customer/order.d.ts +67 -1
- package/dist/esm/slices/customer/order.js +5 -3
- package/dist/esm/slices/orderFulfillment.d.ts +1 -5
- package/dist/esm/slices/orderFulfillment.js +5 -4
- package/package.json +1 -1
|
@@ -83,9 +83,73 @@ export declare const selectAccountConfig: (state: AppState) => {
|
|
|
83
83
|
export declare const selectDisplaySettings: (state: AppState) => import("@open-tender/types").ConfigDisplaySetting | undefined;
|
|
84
84
|
export declare const selectConfigRetries: (state: AppState) => number;
|
|
85
85
|
export declare const selectLightColor: (state: AppState) => string;
|
|
86
|
-
export declare const selectOptIns: (state:
|
|
86
|
+
export declare const selectOptIns: ((state: import("redux").EmptyObject & {
|
|
87
|
+
alerts: import("@open-tender/types").Alerts;
|
|
88
|
+
notifications: import("@open-tender/types").Notifications;
|
|
89
|
+
allergens: import("./allergens").AllergensState;
|
|
90
|
+
announcements: import("./announcements").AnnouncementsState;
|
|
91
|
+
customer: import("redux").CombinedState<{
|
|
92
|
+
account: import("./customer").AccountState;
|
|
93
|
+
allergens: import("./customer").CustomerAllergensState;
|
|
94
|
+
addresses: import("./customer").CustomerAddressesState;
|
|
95
|
+
communicationPreferences: import("./customer").CustomerCommunicationPrefsState;
|
|
96
|
+
creditCards: import("./customer").CustomerCreditCardsState;
|
|
97
|
+
favorites: import("./customer").CustomerFavoritesState;
|
|
98
|
+
fcmToken: import("./customer").CustomerFcmTokenState;
|
|
99
|
+
giftCards: import("./customer").CustomerGiftCardsState;
|
|
100
|
+
orders: import("./customer").CustomerOrdersState;
|
|
101
|
+
order: import("./customer").CustomerOrderState;
|
|
102
|
+
loyalty: import("./customer").CustomerLoyaltyState;
|
|
103
|
+
groupOrders: import("./customer").CustomerGroupOrdersState;
|
|
104
|
+
houseAccounts: import("./customer").CustomerHouseAccountsState;
|
|
105
|
+
rewards: import("./customer").CustomerRewardsState;
|
|
106
|
+
qrcode: import("./customer").CustomerQRCodeState;
|
|
107
|
+
thanx: import("./customer").CustomerThanxState;
|
|
108
|
+
}>;
|
|
109
|
+
signUp: import("./signUp").SignUpState;
|
|
110
|
+
revenueCenters: import("./revenueCenters").RevenueCentersState;
|
|
111
|
+
completedOrders: import("./completedOrders").CompletedOrdersState;
|
|
112
|
+
checkout: import("./checkout").CheckoutState;
|
|
113
|
+
order: import("./order").OrderState;
|
|
114
|
+
orderFulfillment: import("./orderFulfillment").OrderFulfillmentState;
|
|
115
|
+
orderRating: import("./orderRating").OrderRatingState;
|
|
116
|
+
deals: import("./deals").DealState;
|
|
117
|
+
confirmation: import("./confirmation").ConfirmationState;
|
|
118
|
+
donations: import("./donations").DonationState;
|
|
119
|
+
guest: import("./guest").GuestState;
|
|
120
|
+
verifyAccount: import("./verifyAccount").VerifyAccountState;
|
|
121
|
+
menu: import("./menu").MenuState;
|
|
122
|
+
resetPassword: import("./resetPassword").ResetPasswordState;
|
|
123
|
+
validTimes: import("./validTimes").ValidTimesState;
|
|
124
|
+
menuItems: import("./menuItems").MenuItemsState;
|
|
125
|
+
menuDisplay: import("./menuDisplay").MenuDisplayState;
|
|
126
|
+
giftCards: import("./giftCards").GiftCardsState;
|
|
127
|
+
groupOrder: import("./groupOrder").GroupOrderState;
|
|
128
|
+
config: ConfigState;
|
|
129
|
+
geolocation: import("./geolocation").GeoLocationState;
|
|
130
|
+
loader: import("./loader").LoaderState;
|
|
131
|
+
qr: import("./qr").QrState;
|
|
132
|
+
misc: import("./misc").MiscState;
|
|
133
|
+
modal: import("@open-tender/types").Modal;
|
|
134
|
+
navSite: import("./navSite").NavSiteState;
|
|
135
|
+
nav: import("./nav").NavState;
|
|
136
|
+
posts: import("./posts").PostsSlice;
|
|
137
|
+
sidebarModal: import("./sidebarModal").SidebarModalState;
|
|
138
|
+
sidebar: import("./sidebar").SidebarState;
|
|
139
|
+
tags: import("./tags").TagsState;
|
|
140
|
+
}) => {
|
|
87
141
|
accepts_marketing: import("@open-tender/types").ConfigAcceptMarketing | null | undefined;
|
|
88
142
|
order_notifications: import("@open-tender/types").ConfigOrderNotifications | null | undefined;
|
|
143
|
+
}) & import("reselect").OutputSelectorFields<(args_0: {
|
|
144
|
+
accepts_marketing: import("@open-tender/types").ConfigAcceptMarketing | null | undefined;
|
|
145
|
+
order_notifications: import("@open-tender/types").ConfigOrderNotifications | null | undefined;
|
|
146
|
+
}) => {
|
|
147
|
+
accepts_marketing: import("@open-tender/types").ConfigAcceptMarketing | null | undefined;
|
|
148
|
+
order_notifications: import("@open-tender/types").ConfigOrderNotifications | null | undefined;
|
|
149
|
+
}, {
|
|
150
|
+
clearCache: () => void;
|
|
151
|
+
}> & {
|
|
152
|
+
clearCache: () => void;
|
|
89
153
|
};
|
|
90
154
|
export declare const selectFulfillment: (state: AppState) => import("@open-tender/types").ConfigFulfillment | undefined;
|
|
91
155
|
export declare const selectRecaptcha: (state: AppState) => import("@open-tender/types").ConfigRecaptcha | undefined;
|
|
@@ -111,11 +111,12 @@ const selectConfigRetries = (state) => state.config.retries;
|
|
|
111
111
|
exports.selectConfigRetries = selectConfigRetries;
|
|
112
112
|
const selectLightColor = (state) => state.config.theme ? state.config.theme.colors.light : '#ffffff';
|
|
113
113
|
exports.selectLightColor = selectLightColor;
|
|
114
|
-
|
|
114
|
+
exports.selectOptIns = (0, toolkit_1.createSelector)((state) => {
|
|
115
115
|
const { accepts_marketing, order_notifications } = state.config.brand || {};
|
|
116
116
|
return { accepts_marketing, order_notifications };
|
|
117
|
-
}
|
|
118
|
-
|
|
117
|
+
}, ({ accepts_marketing, order_notifications }) => {
|
|
118
|
+
return { accepts_marketing, order_notifications };
|
|
119
|
+
});
|
|
119
120
|
const selectFulfillment = (state) => { var _a; return (_a = state.config.brand) === null || _a === void 0 ? void 0 : _a.fulfillment; };
|
|
120
121
|
exports.selectFulfillment = selectFulfillment;
|
|
121
122
|
const selectRecaptcha = (state) => { var _a; return (_a = state.config.settings) === null || _a === void 0 ? void 0 : _a.recaptcha; };
|
|
@@ -33,9 +33,75 @@ export declare const updateCustomerOrderRating: import("@reduxjs/toolkit").Async
|
|
|
33
33
|
rejectedMeta?: unknown;
|
|
34
34
|
}>;
|
|
35
35
|
export declare const resetCustomerOrder: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"order/resetCustomerOrder">, resetCustomerOrderError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"order/resetCustomerOrderError">, setCustomerOrder: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "order/setCustomerOrder">;
|
|
36
|
-
export declare const selectCustomerOrder: (state:
|
|
36
|
+
export declare const selectCustomerOrder: ((state: import("redux").EmptyObject & {
|
|
37
|
+
alerts: import("@open-tender/types").Alerts;
|
|
38
|
+
notifications: import("@open-tender/types").Notifications;
|
|
39
|
+
allergens: import("..").AllergensState;
|
|
40
|
+
announcements: import("..").AnnouncementsState;
|
|
41
|
+
customer: import("redux").CombinedState<{
|
|
42
|
+
account: import("./account").AccountState;
|
|
43
|
+
allergens: import("./allergens").CustomerAllergensState;
|
|
44
|
+
addresses: import("./addresses").CustomerAddressesState;
|
|
45
|
+
communicationPreferences: import("./communicationPreferences").CustomerCommunicationPrefsState;
|
|
46
|
+
creditCards: import("./creditCards").CustomerCreditCardsState;
|
|
47
|
+
favorites: import("./favorites").CustomerFavoritesState;
|
|
48
|
+
fcmToken: import("./fcmToken").CustomerFcmTokenState;
|
|
49
|
+
giftCards: import("./giftCards").CustomerGiftCardsState;
|
|
50
|
+
orders: import("./orders").CustomerOrdersState;
|
|
51
|
+
order: CustomerOrderState;
|
|
52
|
+
loyalty: import("./loyalty").CustomerLoyaltyState;
|
|
53
|
+
groupOrders: import("./groupOrders").CustomerGroupOrdersState;
|
|
54
|
+
houseAccounts: import("./houseAccounts").CustomerHouseAccountsState;
|
|
55
|
+
rewards: import("./rewards").CustomerRewardsState;
|
|
56
|
+
qrcode: import("./qrCode").CustomerQRCodeState;
|
|
57
|
+
thanx: import("./thanx").CustomerThanxState;
|
|
58
|
+
}>;
|
|
59
|
+
signUp: import("..").SignUpState;
|
|
60
|
+
revenueCenters: import("..").RevenueCentersState;
|
|
61
|
+
completedOrders: import("..").CompletedOrdersState;
|
|
62
|
+
checkout: import("..").CheckoutState;
|
|
63
|
+
order: import("..").OrderState;
|
|
64
|
+
orderFulfillment: import("..").OrderFulfillmentState;
|
|
65
|
+
orderRating: import("..").OrderRatingState;
|
|
66
|
+
deals: import("..").DealState;
|
|
67
|
+
confirmation: import("..").ConfirmationState;
|
|
68
|
+
donations: import("..").DonationState;
|
|
69
|
+
guest: import("..").GuestState;
|
|
70
|
+
verifyAccount: import("..").VerifyAccountState;
|
|
71
|
+
menu: import("..").MenuState;
|
|
72
|
+
resetPassword: import("..").ResetPasswordState;
|
|
73
|
+
validTimes: import("..").ValidTimesState;
|
|
74
|
+
menuItems: import("..").MenuItemsState;
|
|
75
|
+
menuDisplay: import("..").MenuDisplayState;
|
|
76
|
+
giftCards: import("..").GiftCardsState;
|
|
77
|
+
groupOrder: import("..").GroupOrderState;
|
|
78
|
+
config: import("..").ConfigState;
|
|
79
|
+
geolocation: import("..").GeoLocationState;
|
|
80
|
+
loader: import("..").LoaderState;
|
|
81
|
+
qr: import("..").QrState;
|
|
82
|
+
misc: import("..").MiscState;
|
|
83
|
+
modal: import("@open-tender/types").Modal;
|
|
84
|
+
navSite: import("..").NavSiteState;
|
|
85
|
+
nav: import("..").NavState;
|
|
86
|
+
posts: import("..").PostsSlice;
|
|
87
|
+
sidebarModal: import("..").SidebarModalState;
|
|
88
|
+
sidebar: import("..").SidebarState;
|
|
89
|
+
tags: import("..").TagsState;
|
|
90
|
+
}) => {
|
|
37
91
|
order: Order | null;
|
|
38
92
|
loading: RequestStatus;
|
|
39
93
|
error: RequestError;
|
|
94
|
+
}) & import("reselect").OutputSelectorFields<(args_0: {
|
|
95
|
+
order: Order | null;
|
|
96
|
+
loading: RequestStatus;
|
|
97
|
+
error: RequestError;
|
|
98
|
+
}) => {
|
|
99
|
+
order: Order | null;
|
|
100
|
+
loading: RequestStatus;
|
|
101
|
+
error: RequestError;
|
|
102
|
+
}, {
|
|
103
|
+
clearCache: () => void;
|
|
104
|
+
}> & {
|
|
105
|
+
clearCache: () => void;
|
|
40
106
|
};
|
|
41
107
|
export declare const customerOrderReducer: import("redux").Reducer<CustomerOrderState, import("redux").AnyAction>;
|
|
@@ -89,9 +89,10 @@ const customerOrderSlice = (0, toolkit_1.createSlice)({
|
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
91
|
_a = customerOrderSlice.actions, exports.resetCustomerOrder = _a.resetCustomerOrder, exports.resetCustomerOrderError = _a.resetCustomerOrderError, exports.setCustomerOrder = _a.setCustomerOrder;
|
|
92
|
-
|
|
92
|
+
exports.selectCustomerOrder = (0, toolkit_1.createSelector)((state) => {
|
|
93
93
|
const { entity: order, loading, error } = state.customer.order;
|
|
94
94
|
return { order, loading, error };
|
|
95
|
-
}
|
|
96
|
-
|
|
95
|
+
}, ({ order, loading, error }) => {
|
|
96
|
+
return { order, loading, error };
|
|
97
|
+
});
|
|
97
98
|
exports.customerOrderReducer = customerOrderSlice.reducer;
|
|
@@ -33,9 +33,5 @@ export declare const updateOrderFulfillment: import("@reduxjs/toolkit").AsyncThu
|
|
|
33
33
|
rejectedMeta?: unknown;
|
|
34
34
|
}>;
|
|
35
35
|
export declare const resetOrderFulfillment: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"orderFulfillment/resetOrderFulfillment">;
|
|
36
|
-
export declare const selectOrderFulfillment: (state: AppState) =>
|
|
37
|
-
orderFulfillment: OrderFulfillment | null;
|
|
38
|
-
loading: RequestStatus;
|
|
39
|
-
error: RequestError;
|
|
40
|
-
};
|
|
36
|
+
export declare const selectOrderFulfillment: (state: AppState) => OrderFulfillmentState;
|
|
41
37
|
export declare const orderFulfillmentReducer: import("redux").Reducer<OrderFulfillmentState, import("redux").AnyAction>;
|
|
@@ -72,9 +72,10 @@ const orderFulfillmentSlice = (0, toolkit_1.createSlice)({
|
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
74
|
exports.resetOrderFulfillment = orderFulfillmentSlice.actions.resetOrderFulfillment;
|
|
75
|
-
const selectOrderFulfillment = (state) => {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
75
|
+
// export const selectOrderFulfillment = (state: AppState) => {
|
|
76
|
+
// const { orderFulfillment, loading, error } = state.orderFulfillment
|
|
77
|
+
// return { orderFulfillment, loading, error }
|
|
78
|
+
// }
|
|
79
|
+
const selectOrderFulfillment = (state) => state.orderFulfillment;
|
|
79
80
|
exports.selectOrderFulfillment = selectOrderFulfillment;
|
|
80
81
|
exports.orderFulfillmentReducer = orderFulfillmentSlice.reducer;
|
|
@@ -83,9 +83,73 @@ export declare const selectAccountConfig: (state: AppState) => {
|
|
|
83
83
|
export declare const selectDisplaySettings: (state: AppState) => import("@open-tender/types").ConfigDisplaySetting | undefined;
|
|
84
84
|
export declare const selectConfigRetries: (state: AppState) => number;
|
|
85
85
|
export declare const selectLightColor: (state: AppState) => string;
|
|
86
|
-
export declare const selectOptIns: (state:
|
|
86
|
+
export declare const selectOptIns: ((state: import("redux").EmptyObject & {
|
|
87
|
+
alerts: import("@open-tender/types").Alerts;
|
|
88
|
+
notifications: import("@open-tender/types").Notifications;
|
|
89
|
+
allergens: import("./allergens").AllergensState;
|
|
90
|
+
announcements: import("./announcements").AnnouncementsState;
|
|
91
|
+
customer: import("redux").CombinedState<{
|
|
92
|
+
account: import("./customer").AccountState;
|
|
93
|
+
allergens: import("./customer").CustomerAllergensState;
|
|
94
|
+
addresses: import("./customer").CustomerAddressesState;
|
|
95
|
+
communicationPreferences: import("./customer").CustomerCommunicationPrefsState;
|
|
96
|
+
creditCards: import("./customer").CustomerCreditCardsState;
|
|
97
|
+
favorites: import("./customer").CustomerFavoritesState;
|
|
98
|
+
fcmToken: import("./customer").CustomerFcmTokenState;
|
|
99
|
+
giftCards: import("./customer").CustomerGiftCardsState;
|
|
100
|
+
orders: import("./customer").CustomerOrdersState;
|
|
101
|
+
order: import("./customer").CustomerOrderState;
|
|
102
|
+
loyalty: import("./customer").CustomerLoyaltyState;
|
|
103
|
+
groupOrders: import("./customer").CustomerGroupOrdersState;
|
|
104
|
+
houseAccounts: import("./customer").CustomerHouseAccountsState;
|
|
105
|
+
rewards: import("./customer").CustomerRewardsState;
|
|
106
|
+
qrcode: import("./customer").CustomerQRCodeState;
|
|
107
|
+
thanx: import("./customer").CustomerThanxState;
|
|
108
|
+
}>;
|
|
109
|
+
signUp: import("./signUp").SignUpState;
|
|
110
|
+
revenueCenters: import("./revenueCenters").RevenueCentersState;
|
|
111
|
+
completedOrders: import("./completedOrders").CompletedOrdersState;
|
|
112
|
+
checkout: import("./checkout").CheckoutState;
|
|
113
|
+
order: import("./order").OrderState;
|
|
114
|
+
orderFulfillment: import("./orderFulfillment").OrderFulfillmentState;
|
|
115
|
+
orderRating: import("./orderRating").OrderRatingState;
|
|
116
|
+
deals: import("./deals").DealState;
|
|
117
|
+
confirmation: import("./confirmation").ConfirmationState;
|
|
118
|
+
donations: import("./donations").DonationState;
|
|
119
|
+
guest: import("./guest").GuestState;
|
|
120
|
+
verifyAccount: import("./verifyAccount").VerifyAccountState;
|
|
121
|
+
menu: import("./menu").MenuState;
|
|
122
|
+
resetPassword: import("./resetPassword").ResetPasswordState;
|
|
123
|
+
validTimes: import("./validTimes").ValidTimesState;
|
|
124
|
+
menuItems: import("./menuItems").MenuItemsState;
|
|
125
|
+
menuDisplay: import("./menuDisplay").MenuDisplayState;
|
|
126
|
+
giftCards: import("./giftCards").GiftCardsState;
|
|
127
|
+
groupOrder: import("./groupOrder").GroupOrderState;
|
|
128
|
+
config: ConfigState;
|
|
129
|
+
geolocation: import("./geolocation").GeoLocationState;
|
|
130
|
+
loader: import("./loader").LoaderState;
|
|
131
|
+
qr: import("./qr").QrState;
|
|
132
|
+
misc: import("./misc").MiscState;
|
|
133
|
+
modal: import("@open-tender/types").Modal;
|
|
134
|
+
navSite: import("./navSite").NavSiteState;
|
|
135
|
+
nav: import("./nav").NavState;
|
|
136
|
+
posts: import("./posts").PostsSlice;
|
|
137
|
+
sidebarModal: import("./sidebarModal").SidebarModalState;
|
|
138
|
+
sidebar: import("./sidebar").SidebarState;
|
|
139
|
+
tags: import("./tags").TagsState;
|
|
140
|
+
}) => {
|
|
87
141
|
accepts_marketing: import("@open-tender/types").ConfigAcceptMarketing | null | undefined;
|
|
88
142
|
order_notifications: import("@open-tender/types").ConfigOrderNotifications | null | undefined;
|
|
143
|
+
}) & import("reselect").OutputSelectorFields<(args_0: {
|
|
144
|
+
accepts_marketing: import("@open-tender/types").ConfigAcceptMarketing | null | undefined;
|
|
145
|
+
order_notifications: import("@open-tender/types").ConfigOrderNotifications | null | undefined;
|
|
146
|
+
}) => {
|
|
147
|
+
accepts_marketing: import("@open-tender/types").ConfigAcceptMarketing | null | undefined;
|
|
148
|
+
order_notifications: import("@open-tender/types").ConfigOrderNotifications | null | undefined;
|
|
149
|
+
}, {
|
|
150
|
+
clearCache: () => void;
|
|
151
|
+
}> & {
|
|
152
|
+
clearCache: () => void;
|
|
89
153
|
};
|
|
90
154
|
export declare const selectFulfillment: (state: AppState) => import("@open-tender/types").ConfigFulfillment | undefined;
|
|
91
155
|
export declare const selectRecaptcha: (state: AppState) => import("@open-tender/types").ConfigRecaptcha | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
|
-
import { createSlice, createAsyncThunk } from '@reduxjs/toolkit';
|
|
2
|
+
import { createSlice, createAsyncThunk, createSelector } from '@reduxjs/toolkit';
|
|
3
3
|
import { capitalize, decorateTheme } from '@open-tender/utils';
|
|
4
4
|
import { ReducerType } from './types';
|
|
5
5
|
import OpenTenderAPI from '../services/api';
|
|
@@ -96,10 +96,12 @@ export const selectDisplaySettings = (state) => {
|
|
|
96
96
|
};
|
|
97
97
|
export const selectConfigRetries = (state) => state.config.retries;
|
|
98
98
|
export const selectLightColor = (state) => state.config.theme ? state.config.theme.colors.light : '#ffffff';
|
|
99
|
-
export const selectOptIns = (state) => {
|
|
99
|
+
export const selectOptIns = createSelector((state) => {
|
|
100
100
|
const { accepts_marketing, order_notifications } = state.config.brand || {};
|
|
101
101
|
return { accepts_marketing, order_notifications };
|
|
102
|
-
}
|
|
102
|
+
}, ({ accepts_marketing, order_notifications }) => {
|
|
103
|
+
return { accepts_marketing, order_notifications };
|
|
104
|
+
});
|
|
103
105
|
export const selectFulfillment = (state) => { var _a; return (_a = state.config.brand) === null || _a === void 0 ? void 0 : _a.fulfillment; };
|
|
104
106
|
export const selectRecaptcha = (state) => { var _a; return (_a = state.config.settings) === null || _a === void 0 ? void 0 : _a.recaptcha; };
|
|
105
107
|
export const selectContentSection = (page) => (state) => state.config.content ? state.config.content[page] : undefined;
|
|
@@ -33,9 +33,75 @@ export declare const updateCustomerOrderRating: import("@reduxjs/toolkit").Async
|
|
|
33
33
|
rejectedMeta?: unknown;
|
|
34
34
|
}>;
|
|
35
35
|
export declare const resetCustomerOrder: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"order/resetCustomerOrder">, resetCustomerOrderError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"order/resetCustomerOrderError">, setCustomerOrder: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "order/setCustomerOrder">;
|
|
36
|
-
export declare const selectCustomerOrder: (state:
|
|
36
|
+
export declare const selectCustomerOrder: ((state: import("redux").EmptyObject & {
|
|
37
|
+
alerts: import("@open-tender/types").Alerts;
|
|
38
|
+
notifications: import("@open-tender/types").Notifications;
|
|
39
|
+
allergens: import("..").AllergensState;
|
|
40
|
+
announcements: import("..").AnnouncementsState;
|
|
41
|
+
customer: import("redux").CombinedState<{
|
|
42
|
+
account: import("./account").AccountState;
|
|
43
|
+
allergens: import("./allergens").CustomerAllergensState;
|
|
44
|
+
addresses: import("./addresses").CustomerAddressesState;
|
|
45
|
+
communicationPreferences: import("./communicationPreferences").CustomerCommunicationPrefsState;
|
|
46
|
+
creditCards: import("./creditCards").CustomerCreditCardsState;
|
|
47
|
+
favorites: import("./favorites").CustomerFavoritesState;
|
|
48
|
+
fcmToken: import("./fcmToken").CustomerFcmTokenState;
|
|
49
|
+
giftCards: import("./giftCards").CustomerGiftCardsState;
|
|
50
|
+
orders: import("./orders").CustomerOrdersState;
|
|
51
|
+
order: CustomerOrderState;
|
|
52
|
+
loyalty: import("./loyalty").CustomerLoyaltyState;
|
|
53
|
+
groupOrders: import("./groupOrders").CustomerGroupOrdersState;
|
|
54
|
+
houseAccounts: import("./houseAccounts").CustomerHouseAccountsState;
|
|
55
|
+
rewards: import("./rewards").CustomerRewardsState;
|
|
56
|
+
qrcode: import("./qrCode").CustomerQRCodeState;
|
|
57
|
+
thanx: import("./thanx").CustomerThanxState;
|
|
58
|
+
}>;
|
|
59
|
+
signUp: import("..").SignUpState;
|
|
60
|
+
revenueCenters: import("..").RevenueCentersState;
|
|
61
|
+
completedOrders: import("..").CompletedOrdersState;
|
|
62
|
+
checkout: import("..").CheckoutState;
|
|
63
|
+
order: import("..").OrderState;
|
|
64
|
+
orderFulfillment: import("..").OrderFulfillmentState;
|
|
65
|
+
orderRating: import("..").OrderRatingState;
|
|
66
|
+
deals: import("..").DealState;
|
|
67
|
+
confirmation: import("..").ConfirmationState;
|
|
68
|
+
donations: import("..").DonationState;
|
|
69
|
+
guest: import("..").GuestState;
|
|
70
|
+
verifyAccount: import("..").VerifyAccountState;
|
|
71
|
+
menu: import("..").MenuState;
|
|
72
|
+
resetPassword: import("..").ResetPasswordState;
|
|
73
|
+
validTimes: import("..").ValidTimesState;
|
|
74
|
+
menuItems: import("..").MenuItemsState;
|
|
75
|
+
menuDisplay: import("..").MenuDisplayState;
|
|
76
|
+
giftCards: import("..").GiftCardsState;
|
|
77
|
+
groupOrder: import("..").GroupOrderState;
|
|
78
|
+
config: import("..").ConfigState;
|
|
79
|
+
geolocation: import("..").GeoLocationState;
|
|
80
|
+
loader: import("..").LoaderState;
|
|
81
|
+
qr: import("..").QrState;
|
|
82
|
+
misc: import("..").MiscState;
|
|
83
|
+
modal: import("@open-tender/types").Modal;
|
|
84
|
+
navSite: import("..").NavSiteState;
|
|
85
|
+
nav: import("..").NavState;
|
|
86
|
+
posts: import("..").PostsSlice;
|
|
87
|
+
sidebarModal: import("..").SidebarModalState;
|
|
88
|
+
sidebar: import("..").SidebarState;
|
|
89
|
+
tags: import("..").TagsState;
|
|
90
|
+
}) => {
|
|
37
91
|
order: Order | null;
|
|
38
92
|
loading: RequestStatus;
|
|
39
93
|
error: RequestError;
|
|
94
|
+
}) & import("reselect").OutputSelectorFields<(args_0: {
|
|
95
|
+
order: Order | null;
|
|
96
|
+
loading: RequestStatus;
|
|
97
|
+
error: RequestError;
|
|
98
|
+
}) => {
|
|
99
|
+
order: Order | null;
|
|
100
|
+
loading: RequestStatus;
|
|
101
|
+
error: RequestError;
|
|
102
|
+
}, {
|
|
103
|
+
clearCache: () => void;
|
|
104
|
+
}> & {
|
|
105
|
+
clearCache: () => void;
|
|
40
106
|
};
|
|
41
107
|
export declare const customerOrderReducer: import("redux").Reducer<CustomerOrderState, import("redux").AnyAction>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
|
-
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
2
|
+
import { createAsyncThunk, createSelector, createSlice } from '@reduxjs/toolkit';
|
|
3
3
|
import { ReducerType } from '../types';
|
|
4
4
|
import { MISSING_CUSTOMER } from '@open-tender/types';
|
|
5
5
|
import { checkAuth, selectToken } from './account';
|
|
@@ -85,8 +85,10 @@ const customerOrderSlice = createSlice({
|
|
|
85
85
|
}
|
|
86
86
|
});
|
|
87
87
|
export const { resetCustomerOrder, resetCustomerOrderError, setCustomerOrder } = customerOrderSlice.actions;
|
|
88
|
-
export const selectCustomerOrder = (state) => {
|
|
88
|
+
export const selectCustomerOrder = createSelector((state) => {
|
|
89
89
|
const { entity: order, loading, error } = state.customer.order;
|
|
90
90
|
return { order, loading, error };
|
|
91
|
-
}
|
|
91
|
+
}, ({ order, loading, error }) => {
|
|
92
|
+
return { order, loading, error };
|
|
93
|
+
});
|
|
92
94
|
export const customerOrderReducer = customerOrderSlice.reducer;
|
|
@@ -33,9 +33,5 @@ export declare const updateOrderFulfillment: import("@reduxjs/toolkit").AsyncThu
|
|
|
33
33
|
rejectedMeta?: unknown;
|
|
34
34
|
}>;
|
|
35
35
|
export declare const resetOrderFulfillment: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"orderFulfillment/resetOrderFulfillment">;
|
|
36
|
-
export declare const selectOrderFulfillment: (state: AppState) =>
|
|
37
|
-
orderFulfillment: OrderFulfillment | null;
|
|
38
|
-
loading: RequestStatus;
|
|
39
|
-
error: RequestError;
|
|
40
|
-
};
|
|
36
|
+
export declare const selectOrderFulfillment: (state: AppState) => OrderFulfillmentState;
|
|
41
37
|
export declare const orderFulfillmentReducer: import("redux").Reducer<OrderFulfillmentState, import("redux").AnyAction>;
|
|
@@ -69,8 +69,9 @@ const orderFulfillmentSlice = createSlice({
|
|
|
69
69
|
}
|
|
70
70
|
});
|
|
71
71
|
export const { resetOrderFulfillment } = orderFulfillmentSlice.actions;
|
|
72
|
-
export const selectOrderFulfillment = (state) => {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
72
|
+
// export const selectOrderFulfillment = (state: AppState) => {
|
|
73
|
+
// const { orderFulfillment, loading, error } = state.orderFulfillment
|
|
74
|
+
// return { orderFulfillment, loading, error }
|
|
75
|
+
// }
|
|
76
|
+
export const selectOrderFulfillment = (state) => state.orderFulfillment;
|
|
76
77
|
export const orderFulfillmentReducer = orderFulfillmentSlice.reducer;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/cloud",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.63",
|
|
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",
|