@viu/emporix-sdk-react 2.5.0 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/README.md +7 -0
- package/dist/{chunk-QMBRDYLW.js → chunk-RCI7242Y.js} +3 -3
- package/dist/{chunk-QMBRDYLW.js.map → chunk-RCI7242Y.js.map} +1 -1
- package/dist/{chunk-D43CSHK3.js → chunk-SDRV73LG.js} +34 -2
- package/dist/chunk-SDRV73LG.js.map +1 -0
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.d.cts +2 -2
- package/dist/hooks.d.ts +2 -2
- package/dist/hooks.js +2 -2
- package/dist/index.cjs +32 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/{provider-fvcYdqqX.d.ts → provider-CLNEKOuu.d.ts} +13 -1
- package/dist/{provider-BhvQWnnh.d.cts → provider-WHISqTG2.d.cts} +13 -1
- package/dist/provider.cjs +32 -0
- package/dist/provider.cjs.map +1 -1
- package/dist/provider.d.cts +1 -1
- package/dist/provider.d.ts +1 -1
- package/dist/provider.js +1 -1
- package/dist/{use-returns-Dspo-4xb.d.ts → use-returns-BED8-FtN.d.ts} +1 -1
- package/dist/{use-returns-C1juSNfc.d.cts → use-returns-BbOXQG4L.d.cts} +1 -1
- package/package.json +3 -3
- package/dist/chunk-D43CSHK3.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @viu/emporix-sdk-react
|
|
2
2
|
|
|
3
|
+
## 2.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#92](https://github.com/viuteam/emporix-sdk/pull/92) [`45a2bd8`](https://github.com/viuteam/emporix-sdk/commit/45a2bd8d83cb46d775301790cb2efc60805efc90) Thanks [@amnael1](https://github.com/amnael1)! - Add opt-in reactive customer-token auto-refresh.
|
|
8
|
+
|
|
9
|
+
Core: `EmporixClient.setCustomerTokenRefresher(refresher)` registers a
|
|
10
|
+
single-flight `CustomerTokenRefresher`; on a `customer`-kind 401 the HTTP layer
|
|
11
|
+
refreshes once and retries. Off by default — the customer token stays
|
|
12
|
+
caller-owned.
|
|
13
|
+
|
|
14
|
+
React: `EmporixProvider` gains `autoRefreshCustomerToken` and
|
|
15
|
+
`onCustomerSessionExpired`. When enabled, a customer 401 is transparently
|
|
16
|
+
refreshed via the stored refresh token (anonymous-authorized
|
|
17
|
+
`GET /refreshauthtoken`) and the request is retried; B2B `legalEntityId` is
|
|
18
|
+
preserved.
|
|
19
|
+
|
|
20
|
+
## 2.5.1
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- [#90](https://github.com/viuteam/emporix-sdk/pull/90) [`3db7978`](https://github.com/viuteam/emporix-sdk/commit/3db79789f90ed8e5134fde809fe689375f03cfa4) Thanks [@amnael1](https://github.com/amnael1)! - Document analytics integration (Google Tag Manager / GA4 ecommerce) via the
|
|
25
|
+
telemetry channel. Adds `docs/analytics.md` — the `dataLayer` bridge, the GA4
|
|
26
|
+
ecommerce event mapping, a `useTrackedCart` wrapper, and SSR + consent notes —
|
|
27
|
+
plus an "Analytics & tracking" pointer in the package README. Docs-only; no API
|
|
28
|
+
changes.
|
|
29
|
+
|
|
3
30
|
## 2.5.0
|
|
4
31
|
|
|
5
32
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -82,6 +82,13 @@ call (default: `customer` if a token is stored, else `anonymous`).
|
|
|
82
82
|
`prefetchProduct` / `prefetchCart` for server-side hydration. See
|
|
83
83
|
[`../../docs/react.md`](../../docs/react.md).
|
|
84
84
|
|
|
85
|
+
## Analytics & tracking
|
|
86
|
+
|
|
87
|
+
A typed, no-op-by-default telemetry channel (`onTelemetry` + `useEmporixTelemetry`)
|
|
88
|
+
feeds any analytics sink. For Google Tag Manager / GA4 ecommerce — the `dataLayer`
|
|
89
|
+
bridge, GA4 event mapping, a `useTrackedCart` wrapper, SSR + consent — see
|
|
90
|
+
[`../../docs/analytics.md`](../../docs/analytics.md).
|
|
91
|
+
|
|
85
92
|
## Subpath exports
|
|
86
93
|
|
|
87
94
|
`.`, `./provider`, `./hooks`, `./storage`, `./ssr`.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useEmporix, EmporixSiteContext, useActiveCompany } from './chunk-
|
|
1
|
+
import { useEmporix, EmporixSiteContext, useActiveCompany } from './chunk-SDRV73LG.js';
|
|
2
2
|
import { useContext, useState, useEffect, useCallback } from 'react';
|
|
3
3
|
import { useQueryClient, useQuery, useMutation, useInfiniteQuery } from '@tanstack/react-query';
|
|
4
4
|
import { auth, EmporixError } from '@viu/emporix-sdk';
|
|
@@ -1420,5 +1420,5 @@ function useUpdateApproval() {
|
|
|
1420
1420
|
}
|
|
1421
1421
|
|
|
1422
1422
|
export { useActiveCart, useAddToShoppingList, useAddressMutations, useApproval, useApprovals, useAssignContact, useAvailabilities, useAvailability, useCancelOrder, useCart, useCartMutations, useCategories, useCategoriesInfinite, useCategory, useCategoryTree, useChangePassword, useCheckout, useCompany, useCompanyContacts, useCompanyGroups, useCompanyLocations, useCompanySwitcher, useCreateApproval, useCreateCart, useCreateCompany, useCreateLocation, useCreateReturn, useCreateShoppingList, useCustomerAddresses, useCustomerSession, useDefaultSite, useDeleteCompany, useDeleteLocation, useDeleteShoppingList, useMatchPrices, useMatchPricesChunked, useMyCompanies, useMyOrders, useMyOrdersInfinite, useMyReturns, useMyRewardPoints, useMyRewardPointsSummary, useMySegmentCategories, useMySegmentCategoriesInfinite, useMySegmentCategoryTree, useMySegmentItems, useMySegmentProducts, useMySegmentProductsInfinite, useMySegments, useOrder, useOrderTransition, usePasswordReset, usePaymentModes, useProduct, useProductByCode, useProductMedia, useProductSearch, useProducts, useProductsByCodes, useProductsInCategory, useProductsInCategoryInfinite, useProductsInfinite, useRedeemCoupon, useRedeemOptions, useRedeemRewardPoints, useRemoveFromShoppingList, useReorder, useReturn, useSalesOrder, useSetShoppingListItemQuantity, useShoppingLists, useSiteContext, useSites, useUnassignContact, useUpdateApproval, useUpdateCompany, useUpdateContactAssignment, useUpdateCustomer, useUpdateLocation, useUpdateSalesOrder, useValidateCoupon, useVariantChildren };
|
|
1423
|
-
//# sourceMappingURL=chunk-
|
|
1424
|
-
//# sourceMappingURL=chunk-
|
|
1423
|
+
//# sourceMappingURL=chunk-RCI7242Y.js.map
|
|
1424
|
+
//# sourceMappingURL=chunk-RCI7242Y.js.map
|