ublo-lib 1.32.7 → 1.32.8

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.
@@ -0,0 +1,13 @@
1
+ import * as React from "react";
2
+ import type { GlobalOptions } from "./types";
3
+ type Options = GlobalOptions & {};
4
+ type Presets = {};
5
+ type Props = {
6
+ options?: Options;
7
+ presets?: Presets;
8
+ children?: React.ReactNode;
9
+ };
10
+ declare const _default: React.MemoExoticComponent<typeof Account>;
11
+ export default _default;
12
+ declare function Account({ options, presets, children }: Props): React.ReactNode;
13
+ //# sourceMappingURL=account.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../../../src/future/components/msem/account.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,KAAK,OAAO,GAAG,aAAa,GAAG,EAAE,CAAC;AAElC,KAAK,OAAO,GAAG,EAAE,CAAC;AAElB,KAAK,KAAK,GAAG;IACX,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;;AAEF,wBAAmC;AAEnC,iBAAS,OAAO,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,KAAK,mBAiBrD"}
@@ -0,0 +1,19 @@
1
+ import * as React from "react";
2
+ import * as Utils from "./utils";
3
+ import * as Plausible from "../plausible";
4
+ export default React.memo(Account);
5
+ function Account({ options, presets, children }) {
6
+ React.useEffect(() => {
7
+ const lang = options?.lang === "fr" ? "fr" : "en";
8
+ const patchedOptions = {
9
+ ...options,
10
+ lang,
11
+ analytics: (...args) => {
12
+ options?.analytics?.apply(null, args);
13
+ Plausible.callback.apply(null, args);
14
+ },
15
+ };
16
+ Utils.loadWidget("customerAccount", patchedOptions, presets);
17
+ }, [options, presets]);
18
+ return children;
19
+ }
@@ -1,4 +1,5 @@
1
1
  import { Script } from "./script";
2
2
  import Tunnel from "./tunnel";
3
- export { Script, Tunnel };
3
+ import Account from "./account";
4
+ export { Script, Tunnel, Account };
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/future/components/msem/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/future/components/msem/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC"}
@@ -1,3 +1,4 @@
1
1
  import { Script } from "./script";
2
2
  import Tunnel from "./tunnel";
3
- export { Script, Tunnel };
3
+ import Account from "./account";
4
+ export { Script, Tunnel, Account };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ublo-lib",
3
- "version": "1.32.7",
3
+ "version": "1.32.8",
4
4
  "peerDependencies": {
5
5
  "dt-design-system": "^3.8.5",
6
6
  "leaflet": "^1.9.1",