@simpleapps-com/augur-hooks 0.1.4 → 0.1.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.
package/dist/index.cjs CHANGED
@@ -1,9 +1,53 @@
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; }// src/provider.tsx
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
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+ var _chunkYSRBE3YIcjs = require('./chunk-YSRBE3YI.cjs');
33
+
34
+ // src/provider.tsx
2
35
  var _react = require('react');
3
36
  var _jsxruntime = require('react/jsx-runtime');
4
37
  var AugurApiContext = _react.createContext.call(void 0, null);
5
- function AugurHooksProvider({ api, children }) {
6
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AugurApiContext.Provider, { value: api, children });
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 }) }) });
7
51
  }
8
52
  function useAugurApi() {
9
53
  const api = _react.useContext.call(void 0, AugurApiContext);
@@ -14,6 +58,12 @@ function useAugurApi() {
14
58
  }
15
59
  return api;
16
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
+ }
17
67
 
18
68
  // src/stores/cart-store.ts
19
69
  var _zustand = require('zustand');
@@ -102,65 +152,27 @@ function useFormatPrice(locale = "en-US", currency = "USD") {
102
152
 
103
153
  // src/hooks/use-item-price.ts
104
154
  var _reactquery = require('@tanstack/react-query');
105
- var _augurutils = require('@simpleapps-com/augur-utils');
106
- var PRICE_CACHE_OPTIONS = {
107
- ..._augurutils.CACHE_CONFIG.SEMI_STATIC,
108
- refetchOnReconnect: true,
109
- refetchOnWindowFocus: false,
110
- meta: { persist: true }
111
- };
112
- var getItemPriceKey = (itemId, customerId, quantity = 1) => {
113
- return ["price", _optionalChain([itemId, 'optionalAccess', _ => _.toUpperCase, 'call', _2 => _2()]) || "", customerId, quantity];
114
- };
115
- var getItemPriceOptions = (api, itemId, customerId, quantity = 1) => ({
116
- queryKey: getItemPriceKey(itemId, customerId, quantity),
117
- queryFn: async () => {
118
- const response = await api.pricing.priceEngine.get({
119
- itemId: _optionalChain([itemId, 'optionalAccess', _3 => _3.toUpperCase, 'call', _4 => _4()]) || "",
120
- customerId: Number(customerId),
121
- quantity
122
- });
123
- return response.data;
124
- },
125
- ...PRICE_CACHE_OPTIONS
126
- });
127
155
  function useItemPrice(itemId, customerId, quantity = 1, options = {}) {
128
156
  const api = useAugurApi();
129
- const defaultOptions = getItemPriceOptions(api, itemId, customerId, quantity);
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)));
130
162
  return _reactquery.useQuery.call(void 0, {
131
163
  ...defaultOptions,
132
- ...options.queryFn ? { queryFn: options.queryFn } : {},
133
- enabled: _nullishCoalesce(options.enabled, () => ( (Boolean(itemId) && Boolean(customerId)))),
164
+ ...resolvedQueryFn ? { queryFn: resolvedQueryFn } : {},
165
+ enabled: _nullishCoalesce(options.enabled, () => ( (Boolean(itemId) && Boolean(effectiveCustomerId)))),
134
166
  retry: 3
135
167
  });
136
168
  }
137
169
 
138
170
  // src/hooks/use-inv-mast-doc.ts
139
171
 
140
-
141
- var INV_MAST_DOC_CACHE_OPTIONS = _augurutils.CACHE_CONFIG.STATIC;
142
- var getInvMastDocKey = (invMastUid, itemId, includePricing) => {
143
- return [
144
- "invMastDoc",
145
- invMastUid,
146
- itemId.toUpperCase(),
147
- includePricing
148
- ];
149
- };
150
- var getInvMastDocOptions = (api, invMastUid, itemId, includePricing) => ({
151
- queryKey: getInvMastDocKey(invMastUid, itemId, includePricing),
152
- queryFn: async () => {
153
- const response = await api.items.invMast.doc.list(invMastUid, {
154
- includePricing
155
- });
156
- if (!response.data) throw new Error("Item not found");
157
- return response.data;
158
- },
159
- ...INV_MAST_DOC_CACHE_OPTIONS
160
- });
161
172
  function useInvMastDoc(invMastUid, itemId, options = {}) {
162
173
  const api = useAugurApi();
163
- const queryOpts = getInvMastDocOptions(
174
+ const callbacks = useAugurCallbacks();
175
+ const queryOpts = _chunkYSRBE3YIcjs.getInvMastDocOptions.call(void 0,
164
176
  api,
165
177
  invMastUid,
166
178
  itemId,
@@ -168,7 +180,7 @@ function useInvMastDoc(invMastUid, itemId, options = {}) {
168
180
  );
169
181
  const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
170
182
  ...queryOpts,
171
- ...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")))))) } : {},
172
184
  enabled: _nullishCoalesce(options.enabled, () => ( true)),
173
185
  initialData: options.initialData
174
186
  });
@@ -177,33 +189,17 @@ function useInvMastDoc(invMastUid, itemId, options = {}) {
177
189
 
178
190
  // src/hooks/use-item-category.ts
179
191
 
180
-
181
- var CATEGORY_CACHE_OPTIONS = _augurutils.CACHE_CONFIG.STATIC;
182
- var getItemCategoryKey = (itemCategoryUid, apiOptions) => {
183
- return ["itemCategory", itemCategoryUid, apiOptions];
184
- };
185
- var getItemCategoryOptions = (api, itemCategoryUid, apiOptions) => ({
186
- queryKey: getItemCategoryKey(itemCategoryUid, apiOptions),
187
- queryFn: async () => {
188
- const response = await api.items.itemCategory.get(
189
- itemCategoryUid,
190
- apiOptions
191
- );
192
- if (!response.data) throw new Error("Item category not found");
193
- return response.data;
194
- },
195
- ...CATEGORY_CACHE_OPTIONS
196
- });
197
192
  function useItemCategory(itemCategoryUid, options = {}) {
198
193
  const api = useAugurApi();
199
- const queryOpts = getItemCategoryOptions(
194
+ const callbacks = useAugurCallbacks();
195
+ const queryOpts = _chunkYSRBE3YIcjs.getItemCategoryOptions.call(void 0,
200
196
  api,
201
197
  itemCategoryUid,
202
198
  options.apiOptions
203
199
  );
204
200
  const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
205
201
  ...queryOpts,
206
- ...options.queryFn ? { queryFn: options.queryFn } : {},
202
+ ..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _4 => _4.getItemCategory]))) ? { queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getItemCategory(itemCategoryUid, options.apiOptions)))) } : {},
207
203
  enabled: _nullishCoalesce(options.enabled, () => ( true))
