@open-tender/cloud 0.1.99 → 0.1.100
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.
|
@@ -66,5 +66,67 @@ export declare const addCustomerCreditCard: import("@reduxjs/toolkit").AsyncThun
|
|
|
66
66
|
}>;
|
|
67
67
|
export declare const resetCustomerCreditCards: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"creditCards/resetCustomerCreditCards">, resetCustomerCreditCardsError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"creditCards/resetCustomerCreditCardsError">, setCustomerCreditCards: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "creditCards/setCustomerCreditCards">;
|
|
68
68
|
export declare const selectCustomerCreditCards: (state: AppState) => CustomerCreditCardsState;
|
|
69
|
-
export declare const selectCustomerCreditCardsForPayment: (state:
|
|
69
|
+
export declare const selectCustomerCreditCardsForPayment: ((state: import("redux").EmptyObject & {
|
|
70
|
+
alerts: import("@open-tender/types").Alerts;
|
|
71
|
+
allergens: import("..").AllergensState;
|
|
72
|
+
announcements: import("..").AnnouncementsState;
|
|
73
|
+
checkout: import("..").CheckoutState;
|
|
74
|
+
completedOrders: import("..").CompletedOrdersState;
|
|
75
|
+
config: import("..").ConfigState;
|
|
76
|
+
confirmation: import("..").ConfirmationState;
|
|
77
|
+
customer: import("redux").CombinedState<{
|
|
78
|
+
account: import("./account").AccountState;
|
|
79
|
+
communicationPreferences: import("./communicationPreferences").CustomerCommunicationPrefsState;
|
|
80
|
+
creditCards: CustomerCreditCardsState;
|
|
81
|
+
allergens: import("./allergens").CustomerAllergensState;
|
|
82
|
+
addresses: import("./addresses").CustomerAddressesState;
|
|
83
|
+
favorites: import("./favorites").CustomerFavoritesState;
|
|
84
|
+
fcmToken: import("./fcmToken").CustomerFcmTokenState;
|
|
85
|
+
giftCards: import("./giftCards").CustomerGiftCardsState;
|
|
86
|
+
groupOrders: import("./groupOrders").CustomerGroupOrdersState;
|
|
87
|
+
houseAccounts: import("./houseAccounts").CustomerHouseAccountsState;
|
|
88
|
+
loyalty: import("./loyalty").CustomerLoyaltyState;
|
|
89
|
+
order: import("./order").CustomerOrderState;
|
|
90
|
+
orders: import("./orders").CustomerOrdersState;
|
|
91
|
+
pointsShop: import("./pointsShop").PointsShopState;
|
|
92
|
+
qrcode: import("./qrCode").CustomerQRCodeState;
|
|
93
|
+
rewards: import("./rewards").CustomerRewardsState;
|
|
94
|
+
thanx: import("./thanx").CustomerThanxState;
|
|
95
|
+
tpls: import("./tpls").CustomerTplsState;
|
|
96
|
+
}>;
|
|
97
|
+
deals: import("..").DealsState;
|
|
98
|
+
donations: import("..").DonationState;
|
|
99
|
+
geolocation: import("..").GeoLocationState;
|
|
100
|
+
giftCards: import("..").GiftCardsState;
|
|
101
|
+
groupOrder: import("..").GroupOrderState;
|
|
102
|
+
guest: import("..").GuestState;
|
|
103
|
+
loader: import("..").LoaderState;
|
|
104
|
+
menu: import("..").MenuState;
|
|
105
|
+
menuDisplay: import("..").MenuDisplayState;
|
|
106
|
+
menuItems: import("..").MenuItemsState;
|
|
107
|
+
modal: import("@open-tender/types").Modal;
|
|
108
|
+
misc: import("..").MiscState;
|
|
109
|
+
nav: import("..").NavState;
|
|
110
|
+
navSite: import("..").NavSiteState;
|
|
111
|
+
notifications: import("@open-tender/types").Notifications;
|
|
112
|
+
oneTimePasscode: import("..").OneTimePasscodeState;
|
|
113
|
+
order: import("..").OrderState;
|
|
114
|
+
orderFulfillment: import("..").OrderFulfillmentState;
|
|
115
|
+
orderRating: import("..").OrderRatingState;
|
|
116
|
+
posts: import("..").PostsSlice;
|
|
117
|
+
qr: import("..").QrState;
|
|
118
|
+
resetPassword: import("..").ResetPasswordState;
|
|
119
|
+
revenueCenters: import("..").RevenueCentersState;
|
|
120
|
+
sidebar: import("..").SidebarState;
|
|
121
|
+
sidebarModal: import("..").SidebarModalState;
|
|
122
|
+
signUp: import("..").SignUpState;
|
|
123
|
+
tags: import("..").TagsState;
|
|
124
|
+
terms: import("..").TermsSlice;
|
|
125
|
+
validTimes: import("..").ValidTimesState;
|
|
126
|
+
verifyAccount: import("..").VerifyAccountState;
|
|
127
|
+
}) => import("@open-tender/types").CreditCard[]) & import("reselect").OutputSelectorFields<(args_0: CreditCards) => import("@open-tender/types").CreditCard[], {
|
|
128
|
+
clearCache: () => void;
|
|
129
|
+
}> & {
|
|
130
|
+
clearCache: () => void;
|
|
131
|
+
};
|
|
70
132
|
export declare const customerCreditCardsReducer: import("redux").Reducer<CustomerCreditCardsState, import("redux").AnyAction>;
|
|
@@ -161,9 +161,10 @@ const customerCreditCardsSlice = (0, toolkit_1.createSlice)({
|
|
|
161
161
|
_a = customerCreditCardsSlice.actions, exports.resetCustomerCreditCards = _a.resetCustomerCreditCards, exports.resetCustomerCreditCardsError = _a.resetCustomerCreditCardsError, exports.setCustomerCreditCards = _a.setCustomerCreditCards;
|
|
162
162
|
const selectCustomerCreditCards = (state) => state.customer.creditCards;
|
|
163
163
|
exports.selectCustomerCreditCards = selectCustomerCreditCards;
|
|
164
|
-
|
|
164
|
+
exports.selectCustomerCreditCardsForPayment = (0, toolkit_1.createSelector)((state) => {
|
|
165
165
|
const creditCards = state.customer.creditCards.entities;
|
|
166
|
+
return creditCards;
|
|
167
|
+
}, creditCards => {
|
|
166
168
|
return creditCards.filter(i => i.has_profile);
|
|
167
|
-
};
|
|
168
|
-
exports.selectCustomerCreditCardsForPayment = selectCustomerCreditCardsForPayment;
|
|
169
|
+
});
|
|
169
170
|
exports.customerCreditCardsReducer = customerCreditCardsSlice.reducer;
|
|
@@ -66,5 +66,67 @@ export declare const addCustomerCreditCard: import("@reduxjs/toolkit").AsyncThun
|
|
|
66
66
|
}>;
|
|
67
67
|
export declare const resetCustomerCreditCards: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"creditCards/resetCustomerCreditCards">, resetCustomerCreditCardsError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"creditCards/resetCustomerCreditCardsError">, setCustomerCreditCards: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "creditCards/setCustomerCreditCards">;
|
|
68
68
|
export declare const selectCustomerCreditCards: (state: AppState) => CustomerCreditCardsState;
|
|
69
|
-
export declare const selectCustomerCreditCardsForPayment: (state:
|
|
69
|
+
export declare const selectCustomerCreditCardsForPayment: ((state: import("redux").EmptyObject & {
|
|
70
|
+
alerts: import("@open-tender/types").Alerts;
|
|
71
|
+
allergens: import("..").AllergensState;
|
|
72
|
+
announcements: import("..").AnnouncementsState;
|
|
73
|
+
checkout: import("..").CheckoutState;
|
|
74
|
+
completedOrders: import("..").CompletedOrdersState;
|
|
75
|
+
config: import("..").ConfigState;
|
|
76
|
+
confirmation: import("..").ConfirmationState;
|
|
77
|
+
customer: import("redux").CombinedState<{
|
|
78
|
+
account: import("./account").AccountState;
|
|
79
|
+
communicationPreferences: import("./communicationPreferences").CustomerCommunicationPrefsState;
|
|
80
|
+
creditCards: CustomerCreditCardsState;
|
|
81
|
+
allergens: import("./allergens").CustomerAllergensState;
|
|
82
|
+
addresses: import("./addresses").CustomerAddressesState;
|
|
83
|
+
favorites: import("./favorites").CustomerFavoritesState;
|
|
84
|
+
fcmToken: import("./fcmToken").CustomerFcmTokenState;
|
|
85
|
+
giftCards: import("./giftCards").CustomerGiftCardsState;
|
|
86
|
+
groupOrders: import("./groupOrders").CustomerGroupOrdersState;
|
|
87
|
+
houseAccounts: import("./houseAccounts").CustomerHouseAccountsState;
|
|
88
|
+
loyalty: import("./loyalty").CustomerLoyaltyState;
|
|
89
|
+
order: import("./order").CustomerOrderState;
|
|
90
|
+
orders: import("./orders").CustomerOrdersState;
|
|
91
|
+
pointsShop: import("./pointsShop").PointsShopState;
|
|
92
|
+
qrcode: import("./qrCode").CustomerQRCodeState;
|
|
93
|
+
rewards: import("./rewards").CustomerRewardsState;
|
|
94
|
+
thanx: import("./thanx").CustomerThanxState;
|
|
95
|
+
tpls: import("./tpls").CustomerTplsState;
|
|
96
|
+
}>;
|
|
97
|
+
deals: import("..").DealsState;
|
|
98
|
+
donations: import("..").DonationState;
|
|
99
|
+
geolocation: import("..").GeoLocationState;
|
|
100
|
+
giftCards: import("..").GiftCardsState;
|
|
101
|
+
groupOrder: import("..").GroupOrderState;
|
|
102
|
+
guest: import("..").GuestState;
|
|
103
|
+
loader: import("..").LoaderState;
|
|
104
|
+
menu: import("..").MenuState;
|
|
105
|
+
menuDisplay: import("..").MenuDisplayState;
|
|
106
|
+
menuItems: import("..").MenuItemsState;
|
|
107
|
+
modal: import("@open-tender/types").Modal;
|
|
108
|
+
misc: import("..").MiscState;
|
|
109
|
+
nav: import("..").NavState;
|
|
110
|
+
navSite: import("..").NavSiteState;
|
|
111
|
+
notifications: import("@open-tender/types").Notifications;
|
|
112
|
+
oneTimePasscode: import("..").OneTimePasscodeState;
|
|
113
|
+
order: import("..").OrderState;
|
|
114
|
+
orderFulfillment: import("..").OrderFulfillmentState;
|
|
115
|
+
orderRating: import("..").OrderRatingState;
|
|
116
|
+
posts: import("..").PostsSlice;
|
|
117
|
+
qr: import("..").QrState;
|
|
118
|
+
resetPassword: import("..").ResetPasswordState;
|
|
119
|
+
revenueCenters: import("..").RevenueCentersState;
|
|
120
|
+
sidebar: import("..").SidebarState;
|
|
121
|
+
sidebarModal: import("..").SidebarModalState;
|
|
122
|
+
signUp: import("..").SignUpState;
|
|
123
|
+
tags: import("..").TagsState;
|
|
124
|
+
terms: import("..").TermsSlice;
|
|
125
|
+
validTimes: import("..").ValidTimesState;
|
|
126
|
+
verifyAccount: import("..").VerifyAccountState;
|
|
127
|
+
}) => import("@open-tender/types").CreditCard[]) & import("reselect").OutputSelectorFields<(args_0: CreditCards) => import("@open-tender/types").CreditCard[], {
|
|
128
|
+
clearCache: () => void;
|
|
129
|
+
}> & {
|
|
130
|
+
clearCache: () => void;
|
|
131
|
+
};
|
|
70
132
|
export declare const customerCreditCardsReducer: import("redux").Reducer<CustomerCreditCardsState, 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';
|
|
@@ -156,8 +156,10 @@ const customerCreditCardsSlice = createSlice({
|
|
|
156
156
|
});
|
|
157
157
|
export const { resetCustomerCreditCards, resetCustomerCreditCardsError, setCustomerCreditCards } = customerCreditCardsSlice.actions;
|
|
158
158
|
export const selectCustomerCreditCards = (state) => state.customer.creditCards;
|
|
159
|
-
export const selectCustomerCreditCardsForPayment = (state) => {
|
|
159
|
+
export const selectCustomerCreditCardsForPayment = createSelector((state) => {
|
|
160
160
|
const creditCards = state.customer.creditCards.entities;
|
|
161
|
+
return creditCards;
|
|
162
|
+
}, creditCards => {
|
|
161
163
|
return creditCards.filter(i => i.has_profile);
|
|
162
|
-
};
|
|
164
|
+
});
|
|
163
165
|
export const customerCreditCardsReducer = customerCreditCardsSlice.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.100",
|
|
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",
|