@simpleapps-com/augur-hooks 2.0.3 → 2.0.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/{chunk-CQ3BRHK2.cjs → chunk-H7OXSAHP.cjs} +31 -41
- package/dist/chunk-H7OXSAHP.cjs.map +1 -0
- package/dist/{chunk-4RSFZ6WY.js → chunk-QFZHOGID.js} +31 -41
- package/dist/chunk-QFZHOGID.js.map +1 -0
- package/dist/{customer-quotes-DIpZNjT1.d.ts → customer-quotes-BQYqzomR.d.cts} +15 -48
- package/dist/{customer-quotes-DIpZNjT1.d.cts → customer-quotes-BQYqzomR.d.ts} +15 -48
- package/dist/index.cjs +180 -155
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +49 -28
- package/dist/index.d.ts +49 -28
- package/dist/index.js +99 -74
- package/dist/index.js.map +1 -1
- package/dist/server.cjs +2 -2
- package/dist/server.d.cts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +1 -1
- package/dist/web.cjs +1 -12
- package/dist/web.cjs.map +1 -1
- package/dist/web.js +2 -13
- package/dist/web.js.map +1 -1
- package/package.json +4 -4
- package/dist/chunk-4RSFZ6WY.js.map +0 -1
- package/dist/chunk-CQ3BRHK2.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
var
|
|
46
|
+
var _chunkH7OXSAHPcjs = require('./chunk-H7OXSAHP.cjs');
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
var _chunkAXCNTEABcjs = require('./chunk-AXCNTEAB.cjs');
|
|
@@ -53,12 +53,8 @@ var _react = require('react');
|
|
|
53
53
|
var _augurcore = require('@simpleapps-com/augur-core');
|
|
54
54
|
var _jsxruntime = require('react/jsx-runtime');
|
|
55
55
|
var AugurApiContext = _react.createContext.call(void 0, null);
|
|
56
|
-
var AugurCallbacksContext = _react.createContext.call(void 0,
|
|
57
|
-
|
|
58
|
-
);
|
|
59
|
-
var AugurAuthReactContext = _react.createContext.call(void 0,
|
|
60
|
-
void 0
|
|
61
|
-
);
|
|
56
|
+
var AugurCallbacksContext = _react.createContext.call(void 0, void 0);
|
|
57
|
+
var AugurAuthReactContext = _react.createContext.call(void 0, void 0);
|
|
62
58
|
var AugurCacheContext = _react.createContext.call(void 0, void 0);
|
|
63
59
|
var AugurOptionsContext = _react.createContext.call(void 0, null);
|
|
64
60
|
var AugurSiteContext = _react.createContext.call(void 0, void 0);
|
|
@@ -70,7 +66,7 @@ function AugurHooksProvider({
|
|
|
70
66
|
site,
|
|
71
67
|
children
|
|
72
68
|
}) {
|
|
73
|
-
if (process.env
|
|
69
|
+
if (process.env["NODE_ENV"] === "development" && !api && !callbacks) {
|
|
74
70
|
console.warn(
|
|
75
71
|
"AugurHooksProvider: neither `api` nor `callbacks` provided. Hooks will fail at runtime unless every hook receives a queryFn override."
|
|
76
72
|
);
|
|
@@ -129,10 +125,7 @@ var useCartStore = _zustand.create.call(void 0, )(
|
|
|
129
125
|
cartLineCount: 0,
|
|
130
126
|
setCartHdrUid: (cartHdrUid) => set({ cartHdrUid }, false, "setCartHdrUid"),
|
|
131
127
|
setCartLines: (cartLines) => {
|
|
132
|
-
const cartQuantityTotal = cartLines.reduce(
|
|
133
|
-
(sum, line) => sum + (line.quantity || 0),
|
|
134
|
-
0
|
|
135
|
-
);
|
|
128
|
+
const cartQuantityTotal = cartLines.reduce((sum, line) => sum + (line.quantity || 0), 0);
|
|
136
129
|
const cartLineCount = cartLines.length;
|
|
137
130
|
set({ cartLines, cartQuantityTotal, cartLineCount }, false, "setCartLines");
|
|
138
131
|
},
|
|
@@ -142,7 +135,7 @@ var useCartStore = _zustand.create.call(void 0, )(
|
|
|
142
135
|
"clearCart"
|
|
143
136
|
)
|
|
144
137
|
}),
|
|
145
|
-
{ name: "CartStore", enabled: process.env
|
|
138
|
+
{ name: "CartStore", enabled: process.env["NODE_ENV"] === "development" }
|
|
146
139
|
)
|
|
147
140
|
);
|
|
148
141
|
var useCartHdrUid = () => useCartStore((s) => s.cartHdrUid);
|
|
@@ -173,7 +166,7 @@ var useItemFiltersStore = _zustand.create.call(void 0, )(
|
|
|
173
166
|
}),
|
|
174
167
|
{
|
|
175
168
|
name: "ItemsFiltersStore",
|
|
176
|
-
enabled: process.env
|
|
169
|
+
enabled: process.env["NODE_ENV"] === "development"
|
|
177
170
|
}
|
|
178
171
|
)
|
|
179
172
|
);
|
|
@@ -211,7 +204,12 @@ function resolveFormatting(opts, siteFormatting) {
|
|
|
211
204
|
function useFormatPrice(optionsOrLocale, legacyCurrency) {
|
|
212
205
|
const site = useAugurSite();
|
|
213
206
|
const opts = normaliseOptions(optionsOrLocale, legacyCurrency);
|
|
214
|
-
const {
|
|
207
|
+
const {
|
|
208
|
+
locale,
|
|
209
|
+
currency,
|
|
210
|
+
precision: basePrecision,
|
|
211
|
+
zeroLabel
|
|
212
|
+
} = resolveFormatting(opts, _optionalChain([site, 'optionalAccess', _5 => _5.formatting]));
|
|
215
213
|
const formatPrice = (price, callOptions) => {
|
|
216
214
|
const effectiveValue = price * (_nullishCoalesce(_optionalChain([callOptions, 'optionalAccess', _6 => _6.quantity]), () => ( 1)));
|
|
217
215
|
if (effectiveValue === 0 && zeroLabel !== void 0) {
|
|
@@ -239,7 +237,7 @@ function useItemPrice(itemId, customerId, quantity = 1, options = {}) {
|
|
|
239
237
|
const cache = useAugurCache();
|
|
240
238
|
const site = useAugurSite();
|
|
241
239
|
const effectiveCustomerId = _nullishCoalesce(_nullishCoalesce(customerId, () => ( _optionalChain([auth, 'optionalAccess', _8 => _8.customerId]))), () => ( _optionalChain([site, 'optionalAccess', _9 => _9.defaults, 'optionalAccess', _10 => _10.customerId])));
|
|
242
|
-
const defaultOptions =
|
|
240
|
+
const defaultOptions = _chunkH7OXSAHPcjs.getItemPriceOptions.call(void 0, api, itemId, effectiveCustomerId, quantity, cache);
|
|
243
241
|
const resolvedQueryFn = _nullishCoalesce(options.queryFn, () => ( (_optionalChain([callbacks, 'optionalAccess', _11 => _11.getItemPrice]) ? () => callbacks.getItemPrice(itemId, effectiveCustomerId, quantity) : void 0)));
|
|
244
242
|
const query = _reactquery.useQuery.call(void 0, {
|
|
245
243
|
...defaultOptions,
|
|
@@ -260,7 +258,7 @@ function useInvMastDoc(invMastUid, itemId, options = {}) {
|
|
|
260
258
|
const api = useAugurApiOptional();
|
|
261
259
|
const callbacks = useAugurCallbacks();
|
|
262
260
|
const cache = useAugurCache();
|
|
263
|
-
const queryOpts =
|
|
261
|
+
const queryOpts = _chunkH7OXSAHPcjs.getInvMastDocOptions.call(void 0,
|
|
264
262
|
api,
|
|
265
263
|
invMastUid,
|
|
266
264
|
itemId,
|
|
@@ -269,7 +267,9 @@ function useInvMastDoc(invMastUid, itemId, options = {}) {
|
|
|
269
267
|
);
|
|
270
268
|
const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
|
|
271
269
|
...queryOpts,
|
|
272
|
-
..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _12 => _12.getInvMastDoc]))) ? {
|
|
270
|
+
..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _12 => _12.getInvMastDoc]))) ? {
|
|
271
|
+
queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getInvMastDoc(invMastUid, itemId, _nullishCoalesce(options.includePricing, () => ( "N"))))))
|
|
272
|
+
} : {},
|
|
273
273
|
enabled: _nullishCoalesce(options.enabled, () => ( true)),
|
|
274
274
|
initialData: options.initialData
|
|
275
275
|
});
|
|
@@ -282,15 +282,12 @@ function useItemCategory(itemCategoryUid, options = {}) {
|
|
|
282
282
|
const api = useAugurApiOptional();
|
|
283
283
|
const callbacks = useAugurCallbacks();
|
|
284
284
|
const cache = useAugurCache();
|
|
285
|
-
const queryOpts =
|
|
286
|
-
api,
|
|
287
|
-
itemCategoryUid,
|
|
288
|
-
options.apiOptions,
|
|
289
|
-
cache
|
|
290
|
-
);
|
|
285
|
+
const queryOpts = _chunkH7OXSAHPcjs.getItemCategoryOptions.call(void 0, api, itemCategoryUid, options.apiOptions, cache);
|
|
291
286
|
const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
|
|
292
287
|
...queryOpts,
|
|
293
|
-
..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _13 => _13.getItemCategory]))) ? {
|
|
288
|
+
..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _13 => _13.getItemCategory]))) ? {
|
|
289
|
+
queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getItemCategory(itemCategoryUid, options.apiOptions))))
|
|
290
|
+
} : {},
|
|
294
291
|
enabled: _nullishCoalesce(options.enabled, () => ( true))
|
|
295
292
|
});
|
|
296
293
|
return { category: data, isLoading, error };
|
|
@@ -302,7 +299,7 @@ function useInvMast(invMastUid, itemId, options = {}) {
|
|
|
302
299
|
const api = useAugurApiOptional();
|
|
303
300
|
const callbacks = useAugurCallbacks();
|
|
304
301
|
const cache = useAugurCache();
|
|
305
|
-
const queryOpts =
|
|
302
|
+
const queryOpts = _chunkH7OXSAHPcjs.getInvMastOptions.call(void 0, api, invMastUid, itemId, cache);
|
|
306
303
|
const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
|
|
307
304
|
...queryOpts,
|
|
308
305
|
..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _14 => _14.getInvMast]))) ? { queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getInvMast(invMastUid, itemId)))) } : {},
|
|
@@ -317,7 +314,7 @@ function useInvMastStock(invMastUid, options = {}) {
|
|
|
317
314
|
const api = useAugurApiOptional();
|
|
318
315
|
const callbacks = useAugurCallbacks();
|
|
319
316
|
const cache = useAugurCache();
|
|
320
|
-
const queryOpts =
|
|
317
|
+
const queryOpts = _chunkH7OXSAHPcjs.getInvMastStockOptions.call(void 0, api, invMastUid, cache);
|
|
321
318
|
const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
|
|
322
319
|
...queryOpts,
|
|
323
320
|
..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _15 => _15.getInvMastStock]))) ? { queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getInvMastStock(invMastUid)))) } : {},
|
|
@@ -342,7 +339,7 @@ function useStock(invMastUid, options = {}) {
|
|
|
342
339
|
const api = useAugurApiOptional();
|
|
343
340
|
const callbacks = useAugurCallbacks();
|
|
344
341
|
const cache = useAugurCache();
|
|
345
|
-
const queryOpts =
|
|
342
|
+
const queryOpts = _chunkH7OXSAHPcjs.getStockOptions.call(void 0, api, invMastUid, cache);
|
|
346
343
|
const resolvedQueryFn = _nullishCoalesce(options.queryFn, () => ( (_optionalChain([callbacks, 'optionalAccess', _16 => _16.getStock]) ? () => callbacks.getStock(invMastUid) : void 0)));
|
|
347
344
|
const query = _reactquery.useQuery.call(void 0, {
|
|
348
345
|
...queryOpts,
|
|
@@ -361,7 +358,13 @@ function useStock(invMastUid, options = {}) {
|
|
|
361
358
|
lowStockThreshold: options.lowStockThreshold,
|
|
362
359
|
showQuantity: options.showQuantity
|
|
363
360
|
}),
|
|
364
|
-
[
|
|
361
|
+
[
|
|
362
|
+
query.data,
|
|
363
|
+
options.companyKey,
|
|
364
|
+
options.round,
|
|
365
|
+
options.lowStockThreshold,
|
|
366
|
+
options.showQuantity
|
|
367
|
+
]
|
|
365
368
|
);
|
|
366
369
|
return {
|
|
367
370
|
stock: _nullishCoalesce(query.data, () => ( null)),
|
|
@@ -379,7 +382,7 @@ function useBatchInvMastDoc(params, options = {}) {
|
|
|
379
382
|
const cache = useAugurCache();
|
|
380
383
|
const queryClient = _reactquery.useQueryClient.call(void 0, );
|
|
381
384
|
const includePricing = _nullishCoalesce(options.includePricing, () => ( "N"));
|
|
382
|
-
const batchOpts =
|
|
385
|
+
const batchOpts = _chunkH7OXSAHPcjs.getBatchInvMastDocOptions.call(void 0, api, params, includePricing, cache);
|
|
383
386
|
const resolveFetchItems = (uncached) => {
|
|
384
387
|
if (options.queryFn) {
|
|
385
388
|
return options.queryFn(uncached, includePricing);
|
|
@@ -387,18 +390,18 @@ function useBatchInvMastDoc(params, options = {}) {
|
|
|
387
390
|
if (_optionalChain([callbacks, 'optionalAccess', _17 => _17.batchGetInvMastDocs])) {
|
|
388
391
|
return callbacks.batchGetInvMastDocs(uncached, includePricing);
|
|
389
392
|
}
|
|
390
|
-
const fallbackOpts =
|
|
393
|
+
const fallbackOpts = _chunkH7OXSAHPcjs.getBatchInvMastDocOptions.call(void 0, api, uncached, includePricing, cache);
|
|
391
394
|
return fallbackOpts.queryFn();
|
|
392
395
|
};
|
|
393
396
|
const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
|
|
394
397
|
queryKey: batchOpts.queryKey,
|
|
395
|
-
queryFn: () =>
|
|
398
|
+
queryFn: () => _chunkH7OXSAHPcjs.executeBatchQuery.call(void 0, {
|
|
396
399
|
params,
|
|
397
400
|
queryClient,
|
|
398
|
-
getItemKey: (p) =>
|
|
401
|
+
getItemKey: (p) => _chunkH7OXSAHPcjs.getInvMastDocKey.call(void 0, p.invMastUid, p.itemId, includePricing),
|
|
399
402
|
getResultKey: (p) => p.itemId.toUpperCase(),
|
|
400
403
|
fetchItems: resolveFetchItems,
|
|
401
|
-
getSeedKey: (_key, doc) =>
|
|
404
|
+
getSeedKey: (_key, doc) => _chunkH7OXSAHPcjs.getInvMastDocKey.call(void 0, doc.invMastUid, doc.itemId, includePricing)
|
|
402
405
|
}),
|
|
403
406
|
staleTime: batchOpts.staleTime,
|
|
404
407
|
gcTime: batchOpts.gcTime,
|
|
@@ -421,8 +424,8 @@ function useProductCategory(itemCategoryUid, options = {}) {
|
|
|
421
424
|
const api = useAugurApiOptional();
|
|
422
425
|
const callbacks = useAugurCallbacks();
|
|
423
426
|
const cache = useAugurCache();
|
|
424
|
-
const baseOptions = itemCategoryUid ?
|
|
425
|
-
queryKey:
|
|
427
|
+
const baseOptions = itemCategoryUid ? _chunkH7OXSAHPcjs.getProductCategoryOptions.call(void 0, api, itemCategoryUid, cache) : {
|
|
428
|
+
queryKey: _chunkH7OXSAHPcjs.getProductCategoryKey.call(void 0, null),
|
|
426
429
|
/* v8 ignore next */
|
|
427
430
|
queryFn: () => Promise.reject()
|
|
428
431
|
};
|
|
@@ -450,8 +453,8 @@ function useItemDetails(itemId, options = {}) {
|
|
|
450
453
|
const callbacks = useAugurCallbacks();
|
|
451
454
|
const cache = useAugurCache();
|
|
452
455
|
const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
|
|
453
|
-
...itemId ?
|
|
454
|
-
queryKey:
|
|
456
|
+
...itemId ? _chunkH7OXSAHPcjs.getItemDetailsOptions.call(void 0, api, itemId, cache) : {
|
|
457
|
+
queryKey: _chunkH7OXSAHPcjs.getItemDetailsKey.call(void 0, ""),
|
|
455
458
|
/* v8 ignore next */
|
|
456
459
|
queryFn: () => Promise.reject()
|
|
457
460
|
},
|
|
@@ -478,8 +481,8 @@ function useItemAttributes(itemCategoryUid, options = {}) {
|
|
|
478
481
|
const callbacks = useAugurCallbacks();
|
|
479
482
|
const cache = useAugurCache();
|
|
480
483
|
const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
|
|
481
|
-
...itemCategoryUid ?
|
|
482
|
-
queryKey:
|
|
484
|
+
...itemCategoryUid ? _chunkH7OXSAHPcjs.getItemAttributesOptions.call(void 0, api, itemCategoryUid, cache) : {
|
|
485
|
+
queryKey: _chunkH7OXSAHPcjs.getItemAttributesKey.call(void 0, null),
|
|
483
486
|
/* v8 ignore next */
|
|
484
487
|
queryFn: () => Promise.reject()
|
|
485
488
|
},
|
|
@@ -503,7 +506,7 @@ function useProductSearch(pageData, options = {}) {
|
|
|
503
506
|
const api = useAugurApiOptional();
|
|
504
507
|
const callbacks = useAugurCallbacks();
|
|
505
508
|
const cache = useAugurCache();
|
|
506
|
-
const defaultOptions =
|
|
509
|
+
const defaultOptions = _chunkH7OXSAHPcjs.getProductSearchOptions.call(void 0, api, pageData, cache);
|
|
507
510
|
const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
|
|
508
511
|
...defaultOptions,
|
|
509
512
|
..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _27 => _27.getProductSearch]))) ? { queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getProductSearch(pageData)))) } : {},
|
|
@@ -515,6 +518,7 @@ function useProductSearch(pageData, options = {}) {
|
|
|
515
518
|
return {
|
|
516
519
|
productItems: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _28 => _28.items]), () => ( null)),
|
|
517
520
|
total: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _29 => _29.totalResults]), () => ( 0)),
|
|
521
|
+
result: data,
|
|
518
522
|
loading: isLoading,
|
|
519
523
|
error
|
|
520
524
|
};
|
|
@@ -529,15 +533,22 @@ function useSearchSuggestions(query, options = {}) {
|
|
|
529
533
|
const limit = _nullishCoalesce(options.limit, () => ( 10));
|
|
530
534
|
const offset = _nullishCoalesce(options.offset, () => ( 0));
|
|
531
535
|
const enabled = (_nullishCoalesce(options.enabled, () => ( true))) && query.trim().length > 0;
|
|
532
|
-
const defaultOptions =
|
|
536
|
+
const defaultOptions = _chunkH7OXSAHPcjs.getSearchSuggestionsOptions.call(void 0, api, query, limit, offset, cache);
|
|
533
537
|
const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
|
|
534
538
|
...defaultOptions,
|
|
535
|
-
..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _30 => _30.getSearchSuggestions]))) ? {
|
|
539
|
+
..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _30 => _30.getSearchSuggestions]))) ? {
|
|
540
|
+
queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getSearchSuggestions(query, limit, offset))))
|
|
541
|
+
} : {},
|
|
536
542
|
enabled
|
|
537
543
|
});
|
|
538
544
|
return {
|
|
539
545
|
suggestions: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _31 => _31.data]), () => ( [])),
|
|
540
546
|
total: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _32 => _32.total]), () => ( 0)),
|
|
547
|
+
count: _optionalChain([data, 'optionalAccess', _33 => _33.count]),
|
|
548
|
+
totalResults: _optionalChain([data, 'optionalAccess', _34 => _34.totalResults]),
|
|
549
|
+
message: _optionalChain([data, 'optionalAccess', _35 => _35.message]),
|
|
550
|
+
status: _optionalChain([data, 'optionalAccess', _36 => _36.status]),
|
|
551
|
+
result: data,
|
|
541
552
|
isLoading,
|
|
542
553
|
error
|
|
543
554
|
};
|
|
@@ -552,9 +563,7 @@ function requireCartUid(cartHdrUid) {
|
|
|
552
563
|
return num;
|
|
553
564
|
}
|
|
554
565
|
function buildOptimisticAdd(cartLines, item, cartHdrUid, itemId) {
|
|
555
|
-
const existingIndex = cartLines.findIndex(
|
|
556
|
-
(line) => line.invMastUid === item.invMastUid
|
|
557
|
-
);
|
|
566
|
+
const existingIndex = cartLines.findIndex((line) => line.invMastUid === item.invMastUid);
|
|
558
567
|
if (existingIndex >= 0) {
|
|
559
568
|
return cartLines.map(
|
|
560
569
|
(line, index) => index === existingIndex ? { ...line, quantity: line.quantity + item.quantity } : line
|
|
@@ -582,8 +591,8 @@ function useCartActions(callbacks) {
|
|
|
582
591
|
const setCartLines = useSetCartLines();
|
|
583
592
|
const notify = callbacks.toast;
|
|
584
593
|
const invalidateCartCache = _react.useCallback.call(void 0, () => {
|
|
585
|
-
queryClient.invalidateQueries({ queryKey: ["cartLines", cartHdrUid] });
|
|
586
|
-
queryClient.invalidateQueries({
|
|
594
|
+
void queryClient.invalidateQueries({ queryKey: ["cartLines", cartHdrUid] });
|
|
595
|
+
void queryClient.invalidateQueries({
|
|
587
596
|
queryKey: ["cart-also-bought", cartHdrUid]
|
|
588
597
|
});
|
|
589
598
|
}, [queryClient, cartHdrUid]);
|
|
@@ -604,17 +613,17 @@ function useCartActions(callbacks) {
|
|
|
604
613
|
]);
|
|
605
614
|
if (!success) throw new Error("Failed to add item to cart");
|
|
606
615
|
invalidateCartCache();
|
|
607
|
-
if (showToast && _optionalChain([notify, 'optionalAccess',
|
|
616
|
+
if (showToast && _optionalChain([notify, 'optionalAccess', _37 => _37.info])) {
|
|
608
617
|
notify.info(`${item.quantity} x ${itemId || "Item"} added to cart`);
|
|
609
618
|
}
|
|
610
|
-
_optionalChain([onSuccess, 'optionalCall',
|
|
619
|
+
_optionalChain([onSuccess, 'optionalCall', _38 => _38()]);
|
|
611
620
|
return true;
|
|
612
621
|
} catch (error) {
|
|
613
622
|
setCartLines(previousCartLines);
|
|
614
|
-
if (showToast && _optionalChain([notify, 'optionalAccess',
|
|
623
|
+
if (showToast && _optionalChain([notify, 'optionalAccess', _39 => _39.error])) {
|
|
615
624
|
notify.error("Failed to add item to cart. Please try again.");
|
|
616
625
|
}
|
|
617
|
-
_optionalChain([onError, 'optionalCall',
|
|
626
|
+
_optionalChain([onError, 'optionalCall', _40 => _40(error)]);
|
|
618
627
|
return false;
|
|
619
628
|
}
|
|
620
629
|
},
|
|
@@ -633,14 +642,14 @@ function useCartActions(callbacks) {
|
|
|
633
642
|
const success = await callbacks.updateCartLines(uid, updatedLines);
|
|
634
643
|
if (!success) throw new Error("Failed to update quantity");
|
|
635
644
|
invalidateCartCache();
|
|
636
|
-
_optionalChain([onSuccess, 'optionalCall',
|
|
645
|
+
_optionalChain([onSuccess, 'optionalCall', _41 => _41()]);
|
|
637
646
|
return true;
|
|
638
647
|
} catch (error) {
|
|
639
648
|
setCartLines(previousCartLines);
|
|
640
|
-
if (showToast && _optionalChain([notify, 'optionalAccess',
|
|
649
|
+
if (showToast && _optionalChain([notify, 'optionalAccess', _42 => _42.error])) {
|
|
641
650
|
notify.error("Failed to update quantity. Please try again.");
|
|
642
651
|
}
|
|
643
|
-
_optionalChain([onError, 'optionalCall',
|
|
652
|
+
_optionalChain([onError, 'optionalCall', _43 => _43(error)]);
|
|
644
653
|
return false;
|
|
645
654
|
}
|
|
646
655
|
},
|
|
@@ -659,17 +668,17 @@ function useCartActions(callbacks) {
|
|
|
659
668
|
const success = await callbacks.updateCartLines(uid, zeroedLines);
|
|
660
669
|
if (!success) throw new Error("Failed to remove item");
|
|
661
670
|
invalidateCartCache();
|
|
662
|
-
if (showToast && _optionalChain([notify, 'optionalAccess',
|
|
671
|
+
if (showToast && _optionalChain([notify, 'optionalAccess', _44 => _44.info])) {
|
|
663
672
|
notify.info(`${itemId || "Item"} removed from cart`);
|
|
664
673
|
}
|
|
665
|
-
_optionalChain([onSuccess, 'optionalCall',
|
|
674
|
+
_optionalChain([onSuccess, 'optionalCall', _45 => _45()]);
|
|
666
675
|
return true;
|
|
667
676
|
} catch (error) {
|
|
668
677
|
setCartLines(previousCartLines);
|
|
669
|
-
if (showToast && _optionalChain([notify, 'optionalAccess',
|
|
678
|
+
if (showToast && _optionalChain([notify, 'optionalAccess', _46 => _46.error])) {
|
|
670
679
|
notify.error("Failed to remove item. Please try again.");
|
|
671
680
|
}
|
|
672
|
-
_optionalChain([onError, 'optionalCall',
|
|
681
|
+
_optionalChain([onError, 'optionalCall', _47 => _47(error)]);
|
|
673
682
|
return false;
|
|
674
683
|
}
|
|
675
684
|
},
|
|
@@ -685,17 +694,17 @@ function useCartActions(callbacks) {
|
|
|
685
694
|
const success = await callbacks.deleteItemsFromCart(uid);
|
|
686
695
|
if (!success) throw new Error("Failed to clear cart");
|
|
687
696
|
invalidateCartCache();
|
|
688
|
-
if (showToast && _optionalChain([notify, 'optionalAccess',
|
|
697
|
+
if (showToast && _optionalChain([notify, 'optionalAccess', _48 => _48.info])) {
|
|
689
698
|
notify.info("Cart cleared");
|
|
690
699
|
}
|
|
691
|
-
_optionalChain([onSuccess, 'optionalCall',
|
|
700
|
+
_optionalChain([onSuccess, 'optionalCall', _49 => _49()]);
|
|
692
701
|
return true;
|
|
693
702
|
} catch (error) {
|
|
694
703
|
setCartLines(previousCartLines);
|
|
695
|
-
if (showToast && _optionalChain([notify, 'optionalAccess',
|
|
704
|
+
if (showToast && _optionalChain([notify, 'optionalAccess', _50 => _50.error])) {
|
|
696
705
|
notify.error("Failed to clear cart. Please try again.");
|
|
697
706
|
}
|
|
698
|
-
_optionalChain([onError, 'optionalCall',
|
|
707
|
+
_optionalChain([onError, 'optionalCall', _51 => _51(error)]);
|
|
699
708
|
return false;
|
|
700
709
|
}
|
|
701
710
|
},
|
|
@@ -709,7 +718,7 @@ function useCartActions(callbacks) {
|
|
|
709
718
|
);
|
|
710
719
|
const getItemQuantity = _react.useCallback.call(void 0,
|
|
711
720
|
(invMastUid) => {
|
|
712
|
-
return _nullishCoalesce(_optionalChain([cartLines, 'access',
|
|
721
|
+
return _nullishCoalesce(_optionalChain([cartLines, 'access', _52 => _52.find, 'call', _53 => _53((line) => line.invMastUid === invMastUid), 'optionalAccess', _54 => _54.quantity]), () => ( 0));
|
|
713
722
|
},
|
|
714
723
|
[cartLines]
|
|
715
724
|
);
|
|
@@ -739,8 +748,8 @@ function useCartInitialization(session, callbacks) {
|
|
|
739
748
|
const clearCart = useClearCart();
|
|
740
749
|
const queryClient = _reactquery.useQueryClient.call(void 0, );
|
|
741
750
|
const effectiveStatus = session.status;
|
|
742
|
-
const effectiveUserId = _nullishCoalesce(session.userId, () => ( _optionalChain([auth, 'optionalAccess',
|
|
743
|
-
const effectiveCartHdrUid = _nullishCoalesce(session.cartHdrUid, () => ( _optionalChain([auth, 'optionalAccess',
|
|
751
|
+
const effectiveUserId = _nullishCoalesce(session.userId, () => ( _optionalChain([auth, 'optionalAccess', _55 => _55.userId])));
|
|
752
|
+
const effectiveCartHdrUid = _nullishCoalesce(session.cartHdrUid, () => ( _optionalChain([auth, 'optionalAccess', _56 => _56.cartHdrUid])));
|
|
744
753
|
const effectiveSession = _react.useMemo.call(void 0,
|
|
745
754
|
() => ({ status: effectiveStatus, userId: effectiveUserId, cartHdrUid: effectiveCartHdrUid }),
|
|
746
755
|
[effectiveStatus, effectiveUserId, effectiveCartHdrUid]
|
|
@@ -780,10 +789,7 @@ function useCartInitialization(session, callbacks) {
|
|
|
780
789
|
}
|
|
781
790
|
retryCountRef.current++;
|
|
782
791
|
if (retryCountRef.current < MAX_RETRY_ATTEMPTS) {
|
|
783
|
-
const delay = Math.min(
|
|
784
|
-
RETRY_DELAY_MS * Math.pow(1.5, retryCountRef.current),
|
|
785
|
-
1e4
|
|
786
|
-
);
|
|
792
|
+
const delay = Math.min(RETRY_DELAY_MS * Math.pow(1.5, retryCountRef.current), 1e4);
|
|
787
793
|
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
788
794
|
}
|
|
789
795
|
} catch (error) {
|
|
@@ -793,20 +799,15 @@ function useCartInitialization(session, callbacks) {
|
|
|
793
799
|
);
|
|
794
800
|
retryCountRef.current++;
|
|
795
801
|
if (retryCountRef.current < MAX_RETRY_ATTEMPTS) {
|
|
796
|
-
const delay = Math.min(
|
|
797
|
-
RETRY_DELAY_MS * Math.pow(1.5, retryCountRef.current),
|
|
798
|
-
1e4
|
|
799
|
-
);
|
|
802
|
+
const delay = Math.min(RETRY_DELAY_MS * Math.pow(1.5, retryCountRef.current), 1e4);
|
|
800
803
|
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
801
804
|
}
|
|
802
805
|
}
|
|
803
806
|
}
|
|
804
|
-
console.error(
|
|
805
|
-
`Cart initialization failed after ${MAX_RETRY_ATTEMPTS} attempts`
|
|
806
|
-
);
|
|
807
|
+
console.error(`Cart initialization failed after ${MAX_RETRY_ATTEMPTS} attempts`);
|
|
807
808
|
isInitializingRef.current = false;
|
|
808
809
|
};
|
|
809
|
-
initializeGuestCart();
|
|
810
|
+
void initializeGuestCart();
|
|
810
811
|
}
|
|
811
812
|
}, [effectiveSession, cartHdrUid, setCartHdrUid, callbacks]);
|
|
812
813
|
const { data: cartLinesData } = _reactquery.useQuery.call(void 0, {
|
|
@@ -837,17 +838,17 @@ function useCartPricing(options = {}) {
|
|
|
837
838
|
const cache = useAugurCache();
|
|
838
839
|
const site = useAugurSite();
|
|
839
840
|
const cartLines = useCartLines();
|
|
840
|
-
const customerId = _nullishCoalesce(_nullishCoalesce(options.customerId, () => ( _optionalChain([auth, 'optionalAccess',
|
|
841
|
-
const priceFn = _nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess',
|
|
841
|
+
const customerId = _nullishCoalesce(_nullishCoalesce(options.customerId, () => ( _optionalChain([auth, 'optionalAccess', _57 => _57.customerId]))), () => ( _optionalChain([site, 'optionalAccess', _58 => _58.defaults, 'optionalAccess', _59 => _59.customerId])));
|
|
842
|
+
const priceFn = _nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _60 => _60.getItemPrice])));
|
|
842
843
|
const priceQueries = _reactquery.useQueries.call(void 0, {
|
|
843
844
|
queries: cartLines.map((line) => {
|
|
844
845
|
const base = priceFn ? {
|
|
845
|
-
queryKey:
|
|
846
|
+
queryKey: _chunkH7OXSAHPcjs.getItemPriceKey.call(void 0, line.itemId, customerId, line.quantity),
|
|
846
847
|
queryFn: () => priceFn(line.itemId, customerId, line.quantity),
|
|
847
848
|
refetchOnReconnect: true,
|
|
848
849
|
refetchOnWindowFocus: false,
|
|
849
850
|
meta: { persist: true }
|
|
850
|
-
} :
|
|
851
|
+
} : _chunkH7OXSAHPcjs.getItemPriceOptions.call(void 0, api, line.itemId, customerId, line.quantity, cache);
|
|
851
852
|
return {
|
|
852
853
|
...base,
|
|
853
854
|
enabled: !!customerId && !!line.itemId
|
|
@@ -858,7 +859,7 @@ function useCartPricing(options = {}) {
|
|
|
858
859
|
const map = {};
|
|
859
860
|
cartLines.forEach((line, index) => {
|
|
860
861
|
const queryResult = priceQueries[index];
|
|
861
|
-
if (_optionalChain([queryResult, 'optionalAccess',
|
|
862
|
+
if (_optionalChain([queryResult, 'optionalAccess', _61 => _61.data])) {
|
|
862
863
|
const derived = _augurutils.derivePrice.call(void 0, { priceData: queryResult.data, quantity: line.quantity });
|
|
863
864
|
map[line.itemId.toUpperCase()] = {
|
|
864
865
|
unitPrice: derived.unitPrice,
|
|
@@ -870,7 +871,7 @@ function useCartPricing(options = {}) {
|
|
|
870
871
|
}, [cartLines, priceQueries]);
|
|
871
872
|
const getUnitPrice = _react.useMemo.call(void 0, () => {
|
|
872
873
|
return (itemId) => {
|
|
873
|
-
return _nullishCoalesce(_optionalChain([prices, 'access',
|
|
874
|
+
return _nullishCoalesce(_optionalChain([prices, 'access', _62 => _62[_optionalChain([itemId, 'optionalAccess', _63 => _63.toUpperCase, 'call', _64 => _64()])], 'optionalAccess', _65 => _65.unitPrice]), () => ( 0));
|
|
874
875
|
};
|
|
875
876
|
}, [prices]);
|
|
876
877
|
const getItemTotal = _react.useMemo.call(void 0, () => {
|
|
@@ -880,7 +881,7 @@ function useCartPricing(options = {}) {
|
|
|
880
881
|
}, [getUnitPrice]);
|
|
881
882
|
const subtotal = _react.useMemo.call(void 0, () => {
|
|
882
883
|
return cartLines.reduce((sum, line) => {
|
|
883
|
-
const unitPrice = _nullishCoalesce(_optionalChain([prices, 'access',
|
|
884
|
+
const unitPrice = _nullishCoalesce(_optionalChain([prices, 'access', _66 => _66[line.itemId.toUpperCase()], 'optionalAccess', _67 => _67.unitPrice]), () => ( 0));
|
|
884
885
|
return sum + unitPrice * line.quantity;
|
|
885
886
|
}, 0);
|
|
886
887
|
}, [cartLines, prices]);
|
|
@@ -948,13 +949,8 @@ function useCategoryItemsInfinite(itemCategoryUid, itemsFilters, options = {}) {
|
|
|
948
949
|
const callbacks = useAugurCallbacks();
|
|
949
950
|
const cache = useAugurCache();
|
|
950
951
|
const { enabled = true } = options;
|
|
951
|
-
const defaultOptions =
|
|
952
|
-
|
|
953
|
-
itemCategoryUid,
|
|
954
|
-
itemsFilters,
|
|
955
|
-
cache
|
|
956
|
-
);
|
|
957
|
-
const cb = _optionalChain([callbacks, 'optionalAccess', _64 => _64.getCategoryItemsInfinite]);
|
|
952
|
+
const defaultOptions = _chunkH7OXSAHPcjs.getCategoryItemsInfiniteOptions.call(void 0, api, itemCategoryUid, itemsFilters, cache);
|
|
953
|
+
const cb = _optionalChain([callbacks, 'optionalAccess', _68 => _68.getCategoryItemsInfinite]);
|
|
958
954
|
const resolvedQueryFn = _nullishCoalesce(options.queryFn, () => ( (cb ? ({ pageParam }) => cb({
|
|
959
955
|
itemCategoryUid,
|
|
960
956
|
itemsFilters,
|
|
@@ -975,13 +971,8 @@ function useItemSearchInfinite(itemsFilters, itemCategoryUid, options = {}) {
|
|
|
975
971
|
const callbacks = useAugurCallbacks();
|
|
976
972
|
const cache = useAugurCache();
|
|
977
973
|
const { enabled = true } = options;
|
|
978
|
-
const defaultOptions =
|
|
979
|
-
|
|
980
|
-
itemsFilters,
|
|
981
|
-
itemCategoryUid,
|
|
982
|
-
cache
|
|
983
|
-
);
|
|
984
|
-
const cb = _optionalChain([callbacks, 'optionalAccess', _65 => _65.getItemSearchInfinite]);
|
|
974
|
+
const defaultOptions = _chunkH7OXSAHPcjs.getItemSearchInfiniteOptions.call(void 0, api, itemsFilters, itemCategoryUid, cache);
|
|
975
|
+
const cb = _optionalChain([callbacks, 'optionalAccess', _69 => _69.getItemSearchInfinite]);
|
|
985
976
|
const resolvedQueryFn = _nullishCoalesce(options.queryFn, () => ( (cb ? ({ pageParam }) => cb({
|
|
986
977
|
itemsFilters,
|
|
987
978
|
itemCategoryUid,
|
|
@@ -1002,12 +993,12 @@ function useJoomlaContent(articleId, options = {}) {
|
|
|
1002
993
|
const callbacks = useAugurCallbacks();
|
|
1003
994
|
const cache = useAugurCache();
|
|
1004
995
|
const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
|
|
1005
|
-
...articleId ?
|
|
1006
|
-
queryKey:
|
|
996
|
+
...articleId ? _chunkH7OXSAHPcjs.getJoomlaContentOptions.call(void 0, api, articleId, cache) : {
|
|
997
|
+
queryKey: _chunkH7OXSAHPcjs.getJoomlaContentKey.call(void 0, ""),
|
|
1007
998
|
/* v8 ignore next */
|
|
1008
999
|
queryFn: () => Promise.reject()
|
|
1009
1000
|
},
|
|
1010
|
-
..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess',
|
|
1001
|
+
..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _70 => _70.getJoomlaContent]))) ? { queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getJoomlaContent(articleId)))) } : {},
|
|
1011
1002
|
enabled: (_nullishCoalesce(options.enabled, () => ( true))) && !!articleId
|
|
1012
1003
|
});
|
|
1013
1004
|
return {
|
|
@@ -1019,23 +1010,32 @@ function useJoomlaContent(articleId, options = {}) {
|
|
|
1019
1010
|
|
|
1020
1011
|
// src/hooks/use-joomla-content-list.ts
|
|
1021
1012
|
|
|
1013
|
+
var EMPTY_LIST = { data: [], total: 0 };
|
|
1022
1014
|
function useJoomlaContentList(categoryId, options = {}) {
|
|
1023
1015
|
const api = useAugurApiOptional();
|
|
1024
1016
|
const callbacks = useAugurCallbacks();
|
|
1025
1017
|
const cache = useAugurCache();
|
|
1026
1018
|
const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
|
|
1027
|
-
...categoryId ?
|
|
1028
|
-
queryKey:
|
|
1019
|
+
...categoryId ? _chunkH7OXSAHPcjs.getJoomlaContentListOptions.call(void 0, api, categoryId, options.filters, cache) : {
|
|
1020
|
+
queryKey: _chunkH7OXSAHPcjs.getJoomlaContentListKey.call(void 0, ""),
|
|
1029
1021
|
/* v8 ignore next */
|
|
1030
1022
|
queryFn: () => Promise.reject()
|
|
1031
1023
|
},
|
|
1032
|
-
..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess',
|
|
1024
|
+
..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _71 => _71.getJoomlaContentList]))) ? {
|
|
1033
1025
|
queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getJoomlaContentList(categoryId, options.filters))))
|
|
1034
1026
|
} : {},
|
|
1035
1027
|
enabled: (_nullishCoalesce(options.enabled, () => ( true))) && !!categoryId
|
|
1028
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1036
1029
|
});
|
|
1030
|
+
const result = data || EMPTY_LIST;
|
|
1037
1031
|
return {
|
|
1038
|
-
articles:
|
|
1032
|
+
articles: result.data,
|
|
1033
|
+
total: result.total,
|
|
1034
|
+
count: result.count,
|
|
1035
|
+
totalResults: result.totalResults,
|
|
1036
|
+
message: result.message,
|
|
1037
|
+
status: result.status,
|
|
1038
|
+
result,
|
|
1039
1039
|
isLoading,
|
|
1040
1040
|
error
|
|
1041
1041
|
};
|
|
@@ -1043,19 +1043,28 @@ function useJoomlaContentList(categoryId, options = {}) {
|
|
|
1043
1043
|
|
|
1044
1044
|
// src/hooks/use-joomla-menu.ts
|
|
1045
1045
|
|
|
1046
|
+
var EMPTY_LIST2 = { data: [], total: 0 };
|
|
1046
1047
|
function useJoomlaMenu(options = {}) {
|
|
1047
1048
|
const api = useAugurApiOptional();
|
|
1048
1049
|
const callbacks = useAugurCallbacks();
|
|
1049
1050
|
const cache = useAugurCache();
|
|
1050
1051
|
const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
|
|
1051
|
-
...
|
|
1052
|
-
..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess',
|
|
1052
|
+
..._chunkH7OXSAHPcjs.getJoomlaMenuOptions.call(void 0, api, options.filters, cache),
|
|
1053
|
+
..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _72 => _72.getJoomlaMenu]))) ? {
|
|
1053
1054
|
queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getJoomlaMenu(options.filters))))
|
|
1054
1055
|
} : {},
|
|
1055
1056
|
enabled: _nullishCoalesce(options.enabled, () => ( true))
|
|
1057
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1056
1058
|
});
|
|
1059
|
+
const result = data || EMPTY_LIST2;
|
|
1057
1060
|
return {
|
|
1058
|
-
menuItems:
|
|
1061
|
+
menuItems: result.data,
|
|
1062
|
+
total: result.total,
|
|
1063
|
+
count: result.count,
|
|
1064
|
+
totalResults: result.totalResults,
|
|
1065
|
+
message: result.message,
|
|
1066
|
+
status: result.status,
|
|
1067
|
+
result,
|
|
1059
1068
|
isLoading,
|
|
1060
1069
|
error
|
|
1061
1070
|
};
|
|
@@ -1068,12 +1077,12 @@ function useJoomlaMenuDoc(menuId, options = {}) {
|
|
|
1068
1077
|
const callbacks = useAugurCallbacks();
|
|
1069
1078
|
const cache = useAugurCache();
|
|
1070
1079
|
const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
|
|
1071
|
-
...menuId ?
|
|
1072
|
-
queryKey:
|
|
1080
|
+
...menuId ? _chunkH7OXSAHPcjs.getJoomlaMenuDocOptions.call(void 0, api, menuId, cache) : {
|
|
1081
|
+
queryKey: _chunkH7OXSAHPcjs.getJoomlaMenuDocKey.call(void 0, ""),
|
|
1073
1082
|
/* v8 ignore next */
|
|
1074
1083
|
queryFn: () => Promise.reject()
|
|
1075
1084
|
},
|
|
1076
|
-
..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess',
|
|
1085
|
+
..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _73 => _73.getJoomlaMenuDoc]))) ? { queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getJoomlaMenuDoc(menuId)))) } : {},
|
|
1077
1086
|
enabled: (_nullishCoalesce(options.enabled, () => ( true))) && !!menuId
|
|
1078
1087
|
});
|
|
1079
1088
|
return {
|
|
@@ -1085,23 +1094,28 @@ function useJoomlaMenuDoc(menuId, options = {}) {
|
|
|
1085
1094
|
|
|
1086
1095
|
// src/hooks/use-customer-orders.ts
|
|
1087
1096
|
|
|
1088
|
-
var
|
|
1097
|
+
var EMPTY_LIST3 = { data: [], total: 0 };
|
|
1089
1098
|
function useCustomerOrders(customerId, params, options = {}) {
|
|
1090
1099
|
const callbacks = useAugurCallbacks();
|
|
1091
1100
|
const auth = useAugurAuth();
|
|
1092
1101
|
const site = useAugurSite();
|
|
1093
|
-
const effectiveCustomerId = _nullishCoalesce(_nullishCoalesce(customerId, () => ( _optionalChain([auth, 'optionalAccess',
|
|
1094
|
-
const resolvedQueryFn = _nullishCoalesce(options.queryFn, () => ( (_optionalChain([callbacks, 'optionalAccess',
|
|
1102
|
+
const effectiveCustomerId = _nullishCoalesce(_nullishCoalesce(customerId, () => ( _optionalChain([auth, 'optionalAccess', _74 => _74.customerId]))), () => ( _optionalChain([site, 'optionalAccess', _75 => _75.defaults, 'optionalAccess', _76 => _76.customerId])));
|
|
1103
|
+
const resolvedQueryFn = _nullishCoalesce(options.queryFn, () => ( (_optionalChain([callbacks, 'optionalAccess', _77 => _77.getCustomerOrders]) ? () => callbacks.getCustomerOrders(effectiveCustomerId, params) : void 0)));
|
|
1095
1104
|
const enabled = (_nullishCoalesce(options.enabled, () => ( true))) && !!effectiveCustomerId && !!resolvedQueryFn;
|
|
1096
1105
|
const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
|
|
1097
|
-
queryKey:
|
|
1106
|
+
queryKey: _chunkH7OXSAHPcjs.getCustomerOrdersKey.call(void 0, effectiveCustomerId, params),
|
|
1098
1107
|
queryFn: resolvedQueryFn,
|
|
1099
1108
|
enabled
|
|
1100
1109
|
});
|
|
1101
|
-
const result = data ||
|
|
1110
|
+
const result = data || EMPTY_LIST3;
|
|
1102
1111
|
return {
|
|
1103
1112
|
orders: result.data,
|
|
1104
1113
|
total: result.total,
|
|
1114
|
+
count: result.count,
|
|
1115
|
+
totalResults: result.totalResults,
|
|
1116
|
+
message: result.message,
|
|
1117
|
+
status: result.status,
|
|
1118
|
+
result,
|
|
1105
1119
|
isLoading,
|
|
1106
1120
|
error
|
|
1107
1121
|
};
|
|
@@ -1110,11 +1124,11 @@ function useOrderDetail(customerId, orderId, options = {}) {
|
|
|
1110
1124
|
const callbacks = useAugurCallbacks();
|
|
1111
1125
|
const auth = useAugurAuth();
|
|
1112
1126
|
const site = useAugurSite();
|
|
1113
|
-
const effectiveCustomerId = _nullishCoalesce(_nullishCoalesce(customerId, () => ( _optionalChain([auth, 'optionalAccess',
|
|
1114
|
-
const resolvedQueryFn = _nullishCoalesce(options.queryFn, () => ( (_optionalChain([callbacks, 'optionalAccess',
|
|
1127
|
+
const effectiveCustomerId = _nullishCoalesce(_nullishCoalesce(customerId, () => ( _optionalChain([auth, 'optionalAccess', _78 => _78.customerId]))), () => ( _optionalChain([site, 'optionalAccess', _79 => _79.defaults, 'optionalAccess', _80 => _80.customerId])));
|
|
1128
|
+
const resolvedQueryFn = _nullishCoalesce(options.queryFn, () => ( (_optionalChain([callbacks, 'optionalAccess', _81 => _81.getCustomerOrderDetail]) ? () => callbacks.getCustomerOrderDetail(effectiveCustomerId, orderId) : void 0)));
|
|
1115
1129
|
const enabled = (_nullishCoalesce(options.enabled, () => ( true))) && !!effectiveCustomerId && !!orderId && !!resolvedQueryFn;
|
|
1116
1130
|
const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
|
|
1117
|
-
queryKey:
|
|
1131
|
+
queryKey: _chunkH7OXSAHPcjs.getCustomerOrderDetailKey.call(void 0, effectiveCustomerId, orderId),
|
|
1118
1132
|
queryFn: resolvedQueryFn,
|
|
1119
1133
|
enabled
|
|
1120
1134
|
});
|
|
@@ -1127,23 +1141,28 @@ function useOrderDetail(customerId, orderId, options = {}) {
|
|
|
1127
1141
|
|
|
1128
1142
|
// src/hooks/use-customer-invoices.ts
|
|
1129
1143
|
|
|
1130
|
-
var
|
|
1144
|
+
var EMPTY_LIST4 = { data: [], total: 0 };
|
|
1131
1145
|
function useCustomerInvoices(customerId, params, options = {}) {
|
|
1132
1146
|
const callbacks = useAugurCallbacks();
|
|
1133
1147
|
const auth = useAugurAuth();
|
|
1134
1148
|
const site = useAugurSite();
|
|
1135
|
-
const effectiveCustomerId = _nullishCoalesce(_nullishCoalesce(customerId, () => ( _optionalChain([auth, 'optionalAccess',
|
|
1136
|
-
const resolvedQueryFn = _nullishCoalesce(options.queryFn, () => ( (_optionalChain([callbacks, 'optionalAccess',
|
|
1149
|
+
const effectiveCustomerId = _nullishCoalesce(_nullishCoalesce(customerId, () => ( _optionalChain([auth, 'optionalAccess', _82 => _82.customerId]))), () => ( _optionalChain([site, 'optionalAccess', _83 => _83.defaults, 'optionalAccess', _84 => _84.customerId])));
|
|
1150
|
+
const resolvedQueryFn = _nullishCoalesce(options.queryFn, () => ( (_optionalChain([callbacks, 'optionalAccess', _85 => _85.getCustomerInvoices]) ? () => callbacks.getCustomerInvoices(effectiveCustomerId, params) : void 0)));
|
|
1137
1151
|
const enabled = (_nullishCoalesce(options.enabled, () => ( true))) && !!effectiveCustomerId && !!resolvedQueryFn;
|
|
1138
1152
|
const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
|
|
1139
|
-
queryKey:
|
|
1153
|
+
queryKey: _chunkH7OXSAHPcjs.getCustomerInvoicesKey.call(void 0, effectiveCustomerId, params),
|
|
1140
1154
|
queryFn: resolvedQueryFn,
|
|
1141
1155
|
enabled
|
|
1142
1156
|
});
|
|
1143
|
-
const result = data ||
|
|
1157
|
+
const result = data || EMPTY_LIST4;
|
|
1144
1158
|
return {
|
|
1145
1159
|
invoices: result.data,
|
|
1146
1160
|
total: result.total,
|
|
1161
|
+
count: result.count,
|
|
1162
|
+
totalResults: result.totalResults,
|
|
1163
|
+
message: result.message,
|
|
1164
|
+
status: result.status,
|
|
1165
|
+
result,
|
|
1147
1166
|
isLoading,
|
|
1148
1167
|
error
|
|
1149
1168
|
};
|
|
@@ -1152,11 +1171,11 @@ function useInvoiceDetail(customerId, invoiceNo, options = {}) {
|
|
|
1152
1171
|
const callbacks = useAugurCallbacks();
|
|
1153
1172
|
const auth = useAugurAuth();
|
|
1154
1173
|
const site = useAugurSite();
|
|
1155
|
-
const effectiveCustomerId = _nullishCoalesce(_nullishCoalesce(customerId, () => ( _optionalChain([auth, 'optionalAccess',
|
|
1156
|
-
const resolvedQueryFn = _nullishCoalesce(options.queryFn, () => ( (_optionalChain([callbacks, 'optionalAccess',
|
|
1174
|
+
const effectiveCustomerId = _nullishCoalesce(_nullishCoalesce(customerId, () => ( _optionalChain([auth, 'optionalAccess', _86 => _86.customerId]))), () => ( _optionalChain([site, 'optionalAccess', _87 => _87.defaults, 'optionalAccess', _88 => _88.customerId])));
|
|
1175
|
+
const resolvedQueryFn = _nullishCoalesce(options.queryFn, () => ( (_optionalChain([callbacks, 'optionalAccess', _89 => _89.getCustomerInvoiceDetail]) ? () => callbacks.getCustomerInvoiceDetail(effectiveCustomerId, invoiceNo) : void 0)));
|
|
1157
1176
|
const enabled = (_nullishCoalesce(options.enabled, () => ( true))) && !!effectiveCustomerId && !!invoiceNo && !!resolvedQueryFn;
|
|
1158
1177
|
const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
|
|
1159
|
-
queryKey:
|
|
1178
|
+
queryKey: _chunkH7OXSAHPcjs.getCustomerInvoiceDetailKey.call(void 0, effectiveCustomerId, invoiceNo),
|
|
1160
1179
|
queryFn: resolvedQueryFn,
|
|
1161
1180
|
enabled
|
|
1162
1181
|
});
|
|
@@ -1169,23 +1188,28 @@ function useInvoiceDetail(customerId, invoiceNo, options = {}) {
|
|
|
1169
1188
|
|
|
1170
1189
|
// src/hooks/use-customer-quotes.ts
|
|
1171
1190
|
|
|
1172
|
-
var
|
|
1191
|
+
var EMPTY_LIST5 = { data: [], total: 0 };
|
|
1173
1192
|
function useCustomerQuotes(customerId, params, options = {}) {
|
|
1174
1193
|
const callbacks = useAugurCallbacks();
|
|
1175
1194
|
const auth = useAugurAuth();
|
|
1176
1195
|
const site = useAugurSite();
|
|
1177
|
-
const effectiveCustomerId = _nullishCoalesce(_nullishCoalesce(customerId, () => ( _optionalChain([auth, 'optionalAccess',
|
|
1178
|
-
const resolvedQueryFn = _nullishCoalesce(options.queryFn, () => ( (_optionalChain([callbacks, 'optionalAccess',
|
|
1196
|
+
const effectiveCustomerId = _nullishCoalesce(_nullishCoalesce(customerId, () => ( _optionalChain([auth, 'optionalAccess', _90 => _90.customerId]))), () => ( _optionalChain([site, 'optionalAccess', _91 => _91.defaults, 'optionalAccess', _92 => _92.customerId])));
|
|
1197
|
+
const resolvedQueryFn = _nullishCoalesce(options.queryFn, () => ( (_optionalChain([callbacks, 'optionalAccess', _93 => _93.getCustomerQuotes]) ? () => callbacks.getCustomerQuotes(effectiveCustomerId, params) : void 0)));
|
|
1179
1198
|
const enabled = (_nullishCoalesce(options.enabled, () => ( true))) && !!effectiveCustomerId && !!resolvedQueryFn;
|
|
1180
1199
|
const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
|
|
1181
|
-
queryKey:
|
|
1200
|
+
queryKey: _chunkH7OXSAHPcjs.getCustomerQuotesKey.call(void 0, effectiveCustomerId, params),
|
|
1182
1201
|
queryFn: resolvedQueryFn,
|
|
1183
1202
|
enabled
|
|
1184
1203
|
});
|
|
1185
|
-
const result = data ||
|
|
1204
|
+
const result = data || EMPTY_LIST5;
|
|
1186
1205
|
return {
|
|
1187
1206
|
quotes: result.data,
|
|
1188
1207
|
total: result.total,
|
|
1208
|
+
count: result.count,
|
|
1209
|
+
totalResults: result.totalResults,
|
|
1210
|
+
message: result.message,
|
|
1211
|
+
status: result.status,
|
|
1212
|
+
result,
|
|
1189
1213
|
isLoading,
|
|
1190
1214
|
error
|
|
1191
1215
|
};
|
|
@@ -1194,11 +1218,11 @@ function useQuoteDetail(customerId, quoteNo, options = {}) {
|
|
|
1194
1218
|
const callbacks = useAugurCallbacks();
|
|
1195
1219
|
const auth = useAugurAuth();
|
|
1196
1220
|
const site = useAugurSite();
|
|
1197
|
-
const effectiveCustomerId = _nullishCoalesce(_nullishCoalesce(customerId, () => ( _optionalChain([auth, 'optionalAccess',
|
|
1198
|
-
const resolvedQueryFn = _nullishCoalesce(options.queryFn, () => ( (_optionalChain([callbacks, 'optionalAccess',
|
|
1221
|
+
const effectiveCustomerId = _nullishCoalesce(_nullishCoalesce(customerId, () => ( _optionalChain([auth, 'optionalAccess', _94 => _94.customerId]))), () => ( _optionalChain([site, 'optionalAccess', _95 => _95.defaults, 'optionalAccess', _96 => _96.customerId])));
|
|
1222
|
+
const resolvedQueryFn = _nullishCoalesce(options.queryFn, () => ( (_optionalChain([callbacks, 'optionalAccess', _97 => _97.getCustomerQuoteDetail]) ? () => callbacks.getCustomerQuoteDetail(effectiveCustomerId, quoteNo) : void 0)));
|
|
1199
1223
|
const enabled = (_nullishCoalesce(options.enabled, () => ( true))) && !!effectiveCustomerId && !!quoteNo && !!resolvedQueryFn;
|
|
1200
1224
|
const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
|
|
1201
|
-
queryKey:
|
|
1225
|
+
queryKey: _chunkH7OXSAHPcjs.getCustomerQuoteDetailKey.call(void 0, effectiveCustomerId, quoteNo),
|
|
1202
1226
|
queryFn: resolvedQueryFn,
|
|
1203
1227
|
enabled
|
|
1204
1228
|
});
|
|
@@ -1215,10 +1239,10 @@ function createSiteHooks(config = {}) {
|
|
|
1215
1239
|
const { callbacks, defaultCustomerId, cache, imageConfig } = config;
|
|
1216
1240
|
function Provider({ api, auth, children }) {
|
|
1217
1241
|
const mergedAuth = {
|
|
1218
|
-
status: _nullishCoalesce(_optionalChain([auth, 'optionalAccess',
|
|
1219
|
-
customerId: _optionalChain([auth, 'optionalAccess',
|
|
1220
|
-
userId: _optionalChain([auth, 'optionalAccess',
|
|
1221
|
-
cartHdrUid: _optionalChain([auth, 'optionalAccess',
|
|
1242
|
+
status: _nullishCoalesce(_optionalChain([auth, 'optionalAccess', _98 => _98.status]), () => ( "unauthenticated")),
|
|
1243
|
+
customerId: _optionalChain([auth, 'optionalAccess', _99 => _99.customerId]),
|
|
1244
|
+
userId: _optionalChain([auth, 'optionalAccess', _100 => _100.userId]),
|
|
1245
|
+
cartHdrUid: _optionalChain([auth, 'optionalAccess', _101 => _101.cartHdrUid])
|
|
1222
1246
|
};
|
|
1223
1247
|
return _react.createElement.call(void 0, AugurHooksProvider, {
|
|
1224
1248
|
api,
|
|
@@ -1273,9 +1297,7 @@ function createSiteHooks(config = {}) {
|
|
|
1273
1297
|
// Hooks -- images
|
|
1274
1298
|
useImageWithFallback: (imagePath, options) => {
|
|
1275
1299
|
if (!imageConfig) {
|
|
1276
|
-
throw new Error(
|
|
1277
|
-
"useImageWithFallback requires imageConfig in createSiteHooks config"
|
|
1278
|
-
);
|
|
1300
|
+
throw new Error("useImageWithFallback requires imageConfig in createSiteHooks config");
|
|
1279
1301
|
}
|
|
1280
1302
|
return _chunkAXCNTEABcjs.useImageWithFallback.call(void 0, imageConfig, imagePath, options);
|
|
1281
1303
|
}
|
|
@@ -1298,7 +1320,7 @@ function deserialize(data) {
|
|
|
1298
1320
|
|
|
1299
1321
|
// src/persistence/apply-limits.ts
|
|
1300
1322
|
function applyLimits(data, limits) {
|
|
1301
|
-
const queries = _optionalChain([data, 'access',
|
|
1323
|
+
const queries = _optionalChain([data, 'access', _102 => _102.clientState, 'optionalAccess', _103 => _103.queries]);
|
|
1302
1324
|
if (!queries || Object.keys(limits).length === 0) return data;
|
|
1303
1325
|
const entries = queries;
|
|
1304
1326
|
const unlimited = [];
|
|
@@ -1399,7 +1421,7 @@ function useStorageMonitor(config) {
|
|
|
1399
1421
|
const raw = storage.getItem(key);
|
|
1400
1422
|
if (!raw) return;
|
|
1401
1423
|
const parsed = JSON.parse(raw);
|
|
1402
|
-
if (!_optionalChain([parsed, 'access',
|
|
1424
|
+
if (!_optionalChain([parsed, 'access', _104 => _104.clientState, 'optionalAccess', _105 => _105.queries])) return;
|
|
1403
1425
|
parsed.clientState.queries = parsed.clientState.queries.filter(
|
|
1404
1426
|
(q) => {
|
|
1405
1427
|
if (!Array.isArray(q.queryKey)) return true;
|
|
@@ -1426,16 +1448,19 @@ function useAugurPersistence(config) {
|
|
|
1426
1448
|
setIsMounted(true);
|
|
1427
1449
|
}, []);
|
|
1428
1450
|
useStorageMonitor(config);
|
|
1429
|
-
const isDev = typeof process !== "undefined" && _optionalChain([process, 'access',
|
|
1451
|
+
const isDev = typeof process !== "undefined" && _optionalChain([process, 'access', _106 => _106.env, 'optionalAccess', _107 => _107["NODE_ENV"]]) === "development";
|
|
1430
1452
|
const { persistableKeys } = config;
|
|
1431
|
-
const dehydrateOptions = _react.useMemo.call(void 0,
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1453
|
+
const dehydrateOptions = _react.useMemo.call(void 0,
|
|
1454
|
+
() => ({
|
|
1455
|
+
shouldDehydrateQuery: (query) => {
|
|
1456
|
+
const key = query.queryKey;
|
|
1457
|
+
if (!Array.isArray(key) || key.length === 0) return false;
|
|
1458
|
+
if (query.state.status !== "success") return false;
|
|
1459
|
+
return persistableKeys.includes(key[0]);
|
|
1460
|
+
}
|
|
1461
|
+
}),
|
|
1462
|
+
[persistableKeys]
|
|
1463
|
+
);
|
|
1439
1464
|
return {
|
|
1440
1465
|
persister,
|
|
1441
1466
|
maxAge: isMounted ? _nullishCoalesce(config.maxAge, () => ( 24 * 60 * 60 * 1e3)) : 0,
|
|
@@ -1536,5 +1561,5 @@ function useAugurPersistence(config) {
|
|
|
1536
1561
|
|
|
1537
1562
|
|
|
1538
1563
|
|
|
1539
|
-
exports.AugurHooksProvider = AugurHooksProvider; exports.createSiteHooks = createSiteHooks; exports.executeBatchQuery =
|
|
1564
|
+
exports.AugurHooksProvider = AugurHooksProvider; exports.createSiteHooks = createSiteHooks; exports.executeBatchQuery = _chunkH7OXSAHPcjs.executeBatchQuery; exports.getBatchInvMastDocKey = _chunkH7OXSAHPcjs.getBatchInvMastDocKey; exports.getBatchInvMastDocOptions = _chunkH7OXSAHPcjs.getBatchInvMastDocOptions; exports.getCartPricingQueryOptions = _chunkH7OXSAHPcjs.getCartPricingQueryOptions; exports.getCategoryItemsInfiniteKey = _chunkH7OXSAHPcjs.getCategoryItemsInfiniteKey; exports.getCategoryItemsInfiniteOptions = _chunkH7OXSAHPcjs.getCategoryItemsInfiniteOptions; exports.getCustomerInvoiceDetailKey = _chunkH7OXSAHPcjs.getCustomerInvoiceDetailKey; exports.getCustomerInvoicesKey = _chunkH7OXSAHPcjs.getCustomerInvoicesKey; exports.getCustomerOrderDetailKey = _chunkH7OXSAHPcjs.getCustomerOrderDetailKey; exports.getCustomerOrdersKey = _chunkH7OXSAHPcjs.getCustomerOrdersKey; exports.getCustomerQuoteDetailKey = _chunkH7OXSAHPcjs.getCustomerQuoteDetailKey; exports.getCustomerQuotesKey = _chunkH7OXSAHPcjs.getCustomerQuotesKey; exports.getInvMastDocKey = _chunkH7OXSAHPcjs.getInvMastDocKey; exports.getInvMastDocOptions = _chunkH7OXSAHPcjs.getInvMastDocOptions; exports.getInvMastKey = _chunkH7OXSAHPcjs.getInvMastKey; exports.getInvMastOptions = _chunkH7OXSAHPcjs.getInvMastOptions; exports.getInvMastStockKey = _chunkH7OXSAHPcjs.getInvMastStockKey; exports.getInvMastStockOptions = _chunkH7OXSAHPcjs.getInvMastStockOptions; exports.getItemAttributesKey = _chunkH7OXSAHPcjs.getItemAttributesKey; exports.getItemAttributesOptions = _chunkH7OXSAHPcjs.getItemAttributesOptions; exports.getItemCategoryKey = _chunkH7OXSAHPcjs.getItemCategoryKey; exports.getItemCategoryOptions = _chunkH7OXSAHPcjs.getItemCategoryOptions; exports.getItemDetailsKey = _chunkH7OXSAHPcjs.getItemDetailsKey; exports.getItemDetailsOptions = _chunkH7OXSAHPcjs.getItemDetailsOptions; exports.getItemPriceKey = _chunkH7OXSAHPcjs.getItemPriceKey; exports.getItemPriceOptions = _chunkH7OXSAHPcjs.getItemPriceOptions; exports.getItemSearchInfiniteKey = _chunkH7OXSAHPcjs.getItemSearchInfiniteKey; exports.getItemSearchInfiniteOptions = _chunkH7OXSAHPcjs.getItemSearchInfiniteOptions; exports.getJoomlaContentKey = _chunkH7OXSAHPcjs.getJoomlaContentKey; exports.getJoomlaContentListKey = _chunkH7OXSAHPcjs.getJoomlaContentListKey; exports.getJoomlaContentListOptions = _chunkH7OXSAHPcjs.getJoomlaContentListOptions; exports.getJoomlaContentOptions = _chunkH7OXSAHPcjs.getJoomlaContentOptions; exports.getJoomlaMenuDocKey = _chunkH7OXSAHPcjs.getJoomlaMenuDocKey; exports.getJoomlaMenuDocOptions = _chunkH7OXSAHPcjs.getJoomlaMenuDocOptions; exports.getJoomlaMenuKey = _chunkH7OXSAHPcjs.getJoomlaMenuKey; exports.getJoomlaMenuOptions = _chunkH7OXSAHPcjs.getJoomlaMenuOptions; exports.getProductCategoryKey = _chunkH7OXSAHPcjs.getProductCategoryKey; exports.getProductCategoryOptions = _chunkH7OXSAHPcjs.getProductCategoryOptions; exports.getProductSearchKey = _chunkH7OXSAHPcjs.getProductSearchKey; exports.getProductSearchOptions = _chunkH7OXSAHPcjs.getProductSearchOptions; exports.getSearchSuggestionsKey = _chunkH7OXSAHPcjs.getSearchSuggestionsKey; exports.getSearchSuggestionsOptions = _chunkH7OXSAHPcjs.getSearchSuggestionsOptions; exports.getStockKey = _chunkH7OXSAHPcjs.getStockKey; exports.getStockOptions = _chunkH7OXSAHPcjs.getStockOptions; exports.useAugurApi = useAugurApi; exports.useAugurApiOptional = useAugurApiOptional; exports.useAugurAuth = useAugurAuth; exports.useAugurCache = useAugurCache; exports.useAugurOptions = useAugurOptions; exports.useAugurPersistence = useAugurPersistence; exports.useAugurSite = useAugurSite; exports.useBatchInvMastDoc = useBatchInvMastDoc; exports.useCartActions = useCartActions; exports.useCartHdrUid = useCartHdrUid; exports.useCartInitialization = useCartInitialization; exports.useCartLineCount = useCartLineCount; exports.useCartLines = useCartLines; exports.useCartPricing = useCartPricing; exports.useCartQuantityTotal = useCartQuantityTotal; exports.useCartStore = useCartStore; exports.useCategoryItemsInfinite = useCategoryItemsInfinite; exports.useClearCart = useClearCart; exports.useCustomerInvoices = useCustomerInvoices; exports.useCustomerOrders = useCustomerOrders; exports.useCustomerQuotes = useCustomerQuotes; exports.useDebounce = useDebounce; exports.useFormatPrice = useFormatPrice; exports.useInvMast = useInvMast; exports.useInvMastDoc = useInvMastDoc; exports.useInvMastStock = useInvMastStock; exports.useInvoiceDetail = useInvoiceDetail; exports.useItemAttributes = useItemAttributes; exports.useItemCategory = useItemCategory; exports.useItemDetails = useItemDetails; exports.useItemFiltersStore = useItemFiltersStore; exports.useItemPrice = useItemPrice; exports.useItemSearchInfinite = useItemSearchInfinite; exports.useJoomlaContent = useJoomlaContent; exports.useJoomlaContentList = useJoomlaContentList; exports.useJoomlaMenu = useJoomlaMenu; exports.useJoomlaMenuDoc = useJoomlaMenuDoc; exports.useOrderDetail = useOrderDetail; exports.usePaginationPrefetch = usePaginationPrefetch; exports.useProductCategory = useProductCategory; exports.useProductSearch = useProductSearch; exports.useQuoteDetail = useQuoteDetail; exports.useSearchSuggestions = useSearchSuggestions; exports.useSetCartHdrUid = useSetCartHdrUid; exports.useSetCartLines = useSetCartLines; exports.useStock = useStock;
|
|
1540
1565
|
//# sourceMappingURL=index.cjs.map
|