208
204
  });
209
205
  return { category: data, isLoading, error };
@@ -211,26 +207,13 @@ function useItemCategory(itemCategoryUid, options = {}) {
211
207
 
212
208
  // src/hooks/use-inv-mast.ts
213
209
 
214
-
215
- var INV_MAST_CACHE_OPTIONS = _augurutils.CACHE_CONFIG.STATIC;
216
- var getInvMastKey = (invMastUid, itemId) => {
217
- return ["invMast", invMastUid, itemId.toUpperCase()];
218
- };
219
- var getInvMastOptions = (api, invMastUid, itemId) => ({
220
- queryKey: getInvMastKey(invMastUid, itemId),
221
- queryFn: async () => {
222
- const response = await api.items.invMast.get(invMastUid);
223
- if (!response.data) throw new Error("Item not found");
224
- return response.data;
225
- },
226
- ...INV_MAST_CACHE_OPTIONS
227
- });
228
210
  function useInvMast(invMastUid, itemId, options = {}) {
229
211
  const api = useAugurApi();
230
- const queryOpts = getInvMastOptions(api, invMastUid, itemId);
212
+ const callbacks = useAugurCallbacks();
213
+ const queryOpts = _chunkYSRBE3YIcjs.getInvMastOptions.call(void 0, api, invMastUid, itemId);
231
214
  const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
232
215
  ...queryOpts,
233
- ...options.queryFn ? { queryFn: options.queryFn } : {},
216
+ ..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _5 => _5.getInvMast]))) ? { queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getInvMast(invMastUid, itemId)))) } : {},
234
217
  enabled: _nullishCoalesce(options.enabled, () => ( true))
235
218
  });
236
219
  return { item: data, isLoading, error };
@@ -238,28 +221,13 @@ function useInvMast(invMastUid, itemId, options = {}) {
238
221
 
239
222
  // src/hooks/use-inv-mast-stock.ts
240
223
 
241
-
242
- var getInvMastStockKey = (invMastUid) => {
243
- return ["invMastStock", invMastUid];
244
- };
245
- var getInvMastStockOptions = (api, invMastUid) => ({
246
- queryKey: getInvMastStockKey(invMastUid),
247
- queryFn: async () => {
248
- const response = await api.items.invMast.stock.list(Number(invMastUid));
249
- const stockData = _nullishCoalesce(_optionalChain([response, 'access', _5 => _5.data, 'optionalAccess', _6 => _6.stockData]), () => ( []));
250
- return stockData.reduce(
251
- (qty, stock) => qty + stock.qtyOnHand,
252
- 0
253
- );
254
- },
255
- ..._augurutils.CACHE_CONFIG.SEMI_STATIC
256
- });
257
224
  function useInvMastStock(invMastUid, options = {}) {
258
225
  const api = useAugurApi();
259
- const queryOpts = getInvMastStockOptions(api, invMastUid);
226
+ const callbacks = useAugurCallbacks();
227
+ const queryOpts = _chunkYSRBE3YIcjs.getInvMastStockOptions.call(void 0, api, invMastUid);
260
228
  const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
261
229
  ...queryOpts,
262
- ...options.queryFn ? { queryFn: options.queryFn } : {},
230
+ ..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _6 => _6.getInvMastStock]))) ? { queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getInvMastStock(invMastUid)))) } : {},
263
231
  enabled: (_nullishCoalesce(options.enabled, () => ( true))) && !!invMastUid,
264
232
  retry: 3,
265
233
  /* v8 ignore start */
