@open-tender/store 1.1.237 → 1.1.238
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.
|
@@ -127,20 +127,12 @@ export declare const selectCustomerLoyaltyProgram: ((state: {
|
|
|
127
127
|
resultsCount: () => number;
|
|
128
128
|
resetResultsCount: () => void;
|
|
129
129
|
} & {
|
|
130
|
-
resultFunc: (resultFuncArgs_0: {
|
|
131
|
-
entities: LoyaltyPrograms;
|
|
132
|
-
loading: RequestStatus;
|
|
133
|
-
error: RequestError;
|
|
134
|
-
}) => {
|
|
130
|
+
resultFunc: (resultFuncArgs_0: CustomerState) => {
|
|
135
131
|
program: import("@open-tender/types").LoyaltyProgram | null;
|
|
136
132
|
loading: RequestStatus;
|
|
137
133
|
error: RequestError;
|
|
138
134
|
};
|
|
139
|
-
memoizedResultFunc: ((resultFuncArgs_0: {
|
|
140
|
-
entities: LoyaltyPrograms;
|
|
141
|
-
loading: RequestStatus;
|
|
142
|
-
error: RequestError;
|
|
143
|
-
}) => {
|
|
135
|
+
memoizedResultFunc: ((resultFuncArgs_0: CustomerState) => {
|
|
144
136
|
program: import("@open-tender/types").LoyaltyProgram | null;
|
|
145
137
|
loading: RequestStatus;
|
|
146
138
|
error: RequestError;
|
|
@@ -154,11 +146,7 @@ export declare const selectCustomerLoyaltyProgram: ((state: {
|
|
|
154
146
|
loading: RequestStatus;
|
|
155
147
|
error: RequestError;
|
|
156
148
|
};
|
|
157
|
-
dependencies: [(state: AppState) =>
|
|
158
|
-
entities: LoyaltyPrograms;
|
|
159
|
-
loading: RequestStatus;
|
|
160
|
-
error: RequestError;
|
|
161
|
-
}];
|
|
149
|
+
dependencies: [(state: AppState) => CustomerState];
|
|
162
150
|
recomputations: () => number;
|
|
163
151
|
resetRecomputations: () => void;
|
|
164
152
|
dependencyRecomputations: () => number;
|
|
@@ -111,11 +111,8 @@ exports.selectCustomerLoyaltySummary = (0, toolkit_1.createSelector)(function (s
|
|
|
111
111
|
});
|
|
112
112
|
var selectCustomerLoyalty = function (state) { return state.customer.loyalty; };
|
|
113
113
|
exports.selectCustomerLoyalty = selectCustomerLoyalty;
|
|
114
|
-
exports.selectCustomerLoyaltyProgram = (0, toolkit_1.createSelector)(function (state) {
|
|
115
|
-
var
|
|
116
|
-
return { entities: entities, loading: loading, error: error };
|
|
117
|
-
}, function (_a) {
|
|
118
|
-
var entities = _a.entities, loading = _a.loading, error = _a.error;
|
|
114
|
+
exports.selectCustomerLoyaltyProgram = (0, toolkit_1.createSelector)(function (state) { return state.customer; }, function (_a) {
|
|
115
|
+
var entities = _a.loyalty, loading = _a.loading, error = _a.error;
|
|
119
116
|
var programs = entities.filter(function (i) { return i.earn_order_type === null || i.earn_order_type === 'OLO'; });
|
|
120
117
|
var program = programs.length ? programs[0] : null;
|
|
121
118
|
return { program: program, loading: loading, error: error };
|
|
@@ -127,20 +127,12 @@ export declare const selectCustomerLoyaltyProgram: ((state: {
|
|
|
127
127
|
resultsCount: () => number;
|
|
128
128
|
resetResultsCount: () => void;
|
|
129
129
|
} & {
|
|
130
|
-
resultFunc: (resultFuncArgs_0: {
|
|
131
|
-
entities: LoyaltyPrograms;
|
|
132
|
-
loading: RequestStatus;
|
|
133
|
-
error: RequestError;
|
|
134
|
-
}) => {
|
|
130
|
+
resultFunc: (resultFuncArgs_0: CustomerState) => {
|
|
135
131
|
program: import("@open-tender/types").LoyaltyProgram | null;
|
|
136
132
|
loading: RequestStatus;
|
|
137
133
|
error: RequestError;
|
|
138
134
|
};
|
|
139
|
-
memoizedResultFunc: ((resultFuncArgs_0: {
|
|
140
|
-
entities: LoyaltyPrograms;
|
|
141
|
-
loading: RequestStatus;
|
|
142
|
-
error: RequestError;
|
|
143
|
-
}) => {
|
|
135
|
+
memoizedResultFunc: ((resultFuncArgs_0: CustomerState) => {
|
|
144
136
|
program: import("@open-tender/types").LoyaltyProgram | null;
|
|
145
137
|
loading: RequestStatus;
|
|
146
138
|
error: RequestError;
|
|
@@ -154,11 +146,7 @@ export declare const selectCustomerLoyaltyProgram: ((state: {
|
|
|
154
146
|
loading: RequestStatus;
|
|
155
147
|
error: RequestError;
|
|
156
148
|
};
|
|
157
|
-
dependencies: [(state: AppState) =>
|
|
158
|
-
entities: LoyaltyPrograms;
|
|
159
|
-
loading: RequestStatus;
|
|
160
|
-
error: RequestError;
|
|
161
|
-
}];
|
|
149
|
+
dependencies: [(state: AppState) => CustomerState];
|
|
162
150
|
recomputations: () => number;
|
|
163
151
|
resetRecomputations: () => void;
|
|
164
152
|
dependencyRecomputations: () => number;
|
|
@@ -100,11 +100,8 @@ export var selectCustomerLoyaltySummary = createSelector(function (state) {
|
|
|
100
100
|
};
|
|
101
101
|
});
|
|
102
102
|
export var selectCustomerLoyalty = function (state) { return state.customer.loyalty; };
|
|
103
|
-
export var selectCustomerLoyaltyProgram = createSelector(function (state) {
|
|
104
|
-
var
|
|
105
|
-
return { entities: entities, loading: loading, error: error };
|
|
106
|
-
}, function (_a) {
|
|
107
|
-
var entities = _a.entities, loading = _a.loading, error = _a.error;
|
|
103
|
+
export var selectCustomerLoyaltyProgram = createSelector(function (state) { return state.customer; }, function (_a) {
|
|
104
|
+
var entities = _a.loyalty, loading = _a.loading, error = _a.error;
|
|
108
105
|
var programs = entities.filter(function (i) { return i.earn_order_type === null || i.earn_order_type === 'OLO'; });
|
|
109
106
|
var program = programs.length ? programs[0] : null;
|
|
110
107
|
return { program: program, loading: loading, error: error };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/store",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.238",
|
|
4
4
|
"description": "A library of hooks, reducers, utility functions, and types for use with Open Tender applications that utilize our in-store POS API",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|