@open-tender/cloud 0.4.4 → 0.4.6
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.
|
@@ -166,6 +166,73 @@ export declare const selectFulfillment: (state: AppState) => import("@open-tende
|
|
|
166
166
|
export declare const selectRecaptcha: (state: AppState) => import("@open-tender/types").ConfigRecaptcha | undefined;
|
|
167
167
|
export declare const selectContentSection: <T extends keyof ConfigContent>(page: T) => (state: AppState) => ConfigContent[T] | undefined;
|
|
168
168
|
export declare const selectPage: (page: ConfigPageType) => (state: AppState) => ConfigPage | undefined;
|
|
169
|
+
export declare const selectBottomTabsDisplayed: (state: AppState) => import("@open-tender/types").BottomTabsSections;
|
|
170
|
+
export declare const selectBottomTabsTitles: ((state: import("redux").EmptyObject & {
|
|
171
|
+
alerts: import("@open-tender/types").Alerts;
|
|
172
|
+
allergens: import("./allergens").AllergensState;
|
|
173
|
+
announcements: import("./announcements").AnnouncementsState;
|
|
174
|
+
checkout: import("./checkout").CheckoutState;
|
|
175
|
+
completedOrders: import("./completedOrders").CompletedOrdersState;
|
|
176
|
+
config: ConfigState;
|
|
177
|
+
confirmation: import("./confirmation").ConfirmationState;
|
|
178
|
+
customer: import("redux").CombinedState<{
|
|
179
|
+
account: import("./customer").AccountState;
|
|
180
|
+
communicationPreferences: import("./customer").CustomerCommunicationPrefsState;
|
|
181
|
+
creditCards: import("./customer").CustomerCreditCardsState;
|
|
182
|
+
allergens: import("./customer").CustomerAllergensState;
|
|
183
|
+
addresses: import("./customer").CustomerAddressesState;
|
|
184
|
+
favorites: import("./customer").CustomerFavoritesState;
|
|
185
|
+
fcmToken: import("./customer").CustomerFcmTokenState;
|
|
186
|
+
giftCards: import("./customer").CustomerGiftCardsState;
|
|
187
|
+
groupOrders: import("./customer").CustomerGroupOrdersState;
|
|
188
|
+
history: import("./customer").CustomerHistoryState;
|
|
189
|
+
houseAccounts: import("./customer").CustomerHouseAccountsState;
|
|
190
|
+
loyalty: import("./customer").CustomerLoyaltyState;
|
|
191
|
+
order: import("./customer").CustomerOrderState;
|
|
192
|
+
orders: import("./customer").CustomerOrdersState;
|
|
193
|
+
pointsShop: import("./customer").PointsShopState;
|
|
194
|
+
qrcode: import("./customer").CustomerQRCodeState;
|
|
195
|
+
rewards: import("./customer").CustomerRewardsState;
|
|
196
|
+
thanx: import("./customer").CustomerThanxState;
|
|
197
|
+
tpls: import("./customer").CustomerTplsState;
|
|
198
|
+
}>;
|
|
199
|
+
deals: import("./deals").DealsState;
|
|
200
|
+
donations: import("./donations").DonationState;
|
|
201
|
+
geolocation: import("./geolocation").GeoLocationState;
|
|
202
|
+
giftCards: import("./giftCards").GiftCardsState;
|
|
203
|
+
groupOrder: import("./groupOrder").GroupOrderState;
|
|
204
|
+
guest: import("./guest").GuestState;
|
|
205
|
+
loader: import("./loader").LoaderState;
|
|
206
|
+
menu: import("./menu").MenuState;
|
|
207
|
+
menuDisplay: import("./menuDisplay").MenuDisplayState;
|
|
208
|
+
menuItems: import("./menuItems").MenuItemsState;
|
|
209
|
+
modal: import("@open-tender/types").Modal;
|
|
210
|
+
misc: import("./misc").MiscState;
|
|
211
|
+
nav: import("./nav").NavState;
|
|
212
|
+
navSite: import("./navSite").NavSiteState;
|
|
213
|
+
notifications: import("@open-tender/types").Notifications;
|
|
214
|
+
oneTimePasscode: import("./oneTimePasscode").OneTimePasscodeState;
|
|
215
|
+
order: import("./order").OrderState;
|
|
216
|
+
orderFulfillment: import("./orderFulfillment").OrderFulfillmentState;
|
|
217
|
+
orderRating: import("./orderRating").OrderRatingState;
|
|
218
|
+
posts: import("./posts").PostsSlice;
|
|
219
|
+
pushNotifications: import("./pushNotifications").PushNotificationsState;
|
|
220
|
+
qr: import("./qr").QrState;
|
|
221
|
+
quote: import("./quote").QuoteState;
|
|
222
|
+
resetPassword: import("./resetPassword").ResetPasswordState;
|
|
223
|
+
revenueCenters: import("./revenueCenters").RevenueCentersState;
|
|
224
|
+
sidebar: import("./sidebar").SidebarState;
|
|
225
|
+
sidebarModal: import("./sidebarModal").SidebarModalState;
|
|
226
|
+
signUp: import("./signUp").SignUpState;
|
|
227
|
+
tags: import("./tags").TagsState;
|
|
228
|
+
terms: import("./terms").TermsSlice;
|
|
229
|
+
validTimes: import("./validTimes").ValidTimesState;
|
|
230
|
+
verifyAccount: import("./verifyAccount").VerifyAccountState;
|
|
231
|
+
}) => {}) & import("reselect").OutputSelectorFields<(args_0: (import("@open-tender/types").BottomTabsDisplayed & import("@open-tender/types").BottomTabsTitles) | undefined) => {}, {
|
|
232
|
+
clearCache: () => void;
|
|
233
|
+
}> & {
|
|
234
|
+
clearCache: () => void;
|
|
235
|
+
};
|
|
169
236
|
export declare const selectSoldOutMsg: (state: AppState) => string;
|
|
170
237
|
export declare const selectHeaderHeight: (state: AppState) => (isBrowser: boolean) => number;
|
|
171
238
|
export declare const selectOutpostName: (state: AppState) => string | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.configReducer = exports.selectCategoryType = exports.selectHasCatering = exports.selectOutpostName = exports.selectHeaderHeight = exports.selectSoldOutMsg = exports.selectPage = exports.selectContentSection = exports.selectRecaptcha = exports.selectFulfillment = exports.selectOptIns = exports.selectLightColor = exports.selectConfigRetries = exports.selectDisplaySettings = exports.selectCateringOnly = exports.selectAccountConfig = exports.selectApi = exports.selectPages = exports.selectStylesheet = exports.selectSettings = exports.selectContent = exports.selectTheme = exports.selectBrand = exports.selectConfig = exports.incrementRetries = exports.resetRetries = exports.resetConfig = exports.fetchConfig = exports.ConfigActionType = void 0;
|
|
4
|
+
exports.configReducer = exports.selectCategoryType = exports.selectHasCatering = exports.selectOutpostName = exports.selectHeaderHeight = exports.selectSoldOutMsg = exports.selectBottomTabsTitles = exports.selectBottomTabsDisplayed = exports.selectPage = exports.selectContentSection = exports.selectRecaptcha = exports.selectFulfillment = exports.selectOptIns = exports.selectLightColor = exports.selectConfigRetries = exports.selectDisplaySettings = exports.selectCateringOnly = exports.selectAccountConfig = exports.selectApi = exports.selectPages = exports.selectStylesheet = exports.selectSettings = exports.selectContent = exports.selectTheme = exports.selectBrand = exports.selectConfig = exports.incrementRetries = exports.resetRetries = exports.resetConfig = exports.fetchConfig = exports.ConfigActionType = void 0;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
6
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
7
7
|
const utils_1 = require("@open-tender/utils");
|
|
@@ -133,6 +133,20 @@ const selectContentSection = (page) => (state) => state.config.content ? state.c
|
|
|
133
133
|
exports.selectContentSection = selectContentSection;
|
|
134
134
|
const selectPage = (page) => (state) => state.config.pages ? state.config.pages[page] : undefined;
|
|
135
135
|
exports.selectPage = selectPage;
|
|
136
|
+
const selectBottomTabsDisplayed = (state) => { var _a; return ((_a = state.config.content) === null || _a === void 0 ? void 0 : _a.bottomTabs.displayed) || []; };
|
|
137
|
+
exports.selectBottomTabsDisplayed = selectBottomTabsDisplayed;
|
|
138
|
+
exports.selectBottomTabsTitles = (0, toolkit_1.createSelector)((state) => {
|
|
139
|
+
const { bottomTabs } = state.config.content || {};
|
|
140
|
+
return bottomTabs;
|
|
141
|
+
}, bottomTabs => {
|
|
142
|
+
if (!bottomTabs)
|
|
143
|
+
return {};
|
|
144
|
+
return Object.entries(bottomTabs).reduce((obj, [key, value]) => {
|
|
145
|
+
if (key === 'displayed')
|
|
146
|
+
return obj;
|
|
147
|
+
return Object.assign(Object.assign({}, obj), { [key]: value.title });
|
|
148
|
+
}, {});
|
|
149
|
+
});
|
|
136
150
|
const selectSoldOutMsg = (state) => {
|
|
137
151
|
var _a;
|
|
138
152
|
const { soldOutMessage } = ((_a = state.config.content) === null || _a === void 0 ? void 0 : _a.menu) || {};
|
|
@@ -19,7 +19,7 @@ exports.signUpCustomer = (0, toolkit_1.createAsyncThunk)(SignUpActionType.SignUp
|
|
|
19
19
|
const response = yield api.postSignUp(data);
|
|
20
20
|
const { email, password } = data;
|
|
21
21
|
if (email && password) {
|
|
22
|
-
if (brand === null || brand === void 0 ? void 0 : brand.tpls) {
|
|
22
|
+
if ((brand === null || brand === void 0 ? void 0 : brand.tpls) && (brand === null || brand === void 0 ? void 0 : brand.tpls) !== 'SPARKFLY') {
|
|
23
23
|
const resp = yield api.postCustomerSignIn(data);
|
|
24
24
|
dispatch((0, customer_1.setCustomerAuth)(resp));
|
|
25
25
|
yield dispatch((0, customer_1.fetchCustomer)());
|
|
@@ -166,6 +166,73 @@ export declare const selectFulfillment: (state: AppState) => import("@open-tende
|
|
|
166
166
|
export declare const selectRecaptcha: (state: AppState) => import("@open-tender/types").ConfigRecaptcha | undefined;
|
|
167
167
|
export declare const selectContentSection: <T extends keyof ConfigContent>(page: T) => (state: AppState) => ConfigContent[T] | undefined;
|
|
168
168
|
export declare const selectPage: (page: ConfigPageType) => (state: AppState) => ConfigPage | undefined;
|
|
169
|
+
export declare const selectBottomTabsDisplayed: (state: AppState) => import("@open-tender/types").BottomTabsSections;
|
|
170
|
+
export declare const selectBottomTabsTitles: ((state: import("redux").EmptyObject & {
|
|
171
|
+
alerts: import("@open-tender/types").Alerts;
|
|
172
|
+
allergens: import("./allergens").AllergensState;
|
|
173
|
+
announcements: import("./announcements").AnnouncementsState;
|
|
174
|
+
checkout: import("./checkout").CheckoutState;
|
|
175
|
+
completedOrders: import("./completedOrders").CompletedOrdersState;
|
|
176
|
+
config: ConfigState;
|
|
177
|
+
confirmation: import("./confirmation").ConfirmationState;
|
|
178
|
+
customer: import("redux").CombinedState<{
|
|
179
|
+
account: import("./customer").AccountState;
|
|
180
|
+
communicationPreferences: import("./customer").CustomerCommunicationPrefsState;
|
|
181
|
+
creditCards: import("./customer").CustomerCreditCardsState;
|
|
182
|
+
allergens: import("./customer").CustomerAllergensState;
|
|
183
|
+
addresses: import("./customer").CustomerAddressesState;
|
|
184
|
+
favorites: import("./customer").CustomerFavoritesState;
|
|
185
|
+
fcmToken: import("./customer").CustomerFcmTokenState;
|
|
186
|
+
giftCards: import("./customer").CustomerGiftCardsState;
|
|
187
|
+
groupOrders: import("./customer").CustomerGroupOrdersState;
|
|
188
|
+
history: import("./customer").CustomerHistoryState;
|
|
189
|
+
houseAccounts: import("./customer").CustomerHouseAccountsState;
|
|
190
|
+
loyalty: import("./customer").CustomerLoyaltyState;
|
|
191
|
+
order: import("./customer").CustomerOrderState;
|
|
192
|
+
orders: import("./customer").CustomerOrdersState;
|
|
193
|
+
pointsShop: import("./customer").PointsShopState;
|
|
194
|
+
qrcode: import("./customer").CustomerQRCodeState;
|
|
195
|
+
rewards: import("./customer").CustomerRewardsState;
|
|
196
|
+
thanx: import("./customer").CustomerThanxState;
|
|
197
|
+
tpls: import("./customer").CustomerTplsState;
|
|
198
|
+
}>;
|
|
199
|
+
deals: import("./deals").DealsState;
|
|
200
|
+
donations: import("./donations").DonationState;
|
|
201
|
+
geolocation: import("./geolocation").GeoLocationState;
|
|
202
|
+
giftCards: import("./giftCards").GiftCardsState;
|
|
203
|
+
groupOrder: import("./groupOrder").GroupOrderState;
|
|
204
|
+
guest: import("./guest").GuestState;
|
|
205
|
+
loader: import("./loader").LoaderState;
|
|
206
|
+
menu: import("./menu").MenuState;
|
|
207
|
+
menuDisplay: import("./menuDisplay").MenuDisplayState;
|
|
208
|
+
menuItems: import("./menuItems").MenuItemsState;
|
|
209
|
+
modal: import("@open-tender/types").Modal;
|
|
210
|
+
misc: import("./misc").MiscState;
|
|
211
|
+
nav: import("./nav").NavState;
|
|
212
|
+
navSite: import("./navSite").NavSiteState;
|
|
213
|
+
notifications: import("@open-tender/types").Notifications;
|
|
214
|
+
oneTimePasscode: import("./oneTimePasscode").OneTimePasscodeState;
|
|
215
|
+
order: import("./order").OrderState;
|
|
216
|
+
orderFulfillment: import("./orderFulfillment").OrderFulfillmentState;
|
|
217
|
+
orderRating: import("./orderRating").OrderRatingState;
|
|
218
|
+
posts: import("./posts").PostsSlice;
|
|
219
|
+
pushNotifications: import("./pushNotifications").PushNotificationsState;
|
|
220
|
+
qr: import("./qr").QrState;
|
|
221
|
+
quote: import("./quote").QuoteState;
|
|
222
|
+
resetPassword: import("./resetPassword").ResetPasswordState;
|
|
223
|
+
revenueCenters: import("./revenueCenters").RevenueCentersState;
|
|
224
|
+
sidebar: import("./sidebar").SidebarState;
|
|
225
|
+
sidebarModal: import("./sidebarModal").SidebarModalState;
|
|
226
|
+
signUp: import("./signUp").SignUpState;
|
|
227
|
+
tags: import("./tags").TagsState;
|
|
228
|
+
terms: import("./terms").TermsSlice;
|
|
229
|
+
validTimes: import("./validTimes").ValidTimesState;
|
|
230
|
+
verifyAccount: import("./verifyAccount").VerifyAccountState;
|
|
231
|
+
}) => {}) & import("reselect").OutputSelectorFields<(args_0: (import("@open-tender/types").BottomTabsDisplayed & import("@open-tender/types").BottomTabsTitles) | undefined) => {}, {
|
|
232
|
+
clearCache: () => void;
|
|
233
|
+
}> & {
|
|
234
|
+
clearCache: () => void;
|
|
235
|
+
};
|
|
169
236
|
export declare const selectSoldOutMsg: (state: AppState) => string;
|
|
170
237
|
export declare const selectHeaderHeight: (state: AppState) => (isBrowser: boolean) => number;
|
|
171
238
|
export declare const selectOutpostName: (state: AppState) => string | undefined;
|
|
@@ -112,6 +112,19 @@ export const selectFulfillment = (state) => { var _a; return (_a = state.config.
|
|
|
112
112
|
export const selectRecaptcha = (state) => { var _a; return (_a = state.config.settings) === null || _a === void 0 ? void 0 : _a.recaptcha; };
|
|
113
113
|
export const selectContentSection = (page) => (state) => state.config.content ? state.config.content[page] : undefined;
|
|
114
114
|
export const selectPage = (page) => (state) => state.config.pages ? state.config.pages[page] : undefined;
|
|
115
|
+
export const selectBottomTabsDisplayed = (state) => { var _a; return ((_a = state.config.content) === null || _a === void 0 ? void 0 : _a.bottomTabs.displayed) || []; };
|
|
116
|
+
export const selectBottomTabsTitles = createSelector((state) => {
|
|
117
|
+
const { bottomTabs } = state.config.content || {};
|
|
118
|
+
return bottomTabs;
|
|
119
|
+
}, bottomTabs => {
|
|
120
|
+
if (!bottomTabs)
|
|
121
|
+
return {};
|
|
122
|
+
return Object.entries(bottomTabs).reduce((obj, [key, value]) => {
|
|
123
|
+
if (key === 'displayed')
|
|
124
|
+
return obj;
|
|
125
|
+
return Object.assign(Object.assign({}, obj), { [key]: value.title });
|
|
126
|
+
}, {});
|
|
127
|
+
});
|
|
115
128
|
export const selectSoldOutMsg = (state) => {
|
|
116
129
|
var _a;
|
|
117
130
|
const { soldOutMessage } = ((_a = state.config.content) === null || _a === void 0 ? void 0 : _a.menu) || {};
|
|
@@ -16,7 +16,7 @@ export const signUpCustomer = createAsyncThunk(SignUpActionType.SignUpCustomer,
|
|
|
16
16
|
const response = yield api.postSignUp(data);
|
|
17
17
|
const { email, password } = data;
|
|
18
18
|
if (email && password) {
|
|
19
|
-
if (brand === null || brand === void 0 ? void 0 : brand.tpls) {
|
|
19
|
+
if ((brand === null || brand === void 0 ? void 0 : brand.tpls) && (brand === null || brand === void 0 ? void 0 : brand.tpls) !== 'SPARKFLY') {
|
|
20
20
|
const resp = yield api.postCustomerSignIn(data);
|
|
21
21
|
dispatch(setCustomerAuth(resp));
|
|
22
22
|
yield dispatch(fetchCustomer());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/cloud",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.6",
|
|
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",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"react": "^18.2.0"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@open-tender/types": "^0.4.
|
|
58
|
+
"@open-tender/types": "^0.4.11",
|
|
59
59
|
"@open-tender/utils": "^0.4.6"
|
|
60
60
|
}
|
|
61
61
|
}
|