@@ -275,29 +243,26 @@ function useInvMastStock(invMastUid, options = {}) {
275
243
 
276
244
  // src/hooks/use-product-category.ts
277
245
 
278
-
279
- var getProductCategoryKey = (itemCategoryUid) => {
280
- return ["productCategory", itemCategoryUid];
281
- };
282
- var getProductCategoryOptions = (api, itemCategoryUid) => ({
283
- queryKey: getProductCategoryKey(itemCategoryUid),
284
- queryFn: async () => {
285
- const response = await api.items.itemCategory.get(
286
- Number(itemCategoryUid)
287
- );
288
- return response.data;
289
- },
290
- ..._augurutils.CACHE_CONFIG.STATIC
291
- });
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
+ }
292
254
  function useProductCategory(itemCategoryUid, options = {}) {
293
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)));
294
263
  const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
295
- ...itemCategoryUid ? getProductCategoryOptions(api, itemCategoryUid) : {
296
- queryKey: getProductCategoryKey(null),
297
- /* v8 ignore next */
298
- queryFn: () => Promise.reject()
299
- },
300
- ...options.queryFn ? { queryFn: options.queryFn } : {},
264
+ ...baseOptions,
265
+ ...resolvedQueryFn ? { queryFn: resolvedQueryFn } : {},
301
266
  enabled: (_nullishCoalesce(options.enabled, () => ( true))) && !!itemCategoryUid,
302
267
  retry: 3,
303
268
  /* v8 ignore start */
@@ -305,10 +270,7 @@ function useProductCategory(itemCategoryUid, options = {}) {
305
270
  /* v8 ignore stop */
306
271
  });
307
272
  return {
308
- childrenTotal: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _7 => _7.childrenTotal]), () => ( 0)),
309
- itemCategoryDesc: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _8 => _8.itemCategoryDesc]), () => ( "")),
310
- productCategories: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _9 => _9.children]), () => ( null)),
311
- productCategoryImage: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _10 => _10.categoryImage]), () => ( null)),
273
+ ...resolveData(data),
312
274
  loading: isLoading,
313
275
  error
314
276
  };
@@ -316,35 +278,23 @@ function useProductCategory(itemCategoryUid, options = {}) {
316
278
 
317
279
  // src/hooks/use-item-details.ts
318
280
 
319
-
320
- var getItemDetailsKey = (itemId) => {
321
- return ["itemDetails", itemId];
322
- };
323
- var getItemDetailsOptions = (api, itemId) => ({
324
- queryKey: getItemDetailsKey(itemId),
325
- queryFn: async () => {
326
- const response = await api.items.invMast.doc.list(Number(itemId));
327
- if (!response.data) throw new Error("Item not found");
328
- return response.data;
329
- },
330
- ..._augurutils.CACHE_CONFIG.STATIC
331
- });
332
281
  function useItemDetails(itemId, options = {}) {
333
282
  const api = useAugurApi();
283
+ const callbacks = useAugurCallbacks();
334
284
  const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
335
- ...itemId ? getItemDetailsOptions(api, itemId) : {
336
- queryKey: getItemDetailsKey(""),
285
+ ...itemId ? _chunkYSRBE3YIcjs.getItemDetailsOptions.call(void 0, api, itemId) : {
286
+ queryKey: _chunkYSRBE3YIcjs.getItemDetailsKey.call(void 0, ""),
337
287
  /* v8 ignore next */
338
288
  queryFn: () => Promise.reject()
339
289
  },
340
- ...options.queryFn ? { queryFn: options.queryFn } : {},
290
+ ..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _12 => _12.getItemDetails]))) ? { queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getItemDetails(itemId)))) } : {},
341
291
  enabled: (_nullishCoalesce(options.enabled, () => ( true))) && !!itemId,
342
292
  retry: 3,
343
293
  /* v8 ignore start */
344
294
  retryDelay: (attemptIndex) => Math.min(1e3 * 2 ** attemptIndex, 1e4)
345
295
  /* v8 ignore stop */
346
296
  });
347
- const categoryList = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _11 => _11.categoryList]), () => ( []));
297
+ const categoryList = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _13 => _13.categoryList]), () => ( []));
348
298
  return {
349
299
  itemCategoryUid: categoryList.length > 0 ? categoryList[categoryList.length - 1] : null,
350
300
  itemDetails: _nullishCoalesce(data, () => ( null)),
@@ -355,31 +305,16 @@ function useItemDetails(itemId, options = {}) {
355
305
 
356
306
  // src/hooks/use-item-attributes.ts
357
307
 
358
-
359
- var getItemAttributesKey = (itemCategoryUid) => {
360
- return ["itemAttributes", itemCategoryUid];
361
- };
362
- var getItemAttributesOptions = (api, itemCategoryUid) => ({
363
- queryKey: getItemAttributesKey(itemCategoryUid),
364
- queryFn: async () => {
365
- const response = await api.openSearch.itemSearch.attributes.list({
366
- q: "",
367
- searchType: "query",
368
- classId5List: String(itemCategoryUid)
369
- });
370
- return response.data;
371
- },
372
- ..._augurutils.CACHE_CONFIG.STATIC
373
- });
374
308
  function useItemAttributes(itemCategoryUid, options = {}) {
375
309
  const api = useAugurApi();
310
+ const callbacks = useAugurCallbacks();
376
311
  const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
377
- ...itemCategoryUid ? getItemAttributesOptions(api, itemCategoryUid) : {
378
- queryKey: getItemAttributesKey(null),
312
+ ...itemCategoryUid ? _chunkYSRBE3YIcjs.getItemAttributesOptions.call(void 0, api, itemCategoryUid) : {
313
+ queryKey: _chunkYSRBE3YIcjs.getItemAttributesKey.call(void 0, null),
379
314
  /* v8 ignore next */
380
315
  queryFn: () => Promise.reject()
381
316
  },
382
- ...options.queryFn ? { queryFn: options.queryFn } : {},
317
+ ..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _14 => _14.getItemAttributes]))) ? { queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getItemAttributes(itemCategoryUid)))) } : {},
383
318
  enabled: (_nullishCoalesce(options.enabled, () => ( true))) && !!itemCategoryUid,
