@simpleapps-com/augur-hooks 0.1.5 → 0.1.7
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/{chunk-V3RMLU3V.js → chunk-DS2ECDHJ.js} +63 -2
- package/dist/{chunk-V3RMLU3V.js.map → chunk-DS2ECDHJ.js.map} +1 -1
- package/dist/{chunk-MRQREI4L.cjs → chunk-YSRBE3YI.cjs} +63 -2
- package/dist/chunk-YSRBE3YI.cjs.map +1 -0
- package/dist/index.cjs +167 -128
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -28
- package/dist/index.d.ts +28 -28
- package/dist/index.js +136 -97
- package/dist/index.js.map +1 -1
- package/dist/{server-ZsiDw2HO.d.cts → server-CF43MUMf.d.cts} +188 -31
- package/dist/{server-ZsiDw2HO.d.ts → server-CF43MUMf.d.ts} +188 -31
- package/dist/server.cjs +6 -2
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +5 -1
- package/package.json +2 -2
- package/dist/chunk-MRQREI4L.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
@@ -27,14 +27,27 @@
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
var _chunkYSRBE3YIcjs = require('./chunk-YSRBE3YI.cjs');
|
|
31
33
|
|
|
32
34
|
// src/provider.tsx
|
|
33
35
|
var _react = require('react');
|
|
34
36
|
var _jsxruntime = require('react/jsx-runtime');
|
|
35
37
|
var AugurApiContext = _react.createContext.call(void 0, null);
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
var AugurCallbacksContext = _react.createContext.call(void 0,
|
|
39
|
+
void 0
|
|
40
|
+
);
|
|
41
|
+
var AugurAuthReactContext = _react.createContext.call(void 0,
|
|
42
|
+
void 0
|
|
43
|
+
);
|
|
44
|
+
function AugurHooksProvider({
|
|
45
|
+
api,
|
|
46
|
+
callbacks,
|
|
47
|
+
auth,
|
|
48
|
+
children
|
|
49
|
+
}) {
|
|
50
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AugurApiContext.Provider, { value: api, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AugurCallbacksContext.Provider, { value: callbacks, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AugurAuthReactContext.Provider, { value: auth, children }) }) });
|
|
38
51
|
}
|
|
39
52
|
function useAugurApi() {
|
|
40
53
|
const api = _react.useContext.call(void 0, AugurApiContext);
|
|
@@ -45,6 +58,12 @@ function useAugurApi() {
|
|
|
45
58
|
}
|
|
46
59
|
return api;
|
|
47
60
|
}
|
|
61
|
+
function useAugurCallbacks() {
|
|
62
|
+
return _react.useContext.call(void 0, AugurCallbacksContext);
|
|
63
|
+
}
|
|
64
|
+
function useAugurAuth() {
|
|
65
|
+
return _react.useContext.call(void 0, AugurAuthReactContext);
|
|
66
|
+
}
|
|
48
67
|
|
|
49
68
|
// src/stores/cart-store.ts
|
|
50
69
|
var _zustand = require('zustand');
|
|
@@ -135,11 +154,15 @@ function useFormatPrice(locale = "en-US", currency = "USD") {
|
|
|
135
154
|
var _reactquery = require('@tanstack/react-query');
|
|
136
155
|
function useItemPrice(itemId, customerId, quantity = 1, options = {}) {
|
|
137
156
|
const api = useAugurApi();
|
|
138
|
-
const
|
|
157
|
+
const callbacks = useAugurCallbacks();
|
|
158
|
+
const auth = useAugurAuth();
|
|
159
|
+
const effectiveCustomerId = _nullishCoalesce(customerId, () => ( _optionalChain([auth, 'optionalAccess', _ => _.customerId])));
|
|
160
|
+
const defaultOptions = _chunkYSRBE3YIcjs.getItemPriceOptions.call(void 0, api, itemId, effectiveCustomerId, quantity);
|
|
161
|
+
const resolvedQueryFn = _nullishCoalesce(options.queryFn, () => ( (_optionalChain([callbacks, 'optionalAccess', _2 => _2.getItemPrice]) ? () => callbacks.getItemPrice(itemId, effectiveCustomerId, quantity) : void 0)));
|
|
139
162
|
return _reactquery.useQuery.call(void 0, {
|
|
140
163
|
...defaultOptions,
|
|
141
|
-
...
|
|
142
|
-
enabled: _nullishCoalesce(options.enabled, () => ( (Boolean(itemId) && Boolean(
|
|
164
|
+
...resolvedQueryFn ? { queryFn: resolvedQueryFn } : {},
|
|
165
|
+
enabled: _nullishCoalesce(options.enabled, () => ( (Boolean(itemId) && Boolean(effectiveCustomerId)))),
|
|
143
166
|
retry: 3
|
|
144
167
|
});
|
|
145
168
|
}
|
|
@@ -148,7 +171,8 @@ function useItemPrice(itemId, customerId, quantity = 1, options = {}) {
|
|
|
148
171
|
|
|
149
172
|
function useInvMastDoc(invMastUid, itemId, options = {}) {
|
|
150
173
|
const api = useAugurApi();
|
|
151
|
-
const
|
|
174
|
+
const callbacks = useAugurCallbacks();
|
|
175
|
+
const queryOpts = _chunkYSRBE3YIcjs.getInvMastDocOptions.call(void 0,
|
|
152
176
|
api,
|
|
153
177
|
invMastUid,
|
|
154
178
|
itemId,
|
|
@@ -156,7 +180,7 @@ function useInvMastDoc(invMastUid, itemId, options = {}) {
|
|
|
156
180
|
);
|
|
157
181
|
const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
|
|
158
182
|
...queryOpts,
|
|
159
|
-
...options.queryFn ? { queryFn: options.queryFn } : {},
|
|
183
|
+
..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _3 => _3.getInvMastDoc]))) ? { queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getInvMastDoc(invMastUid, itemId, _nullishCoalesce(options.includePricing, () => ( "N")))))) } : {},
|
|
160
184
|
enabled: _nullishCoalesce(options.enabled, () => ( true)),
|
|
161
185
|
initialData: options.initialData
|
|
162
186
|
});
|
|
@@ -167,14 +191,15 @@ function useInvMastDoc(invMastUid, itemId, options = {}) {
|
|
|
167
191
|
|
|
168
192
|
function useItemCategory(itemCategoryUid, options = {}) {
|
|
169
193
|
const api = useAugurApi();
|
|
170
|
-
const
|
|
194
|
+
const callbacks = useAugurCallbacks();
|
|
195
|
+
const queryOpts = _chunkYSRBE3YIcjs.getItemCategoryOptions.call(void 0,
|
|
171
196
|
api,
|
|
172
197
|
itemCategoryUid,
|
|
173
198
|
options.apiOptions
|
|
174
199
|
);
|
|
175
200
|
const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
|
|
176
201
|
...queryOpts,
|
|
177
|
-
...options.queryFn ? { queryFn: options.queryFn } : {},
|
|
202
|
+
..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _4 => _4.getItemCategory]))) ? { queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getItemCategory(itemCategoryUid, options.apiOptions)))) } : {},
|
|
178
203
|
enabled: _nullishCoalesce(options.enabled, () => ( true))
|
|
179
204
|
});
|
|
180
205
|
return { category: data, isLoading, error };
|
|
@@ -184,10 +209,11 @@ function useItemCategory(itemCategoryUid, options = {}) {
|
|
|
184
209
|
|
|
185
210
|
function useInvMast(invMastUid, itemId, options = {}) {
|
|
186
211
|
const api = useAugurApi();
|
|
187
|
-
const
|
|
212
|
+
const callbacks = useAugurCallbacks();
|
|
213
|
+
const queryOpts = _chunkYSRBE3YIcjs.getInvMastOptions.call(void 0, api, invMastUid, itemId);
|
|
188
214
|
const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
|
|
189
215
|
...queryOpts,
|
|
190
|
-
...options.queryFn ? { queryFn: options.queryFn } : {},
|
|
216
|
+
..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _5 => _5.getInvMast]))) ? { queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getInvMast(invMastUid, itemId)))) } : {},
|
|
191
217
|
enabled: _nullishCoalesce(options.enabled, () => ( true))
|
|
192
218
|
});
|
|
193
219
|
return { item: data, isLoading, error };
|
|
@@ -197,10 +223,11 @@ function useInvMast(invMastUid, itemId, options = {}) {
|
|
|
197
223
|
|
|
198
224
|
function useInvMastStock(invMastUid, options = {}) {
|
|
199
225
|
const api = useAugurApi();
|
|
200
|
-
const
|
|
226
|
+
const callbacks = useAugurCallbacks();
|
|
227
|
+
const queryOpts = _chunkYSRBE3YIcjs.getInvMastStockOptions.call(void 0, api, invMastUid);
|
|
201
228
|
const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
|
|
202
229
|
...queryOpts,
|
|
203
|
-
...options.queryFn ? { queryFn: options.queryFn } : {},
|
|
230
|
+
..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _6 => _6.getInvMastStock]))) ? { queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getInvMastStock(invMastUid)))) } : {},
|
|
204
231
|
enabled: (_nullishCoalesce(options.enabled, () => ( true))) && !!invMastUid,
|
|
205
232
|
retry: 3,
|
|
206
233
|
/* v8 ignore start */
|
|
@@ -216,15 +243,26 @@ function useInvMastStock(invMastUid, options = {}) {
|
|
|
216
243
|
|
|
217
244
|
// src/hooks/use-product-category.ts
|
|
218
245
|
|
|
246
|
+
function resolveData(data) {
|
|
247
|
+
return {
|
|
248
|
+
childrenTotal: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _7 => _7.childrenTotal]), () => ( 0)),
|
|
249
|
+
itemCategoryDesc: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _8 => _8.itemCategoryDesc]), () => ( "")),
|
|
250
|
+
productCategories: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _9 => _9.children]), () => ( null)),
|
|
251
|
+
productCategoryImage: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _10 => _10.categoryImage]), () => ( null))
|
|
252
|
+
};
|
|
253
|
+
}
|
|
219
254
|
function useProductCategory(itemCategoryUid, options = {}) {
|
|
220
255
|
const api = useAugurApi();
|
|
256
|
+
const callbacks = useAugurCallbacks();
|
|
257
|
+
const baseOptions = itemCategoryUid ? _chunkYSRBE3YIcjs.getProductCategoryOptions.call(void 0, api, itemCategoryUid) : {
|
|
258
|
+
queryKey: _chunkYSRBE3YIcjs.getProductCategoryKey.call(void 0, null),
|
|
259
|
+
/* v8 ignore next */
|
|
260
|
+
queryFn: () => Promise.reject()
|
|
261
|
+
};
|
|
262
|
+
const resolvedQueryFn = _nullishCoalesce(options.queryFn, () => ( (_optionalChain([callbacks, 'optionalAccess', _11 => _11.getProductCategory]) ? () => callbacks.getProductCategory(itemCategoryUid) : void 0)));
|
|
221
263
|
const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
|
|
222
|
-
...
|
|
223
|
-
|
|
224
|
-
/* v8 ignore next */
|
|
225
|
-
queryFn: () => Promise.reject()
|
|
226
|
-
},
|
|
227
|
-
...options.queryFn ? { queryFn: options.queryFn } : {},
|
|
264
|
+
...baseOptions,
|
|
265
|
+
...resolvedQueryFn ? { queryFn: resolvedQueryFn } : {},
|
|
228
266
|
enabled: (_nullishCoalesce(options.enabled, () => ( true))) && !!itemCategoryUid,
|
|
229
267
|
retry: 3,
|
|
230
268
|
/* v8 ignore start */
|
|
@@ -232,10 +270,7 @@ function useProductCategory(itemCategoryUid, options = {}) {
|
|
|
232
270
|
/* v8 ignore stop */
|
|
233
271
|
});
|
|
234
272
|
return {
|
|
235
|
-
|
|
236
|
-
itemCategoryDesc: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _2 => _2.itemCategoryDesc]), () => ( "")),
|
|
237
|
-
productCategories: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _3 => _3.children]), () => ( null)),
|
|
238
|
-
productCategoryImage: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _4 => _4.categoryImage]), () => ( null)),
|
|
273
|
+
...resolveData(data),
|
|
239
274
|
loading: isLoading,
|
|
240
275
|
error
|
|
241
276
|
};
|
|
@@ -245,20 +280,21 @@ function useProductCategory(itemCategoryUid, options = {}) {
|
|
|
245
280
|
|
|
246
281
|
function useItemDetails(itemId, options = {}) {
|
|
247
282
|
const api = useAugurApi();
|
|
283
|
+
const callbacks = useAugurCallbacks();
|
|
248
284
|
const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
|
|
249
|
-
...itemId ?
|
|
250
|
-
queryKey:
|
|
285
|
+
...itemId ? _chunkYSRBE3YIcjs.getItemDetailsOptions.call(void 0, api, itemId) : {
|
|
286
|
+
queryKey: _chunkYSRBE3YIcjs.getItemDetailsKey.call(void 0, ""),
|
|
251
287
|
/* v8 ignore next */
|
|
252
288
|
queryFn: () => Promise.reject()
|
|
253
289
|
},
|
|
254
|
-
...options.queryFn ? { queryFn: options.queryFn } : {},
|
|
290
|
+
..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _12 => _12.getItemDetails]))) ? { queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getItemDetails(itemId)))) } : {},
|
|
255
291
|
enabled: (_nullishCoalesce(options.enabled, () => ( true))) && !!itemId,
|
|
256
292
|
retry: 3,
|
|
257
293
|
/* v8 ignore start */
|
|
258
294
|
retryDelay: (attemptIndex) => Math.min(1e3 * 2 ** attemptIndex, 1e4)
|
|
259
295
|
/* v8 ignore stop */
|
|
260
296
|
});
|
|
261
|
-
const categoryList = _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
297
|
+
const categoryList = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _13 => _13.categoryList]), () => ( []));
|
|
262
298
|
return {
|
|
263
299
|
itemCategoryUid: categoryList.length > 0 ? categoryList[categoryList.length - 1] : null,
|
|
264
300
|
itemDetails: _nullishCoalesce(data, () => ( null)),
|
|
@@ -271,13 +307,14 @@ function useItemDetails(itemId, options = {}) {
|
|
|
271
307
|
|
|
272
308
|
function useItemAttributes(itemCategoryUid, options = {}) {
|
|
273
309
|
const api = useAugurApi();
|
|
310
|
+
const callbacks = useAugurCallbacks();
|
|
274
311
|
const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
|
|
275
|
-
...itemCategoryUid ?
|
|
276
|
-
queryKey:
|
|
312
|
+
...itemCategoryUid ? _chunkYSRBE3YIcjs.getItemAttributesOptions.call(void 0, api, itemCategoryUid) : {
|
|
313
|
+
queryKey: _chunkYSRBE3YIcjs.getItemAttributesKey.call(void 0, null),
|
|
277
314
|
/* v8 ignore next */
|
|
278
315
|
queryFn: () => Promise.reject()
|
|
279
316
|
},
|
|
280
|
-
...options.queryFn ? { queryFn: options.queryFn } : {},
|
|
317
|
+
..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _14 => _14.getItemAttributes]))) ? { queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getItemAttributes(itemCategoryUid)))) } : {},
|
|
281
318
|
enabled: (_nullishCoalesce(options.enabled, () => ( true))) && !!itemCategoryUid,
|
|
282
319
|
retry: 3,
|
|
283
320
|
/* v8 ignore start */
|
|
@@ -285,7 +322,7 @@ function useItemAttributes(itemCategoryUid, options = {}) {
|
|
|
285
322
|
/* v8 ignore stop */
|
|
286
323
|
});
|
|
287
324
|
return {
|
|
288
|
-
attributes: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
325
|
+
attributes: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _15 => _15.attributes]), () => ( null)),
|
|
289
326
|
loading: isLoading,
|
|
290
327
|
error
|
|
291
328
|
};
|
|
@@ -295,18 +332,19 @@ function useItemAttributes(itemCategoryUid, options = {}) {
|
|
|
295
332
|
|
|
296
333
|
function useProductSearch(pageData, options = {}) {
|
|
297
334
|
const api = useAugurApi();
|
|
298
|
-
const
|
|
335
|
+
const callbacks = useAugurCallbacks();
|
|
336
|
+
const defaultOptions = _chunkYSRBE3YIcjs.getProductSearchOptions.call(void 0, api, pageData);
|
|
299
337
|
const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
|
|
300
338
|
...defaultOptions,
|
|
301
|
-
...options.queryFn ? { queryFn: options.queryFn } : {},
|
|
339
|
+
..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _16 => _16.getProductSearch]))) ? { queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getProductSearch(pageData)))) } : {},
|
|
302
340
|
retry: 3,
|
|
303
341
|
/* v8 ignore start */
|
|
304
342
|
retryDelay: (attemptIndex) => Math.min(1e3 * 2 ** attemptIndex, 1e4)
|
|
305
343
|
/* v8 ignore stop */
|
|
306
344
|
});
|
|
307
345
|
return {
|
|
308
|
-
productItems: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
309
|
-
total: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
346
|
+
productItems: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _17 => _17.items]), () => ( null)),
|
|
347
|
+
total: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _18 => _18.totalResults]), () => ( 0)),
|
|
310
348
|
loading: isLoading,
|
|
311
349
|
error
|
|
312
350
|
};
|
|
@@ -316,18 +354,19 @@ function useProductSearch(pageData, options = {}) {
|
|
|
316
354
|
|
|
317
355
|
function useSearchSuggestions(query, options = {}) {
|
|
318
356
|
const api = useAugurApi();
|
|
357
|
+
const callbacks = useAugurCallbacks();
|
|
319
358
|
const limit = _nullishCoalesce(options.limit, () => ( 10));
|
|
320
359
|
const offset = _nullishCoalesce(options.offset, () => ( 0));
|
|
321
360
|
const enabled = (_nullishCoalesce(options.enabled, () => ( true))) && query.trim().length > 0;
|
|
322
|
-
const defaultOptions =
|
|
361
|
+
const defaultOptions = _chunkYSRBE3YIcjs.getSearchSuggestionsOptions.call(void 0, api, query, limit, offset);
|
|
323
362
|
const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
|
|
324
363
|
...defaultOptions,
|
|
325
|
-
...options.queryFn ? { queryFn: options.queryFn } : {},
|
|
364
|
+
..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _19 => _19.getSearchSuggestions]))) ? { queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getSearchSuggestions(query, limit, offset)))) } : {},
|
|
326
365
|
enabled
|
|
327
366
|
});
|
|
328
367
|
return {
|
|
329
|
-
suggestions: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
330
|
-
total: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
368
|
+
suggestions: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _20 => _20.data]), () => ( [])),
|
|
369
|
+
total: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _21 => _21.total]), () => ( 0)),
|
|
331
370
|
isLoading,
|
|
332
371
|
error
|
|
333
372
|
};
|
|
@@ -394,17 +433,17 @@ function useCartActions(callbacks) {
|
|
|
394
433
|
]);
|
|
395
434
|
if (!success) throw new Error("Failed to add item to cart");
|
|
396
435
|
invalidateCartCache();
|
|
397
|
-
if (showToast && _optionalChain([notify, 'optionalAccess',
|
|
436
|
+
if (showToast && _optionalChain([notify, 'optionalAccess', _22 => _22.info])) {
|
|
398
437
|
notify.info(`${item.quantity} x ${itemId || "Item"} added to cart`);
|
|
399
438
|
}
|
|
400
|
-
_optionalChain([onSuccess, 'optionalCall',
|
|
439
|
+
_optionalChain([onSuccess, 'optionalCall', _23 => _23()]);
|
|
401
440
|
return true;
|
|
402
441
|
} catch (error) {
|
|
403
442
|
setCartLines(previousCartLines);
|
|
404
|
-
if (showToast && _optionalChain([notify, 'optionalAccess',
|
|
443
|
+
if (showToast && _optionalChain([notify, 'optionalAccess', _24 => _24.error])) {
|
|
405
444
|
notify.error("Failed to add item to cart. Please try again.");
|
|
406
445
|
}
|
|
407
|
-
_optionalChain([onError, 'optionalCall',
|
|
446
|
+
_optionalChain([onError, 'optionalCall', _25 => _25(error)]);
|
|
408
447
|
return false;
|
|
409
448
|
}
|
|
410
449
|
},
|
|
@@ -423,14 +462,14 @@ function useCartActions(callbacks) {
|
|
|
423
462
|
const success = await callbacks.updateCartLines(uid, updatedLines);
|
|
424
463
|
if (!success) throw new Error("Failed to update quantity");
|
|
425
464
|
invalidateCartCache();
|
|
426
|
-
_optionalChain([onSuccess, 'optionalCall',
|
|
465
|
+
_optionalChain([onSuccess, 'optionalCall', _26 => _26()]);
|
|
427
466
|
return true;
|
|
428
467
|
} catch (error) {
|
|
429
468
|
setCartLines(previousCartLines);
|
|
430
|
-
if (showToast && _optionalChain([notify, 'optionalAccess',
|
|
469
|
+
if (showToast && _optionalChain([notify, 'optionalAccess', _27 => _27.error])) {
|
|
431
470
|
notify.error("Failed to update quantity. Please try again.");
|
|
432
471
|
}
|
|
433
|
-
_optionalChain([onError, 'optionalCall',
|
|
472
|
+
_optionalChain([onError, 'optionalCall', _28 => _28(error)]);
|
|
434
473
|
return false;
|
|
435
474
|
}
|
|
436
475
|
},
|
|
@@ -449,17 +488,17 @@ function useCartActions(callbacks) {
|
|
|
449
488
|
const success = await callbacks.updateCartLines(uid, zeroedLines);
|
|
450
489
|
if (!success) throw new Error("Failed to remove item");
|
|
451
490
|
invalidateCartCache();
|
|
452
|
-
if (showToast && _optionalChain([notify, 'optionalAccess',
|
|
491
|
+
if (showToast && _optionalChain([notify, 'optionalAccess', _29 => _29.info])) {
|
|
453
492
|
notify.info(`${itemId || "Item"} removed from cart`);
|
|
454
493
|
}
|
|
455
|
-
_optionalChain([onSuccess, 'optionalCall',
|
|
494
|
+
_optionalChain([onSuccess, 'optionalCall', _30 => _30()]);
|
|
456
495
|
return true;
|
|
457
496
|
} catch (error) {
|
|
458
497
|
setCartLines(previousCartLines);
|
|
459
|
-
if (showToast && _optionalChain([notify, 'optionalAccess',
|
|
498
|
+
if (showToast && _optionalChain([notify, 'optionalAccess', _31 => _31.error])) {
|
|
460
499
|
notify.error("Failed to remove item. Please try again.");
|
|
461
500
|
}
|
|
462
|
-
_optionalChain([onError, 'optionalCall',
|
|
501
|
+
_optionalChain([onError, 'optionalCall', _32 => _32(error)]);
|
|
463
502
|
return false;
|
|
464
503
|
}
|
|
465
504
|
},
|
|
@@ -475,17 +514,17 @@ function useCartActions(callbacks) {
|
|
|
475
514
|
const success = await callbacks.deleteItemsFromCart(uid);
|
|
476
515
|
if (!success) throw new Error("Failed to clear cart");
|
|
477
516
|
invalidateCartCache();
|
|
478
|
-
if (showToast && _optionalChain([notify, 'optionalAccess',
|
|
517
|
+
if (showToast && _optionalChain([notify, 'optionalAccess', _33 => _33.info])) {
|
|
479
518
|
notify.info("Cart cleared");
|
|
480
519
|
}
|
|
481
|
-
_optionalChain([onSuccess, 'optionalCall',
|
|
520
|
+
_optionalChain([onSuccess, 'optionalCall', _34 => _34()]);
|
|
482
521
|
return true;
|
|
483
522
|
} catch (error) {
|
|
484
523
|
setCartLines(previousCartLines);
|
|
485
|
-
if (showToast && _optionalChain([notify, 'optionalAccess',
|
|
524
|
+
if (showToast && _optionalChain([notify, 'optionalAccess', _35 => _35.error])) {
|
|
486
525
|
notify.error("Failed to clear cart. Please try again.");
|
|
487
526
|
}
|
|
488
|
-
_optionalChain([onError, 'optionalCall',
|
|
527
|
+
_optionalChain([onError, 'optionalCall', _36 => _36(error)]);
|
|
489
528
|
return false;
|
|
490
529
|
}
|
|
491
530
|
},
|
|
@@ -499,7 +538,7 @@ function useCartActions(callbacks) {
|
|
|
499
538
|
);
|
|
500
539
|
const getItemQuantity = _react.useCallback.call(void 0,
|
|
501
540
|
(invMastUid) => {
|
|
502
|
-
return _nullishCoalesce(_optionalChain([cartLines, 'access',
|
|
541
|
+
return _nullishCoalesce(_optionalChain([cartLines, 'access', _37 => _37.find, 'call', _38 => _38((line) => line.invMastUid === invMastUid), 'optionalAccess', _39 => _39.quantity]), () => ( 0));
|
|
503
542
|
},
|
|
504
543
|
[cartLines]
|
|
505
544
|
);
|
|
@@ -523,30 +562,38 @@ var _augurutils = require('@simpleapps-com/augur-utils');
|
|
|
523
562
|
var MAX_RETRY_ATTEMPTS = 7;
|
|
524
563
|
var RETRY_DELAY_MS = 1e3;
|
|
525
564
|
function useCartInitialization(session, callbacks) {
|
|
565
|
+
const auth = useAugurAuth();
|
|
526
566
|
const cartHdrUid = useCartHdrUid();
|
|
527
567
|
const setCartHdrUid = useSetCartHdrUid();
|
|
528
568
|
const setCartLines = useSetCartLines();
|
|
529
569
|
const clearCart = useClearCart();
|
|
530
570
|
const queryClient = _reactquery.useQueryClient.call(void 0, );
|
|
571
|
+
const effectiveStatus = session.status;
|
|
572
|
+
const effectiveUserId = _nullishCoalesce(session.userId, () => ( _optionalChain([auth, 'optionalAccess', _40 => _40.userId])));
|
|
573
|
+
const effectiveCartHdrUid = _nullishCoalesce(session.cartHdrUid, () => ( _optionalChain([auth, 'optionalAccess', _41 => _41.cartHdrUid])));
|
|
574
|
+
const effectiveSession = _react.useMemo.call(void 0,
|
|
575
|
+
() => ({ status: effectiveStatus, userId: effectiveUserId, cartHdrUid: effectiveCartHdrUid }),
|
|
576
|
+
[effectiveStatus, effectiveUserId, effectiveCartHdrUid]
|
|
577
|
+
);
|
|
531
578
|
const retryCountRef = _react.useRef.call(void 0, 0);
|
|
532
579
|
const isInitializingRef = _react.useRef.call(void 0, false);
|
|
533
|
-
const prevStatusRef = _react.useRef.call(void 0,
|
|
580
|
+
const prevStatusRef = _react.useRef.call(void 0, effectiveSession.status);
|
|
534
581
|
_react.useEffect.call(void 0, () => {
|
|
535
582
|
const prevStatus = prevStatusRef.current;
|
|
536
|
-
prevStatusRef.current =
|
|
537
|
-
if (prevStatus === "authenticated" &&
|
|
583
|
+
prevStatusRef.current = effectiveSession.status;
|
|
584
|
+
if (prevStatus === "authenticated" && effectiveSession.status === "unauthenticated") {
|
|
538
585
|
clearCart();
|
|
539
586
|
queryClient.removeQueries({ queryKey: ["cartLines"] });
|
|
540
587
|
queryClient.removeQueries({ queryKey: ["cart-also-bought"] });
|
|
541
588
|
}
|
|
542
|
-
}, [
|
|
589
|
+
}, [effectiveSession.status, clearCart, queryClient]);
|
|
543
590
|
_react.useEffect.call(void 0, () => {
|
|
544
|
-
if (cartHdrUid ||
|
|
545
|
-
if (
|
|
546
|
-
setCartHdrUid(
|
|
591
|
+
if (cartHdrUid || effectiveSession.status === "loading") return;
|
|
592
|
+
if (effectiveSession.cartHdrUid && effectiveSession.status === "authenticated") {
|
|
593
|
+
setCartHdrUid(effectiveSession.cartHdrUid);
|
|
547
594
|
return;
|
|
548
595
|
}
|
|
549
|
-
if (
|
|
596
|
+
if (effectiveSession.status === "unauthenticated" && !isInitializingRef.current) {
|
|
550
597
|
isInitializingRef.current = true;
|
|
551
598
|
retryCountRef.current = 0;
|
|
552
599
|
const initializeGuestCart = async () => {
|
|
@@ -591,10 +638,10 @@ function useCartInitialization(session, callbacks) {
|
|
|
591
638
|
};
|
|
592
639
|
initializeGuestCart();
|
|
593
640
|
}
|
|
594
|
-
}, [
|
|
641
|
+
}, [effectiveSession, cartHdrUid, setCartHdrUid, callbacks]);
|
|
595
642
|
const { data: cartLinesData } = _reactquery.useQuery.call(void 0, {
|
|
596
643
|
queryKey: ["cartLines", cartHdrUid],
|
|
597
|
-
queryFn: () => callbacks.getCartLines(Number(cartHdrUid)),
|
|
644
|
+
queryFn: async () => await _asyncNullishCoalesce(await callbacks.getCartLines(Number(cartHdrUid)), async () => ( [])),
|
|
598
645
|
enabled: !!cartHdrUid,
|
|
599
646
|
..._augurutils.CACHE_CONFIG.CART
|
|
600
647
|
});
|
|
@@ -615,19 +662,29 @@ function useCartInitialization(session, callbacks) {
|
|
|
615
662
|
|
|
616
663
|
function useCartPricing(options = {}) {
|
|
617
664
|
const api = useAugurApi();
|
|
665
|
+
const callbacks = useAugurCallbacks();
|
|
666
|
+
const auth = useAugurAuth();
|
|
618
667
|
const cartLines = useCartLines();
|
|
619
|
-
const
|
|
668
|
+
const customerId = _nullishCoalesce(options.customerId, () => ( _optionalChain([auth, 'optionalAccess', _42 => _42.customerId])));
|
|
669
|
+
const priceFn = _nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _43 => _43.getItemPrice])));
|
|
620
670
|
const priceQueries = _reactquery.useQueries.call(void 0, {
|
|
621
|
-
queries: cartLines.map((line) =>
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
671
|
+
queries: cartLines.map((line) => {
|
|
672
|
+
const base = priceFn ? {
|
|
673
|
+
queryKey: _chunkYSRBE3YIcjs.getItemPriceKey.call(void 0, line.itemId, customerId, line.quantity),
|
|
674
|
+
queryFn: () => priceFn(line.itemId, customerId, line.quantity),
|
|
675
|
+
..._chunkYSRBE3YIcjs.PRICE_CACHE_OPTIONS
|
|
676
|
+
} : _chunkYSRBE3YIcjs.getItemPriceOptions.call(void 0, api, line.itemId, customerId, line.quantity);
|
|
677
|
+
return {
|
|
678
|
+
...base,
|
|
679
|
+
enabled: !!customerId && !!line.itemId
|
|
680
|
+
};
|
|
681
|
+
})
|
|
625
682
|
});
|
|
626
683
|
const prices = _react.useMemo.call(void 0, () => {
|
|
627
684
|
const map = {};
|
|
628
685
|
cartLines.forEach((line, index) => {
|
|
629
686
|
const queryResult = priceQueries[index];
|
|
630
|
-
if (_optionalChain([queryResult, 'optionalAccess',
|
|
687
|
+
if (_optionalChain([queryResult, 'optionalAccess', _44 => _44.data])) {
|
|
631
688
|
map[line.itemId.toUpperCase()] = {
|
|
632
689
|
unitPrice: _nullishCoalesce(queryResult.data.unitPrice, () => ( 0)),
|
|
633
690
|
priceData: queryResult.data
|
|
@@ -638,7 +695,7 @@ function useCartPricing(options = {}) {
|
|
|
638
695
|
}, [cartLines, priceQueries]);
|
|
639
696
|
const getUnitPrice = _react.useMemo.call(void 0, () => {
|
|
640
697
|
return (itemId) => {
|
|
641
|
-
return _nullishCoalesce(_optionalChain([prices, 'access',
|
|
698
|
+
return _nullishCoalesce(_optionalChain([prices, 'access', _45 => _45[_optionalChain([itemId, 'optionalAccess', _46 => _46.toUpperCase, 'call', _47 => _47()])], 'optionalAccess', _48 => _48.unitPrice]), () => ( 0));
|
|
642
699
|
};
|
|
643
700
|
}, [prices]);
|
|
644
701
|
const getItemTotal = _react.useMemo.call(void 0, () => {
|
|
@@ -648,7 +705,7 @@ function useCartPricing(options = {}) {
|
|
|
648
705
|
}, [getUnitPrice]);
|
|
649
706
|
const subtotal = _react.useMemo.call(void 0, () => {
|
|
650
707
|
return cartLines.reduce((sum, line) => {
|
|
651
|
-
const unitPrice = _nullishCoalesce(_optionalChain([prices, 'access',
|
|
708
|
+
const unitPrice = _nullishCoalesce(_optionalChain([prices, 'access', _49 => _49[line.itemId.toUpperCase()], 'optionalAccess', _50 => _50.unitPrice]), () => ( 0));
|
|
652
709
|
return sum + unitPrice * line.quantity;
|
|
653
710
|
}, 0);
|
|
654
711
|
}, [cartLines, prices]);
|
|
@@ -710,72 +767,51 @@ var usePaginationPrefetch = ({
|
|
|
710
767
|
|
|
711
768
|
// src/hooks/use-category-items-infinite.ts
|
|
712
769
|
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
770
|
function useCategoryItemsInfinite(itemCategoryUid, itemsFilters, options = {}) {
|
|
717
771
|
const api = useAugurApi();
|
|
772
|
+
const callbacks = useAugurCallbacks();
|
|
718
773
|
const { enabled = true } = options;
|
|
774
|
+
const defaultOptions = _chunkYSRBE3YIcjs.getCategoryItemsInfiniteOptions.call(void 0,
|
|
775
|
+
api,
|
|
776
|
+
itemCategoryUid,
|
|
777
|
+
itemsFilters
|
|
778
|
+
);
|
|
779
|
+
const cb = _optionalChain([callbacks, 'optionalAccess', _51 => _51.getCategoryItemsInfinite]);
|
|
780
|
+
const resolvedQueryFn = _nullishCoalesce(options.queryFn, () => ( (cb ? ({ pageParam }) => cb({
|
|
781
|
+
itemCategoryUid,
|
|
782
|
+
itemsFilters,
|
|
783
|
+
/* v8 ignore next */
|
|
784
|
+
pageParam: _nullishCoalesce(pageParam, () => ( 0))
|
|
785
|
+
}) : void 0)));
|
|
719
786
|
return _reactquery.useInfiniteQuery.call(void 0, {
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
const response = await api.openSearch.itemSearch.list({
|
|
723
|
-
q: itemsFilters.q || "",
|
|
724
|
-
searchType: "query",
|
|
725
|
-
size: itemsFilters.limit,
|
|
726
|
-
from: pageParam,
|
|
727
|
-
classId5List: String(itemCategoryUid),
|
|
728
|
-
filters: _optionalChain([itemsFilters, 'access', _36 => _36.filters, 'optionalAccess', _37 => _37.length]) ? JSON.stringify(itemsFilters.filters) : void 0
|
|
729
|
-
});
|
|
730
|
-
const items = _nullishCoalesce(_optionalChain([response, 'access', _38 => _38.data, 'optionalAccess', _39 => _39.items]), () => ( []));
|
|
731
|
-
const total = _nullishCoalesce(_optionalChain([response, 'access', _40 => _40.data, 'optionalAccess', _41 => _41.totalResults]), () => ( 0));
|
|
732
|
-
const nextOffset = pageParam + itemsFilters.limit;
|
|
733
|
-
return {
|
|
734
|
-
data: items,
|
|
735
|
-
total,
|
|
736
|
-
nextCursor: nextOffset < total ? nextOffset : void 0
|
|
737
|
-
};
|
|
738
|
-
},
|
|
739
|
-
initialPageParam: 0,
|
|
740
|
-
getNextPageParam: (lastPage) => lastPage.nextCursor,
|
|
741
|
-
..._augurutils.CACHE_CONFIG.SEMI_STATIC,
|
|
787
|
+
...defaultOptions,
|
|
788
|
+
...resolvedQueryFn ? { queryFn: resolvedQueryFn } : {},
|
|
742
789
|
enabled: enabled && !!itemCategoryUid
|
|
743
790
|
});
|
|
744
791
|
}
|
|
745
792
|
|
|
746
793
|
// src/hooks/use-item-search-infinite.ts
|
|
747
794
|
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
795
|
function useItemSearchInfinite(itemsFilters, itemCategoryUid, options = {}) {
|
|
752
796
|
const api = useAugurApi();
|
|
797
|
+
const callbacks = useAugurCallbacks();
|
|
753
798
|
const { enabled = true } = options;
|
|
799
|
+
const defaultOptions = _chunkYSRBE3YIcjs.getItemSearchInfiniteOptions.call(void 0,
|
|
800
|
+
api,
|
|
801
|
+
itemsFilters,
|
|
802
|
+
itemCategoryUid
|
|
803
|
+
);
|
|
804
|
+
const cb = _optionalChain([callbacks, 'optionalAccess', _52 => _52.getItemSearchInfinite]);
|
|
805
|
+
const resolvedQueryFn = _nullishCoalesce(options.queryFn, () => ( (cb ? ({ pageParam }) => cb({
|
|
806
|
+
itemsFilters,
|
|
807
|
+
itemCategoryUid,
|
|
808
|
+
/* v8 ignore next */
|
|
809
|
+
pageParam: _nullishCoalesce(pageParam, () => ( 0))
|
|
810
|
+
}) : void 0)));
|
|
754
811
|
return _reactquery.useInfiniteQuery.call(void 0, {
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
q: itemsFilters.q,
|
|
759
|
-
searchType: "query",
|
|
760
|
-
size: itemsFilters.limit,
|
|
761
|
-
from: pageParam,
|
|
762
|
-
classId5List: itemCategoryUid ? String(itemCategoryUid) : void 0,
|
|
763
|
-
filters: _optionalChain([itemsFilters, 'access', _42 => _42.filters, 'optionalAccess', _43 => _43.length]) ? JSON.stringify(itemsFilters.filters) : void 0
|
|
764
|
-
});
|
|
765
|
-
const items = _nullishCoalesce(_optionalChain([response, 'access', _44 => _44.data, 'optionalAccess', _45 => _45.items]), () => ( []));
|
|
766
|
-
const total = _nullishCoalesce(_optionalChain([response, 'access', _46 => _46.data, 'optionalAccess', _47 => _47.totalResults]), () => ( 0));
|
|
767
|
-
const nextOffset = pageParam + itemsFilters.limit;
|
|
768
|
-
return {
|
|
769
|
-
data: items,
|
|
770
|
-
total,
|
|
771
|
-
nextCursor: nextOffset < total ? nextOffset : void 0
|
|
772
|
-
};
|
|
773
|
-
},
|
|
774
|
-
initialPageParam: 0,
|
|
775
|
-
getNextPageParam: (lastPage) => lastPage.nextCursor,
|
|
776
|
-
..._augurutils.CACHE_CONFIG.SEMI_STATIC,
|
|
777
|
-
enabled: enabled && !!itemsFilters.q,
|
|
778
|
-
meta: { persist: true }
|
|
812
|
+
...defaultOptions,
|
|
813
|
+
...resolvedQueryFn ? { queryFn: resolvedQueryFn } : {},
|
|
814
|
+
enabled: enabled && !!itemsFilters.q
|
|
779
815
|
});
|
|
780
816
|
}
|
|
781
817
|
|
|
@@ -835,5 +871,8 @@ function useItemSearchInfinite(itemsFilters, itemCategoryUid, options = {}) {
|
|
|
835
871
|
|
|
836
872
|
|
|
837
873
|
|
|
838
|
-
|
|
874
|
+
|
|
875
|
+
|
|
876
|
+
|
|
877
|
+
exports.AugurHooksProvider = AugurHooksProvider; exports.CATEGORY_CACHE_OPTIONS = _chunkYSRBE3YIcjs.CATEGORY_CACHE_OPTIONS; exports.INV_MAST_CACHE_OPTIONS = _chunkYSRBE3YIcjs.INV_MAST_CACHE_OPTIONS; exports.INV_MAST_DOC_CACHE_OPTIONS = _chunkYSRBE3YIcjs.INV_MAST_DOC_CACHE_OPTIONS; exports.PRICE_CACHE_OPTIONS = _chunkYSRBE3YIcjs.PRICE_CACHE_OPTIONS; exports.SEARCH_SUGGESTIONS_CACHE_OPTIONS = _chunkYSRBE3YIcjs.SEARCH_SUGGESTIONS_CACHE_OPTIONS; exports.getCartPricingQueryOptions = _chunkYSRBE3YIcjs.getCartPricingQueryOptions; exports.getCategoryItemsInfiniteKey = _chunkYSRBE3YIcjs.getCategoryItemsInfiniteKey; exports.getCategoryItemsInfiniteOptions = _chunkYSRBE3YIcjs.getCategoryItemsInfiniteOptions; exports.getInvMastDocKey = _chunkYSRBE3YIcjs.getInvMastDocKey; exports.getInvMastDocOptions = _chunkYSRBE3YIcjs.getInvMastDocOptions; exports.getInvMastKey = _chunkYSRBE3YIcjs.getInvMastKey; exports.getInvMastOptions = _chunkYSRBE3YIcjs.getInvMastOptions; exports.getInvMastStockKey = _chunkYSRBE3YIcjs.getInvMastStockKey; exports.getInvMastStockOptions = _chunkYSRBE3YIcjs.getInvMastStockOptions; exports.getItemAttributesKey = _chunkYSRBE3YIcjs.getItemAttributesKey; exports.getItemAttributesOptions = _chunkYSRBE3YIcjs.getItemAttributesOptions; exports.getItemCategoryKey = _chunkYSRBE3YIcjs.getItemCategoryKey; exports.getItemCategoryOptions = _chunkYSRBE3YIcjs.getItemCategoryOptions; exports.getItemDetailsKey = _chunkYSRBE3YIcjs.getItemDetailsKey; exports.getItemDetailsOptions = _chunkYSRBE3YIcjs.getItemDetailsOptions; exports.getItemPriceKey = _chunkYSRBE3YIcjs.getItemPriceKey; exports.getItemPriceOptions = _chunkYSRBE3YIcjs.getItemPriceOptions; exports.getItemSearchInfiniteKey = _chunkYSRBE3YIcjs.getItemSearchInfiniteKey; exports.getItemSearchInfiniteOptions = _chunkYSRBE3YIcjs.getItemSearchInfiniteOptions; exports.getProductCategoryKey = _chunkYSRBE3YIcjs.getProductCategoryKey; exports.getProductCategoryOptions = _chunkYSRBE3YIcjs.getProductCategoryOptions; exports.getProductSearchKey = _chunkYSRBE3YIcjs.getProductSearchKey; exports.getProductSearchOptions = _chunkYSRBE3YIcjs.getProductSearchOptions; exports.getSearchSuggestionsKey = _chunkYSRBE3YIcjs.getSearchSuggestionsKey; exports.getSearchSuggestionsOptions = _chunkYSRBE3YIcjs.getSearchSuggestionsOptions; exports.useAugurApi = useAugurApi; exports.useAugurAuth = useAugurAuth; exports.useCartActions = useCartActions; exports.useCartHdrUid = useCartHdrUid; exports.useCartInitialization = useCartInitialization; exports.useCartItemCount = useCartItemCount; exports.useCartLines = useCartLines; exports.useCartPricing = useCartPricing; exports.useCartStore = useCartStore; exports.useCategoryItemsInfinite = useCategoryItemsInfinite; exports.useClearCart = useClearCart; exports.useDebounce = useDebounce; exports.useFormatPrice = useFormatPrice; exports.useInvMast = useInvMast; exports.useInvMastDoc = useInvMastDoc; exports.useInvMastStock = useInvMastStock; exports.useItemAttributes = useItemAttributes; exports.useItemCategory = useItemCategory; exports.useItemDetails = useItemDetails; exports.useItemFiltersStore = useItemFiltersStore; exports.useItemPrice = useItemPrice; exports.useItemSearchInfinite = useItemSearchInfinite; exports.usePaginationPrefetch = usePaginationPrefetch; exports.useProductCategory = useProductCategory; exports.useProductSearch = useProductSearch; exports.useSearchSuggestions = useSearchSuggestions; exports.useSetCartHdrUid = useSetCartHdrUid; exports.useSetCartLines = useSetCartLines;
|
|
839
878
|
//# sourceMappingURL=index.cjs.map
|