@wf-financing/ui 3.13.0 → 3.13.2

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 CHANGED
@@ -1,5 +1,25 @@
1
1
  # @wf-financing/ui
2
2
 
3
+ ## 3.13.2
4
+
5
+ ### Patch Changes
6
+
7
+ - testing OIDC release flow
8
+
9
+ - Updated dependencies []:
10
+ - @wf-financing/embedded-types@0.7.1
11
+ - @wf-financing/logger@1.1.2
12
+ - @wf-financing/ui-assets@0.3.2
13
+
14
+ ## 3.13.1
15
+
16
+ ### Patch Changes
17
+
18
+ - Fix amount formating
19
+
20
+ - Updated dependencies []:
21
+ - @wf-financing/ui-assets@0.3.1
22
+
3
23
  ## 3.13.0
4
24
 
5
25
  ### Minor Changes
package/dist/index.es.js CHANGED
@@ -22757,15 +22757,19 @@ const Zw = "wf-theme-variables";
22757
22757
  function Z9({ themeKey: e, rootElement: t, onThemeLoad: n, onThemeLoadError: r }) {
22758
22758
  const o = ig[e];
22759
22759
  if (!o) {
22760
- console.warn("Theme URL not found for theme:", e);
22760
+ r == null || r({
22761
+ message: "Theme URL not found for theme: " + e
22762
+ });
22761
22763
  return;
22762
22764
  }
22763
22765
  const a = t || document.head;
22764
22766
  try {
22765
- if (getComputedStyle(a).getPropertyValue("--app-theme-key").trim() === e)
22767
+ if (getComputedStyle(a).getPropertyValue("--app-theme-key").trim() === e) {
22768
+ n == null || n();
22766
22769
  return;
22767
- } catch {
22768
- console.warn("Unable to check theme key");
22770
+ }
22771
+ } catch (d) {
22772
+ r == null || r(d);
22769
22773
  }
22770
22774
  const l = document.createElement("link");
22771
22775
  l.href = ZC(o), l.rel = "stylesheet", l.id = Zw, l.onload = () => {
@@ -23928,7 +23932,7 @@ const em = {
23928
23932
  "8124d71d-1de6-4a39-8cff-dd2ce96c8363": "rocketFuel",
23929
23933
  "0e553c21-13a7-461f-bf4d-5a92fad4a403": "reveni",
23930
23934
  "bb9f8122-66ff-41bd-a8c0-52a9af0b3b4f": "reveni"
23931
- }, t7 = "3.13.0", n7 = "https://static.wayflyer.com/flyui-assets/styles/flyui-f0765dfb.css", tm = {
23935
+ }, t7 = "3.13.2", n7 = "https://static.wayflyer.com/flyui-assets/styles/flyui-f0765dfb.css", tm = {
23932
23936
  styles: n7
23933
23937
  }, sS = "wf-flyui-styles", r7 = async ({ shadow: e, onStylesLoad: t, onStylesLoadError: n }) => {
23934
23938
  if (!tm || !("styles" in tm))
@@ -23980,15 +23984,16 @@ const em = {
23980
23984
  { code: "AUD", icon: "A$", position: "before" },
23981
23985
  { code: "CAD", icon: "C$", position: "before" }
23982
23986
  ].find(({ code: l }) => e === l), a = () => {
23983
- if (!o) return `${t}${e}`;
23984
- const { position: l, icon: c } = o;
23985
- switch (l) {
23987
+ const l = Number(t).toLocaleString();
23988
+ if (!o) return `${l}${e}`;
23989
+ const { position: c, icon: d } = o;
23990
+ switch (c) {
23986
23991
  case "before":
23987
- return `${c}${t}`;
23992
+ return `${d}${l}`;
23988
23993
  case "after":
23989
- return `${t}${c}`;
23994
+ return `${l}${d}`;
23990
23995
  default:
23991
- return `${c}${t}`;
23996
+ return `${d}${l}`;
23992
23997
  }
23993
23998
  };
23994
23999
  return n.replace("{amount}", a());
@@ -33829,7 +33834,7 @@ const CV = ({ templateString: e }) => {
33829
33834
  }
33830
33835
  );
33831
33836
  }, MV = () => {
33832
- const { isLoading: e, data: t } = m7(), { data: n } = S_(), { onWidgetClose: r, isWidgetDismissed: o, options: a } = Li(), [l] = b.useState(() => !!(a != null && a.skipAnimations)), { mutate: c } = y7(), [d, f] = b.useState(!1);
33837
+ const { isLoading: e, data: t } = m7(), { data: n } = S_(), { onWidgetClose: r, isWidgetDismissed: o, options: a } = Li(), [l] = b.useState(() => !!(a != null && a.skipAnimations) || !e), { mutate: c } = y7(), [d, f] = b.useState(!1);
33833
33838
  if (!(t && n && !o)) return null;
33834
33839
  const m = () => {
33835
33840
  (!e && !t || o) && r();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wf-financing/ui",
3
- "version": "3.13.0",
3
+ "version": "3.13.2",
4
4
  "exports": {
5
5
  ".": {
6
6
  "import": "./dist/index.es.js",
@@ -37,9 +37,9 @@
37
37
  "react-intl": "^6.2.5",
38
38
  "react-markdown": "^10.1.0",
39
39
  "styled-components": "^6.1.19",
40
- "@wf-financing/embedded-types": "0.7.0",
41
- "@wf-financing/ui-assets": "0.3.0",
42
- "@wf-financing/logger": "1.1.1"
40
+ "@wf-financing/embedded-types": "0.7.1",
41
+ "@wf-financing/ui-assets": "0.3.2",
42
+ "@wf-financing/logger": "1.1.2"
43
43
  },
44
44
  "publishConfig": {
45
45
  "access": "public"
package/src/CtaWidget.tsx CHANGED
@@ -12,7 +12,7 @@ export const CtaWidget = () => {
12
12
  const { isLoading, data: cta } = useCtaBanner();
13
13
  const { data: copy } = useCopy();
14
14
  const { onWidgetClose, isWidgetDismissed, options } = usePartnerContext();
15
- const [skipAnimation] = useState(() => !!options?.skipAnimations);
15
+ const [skipAnimation] = useState(() => !!options?.skipAnimations || !isLoading);
16
16
  const { mutate: continueHostedApplicationMutaion } = useContinueHostedApplication();
17
17
  const [isModalOpen, setIsModalOpen] = useState(false);
18
18
 
@@ -11,17 +11,19 @@ export const replacePlaceholdersForMainText = (currency: string, amount: number,
11
11
  const currencyWithIcon = currencies.find(({ code }) => currency === code);
12
12
 
13
13
  const getConvertedAmount = () => {
14
- if (!currencyWithIcon) return `${amount}${currency}`;
14
+ const convertedAmount = Number(amount).toLocaleString();
15
+
16
+ if (!currencyWithIcon) return `${convertedAmount}${currency}`;
15
17
 
16
18
  const { position, icon } = currencyWithIcon;
17
19
 
18
20
  switch (position) {
19
21
  case 'before':
20
- return `${icon}${amount}`;
22
+ return `${icon}${convertedAmount}`;
21
23
  case 'after':
22
- return `${amount}${icon}`;
24
+ return `${convertedAmount}${icon}`;
23
25
  default:
24
- return `${icon}${amount}`;
26
+ return `${icon}${convertedAmount}`;
25
27
  }
26
28
  };
27
29