384
319
  retry: 3,
385
320
  /* v8 ignore start */
@@ -387,7 +322,7 @@ function useItemAttributes(itemCategoryUid, options = {}) {
387
322
  /* v8 ignore stop */
388
323
  });
389
324
  return {
390
- attributes: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _12 => _12.attributes]), () => ( null)),
325
+ attributes: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _15 => _15.attributes]), () => ( null)),
391
326
  loading: isLoading,
392
327
  error
393
328
  };
@@ -395,46 +330,21 @@ function useItemAttributes(itemCategoryUid, options = {}) {
395
330
 
396
331
  // src/hooks/use-product-search.ts
397
332
 
398
-
399
- var getProductSearchKey = (pageData) => {
400
- return [
401
- "productSearch",
402
- pageData.q,
403
- pageData.limit,
404
- pageData.offset,
405
- pageData.sortBy,
406
- pageData.itemCategoryUid
407
- ];
408
- };
409
- var getProductSearchOptions = (api, pageData) => ({
410
- queryKey: getProductSearchKey(pageData),
411
- queryFn: async () => {
412
- const response = await api.openSearch.itemSearch.list({
413
- q: pageData.q,
414
- searchType: "query",
415
- size: pageData.limit,
416
- from: pageData.offset,
417
- classId5List: pageData.itemCategoryUid ? String(pageData.itemCategoryUid) : void 0,
418
- filters: pageData.filters ? JSON.stringify(pageData.filters) : void 0
419
- });
420
- return response.data;
421
- },
422
- ..._augurutils.CACHE_CONFIG.SEMI_STATIC
423
- });
424
333
  function useProductSearch(pageData, options = {}) {
425
334
  const api = useAugurApi();
426
- const defaultOptions = getProductSearchOptions(api, pageData);
335
+ const callbacks = useAugurCallbacks();
336
+ const defaultOptions = _chunkYSRBE3YIcjs.getProductSearchOptions.call(void 0, api, pageData);
427
337
  const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
428
338
  ...defaultOptions,
429
- ...options.queryFn ? { queryFn: options.queryFn } : {},
339
+ ..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _16 => _16.getProductSearch]))) ? { queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getProductSearch(pageData)))) } : {},
430
340
  retry: 3,
431
341
  /* v8 ignore start */
432
342
  retryDelay: (attemptIndex) => Math.min(1e3 * 2 ** attemptIndex, 1e4)
433
343
  /* v8 ignore stop */
434
344
  });
435
345
  return {
436
- productItems: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _13 => _13.items]), () => ( null)),
437
- total: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _14 => _14.totalResults]), () => ( 0)),
346
+ productItems: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _17 => _17.items]), () => ( null)),
347
+ total: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _18 => _18.totalResults]), () => ( 0)),
438
348
  loading: isLoading,
439
349
  error
440
350
  };
@@ -442,35 +352,21 @@ function useProductSearch(pageData, options = {}) {
442
352
 
443
353
  // src/hooks/use-search-suggestions.ts
444
354
 
445
-
446
- var SEARCH_SUGGESTIONS_CACHE_OPTIONS = _augurutils.CACHE_CONFIG.STATIC;
447
- var getSearchSuggestionsKey = (query, limit, offset) => {
448
- return ["searchSuggestions", query, limit, offset];
449
- };
450
- var getSearchSuggestionsOptions = (api, query, limit = 10, offset = 0) => ({
451
- queryKey: getSearchSuggestionsKey(query, limit, offset),
452
- queryFn: async () => {
453
- const response = await api.openSearch.suggestions.suggest.list({
454
- q: query
455
- });
456
- return response.data;
457
- },
458
- ...SEARCH_SUGGESTIONS_CACHE_OPTIONS
459
- });
460
355
  function useSearchSuggestions(query, options = {}) {
461
356
  const api = useAugurApi();
357
+ const callbacks = useAugurCallbacks();
462
358
  const limit = _nullishCoalesce(options.limit, () => ( 10));
463
359
  const offset = _nullishCoalesce(options.offset, () => ( 0));
464
360
  const enabled = (_nullishCoalesce(options.enabled, () => ( true))) && query.trim().length > 0;
465
- const defaultOptions = getSearchSuggestionsOptions(api, query, limit, offset);
361
+ const defaultOptions = _chunkYSRBE3YIcjs.getSearchSuggestionsOptions.call(void 0, api, query, limit, offset);
466
362
  const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
467
363
  ...defaultOptions,
468
- ...options.queryFn ? { queryFn: options.queryFn } : {},
364
+ ..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _19 => _19.getSearchSuggestions]))) ? { queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getSearchSuggestions(query, limit, offset)))) } : {},
469
365
  enabled
