@open-tender/cloud 0.0.137 → 0.1.0
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/app/hooks.d.ts +1 -1
- package/dist/cjs/app/store.d.ts +9 -9
- package/dist/cjs/app/store.js +1 -1
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/services/api.d.ts +7 -7
- package/dist/cjs/services/api.js +70 -69
- package/dist/cjs/slices/alerts.d.ts +1 -1
- package/dist/cjs/slices/allergens.d.ts +7 -1
- package/dist/cjs/slices/announcements.d.ts +7 -1
- package/dist/cjs/slices/checkout.d.ts +20 -1
- package/dist/cjs/slices/completedOrders.d.ts +7 -1
- package/dist/cjs/slices/config.d.ts +7 -1
- package/dist/cjs/slices/config.js +18 -4
- package/dist/cjs/slices/confirmation.d.ts +1 -1
- package/dist/cjs/slices/customer/account.d.ts +55 -1
- package/dist/cjs/slices/customer/account.js +1 -1
- package/dist/cjs/slices/customer/addresses.d.ts +19 -1
- package/dist/cjs/slices/customer/allergens.d.ts +13 -1
- package/dist/cjs/slices/customer/communicationPreferences.d.ts +25 -1
- package/dist/cjs/slices/customer/creditCards.d.ts +25 -1
- package/dist/cjs/slices/customer/favorites.d.ts +28 -3
- package/dist/cjs/slices/customer/favorites.js +5 -6
- package/dist/cjs/slices/customer/fcmToken.d.ts +19 -1
- package/dist/cjs/slices/customer/giftCards.d.ts +37 -1
- package/dist/cjs/slices/customer/groupOrders.d.ts +65 -41
- package/dist/cjs/slices/customer/groupOrders.js +54 -54
- package/dist/cjs/slices/customer/houseAccounts.d.ts +7 -1
- package/dist/cjs/slices/customer/levelup.d.ts +19 -1
- package/dist/cjs/slices/customer/levelup.js +3 -3
- package/dist/cjs/slices/customer/loyalty.d.ts +7 -1
- package/dist/cjs/slices/customer/order.d.ts +13 -1
- package/dist/cjs/slices/customer/orders.d.ts +7 -1
- package/dist/cjs/slices/customer/qrCode.d.ts +7 -1
- package/dist/cjs/slices/customer/rewards.d.ts +7 -1
- package/dist/cjs/slices/customer/thanx.d.ts +7 -1
- package/dist/cjs/slices/deals.d.ts +7 -1
- package/dist/cjs/slices/donations.d.ts +7 -1
- package/dist/cjs/slices/geolocation.d.ts +1 -1
- package/dist/cjs/slices/geolocation.js +3 -3
- package/dist/cjs/slices/giftCards.d.ts +7 -1
- package/dist/cjs/slices/groupOrder.d.ts +42 -12
- package/dist/cjs/slices/groupOrder.js +23 -19
- package/dist/cjs/slices/guest.d.ts +13 -1
- package/dist/cjs/slices/levelup.d.ts +7 -1
- package/dist/cjs/slices/levelup.js +1 -1
- package/dist/cjs/slices/loader.d.ts +1 -1
- package/dist/cjs/slices/loader.js +3 -3
- package/dist/cjs/slices/menu.d.ts +7 -1
- package/dist/cjs/slices/menu.js +1 -1
- package/dist/cjs/slices/menuDisplay.d.ts +7 -1
- package/dist/cjs/slices/menuItems.d.ts +7 -1
- package/dist/cjs/slices/misc.d.ts +1 -1
- package/dist/cjs/slices/misc.js +2 -2
- package/dist/cjs/slices/modalSlice.d.ts +1 -1
- package/dist/cjs/slices/modalSlice.js +4 -4
- package/dist/cjs/slices/navSiteSlice.d.ts +1 -1
- package/dist/cjs/slices/navSiteSlice.js +4 -4
- package/dist/cjs/slices/navSlice.d.ts +1 -1
- package/dist/cjs/slices/navSlice.js +4 -4
- package/dist/cjs/slices/notifications.d.ts +1 -1
- package/dist/cjs/slices/order.d.ts +51 -15
- package/dist/cjs/slices/order.js +22 -14
- package/dist/cjs/slices/orderFulfillment.d.ts +13 -1
- package/dist/cjs/slices/orderRating.d.ts +19 -1
- package/dist/cjs/slices/orders.d.ts +43 -1
- package/dist/cjs/slices/postsSlice.d.ts +7 -1
- package/dist/cjs/slices/postsSlice.js +3 -3
- package/dist/cjs/slices/qr.d.ts +1 -1
- package/dist/cjs/slices/qr.js +3 -3
- package/dist/cjs/slices/resetPassword.d.ts +13 -1
- package/dist/cjs/slices/revenueCenters.d.ts +13 -1
- package/dist/cjs/slices/sidebarModalSlice.d.ts +1 -1
- package/dist/cjs/slices/sidebarModalSlice.js +4 -4
- package/dist/cjs/slices/sidebarSlice.d.ts +1 -1
- package/dist/cjs/slices/sidebarSlice.js +4 -4
- package/dist/cjs/slices/signUp.d.ts +7 -1
- package/dist/cjs/slices/signUp.js +4 -1
- package/dist/cjs/slices/validTimes.d.ts +7 -1
- package/dist/cjs/slices/verifyAccount.d.ts +7 -1
- package/dist/esm/app/hooks.d.ts +1 -1
- package/dist/esm/app/store.d.ts +9 -9
- package/dist/esm/app/store.js +2 -2
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/services/api.d.ts +7 -7
- package/dist/esm/services/api.js +70 -69
- package/dist/esm/slices/alerts.d.ts +1 -1
- package/dist/esm/slices/allergens.d.ts +7 -1
- package/dist/esm/slices/announcements.d.ts +7 -1
- package/dist/esm/slices/checkout.d.ts +20 -1
- package/dist/esm/slices/checkout.js +1 -1
- package/dist/esm/slices/completedOrders.d.ts +7 -1
- package/dist/esm/slices/config.d.ts +7 -1
- package/dist/esm/slices/config.js +18 -4
- package/dist/esm/slices/confirmation.d.ts +1 -1
- package/dist/esm/slices/customer/account.d.ts +55 -1
- package/dist/esm/slices/customer/account.js +1 -1
- package/dist/esm/slices/customer/addresses.d.ts +19 -1
- package/dist/esm/slices/customer/allergens.d.ts +13 -1
- package/dist/esm/slices/customer/communicationPreferences.d.ts +25 -1
- package/dist/esm/slices/customer/creditCards.d.ts +25 -1
- package/dist/esm/slices/customer/favorites.d.ts +28 -3
- package/dist/esm/slices/customer/favorites.js +5 -6
- package/dist/esm/slices/customer/fcmToken.d.ts +19 -1
- package/dist/esm/slices/customer/giftCards.d.ts +37 -1
- package/dist/esm/slices/customer/groupOrders.d.ts +65 -41
- package/dist/esm/slices/customer/groupOrders.js +54 -54
- package/dist/esm/slices/customer/houseAccounts.d.ts +7 -1
- package/dist/esm/slices/customer/levelup.d.ts +19 -1
- package/dist/esm/slices/customer/levelup.js +3 -3
- package/dist/esm/slices/customer/loyalty.d.ts +7 -1
- package/dist/esm/slices/customer/order.d.ts +13 -1
- package/dist/esm/slices/customer/orders.d.ts +7 -1
- package/dist/esm/slices/customer/qrCode.d.ts +7 -1
- package/dist/esm/slices/customer/rewards.d.ts +7 -1
- package/dist/esm/slices/customer/thanx.d.ts +7 -1
- package/dist/esm/slices/deals.d.ts +7 -1
- package/dist/esm/slices/donations.d.ts +7 -1
- package/dist/esm/slices/geolocation.d.ts +1 -1
- package/dist/esm/slices/geolocation.js +3 -3
- package/dist/esm/slices/giftCards.d.ts +7 -1
- package/dist/esm/slices/groupOrder.d.ts +42 -12
- package/dist/esm/slices/groupOrder.js +24 -23
- package/dist/esm/slices/guest.d.ts +13 -1
- package/dist/esm/slices/levelup.d.ts +7 -1
- package/dist/esm/slices/levelup.js +1 -1
- package/dist/esm/slices/loader.d.ts +1 -1
- package/dist/esm/slices/loader.js +3 -3
- package/dist/esm/slices/menu.d.ts +7 -1
- package/dist/esm/slices/menu.js +1 -1
- package/dist/esm/slices/menuDisplay.d.ts +7 -1
- package/dist/esm/slices/menuItems.d.ts +7 -1
- package/dist/esm/slices/misc.d.ts +1 -1
- package/dist/esm/slices/misc.js +3 -3
- package/dist/esm/slices/modalSlice.d.ts +1 -1
- package/dist/esm/slices/modalSlice.js +4 -4
- package/dist/esm/slices/navSiteSlice.d.ts +1 -1
- package/dist/esm/slices/navSiteSlice.js +4 -4
- package/dist/esm/slices/navSlice.d.ts +1 -1
- package/dist/esm/slices/navSlice.js +4 -4
- package/dist/esm/slices/notifications.d.ts +1 -1
- package/dist/esm/slices/order.d.ts +51 -15
- package/dist/esm/slices/order.js +23 -15
- package/dist/esm/slices/orderFulfillment.d.ts +13 -1
- package/dist/esm/slices/orderRating.d.ts +19 -1
- package/dist/esm/slices/orders.d.ts +43 -1
- package/dist/esm/slices/postsSlice.d.ts +7 -1
- package/dist/esm/slices/postsSlice.js +3 -3
- package/dist/esm/slices/qr.d.ts +1 -1
- package/dist/esm/slices/qr.js +3 -3
- package/dist/esm/slices/resetPassword.d.ts +13 -1
- package/dist/esm/slices/revenueCenters.d.ts +13 -1
- package/dist/esm/slices/sidebarModalSlice.d.ts +1 -1
- package/dist/esm/slices/sidebarModalSlice.js +4 -4
- package/dist/esm/slices/sidebarSlice.d.ts +1 -1
- package/dist/esm/slices/sidebarSlice.js +4 -4
- package/dist/esm/slices/signUp.d.ts +7 -1
- package/dist/esm/slices/signUp.js +4 -1
- package/dist/esm/slices/validTimes.d.ts +7 -1
- package/dist/esm/slices/verifyAccount.d.ts +7 -1
- package/package.json +4 -7
|
@@ -12,6 +12,12 @@ export declare enum CustomerOrderActionType {
|
|
|
12
12
|
export declare const fetchCustomerOrder: import("@reduxjs/toolkit").AsyncThunk<Order, number, {
|
|
13
13
|
state: AppState;
|
|
14
14
|
rejectValue: RequestError;
|
|
15
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
16
|
+
extra?: unknown;
|
|
17
|
+
serializedErrorType?: unknown;
|
|
18
|
+
pendingMeta?: unknown;
|
|
19
|
+
fulfilledMeta?: unknown;
|
|
20
|
+
rejectedMeta?: unknown;
|
|
15
21
|
}>;
|
|
16
22
|
export declare const updateCustomerOrderRating: import("@reduxjs/toolkit").AsyncThunk<void, {
|
|
17
23
|
orderId: number;
|
|
@@ -19,8 +25,14 @@ export declare const updateCustomerOrderRating: import("@reduxjs/toolkit").Async
|
|
|
19
25
|
}, {
|
|
20
26
|
state: AppState;
|
|
21
27
|
rejectValue: RequestError;
|
|
28
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
29
|
+
extra?: unknown;
|
|
30
|
+
serializedErrorType?: unknown;
|
|
31
|
+
pendingMeta?: unknown;
|
|
32
|
+
fulfilledMeta?: unknown;
|
|
33
|
+
rejectedMeta?: unknown;
|
|
22
34
|
}>;
|
|
23
|
-
export declare const resetCustomerOrder: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
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">;
|
|
24
36
|
export declare const selectCustomerOrder: (state: AppState) => {
|
|
25
37
|
order: Order | Partial<Order>;
|
|
26
38
|
loading: RequestStatus;
|
|
@@ -14,7 +14,13 @@ export declare enum CustomerOrdersActionType {
|
|
|
14
14
|
export declare const fetchCustomerOrders: import("@reduxjs/toolkit").AsyncThunk<Orders, number, {
|
|
15
15
|
state: AppState;
|
|
16
16
|
rejectValue: RequestError;
|
|
17
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
18
|
+
extra?: unknown;
|
|
19
|
+
serializedErrorType?: unknown;
|
|
20
|
+
pendingMeta?: unknown;
|
|
21
|
+
fulfilledMeta?: unknown;
|
|
22
|
+
rejectedMeta?: unknown;
|
|
17
23
|
}>;
|
|
18
|
-
export declare const resetCustomerOrders: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
24
|
+
export declare const resetCustomerOrders: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"orders/resetCustomerOrders">, resetCustomerOrdersError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"orders/resetCustomerOrdersError">, setCustomerOrders: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "orders/setCustomerOrders">;
|
|
19
25
|
export declare const selectCustomerOrders: (state: AppState) => CustomerOrdersState;
|
|
20
26
|
export declare const customerOrdersReducer: import("redux").Reducer<CustomerOrdersState, import("redux").AnyAction>;
|
|
@@ -11,7 +11,13 @@ export declare enum CustomerQRCodeActionType {
|
|
|
11
11
|
export declare const fetchCustomerQRCode: import("@reduxjs/toolkit").AsyncThunk<string, void, {
|
|
12
12
|
state: AppState;
|
|
13
13
|
rejectValue: RequestError;
|
|
14
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
15
|
+
extra?: unknown;
|
|
16
|
+
serializedErrorType?: unknown;
|
|
17
|
+
pendingMeta?: unknown;
|
|
18
|
+
fulfilledMeta?: unknown;
|
|
19
|
+
rejectedMeta?: unknown;
|
|
14
20
|
}>;
|
|
15
|
-
export declare const resetCustomerQRCode: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
21
|
+
export declare const resetCustomerQRCode: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"qrcode/resetCustomerQRCode">;
|
|
16
22
|
export declare const selectCustomerQRCode: (state: AppState) => CustomerQRCodeState;
|
|
17
23
|
export declare const customerQRCodeReducer: import("redux").Reducer<CustomerQRCodeState, import("redux").AnyAction>;
|
|
@@ -14,7 +14,13 @@ export declare enum CustomerRewardsActionType {
|
|
|
14
14
|
export declare const fetchCustomerRewards: import("@reduxjs/toolkit").AsyncThunk<Rewards, void, {
|
|
15
15
|
state: AppState;
|
|
16
16
|
rejectValue: RequestError;
|
|
17
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
18
|
+
extra?: unknown;
|
|
19
|
+
serializedErrorType?: unknown;
|
|
20
|
+
pendingMeta?: unknown;
|
|
21
|
+
fulfilledMeta?: unknown;
|
|
22
|
+
rejectedMeta?: unknown;
|
|
17
23
|
}>;
|
|
18
|
-
export declare const resetCustomerRewards: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
24
|
+
export declare const resetCustomerRewards: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"rewards/resetCustomerRewards">, resetCustomerRewardsError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"rewards/resetCustomerRewardsError">, setCustomerRewards: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "rewards/setCustomerRewards">;
|
|
19
25
|
export declare const selectCustomerRewards: (state: AppState) => CustomerRewardsState;
|
|
20
26
|
export declare const customerRewardsReducer: import("redux").Reducer<CustomerRewardsState, import("redux").AnyAction>;
|
|
@@ -11,7 +11,13 @@ export declare enum CustomerThanxActionType {
|
|
|
11
11
|
export declare const fetchCustomerThanx: import("@reduxjs/toolkit").AsyncThunk<Thanx, void, {
|
|
12
12
|
state: AppState;
|
|
13
13
|
rejectValue: RequestError;
|
|
14
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
15
|
+
extra?: unknown;
|
|
16
|
+
serializedErrorType?: unknown;
|
|
17
|
+
pendingMeta?: unknown;
|
|
18
|
+
fulfilledMeta?: unknown;
|
|
19
|
+
rejectedMeta?: unknown;
|
|
14
20
|
}>;
|
|
15
|
-
export declare const resetCustomerThanx: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
21
|
+
export declare const resetCustomerThanx: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"thanx/resetCustomerThanx">;
|
|
16
22
|
export declare const selectCustomerThanx: (state: AppState) => CustomerThanxState;
|
|
17
23
|
export declare const customerThanxReducer: import("redux").Reducer<CustomerThanxState, import("redux").AnyAction>;
|
|
@@ -12,8 +12,14 @@ export declare enum DealActionType {
|
|
|
12
12
|
export declare const fetchDeals: import("@reduxjs/toolkit").AsyncThunk<Deals, void, {
|
|
13
13
|
state: AppState;
|
|
14
14
|
rejectValue: RequestError;
|
|
15
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
16
|
+
extra?: unknown;
|
|
17
|
+
serializedErrorType?: unknown;
|
|
18
|
+
pendingMeta?: unknown;
|
|
19
|
+
fulfilledMeta?: unknown;
|
|
20
|
+
rejectedMeta?: unknown;
|
|
15
21
|
}>;
|
|
16
|
-
export declare const resetDeals: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
22
|
+
export declare const resetDeals: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"deals/resetDeals">, setSelectedDeals: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "deals/setSelectedDeals">;
|
|
17
23
|
export declare const selectDeals: (state: AppState) => DealState;
|
|
18
24
|
export declare const selectEligibleDeals: (state: AppState) => Deals;
|
|
19
25
|
export declare const dealsReducer: import("redux").Reducer<DealState, import("redux").AnyAction>;
|
|
@@ -15,8 +15,14 @@ export declare const purchaseDonation: import("@reduxjs/toolkit").AsyncThunk<Don
|
|
|
15
15
|
}, {
|
|
16
16
|
state: AppState;
|
|
17
17
|
rejectValue: RequestError | Record<string, any>;
|
|
18
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
19
|
+
extra?: unknown;
|
|
20
|
+
serializedErrorType?: unknown;
|
|
21
|
+
pendingMeta?: unknown;
|
|
22
|
+
fulfilledMeta?: unknown;
|
|
23
|
+
rejectedMeta?: unknown;
|
|
18
24
|
}>;
|
|
19
|
-
export declare const resetDonation: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
25
|
+
export declare const resetDonation: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"donations/resetDonation">;
|
|
20
26
|
export declare const selectDonation: (state: AppState) => {
|
|
21
27
|
success: boolean;
|
|
22
28
|
loading: RequestStatus;
|
|
@@ -8,7 +8,7 @@ export interface GeoLocationState {
|
|
|
8
8
|
error: RequestError;
|
|
9
9
|
loading: boolean;
|
|
10
10
|
}
|
|
11
|
-
export declare const resetGeolocation: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
11
|
+
export declare const resetGeolocation: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"geolocation/resetGeolocation">, setGeoLatLng: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "geolocation/setGeoLatLng">, setGeoError: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "geolocation/setGeoError">, setGeoLoading: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"geolocation/setGeoLoading">;
|
|
12
12
|
export declare const selectGeo: (state: AppState) => GeoLocationState;
|
|
13
13
|
export declare const selectGeoLatLng: (state: AppState) => {
|
|
14
14
|
lat: number;
|
|
@@ -2,7 +2,7 @@ import { createSlice } from '@reduxjs/toolkit';
|
|
|
2
2
|
const initialState = {
|
|
3
3
|
latLng: null,
|
|
4
4
|
error: null,
|
|
5
|
-
loading: false
|
|
5
|
+
loading: false
|
|
6
6
|
};
|
|
7
7
|
const geolocationSlice = createSlice({
|
|
8
8
|
name: 'geolocation',
|
|
@@ -21,8 +21,8 @@ const geolocationSlice = createSlice({
|
|
|
21
21
|
},
|
|
22
22
|
setGeoLoading: state => {
|
|
23
23
|
state.loading = true;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
26
|
});
|
|
27
27
|
export const { resetGeolocation, setGeoLatLng, setGeoError, setGeoLoading } = geolocationSlice.actions;
|
|
28
28
|
export const selectGeo = (state) => state.geolocation;
|
|
@@ -15,8 +15,14 @@ export declare const purchaseGiftCards: import("@reduxjs/toolkit").AsyncThunk<Cu
|
|
|
15
15
|
}, {
|
|
16
16
|
state: AppState;
|
|
17
17
|
rejectValue: any;
|
|
18
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
19
|
+
extra?: unknown;
|
|
20
|
+
serializedErrorType?: unknown;
|
|
21
|
+
pendingMeta?: unknown;
|
|
22
|
+
fulfilledMeta?: unknown;
|
|
23
|
+
rejectedMeta?: unknown;
|
|
18
24
|
}>;
|
|
19
|
-
export declare const resetGiftCards: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
25
|
+
export declare const resetGiftCards: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"giftCards/resetGiftCards">;
|
|
20
26
|
export declare const selectGiftCards: (state: AppState) => {
|
|
21
27
|
success: boolean;
|
|
22
28
|
loading: RequestStatus;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AppState } from '../app';
|
|
2
|
-
import { CartOwner, GroupOrder, ISOString,
|
|
2
|
+
import { CartOwner, GroupOrder, ISOString, SimpleCart, RequestError, RequestStatus, ServiceType } from '@open-tender/types';
|
|
3
3
|
export interface GroupOrderState {
|
|
4
|
-
cart:
|
|
4
|
+
cart: SimpleCart;
|
|
5
5
|
cartGuest: any;
|
|
6
6
|
cartGuests: any;
|
|
7
7
|
cartId: number | null;
|
|
@@ -13,7 +13,7 @@ export interface GroupOrderState {
|
|
|
13
13
|
guestLimit: number | null;
|
|
14
14
|
isCartOwner: boolean;
|
|
15
15
|
loading: RequestStatus;
|
|
16
|
-
requestedAt: ISOString | null;
|
|
16
|
+
requestedAt: ISOString | 'asap' | null;
|
|
17
17
|
revenueCenterId: number | null;
|
|
18
18
|
serviceType: ServiceType | null;
|
|
19
19
|
spendingLimit: string | null;
|
|
@@ -31,15 +31,15 @@ export declare const makeCartPayload: (response: GroupOrder, cartGuestId?: numbe
|
|
|
31
31
|
token: string;
|
|
32
32
|
revenueCenterId: number;
|
|
33
33
|
serviceType: ServiceType;
|
|
34
|
-
requestedAt: `${number}${number}${number}${number}-${number}${number}-${number}${number}T${number}${number}:${number}${number}:${number}${number}Z
|
|
35
|
-
cutoffAt: string;
|
|
36
|
-
guestLimit: number;
|
|
34
|
+
requestedAt: `${number}${number}${number}${number}-${number}${number}-${number}${number}T${number}${number}:${number}${number}:${number}${number}Z` | "asap";
|
|
35
|
+
cutoffAt: string | null;
|
|
36
|
+
guestLimit: number | null;
|
|
37
37
|
guestCount: number;
|
|
38
|
-
spendingLimit: string;
|
|
38
|
+
spendingLimit: string | null;
|
|
39
39
|
closed: boolean;
|
|
40
40
|
cartOwner: CartOwner | null;
|
|
41
|
-
cart:
|
|
42
|
-
cartGuests:
|
|
41
|
+
cart: SimpleCart;
|
|
42
|
+
cartGuests: import("@open-tender/types").GroupOrderGuests;
|
|
43
43
|
};
|
|
44
44
|
export declare const joinGroupOrder: import("@reduxjs/toolkit").AsyncThunk<any, {
|
|
45
45
|
cart_id: number;
|
|
@@ -48,27 +48,57 @@ export declare const joinGroupOrder: import("@reduxjs/toolkit").AsyncThunk<any,
|
|
|
48
48
|
}, {
|
|
49
49
|
state: AppState;
|
|
50
50
|
rejectValue: any;
|
|
51
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
52
|
+
extra?: unknown;
|
|
53
|
+
serializedErrorType?: unknown;
|
|
54
|
+
pendingMeta?: unknown;
|
|
55
|
+
fulfilledMeta?: unknown;
|
|
56
|
+
rejectedMeta?: unknown;
|
|
51
57
|
}>;
|
|
52
58
|
export declare const fetchGroupOrder: import("@reduxjs/toolkit").AsyncThunk<void | Partial<GroupOrderState>, number, {
|
|
53
59
|
state: AppState;
|
|
54
|
-
rejectValue:
|
|
60
|
+
rejectValue: RequestError;
|
|
61
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
62
|
+
extra?: unknown;
|
|
63
|
+
serializedErrorType?: unknown;
|
|
64
|
+
pendingMeta?: unknown;
|
|
65
|
+
fulfilledMeta?: unknown;
|
|
66
|
+
rejectedMeta?: unknown;
|
|
55
67
|
}>;
|
|
56
68
|
export declare const updateGroupOrder: import("@reduxjs/toolkit").AsyncThunk<void | Partial<GroupOrderState>, void, {
|
|
57
69
|
state: AppState;
|
|
58
70
|
rejectValue: any;
|
|
71
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
72
|
+
extra?: unknown;
|
|
73
|
+
serializedErrorType?: unknown;
|
|
74
|
+
pendingMeta?: unknown;
|
|
75
|
+
fulfilledMeta?: unknown;
|
|
76
|
+
rejectedMeta?: unknown;
|
|
59
77
|
}>;
|
|
60
78
|
export declare const reloadGuestOrder: import("@reduxjs/toolkit").AsyncThunk<void, void, {
|
|
61
79
|
state: AppState;
|
|
62
80
|
rejectValue: any;
|
|
81
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
82
|
+
extra?: unknown;
|
|
83
|
+
serializedErrorType?: unknown;
|
|
84
|
+
pendingMeta?: unknown;
|
|
85
|
+
fulfilledMeta?: unknown;
|
|
86
|
+
rejectedMeta?: unknown;
|
|
63
87
|
}>;
|
|
64
88
|
export declare const addCustomerGroupOrder: import("@reduxjs/toolkit").AsyncThunk<GroupOrderState, {
|
|
65
|
-
|
|
89
|
+
spendingLimit?: string | undefined;
|
|
66
90
|
callback?: (() => void) | undefined;
|
|
67
91
|
}, {
|
|
68
92
|
state: AppState;
|
|
69
93
|
rejectValue: RequestError;
|
|
94
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
95
|
+
extra?: unknown;
|
|
96
|
+
serializedErrorType?: unknown;
|
|
97
|
+
pendingMeta?: unknown;
|
|
98
|
+
fulfilledMeta?: unknown;
|
|
99
|
+
rejectedMeta?: unknown;
|
|
70
100
|
}>;
|
|
71
|
-
export declare const resetGroupOrder: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
101
|
+
export declare const resetGroupOrder: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"groupOrder/resetGroupOrder">;
|
|
72
102
|
export declare const selectGroupOrder: (state: AppState) => GroupOrderState;
|
|
73
103
|
export declare const selectGroupOrderToken: (state: AppState) => string | null;
|
|
74
104
|
export declare const selectSpendingLimit: (state: AppState) => number | null;
|
|
@@ -1,29 +1,26 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
2
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
3
3
|
import { ReducerType } from './types';
|
|
4
|
-
import { MISSING_CUSTOMER
|
|
5
|
-
// CartGuests,
|
|
6
|
-
// CartGuest
|
|
7
|
-
} from '@open-tender/types';
|
|
4
|
+
import { MISSING_CUSTOMER } from '@open-tender/types';
|
|
8
5
|
import { resetOrder, selectTimezone, setCart, setMenuVars } from './order';
|
|
9
6
|
import { isoToDate, makeSimpleCart, rehydrateCart } from '@open-tender/utils';
|
|
10
7
|
import { checkAuth, makeCartData, selectToken } from './customer';
|
|
11
8
|
const initialState = {
|
|
9
|
+
cart: [],
|
|
10
|
+
cartGuest: null,
|
|
11
|
+
cartGuests: [],
|
|
12
12
|
cartId: null,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
serviceType: null,
|
|
16
|
-
requestedAt: null,
|
|
13
|
+
cartOwner: null,
|
|
14
|
+
closed: false,
|
|
17
15
|
cutoffAt: null,
|
|
18
|
-
guestLimit: null,
|
|
19
16
|
guestCount: null,
|
|
20
|
-
|
|
21
|
-
closed: false,
|
|
17
|
+
guestLimit: null,
|
|
22
18
|
isCartOwner: false,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
requestedAt: null,
|
|
20
|
+
revenueCenterId: null,
|
|
21
|
+
serviceType: null,
|
|
22
|
+
spendingLimit: null,
|
|
23
|
+
token: null,
|
|
27
24
|
error: null,
|
|
28
25
|
loading: 'idle'
|
|
29
26
|
};
|
|
@@ -36,7 +33,7 @@ export var GroupOrderActionType;
|
|
|
36
33
|
GroupOrderActionType["AddCustomerGroupOrder"] = "customer/addCustomerGroupOrder";
|
|
37
34
|
})(GroupOrderActionType || (GroupOrderActionType = {}));
|
|
38
35
|
export const makeCartPayload = (response, cartGuestId) => {
|
|
39
|
-
const { customer = null, closed, cart_id: cartId, token, cart, revenue_center_id: revenueCenterId, service_type: serviceType, requested_at: requestedAt, cutoff_at: cutoffAt, spending_limit: spendingLimit, guest_limit: guestLimit, guest_count: guestCount, cart_guests: cartGuests
|
|
36
|
+
const { customer = null, closed, cart_id: cartId, token, cart, revenue_center_id: revenueCenterId, service_type: serviceType, requested_at: requestedAt, cutoff_at: cutoffAt, spending_limit: spendingLimit, guest_limit: guestLimit, guest_count: guestCount, cart_guests: cartGuests } = response;
|
|
40
37
|
const filteredCart = cartGuestId
|
|
41
38
|
? cart.filter(i => i.cart_guest_id === cartGuestId)
|
|
42
39
|
: cart;
|
|
@@ -53,7 +50,7 @@ export const makeCartPayload = (response, cartGuestId) => {
|
|
|
53
50
|
closed,
|
|
54
51
|
cartOwner: customer,
|
|
55
52
|
cart: filteredCart,
|
|
56
|
-
cartGuests: cartGuests || []
|
|
53
|
+
cartGuests: cartGuests || []
|
|
57
54
|
};
|
|
58
55
|
};
|
|
59
56
|
export const joinGroupOrder = createAsyncThunk(GroupOrderActionType.JoinGroupOrder, (requestData, { dispatch, getState, rejectWithValue }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -131,18 +128,18 @@ export const reloadGuestOrder = createAsyncThunk(GroupOrderActionType.ReloadGues
|
|
|
131
128
|
return rejectWithValue(err);
|
|
132
129
|
}
|
|
133
130
|
}));
|
|
134
|
-
export const addCustomerGroupOrder = createAsyncThunk(GroupOrderActionType.AddCustomerGroupOrder, (
|
|
131
|
+
export const addCustomerGroupOrder = createAsyncThunk(GroupOrderActionType.AddCustomerGroupOrder, ({ spendingLimit, callback }, { dispatch, getState, rejectWithValue }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
135
132
|
try {
|
|
136
133
|
const api = getState().config.api;
|
|
137
134
|
const token = selectToken(getState());
|
|
138
135
|
if (!token)
|
|
139
136
|
throw new Error(MISSING_CUSTOMER);
|
|
140
|
-
const cartData = makeCartData(getState().order,
|
|
137
|
+
const cartData = makeCartData(getState().order, spendingLimit);
|
|
141
138
|
const response = yield api.postCustomerGroupOrder(token, cartData);
|
|
142
139
|
const customer = getState().customer.account.profile;
|
|
143
140
|
const payload = Object.assign(Object.assign({}, makeCartPayload(response)), { isCartOwner: true, cartOwner: customer });
|
|
144
|
-
if (
|
|
145
|
-
|
|
141
|
+
if (callback)
|
|
142
|
+
callback();
|
|
146
143
|
return payload;
|
|
147
144
|
}
|
|
148
145
|
catch (err) {
|
|
@@ -223,14 +220,18 @@ export const selectSpendingLimit = (state) => {
|
|
|
223
220
|
export const selectGroupOrderClosed = (state) => {
|
|
224
221
|
const { cartGuest, cutoffAt, closed } = state.groupOrder;
|
|
225
222
|
const tz = selectTimezone(state);
|
|
226
|
-
const cutoffDate = cutoffAt
|
|
223
|
+
const cutoffDate = cutoffAt
|
|
224
|
+
? isoToDate(cutoffAt, tz)
|
|
225
|
+
: null;
|
|
227
226
|
const pastCutoff = cutoffDate ? new Date() > cutoffDate : false;
|
|
228
227
|
return cartGuest && (closed || pastCutoff);
|
|
229
228
|
};
|
|
230
229
|
export const selectGroupOrderTests = (state) => {
|
|
231
230
|
const { closed, cutoffAt, guestLimit, guestCount } = state.groupOrder;
|
|
232
231
|
const tz = selectTimezone(state);
|
|
233
|
-
const cutoffDate = cutoffAt
|
|
232
|
+
const cutoffDate = cutoffAt
|
|
233
|
+
? isoToDate(cutoffAt, tz)
|
|
234
|
+
: null;
|
|
234
235
|
const pastCutoff = cutoffDate ? new Date() > cutoffDate : false;
|
|
235
236
|
const spotsRemaining = guestLimit ? guestLimit - (guestCount !== null && guestCount !== void 0 ? guestCount : 0) : null;
|
|
236
237
|
const atCapacity = spotsRemaining !== null && spotsRemaining <= 0;
|
|
@@ -20,6 +20,12 @@ export declare const fetchGuest: import("@reduxjs/toolkit").AsyncThunk<Partial<G
|
|
|
20
20
|
errors: any;
|
|
21
21
|
email: string;
|
|
22
22
|
};
|
|
23
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
24
|
+
extra?: unknown;
|
|
25
|
+
serializedErrorType?: unknown;
|
|
26
|
+
pendingMeta?: unknown;
|
|
27
|
+
fulfilledMeta?: unknown;
|
|
28
|
+
rejectedMeta?: unknown;
|
|
23
29
|
}>;
|
|
24
30
|
export declare const fetchGuestThanx: import("@reduxjs/toolkit").AsyncThunk<void | {
|
|
25
31
|
email: string;
|
|
@@ -33,7 +39,13 @@ export declare const fetchGuestThanx: import("@reduxjs/toolkit").AsyncThunk<void
|
|
|
33
39
|
errors: any;
|
|
34
40
|
email: string;
|
|
35
41
|
};
|
|
42
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
43
|
+
extra?: unknown;
|
|
44
|
+
serializedErrorType?: unknown;
|
|
45
|
+
pendingMeta?: unknown;
|
|
46
|
+
fulfilledMeta?: unknown;
|
|
47
|
+
rejectedMeta?: unknown;
|
|
36
48
|
}>;
|
|
37
|
-
export declare const resetGuest: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
49
|
+
export declare const resetGuest: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"guest/resetGuest">, resetGuestErrors: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"guest/resetGuestErrors">, setGuestEmail: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "guest/setGuestEmail">;
|
|
38
50
|
export declare const selectGuest: (state: AppState) => GuestState;
|
|
39
51
|
export declare const guestReducer: import("redux").Reducer<GuestState, import("redux").AnyAction>;
|
|
@@ -13,7 +13,13 @@ export declare const fetchLevelUpCustomer: import("@reduxjs/toolkit").AsyncThunk
|
|
|
13
13
|
}, {
|
|
14
14
|
state: AppState;
|
|
15
15
|
rejectValue: RequestError;
|
|
16
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
17
|
+
extra?: unknown;
|
|
18
|
+
serializedErrorType?: unknown;
|
|
19
|
+
pendingMeta?: unknown;
|
|
20
|
+
fulfilledMeta?: unknown;
|
|
21
|
+
rejectedMeta?: unknown;
|
|
16
22
|
}>;
|
|
17
|
-
export declare const resetLevelup: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
23
|
+
export declare const resetLevelup: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"levelup/resetLevelup">, resetLevelUpCustomer: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"levelup/resetLevelUpCustomer">;
|
|
18
24
|
export declare const levelupReducer: import("redux").Reducer<LevelupState, import("redux").AnyAction>;
|
|
19
25
|
export declare const selectLevelUp: (state: AppState) => LevelupState;
|
|
@@ -4,6 +4,6 @@ export interface LoaderState {
|
|
|
4
4
|
title: string;
|
|
5
5
|
subtitle: string;
|
|
6
6
|
}
|
|
7
|
-
export declare const setLoading: import("@reduxjs/toolkit").ActionCreatorWithPayload<any,
|
|
7
|
+
export declare const setLoading: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "loader/setLoading">;
|
|
8
8
|
export declare const selectLoader: (state: AppState) => LoaderState;
|
|
9
9
|
export declare const loaderReducer: import("redux").Reducer<LoaderState, import("redux").AnyAction>;
|
|
@@ -2,7 +2,7 @@ import { createSlice } from '@reduxjs/toolkit';
|
|
|
2
2
|
const initialState = {
|
|
3
3
|
loading: false,
|
|
4
4
|
title: '',
|
|
5
|
-
subtitle: ''
|
|
5
|
+
subtitle: ''
|
|
6
6
|
};
|
|
7
7
|
const loaderSlice = createSlice({
|
|
8
8
|
name: 'loader',
|
|
@@ -13,8 +13,8 @@ const loaderSlice = createSlice({
|
|
|
13
13
|
state.loading = loading;
|
|
14
14
|
state.title = title !== null && title !== void 0 ? title : 'Submitting...';
|
|
15
15
|
state.subtitle = subtitle !== null && subtitle !== void 0 ? subtitle : 'Please hang tight for a sec';
|
|
16
|
-
}
|
|
17
|
-
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
18
|
});
|
|
19
19
|
export const { setLoading } = loaderSlice.actions;
|
|
20
20
|
export const selectLoader = (state) => state.loader;
|
|
@@ -16,8 +16,14 @@ export declare enum MenuActionType {
|
|
|
16
16
|
export declare const fetchMenu: import("@reduxjs/toolkit").AsyncThunk<void | Partial<MenuState>, MenuVars, {
|
|
17
17
|
state: AppState;
|
|
18
18
|
rejectValue: any;
|
|
19
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
20
|
+
extra?: unknown;
|
|
21
|
+
serializedErrorType?: unknown;
|
|
22
|
+
pendingMeta?: unknown;
|
|
23
|
+
fulfilledMeta?: unknown;
|
|
24
|
+
rejectedMeta?: unknown;
|
|
19
25
|
}>;
|
|
20
|
-
export declare const resetMenu: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
26
|
+
export declare const resetMenu: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"menu/resetMenu">, resetCartErrors: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"menu/resetCartErrors">, resetMenuVars: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"menu/resetMenuVars">, setCartErrors: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "menu/setCartErrors">;
|
|
21
27
|
export declare const selectMenu: (state: AppState) => MenuState;
|
|
22
28
|
export declare const selectSoldOut: (state: AppState) => SoldOut;
|
|
23
29
|
export declare const menuReducer: import("redux").Reducer<MenuState, import("redux").AnyAction>;
|
package/dist/esm/slices/menu.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
2
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
3
|
+
import { validateCart } from '@open-tender/utils';
|
|
3
4
|
import { ReducerType } from './types';
|
|
4
5
|
import { refreshRevenueCenter, setAlert, setCart } from './order';
|
|
5
|
-
import { validateCart } from '@open-tender/utils';
|
|
6
6
|
const initialState = {
|
|
7
7
|
menuVars: null,
|
|
8
8
|
previousMenuVars: null,
|
|
@@ -16,8 +16,14 @@ export declare const fetchMenuDisplay: import("@reduxjs/toolkit").AsyncThunk<Men
|
|
|
16
16
|
}, {
|
|
17
17
|
state: AppState;
|
|
18
18
|
rejectValue: RequestError;
|
|
19
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
20
|
+
extra?: unknown;
|
|
21
|
+
serializedErrorType?: unknown;
|
|
22
|
+
pendingMeta?: unknown;
|
|
23
|
+
fulfilledMeta?: unknown;
|
|
24
|
+
rejectedMeta?: unknown;
|
|
19
25
|
}>;
|
|
20
|
-
export declare const resetMenuDisplay: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
26
|
+
export declare const resetMenuDisplay: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"menuDisplay/resetMenuDisplay">;
|
|
21
27
|
export declare const selectMenuDisplay: (state: AppState) => {
|
|
22
28
|
categories: MenuCategory[];
|
|
23
29
|
loading: RequestStatus;
|
|
@@ -14,7 +14,13 @@ export declare const fetchMenuItems: import("@reduxjs/toolkit").AsyncThunk<MenuI
|
|
|
14
14
|
}, {
|
|
15
15
|
state: AppState;
|
|
16
16
|
rejectValue: RequestError;
|
|
17
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
18
|
+
extra?: unknown;
|
|
19
|
+
serializedErrorType?: unknown;
|
|
20
|
+
pendingMeta?: unknown;
|
|
21
|
+
fulfilledMeta?: unknown;
|
|
22
|
+
rejectedMeta?: unknown;
|
|
17
23
|
}>;
|
|
18
|
-
export declare const resetMenuItems: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
24
|
+
export declare const resetMenuItems: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"menuItems/resetMenuItems">, setMenuItems: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "menuItems/setMenuItems">;
|
|
19
25
|
export declare const selectMenuItems: (state: AppState) => MenuItemsState;
|
|
20
26
|
export declare const menuItemsReducer: import("redux").Reducer<MenuItemsState, import("redux").AnyAction>;
|
|
@@ -7,7 +7,7 @@ export interface MiscState {
|
|
|
7
7
|
menuSection: string | null;
|
|
8
8
|
menuPath: string | null;
|
|
9
9
|
}
|
|
10
|
-
export declare const setIsGroupOrder: import("@reduxjs/toolkit").ActionCreatorWithPayload<any,
|
|
10
|
+
export declare const setIsGroupOrder: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "misc/setIsGroupOrder">, setThanxCode: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "misc/setThanxCode">, setMenuBrowse: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "misc/setMenuBrowse">, setMenuPath: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "misc/setMenuPath">, setMenuSection: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "misc/setMenuSection">, setTopOffset: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "misc/setTopOffset">;
|
|
11
11
|
export declare const selectIsGroupOrder: (state: AppState) => boolean;
|
|
12
12
|
export declare const selectThanxCode: (state: AppState) => any;
|
|
13
13
|
export declare const selectTopOffset: (state: AppState) => number | null;
|
package/dist/esm/slices/misc.js
CHANGED
|
@@ -28,10 +28,10 @@ const miscSlice = createSlice({
|
|
|
28
28
|
},
|
|
29
29
|
setMenuBrowse: (state, action) => {
|
|
30
30
|
state.menuBrowse = action.payload;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
33
|
});
|
|
34
|
-
export const { setIsGroupOrder, setThanxCode, setMenuBrowse, setMenuPath, setMenuSection, setTopOffset
|
|
34
|
+
export const { setIsGroupOrder, setThanxCode, setMenuBrowse, setMenuPath, setMenuSection, setTopOffset } = miscSlice.actions;
|
|
35
35
|
export const selectIsGroupOrder = (state) => state.misc.isGroupOrder;
|
|
36
36
|
export const selectThanxCode = (state) => state.misc.thanxCode;
|
|
37
37
|
export const selectTopOffset = (state) => state.misc.topOffset;
|
|
@@ -4,6 +4,6 @@ export interface ModalState {
|
|
|
4
4
|
type: string | null;
|
|
5
5
|
args: any;
|
|
6
6
|
}
|
|
7
|
-
export declare const openModal: import("@reduxjs/toolkit").ActionCreatorWithPayload<any,
|
|
7
|
+
export declare const openModal: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "modal/openModal">, closeModal: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"modal/closeModal">;
|
|
8
8
|
export declare const selectModal: (state: AppState) => ModalState;
|
|
9
9
|
export declare const modalReducer: import("redux").Reducer<ModalState, import("redux").AnyAction>;
|
|
@@ -2,7 +2,7 @@ import { createSlice } from '@reduxjs/toolkit';
|
|
|
2
2
|
const initialState = {
|
|
3
3
|
loading: null,
|
|
4
4
|
type: null,
|
|
5
|
-
args: null
|
|
5
|
+
args: null
|
|
6
6
|
};
|
|
7
7
|
const modalSlice = createSlice({
|
|
8
8
|
name: 'modal',
|
|
@@ -14,11 +14,11 @@ const modalSlice = createSlice({
|
|
|
14
14
|
state.type = type;
|
|
15
15
|
state.args = args;
|
|
16
16
|
},
|
|
17
|
-
closeModal:
|
|
17
|
+
closeModal: state => {
|
|
18
18
|
document.body.classList.remove('has-modal');
|
|
19
19
|
state.type = null;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
22
|
});
|
|
23
23
|
export const { openModal, closeModal } = modalSlice.actions;
|
|
24
24
|
export const selectModal = (state) => state.modal;
|
|
@@ -2,6 +2,6 @@ import { AppState } from '../app';
|
|
|
2
2
|
export interface NavSiteState {
|
|
3
3
|
isOpen: boolean;
|
|
4
4
|
}
|
|
5
|
-
export declare const toggleNavSite: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
5
|
+
export declare const toggleNavSite: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"navSite/toggleNavSite">;
|
|
6
6
|
export declare const selectNavSite: (state: AppState) => NavSiteState;
|
|
7
7
|
export declare const navSiteReducer: import("redux").Reducer<NavSiteState, import("redux").AnyAction>;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { createSlice } from '@reduxjs/toolkit';
|
|
2
2
|
const initialState = {
|
|
3
|
-
isOpen: false
|
|
3
|
+
isOpen: false
|
|
4
4
|
};
|
|
5
5
|
const navSiteSlice = createSlice({
|
|
6
6
|
name: 'navSite',
|
|
7
7
|
initialState,
|
|
8
8
|
reducers: {
|
|
9
|
-
toggleNavSite:
|
|
9
|
+
toggleNavSite: state => {
|
|
10
10
|
state.isOpen = !state.isOpen;
|
|
11
11
|
state.isOpen
|
|
12
12
|
? document.body.classList.add('has-modal')
|
|
13
13
|
: document.body.classList.remove('has-modal');
|
|
14
|
-
}
|
|
15
|
-
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
16
|
});
|
|
17
17
|
export const { toggleNavSite } = navSiteSlice.actions;
|
|
18
18
|
export const selectNavSite = (state) => state.navSite;
|
|
@@ -2,6 +2,6 @@ import { AppState } from '../app';
|
|
|
2
2
|
export interface NavState {
|
|
3
3
|
isOpen: boolean;
|
|
4
4
|
}
|
|
5
|
-
export declare const toggleNav: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
5
|
+
export declare const toggleNav: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"nav/toggleNav">;
|
|
6
6
|
export declare const selectNav: (state: AppState) => NavState;
|
|
7
7
|
export declare const navReducer: import("redux").Reducer<NavState, import("redux").AnyAction>;
|