470
366
  });
471
367
  return {
472
- suggestions: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _15 => _15.data]), () => ( [])),
473
- total: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _16 => _16.total]), () => ( 0)),
368
+ suggestions: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _20 => _20.data]), () => ( [])),
369
+ total: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _21 => _21.total]), () => ( 0)),
474
370
  isLoading,
475
371
  error
476
372
  };
@@ -537,17 +433,17 @@ function useCartActions(callbacks) {
537
433
  ]);
538
434
  if (!success) throw new Error("Failed to add item to cart");
539
435
  invalidateCartCache();
540
- if (showToast && _optionalChain([notify, 'optionalAccess', _17 => _17.info])) {
436
+ if (showToast && _optionalChain([notify, 'optionalAccess', _22 => _22.info])) {
541
437
  notify.info(`${item.quantity} x ${itemId || "Item"} added to cart`);
542
438
  }
543
- _optionalChain([onSuccess, 'optionalCall', _18 => _18()]);
439
+ _optionalChain([onSuccess, 'optionalCall', _23 => _23()]);
544
440
  return true;
545
441
  } catch (error) {
546
442
  setCartLines(previousCartLines);
547
- if (showToast && _optionalChain([notify, 'optionalAccess', _19 => _19.error])) {
443
+ if (showToast && _optionalChain([notify, 'optionalAccess', _24 => _24.error])) {
548
444
  notify.error("Failed to add item to cart. Please try again.");
549
445
  }
550
- _optionalChain([onError, 'optionalCall', _20 => _20(error)]);
446
+ _optionalChain([onError, 'optionalCall', _25 => _25(error)]);
551
447
  return false;
552
448
  }
553
449
  },
@@ -566,14 +462,14 @@ function useCartActions(callbacks) {
566
462
  const success = await callbacks.updateCartLines(uid, updatedLines);
567
463
  if (!success) throw new Error("Failed to update quantity");
568
464
  invalidateCartCache();
569
- _optionalChain([onSuccess, 'optionalCall', _21 => _21()]);
465
+ _optionalChain([onSuccess, 'optionalCall', _26 => _26()]);
570
466
  return true;
571
467
  } catch (error) {
572
468
  setCartLines(previousCartLines);
573
- if (showToast && _optionalChain([notify, 'optionalAccess', _22 => _22.error])) {
469
+ if (showToast && _optionalChain([notify, 'optionalAccess', _27 => _27.error])) {
574
470
  notify.error("Failed to update quantity. Please try again.");
575
471
  }
576
- _optionalChain([onError, 'optionalCall', _23 => _23(error)]);
472
+ _optionalChain([onError, 'optionalCall', _28 => _28(error)]);
577
473
  return false;
578
474
  }
579
475
  },
@@ -592,17 +488,17 @@ function useCartActions(callbacks) {
592
488
  const success = await callbacks.updateCartLines(uid, zeroedLines);
593
489
  if (!success) throw new Error("Failed to remove item");
594
490
  invalidateCartCache();
595
- if (showToast && _optionalChain([notify, 'optionalAccess', _24 => _24.info])) {
491
+ if (showToast && _optionalChain([notify, 'optionalAccess', _29 => _29.info])) {
596
492
  notify.info(`${itemId || "Item"} removed from cart`);
597
493
  }
598
- _optionalChain([onSuccess, 'optionalCall', _25 => _25()]);
494
+ _optionalChain([onSuccess, 'optionalCall', _30 => _30()]);
599
495
  return true;
600
496
  } catch (error) {
601
497
  setCartLines(previousCartLines);
602
- if (showToast && _optionalChain([notify, 'optionalAccess', _26 => _26.error])) {
498
+ if (showToast && _optionalChain([notify, 'optionalAccess', _31 => _31.error])) {
603
499
  notify.error("Failed to remove item. Please try again.");
604
500
  }
605
- _optionalChain([onError, 'optionalCall', _27 => _27(error)]);
501
+ _optionalChain([onError, 'optionalCall', _32 => _32(error)]);
606
502
  return false;
607
503
  }
608
504
  },
@@ -618,17 +514,17 @@ function useCartActions(callbacks) {
618
514
  const success = await callbacks.deleteItemsFromCart(uid);
619
515
  if (!success) throw new Error("Failed to clear cart");
620
516
  invalidateCartCache();
621
- if (showToast && _optionalChain([notify, 'optionalAccess', _28 => _28.info])) {
517
+ if (showToast && _optionalChain([notify, 'optionalAccess', _33 => _33.info])) {
622
518
  notify.info("Cart cleared");
623
519
  }
624
- _optionalChain([onSuccess, 'optionalCall', _29 => _29()]);
520
+ _optionalChain([onSuccess, 'optionalCall', _34 => _34()]);
625
521
  return true;
626
522
  } catch (error) {
627
523
  setCartLines(previousCartLines);
628
- if (showToast && _optionalChain([notify, 'optionalAccess', _30 => _30.error])) {
524
+ if (showToast && _optionalChain([notify, 'optionalAccess', _35 => _35.error])) {
629
525
  notify.error("Failed to clear cart. Please try again.");
630
526
  }
631
- _optionalChain([onError, 'optionalCall', _31 => _31(error)]);
527
+ _optionalChain([onError, 'optionalCall', _36 => _36(error)]);
632
528
  return false;
633
529
  }
634
530
  },
@@ -642,7 +538,7 @@ function useCartActions(callbacks) {
642
538
  );
643
539
  const getItemQuantity = _react.useCallback.call(void 0,
644
540
  (invMastUid) => {
645
- return _nullishCoalesce(_optionalChain([cartLines, 'access', _32 => _32.find, 'call', _33 => _33((line) => line.invMastUid === invMastUid), 'optionalAccess', _34 => _34.quantity]), () => ( 0));
541
+ return _nullishCoalesce(_optionalChain([cartLines, 'access', _37 => _37.find, 'call', _38 => _38((line) => line.invMastUid === invMastUid), 'optionalAccess', _39 => _39.quantity]), () => ( 0));
646
542
  },
647
543
  [cartLines]
648
544
  );
@@ -662,34 +558,42 @@ function useCartActions(callbacks) {
662
558
  // src/hooks/use-cart-initialization.ts
663
559
 
664
560
 
665
-
561
+ var _augurutils = require('@simpleapps-com/augur-utils');
666
562
  var MAX_RETRY_ATTEMPTS = 7;
667
563
  var RETRY_DELAY_MS = 1e3;
668
564
  function useCartInitialization(session, callbacks) {
565
+ const auth = useAugurAuth();
669
566
  const cartHdrUid = useCartHdrUid();
670
567
  const setCartHdrUid = useSetCartHdrUid();
671
568
  const setCartLines = useSetCartLines();
672
569
  const clearCart = useClearCart();
673
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
+ );
674
578
  const retryCountRef = _react.useRef.call(void 0, 0);
675
579
  const isInitializingRef = _react.useRef.call(void 0, false);
676
- const prevStatusRef = _react.useRef.call(void 0, session.status);
580
+ const prevStatusRef = _react.useRef.call(void 0, effectiveSession.status);
677
581
  _react.useEffect.call(void 0, () => {
678
582
  const prevStatus = prevStatusRef.current;
679
- prevStatusRef.current = session.status;
680
- if (prevStatus === "authenticated" && session.status === "unauthenticated") {
583
+ prevStatusRef.current = effectiveSession.status;
584
+ if (prevStatus === "authenticated" && effectiveSession.status === "unauthenticated") {
681
585
  clearCart();
682
586
  queryClient.removeQueries({ queryKey: ["cartLines"] });
683
587
  queryClient.removeQueries({ queryKey: ["cart-also-bought"] });
684
588
  }
685
- }, [session.status, clearCart, queryClient]);
589
+ }, [effectiveSession.status, clearCart, queryClient]);
686
590
  _react.useEffect.call(void 0, () => {
687
- if (cartHdrUid || session.status === "loading") return;
688
- if (session.cartHdrUid && session.status === "authenticated") {
689
- setCartHdrUid(session.cartHdrUid);
591
+ if (cartHdrUid || effectiveSession.status === "loading") return;
592
+ if (effectiveSession.cartHdrUid && effectiveSession.status === "authenticated") {
593
+ setCartHdrUid(effectiveSession.cartHdrUid);
690
594
  return;
691
595
  }
692
- if (session.status === "unauthenticated" && !isInitializingRef.current) {
596
+ if (effectiveSession.status === "unauthenticated" && !isInitializingRef.current) {
693
597
  isInitializingRef.current = true;
694
598
  retryCountRef.current = 0;
695
599
  const initializeGuestCart = async () => {
@@ -734,10 +638,10 @@ function useCartInitialization(session, callbacks) {
734
638
  };
735
639
  initializeGuestCart();
736
640
  }
737
- }, [session, cartHdrUid, setCartHdrUid, callbacks]);
641
+ }, [effectiveSession, cartHdrUid, setCartHdrUid, callbacks]);
738
642
  const { data: cartLinesData } = _reactquery.useQuery.call(void 0, {
739
643
  queryKey: ["cartLines", cartHdrUid],
740
- queryFn: () => callbacks.getCartLines(Number(cartHdrUid)),
644
+ queryFn: async () => await _asyncNullishCoalesce(await callbacks.getCartLines(Number(cartHdrUid)), async () => ( [])),
741
645
  enabled: !!cartHdrUid,
742
646
  ..._augurutils.CACHE_CONFIG.CART
743
647
  });
@@ -758,19 +662,29 @@ function useCartInitialization(session, callbacks) {
758
662
 
759
663
  function useCartPricing(options = {}) {
760
664
  const api = useAugurApi();
665
+ const callbacks = useAugurCallbacks();
666
+ const auth = useAugurAuth();
761
667
  const cartLines = useCartLines();
762
- const { customerId } = options;
668
+ const customerId = _nullishCoalesce(options.customerId, () => ( _optionalChain([auth, 'optionalAccess', _42 => _42.customerId])));
669
+ const priceFn = _nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _43 => _43.getItemPrice])));
763
670
  const priceQueries = _reactquery.useQueries.call(void 0, {
764
- queries: cartLines.map((line) => ({
765
- ...getItemPriceOptions(api, line.itemId, customerId, line.quantity),
766
- enabled: !!customerId && !!line.itemId
767
- }))
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
+ })
768
682
  });
769
683
  const prices = _react.useMemo.call(void 0, () => {
770
684
  const map = {};
771
685
  cartLines.forEach((line, index) => {
772
686
  const queryResult = priceQueries[index];
773
- if (_optionalChain([queryResult, 'optionalAccess', _35 => _35.data])) {
687
+ if (_optionalChain([queryResult, 'optionalAccess', _44 => _44.data])) {
774
688
  map[line.itemId.toUpperCase()] = {
775
689
  unitPrice: _nullishCoalesce(queryResult.data.unitPrice, () => ( 0)),
776
690
  priceData: queryResult.data
@@ -781,7 +695,7 @@ function useCartPricing(options = {}) {
781
695
  }, [cartLines, priceQueries]);
782
696
  const getUnitPrice = _react.useMemo.call(void 0, () => {
783
697
  return (itemId) => {
784
- return _nullishCoalesce(_optionalChain([prices, 'access', _36 => _36[_optionalChain([itemId, 'optionalAccess', _37 => _37.toUpperCase, 'call', _38 => _38()])], 'optionalAccess', _39 => _39.unitPrice]), () => ( 0));
698
+ return _nullishCoalesce(_optionalChain([prices, 'access', _45 => _45[_optionalChain([itemId, 'optionalAccess', _46 => _46.toUpperCase, 'call', _47 => _47()])], 'optionalAccess', _48 => _48.unitPrice]), () => ( 0));
785
699
  };
786
700
  }, [prices]);
787
701
  const getItemTotal = _react.useMemo.call(void 0, () => {
@@ -791,7 +705,7 @@ function useCartPricing(options = {}) {
791
705
  }, [getUnitPrice]);
792
706
  const subtotal = _react.useMemo.call(void 0, () => {
793
707
  return cartLines.reduce((sum, line) => {
794
- const unitPrice = _nullishCoalesce(_optionalChain([prices, 'access', _40 => _40[line.itemId.toUpperCase()], 'optionalAccess', _41 => _41.unitPrice]), () => ( 0));
708
+ const unitPrice = _nullishCoalesce(_optionalChain([prices, 'access', _49 => _49[line.itemId.toUpperCase()], 'optionalAccess', _50 => _50.unitPrice]), () => ( 0));
795
709
  return sum + unitPrice * line.quantity;
796
710
  }, 0);
797
711
  }, [cartLines, prices]);
@@ -808,12 +722,6 @@ function useCartPricing(options = {}) {
808
722
  isError
809
723
  };
810
724
  }
811
- function getCartPricingQueryOptions(api, cartLines, customerId) {
812
- return cartLines.map((line) => ({
813
- ...getItemPriceOptions(api, line.itemId, customerId, line.quantity),
814
- enabled: !!customerId && !!line.itemId
815
- }));
816
- }
817
725
 
818
726
  // src/hooks/use-pagination-prefetch.ts
819
727
 
@@ -859,86 +767,51 @@ var usePaginationPrefetch = ({
859
767
 
860
768
  // src/hooks/use-category-items-infinite.ts
861
769
 
862
-
863
-
864
-
865
- var getCategoryItemsInfiniteKey = (itemCategoryUid, itemsFilters) => {
866
- return [
867
- "categoryItemsInfinite",
868
- itemCategoryUid,
869
- JSON.stringify(itemsFilters)
870
- ];
871
- };
872
770
  function useCategoryItemsInfinite(itemCategoryUid, itemsFilters, options = {}) {
873
771
  const api = useAugurApi();
772
+ const callbacks = useAugurCallbacks();
874
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)));
875
786
  return _reactquery.useInfiniteQuery.call(void 0, {
876
- queryKey: getCategoryItemsInfiniteKey(itemCategoryUid, itemsFilters),
877
- queryFn: async ({ pageParam = 0 }) => {
878
- const response = await api.openSearch.itemSearch.list({
879
- q: itemsFilters.q || "",
880
- searchType: "query",
881
- size: itemsFilters.limit,
882
- from: pageParam,
883
- classId5List: String(itemCategoryUid),
884
- filters: _optionalChain([itemsFilters, 'access', _42 => _42.filters, 'optionalAccess', _43 => _43.length]) ? JSON.stringify(itemsFilters.filters) : void 0
885
- });
886
- const items = _nullishCoalesce(_optionalChain([response, 'access', _44 => _44.data, 'optionalAccess', _45 => _45.items]), () => ( []));
887
- const total = _nullishCoalesce(_optionalChain([response, 'access', _46 => _46.data, 'optionalAccess', _47 => _47.totalResults]), () => ( 0));
888
- const nextOffset = pageParam + itemsFilters.limit;
889
- return {
890
- data: items,
891
- total,
892
- nextCursor: nextOffset < total ? nextOffset : void 0
893
- };
894
- },
895
- initialPageParam: 0,
896
- getNextPageParam: (lastPage) => lastPage.nextCursor,
897
- ..._augurutils.CACHE_CONFIG.SEMI_STATIC,
787
+ ...defaultOptions,
788
+ ...resolvedQueryFn ? { queryFn: resolvedQueryFn } : {},
898
789
  enabled: enabled && !!itemCategoryUid
899
790
  });
900
791
  }
901
792
 
902
793
  // src/hooks/use-item-search-infinite.ts
903
794
 
904
-
905
-
906
-
907
- var getItemSearchInfiniteKey = (itemsFilters, itemCategoryUid) => {
908
- return [
909
- "itemSearchInfinite",
910
- JSON.stringify(itemsFilters),
911
- itemCategoryUid
912
- ];
913
- };
914
795
  function useItemSearchInfinite(itemsFilters, itemCategoryUid, options = {}) {
915
796
  const api = useAugurApi();
797
+ const callbacks = useAugurCallbacks();
916
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)));
917
811
  return _reactquery.useInfiniteQuery.call(void 0, {
918
- queryKey: getItemSearchInfiniteKey(itemsFilters, itemCategoryUid),
919
- queryFn: async ({ pageParam = 0 }) => {
920
- const response = await api.openSearch.itemSearch.list({
921
- q: itemsFilters.q,
922
- searchType: "query",
923
- size: itemsFilters.limit,
924
- from: pageParam,
925
- classId5List: itemCategoryUid ? String(itemCategoryUid) : void 0,
926
- filters: _optionalChain([itemsFilters, 'access', _48 => _48.filters, 'optionalAccess', _49 => _49.length]) ? JSON.stringify(itemsFilters.filters) : void 0
927
- });
928
- const items = _nullishCoalesce(_optionalChain([response, 'access', _50 => _50.data, 'optionalAccess', _51 => _51.items]), () => ( []));
929
- const total = _nullishCoalesce(_optionalChain([response, 'access', _52 => _52.data, 'optionalAccess', _53 => _53.totalResults]), () => ( 0));
930
- const nextOffset = pageParam + itemsFilters.limit;
931
- return {
932
- data: items,
933
- total,
934
- nextCursor: nextOffset < total ? nextOffset : void 0
935
- };
936
- },
937
- initialPageParam: 0,
938
- getNextPageParam: (lastPage) => lastPage.nextCursor,
939
- ..._augurutils.CACHE_CONFIG.SEMI_STATIC,
940
- enabled: enabled && !!itemsFilters.q,
941
- meta: { persist: true }
812
+ ...defaultOptions,
813
+ ...resolvedQueryFn ? { queryFn: resolvedQueryFn } : {},
814
+ enabled: enabled && !!itemsFilters.q
942
815
  });
943
816
  }
944
817
 
@@ -997,5 +870,9 @@ function useItemSearchInfinite(itemsFilters, itemCategoryUid, options = {}) {
997
870
 
998
871
 
999
872
 
1000
- exports.AugurHooksProvider = AugurHooksProvider; exports.CATEGORY_CACHE_OPTIONS = CATEGORY_CACHE_OPTIONS; exports.INV_MAST_CACHE_OPTIONS = INV_MAST_CACHE_OPTIONS; exports.INV_MAST_DOC_CACHE_OPTIONS = INV_MAST_DOC_CACHE_OPTIONS; exports.PRICE_CACHE_OPTIONS = PRICE_CACHE_OPTIONS; exports.getCartPricingQueryOptions = getCartPricingQueryOptions; exports.getCategoryItemsInfiniteKey = getCategoryItemsInfiniteKey; exports.getInvMastDocKey = getInvMastDocKey; exports.getInvMastDocOptions = getInvMastDocOptions; exports.getInvMastKey = getInvMastKey; exports.getInvMastOptions = getInvMastOptions; exports.getInvMastStockKey = getInvMastStockKey; exports.getInvMastStockOptions = getInvMastStockOptions; exports.getItemAttributesKey = getItemAttributesKey; exports.getItemAttributesOptions = getItemAttributesOptions; exports.getItemCategoryKey = getItemCategoryKey; exports.getItemCategoryOptions = getItemCategoryOptions; exports.getItemDetailsKey = getItemDetailsKey; exports.getItemDetailsOptions = getItemDetailsOptions; exports.getItemPriceKey = getItemPriceKey; exports.getItemPriceOptions = getItemPriceOptions; exports.getItemSearchInfiniteKey = getItemSearchInfiniteKey; exports.getProductCategoryKey = getProductCategoryKey; exports.getProductCategoryOptions = getProductCategoryOptions; exports.getProductSearchKey = getProductSearchKey; exports.getProductSearchOptions = getProductSearchOptions; exports.getSearchSuggestionsKey = getSearchSuggestionsKey; exports.getSearchSuggestionsOptions = getSearchSuggestionsOptions; exports.useAugurApi = useAugurApi; 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;
873
+
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;
1001
878
  //# sourceMappingURL=index.cjs.map