@syncfy/authentication-widget 0.0.14 → 0.0.16

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.
@@ -8039,26 +8039,26 @@ const d2 = qi().noUnknown().shape({
8039
8039
  let dg = {
8040
8040
  git: {
8041
8041
  dirty: !1,
8042
- raw: "v0.0.14-0-g24bd51e",
8043
- hash: "g24bd51e",
8042
+ raw: "v0.0.16-0-ge091dbb",
8043
+ hash: "ge091dbb",
8044
8044
  distance: 0,
8045
- tag: "v0.0.14",
8045
+ tag: "v0.0.16",
8046
8046
  semver: {
8047
8047
  options: {
8048
8048
  loose: !1,
8049
8049
  includePrerelease: !1
8050
8050
  },
8051
8051
  loose: !1,
8052
- raw: "v0.0.14",
8052
+ raw: "v0.0.16",
8053
8053
  major: 0,
8054
8054
  minor: 0,
8055
- patch: 14,
8055
+ patch: 16,
8056
8056
  prerelease: [],
8057
8057
  build: [],
8058
- version: "0.0.14"
8058
+ version: "0.0.16"
8059
8059
  },
8060
- suffix: "0-g24bd51e",
8061
- semverString: "0.0.14"
8060
+ suffix: "0-ge091dbb",
8061
+ semverString: "0.0.16"
8062
8062
  }
8063
8063
  };
8064
8064
  function V0() {
@@ -69106,28 +69106,37 @@ const zTe = ["disabled"], UTe = /* @__PURE__ */ rt({
69106
69106
  ]
69107
69107
  });
69108
69108
  function m() {
69109
- const T = setInterval(() => {
69110
- r.sync.getAccounts({ id_credential: r.credential }).then((C) => {
69111
- C.length > 0 && i.value.length === 0 && (clearInterval(T), i.value = C, u.accounts = i.value.map(
69112
- (I) => I.id_account
69109
+ const C = setInterval(() => {
69110
+ r.sync.getAccounts({ id_credential: r.credential }).then((I) => {
69111
+ I.length > 0 && i.value.length === 0 && (clearInterval(C), i.value = I, u.accounts = i.value.map(
69112
+ (B) => B.id_account
69113
69113
  ), d.value = !1);
69114
69114
  }).catch(() => {
69115
- clearInterval(T), d.value = !1, l.value = !0, n("accounts-error");
69115
+ clearInterval(C), d.value = !1, l.value = !0, n("accounts-error");
69116
69116
  });
69117
69117
  }, 2e3);
69118
69118
  }
69119
- function b(T) {
69120
- return `**${T.slice(-4)}`;
69121
- }
69122
- const _ = async (T, C) => {
69123
- T.preventDefault(), C && await C.validate((I) => {
69124
- I && (n("accounts-selected", u.accounts), t("done"));
69119
+ function b() {
69120
+ let C = i.value.reduce((I, B) => (I = {
69121
+ ...I,
69122
+ [B.id_account]: !1
69123
+ }, I), {});
69124
+ return u.accounts.forEach((I) => {
69125
+ C[I] = !0;
69126
+ }), C;
69127
+ }
69128
+ function _(C) {
69129
+ return `**${C.slice(-4)}`;
69130
+ }
69131
+ const S = async (C, I) => {
69132
+ C.preventDefault(), I && await I.validate((B) => {
69133
+ B && (n("accounts-selected", b()), t("done"));
69125
69134
  });
69126
69135
  };
69127
- function S(T, C) {
69128
- c.value = !C;
69136
+ function T(C, I) {
69137
+ c.value = !I;
69129
69138
  }
69130
- return m(), (T, C) => (de(), Be(xt, null, [
69139
+ return m(), (C, I) => (de(), Be(xt, null, [
69131
69140
  d.value ? (de(), nt(hu, {
69132
69141
  key: 0,
69133
69142
  avatar: r.avatar,
@@ -69135,22 +69144,22 @@ const zTe = ["disabled"], UTe = /* @__PURE__ */ rt({
69135
69144
  size: "large",
69136
69145
  title: Y(a)("accounts_selection.fetching"),
69137
69146
  type: l.value ? "error" : "loading",
69138
- onImagesLoaded: C[0] || (C[0] = () => Y(n)("images-loaded")),
69139
- onImagesLoading: C[1] || (C[1] = () => Y(n)("images-loading"))
69147
+ onImagesLoaded: I[0] || (I[0] = () => Y(n)("images-loaded")),
69148
+ onImagesLoading: I[1] || (I[1] = () => Y(n)("images-loading"))
69140
69149
  }, null, 8, ["avatar", "message", "title", "type"])) : (de(), nt(Y(fx), {
69141
69150
  key: 1,
69142
69151
  ref_key: "accountsFormRef",
69143
69152
  ref: o,
69144
- class: Ce(T.$style["accounts-form"]),
69145
- autocomplete: T.disableFormAutocomplete ? "off" : "on",
69153
+ class: Ce(C.$style["accounts-form"]),
69154
+ autocomplete: C.disableFormAutocomplete ? "off" : "on",
69146
69155
  disabled: d.value,
69147
69156
  "hide-required-asterisk": !0,
69148
69157
  "label-position": "top",
69149
69158
  model: u,
69150
69159
  name: "accounts-selection",
69151
69160
  rules: v,
69152
- onSubmit: C[3] || (C[3] = (I) => _(I, o.value)),
69153
- onValidate: S
69161
+ onSubmit: I[3] || (I[3] = (B) => S(B, o.value)),
69162
+ onValidate: T
69154
69163
  }, {
69155
69164
  default: lt(() => [
69156
69165
  _t(Y(cx), {
@@ -69162,32 +69171,32 @@ const zTe = ["disabled"], UTe = /* @__PURE__ */ rt({
69162
69171
  default: lt(() => [
69163
69172
  _t(Y(LMe), {
69164
69173
  modelValue: u.accounts,
69165
- "onUpdate:modelValue": C[2] || (C[2] = (I) => u.accounts = I),
69166
- class: Ce(T.$style["accounts-checkboxes"])
69174
+ "onUpdate:modelValue": I[2] || (I[2] = (B) => u.accounts = B),
69175
+ class: Ce(C.$style["accounts-checkboxes"])
69167
69176
  }, {
69168
69177
  default: lt(() => [
69169
- (de(!0), Be(xt, null, ii(i.value, (I) => (de(), nt(Y(FMe), {
69170
- key: I.id_account,
69171
- class: Ce(T.$style["accounts-checkbox"]),
69178
+ (de(!0), Be(xt, null, ii(i.value, (B) => (de(), nt(Y(FMe), {
69179
+ key: B.id_account,
69180
+ class: Ce(C.$style["accounts-checkbox"]),
69172
69181
  name: "accounts",
69173
- value: I.id_account
69182
+ value: B.id_account
69174
69183
  }, {
69175
69184
  default: lt(() => [
69176
69185
  Re("div", {
69177
- class: Ce(T.$style["accounts-checkbox-content"])
69186
+ class: Ce(C.$style["accounts-checkbox-content"])
69178
69187
  }, [
69179
- Re("div", null, at(I.account_type), 1),
69188
+ Re("div", null, at(B.account_type), 1),
69180
69189
  Re("div", {
69181
- class: Ce(T.$style["accounts-checkbox-row"])
69190
+ class: Ce(C.$style["accounts-checkbox-row"])
69182
69191
  }, [
69183
- Re("div", null, at(b(I.number)), 1),
69192
+ Re("div", null, at(_(B.number)), 1),
69184
69193
  Re("div", null, [
69185
69194
  _t(Y(R5e), {
69186
- class: Ce(T.$style["accounts-balance"]),
69187
- value: I.balance,
69195
+ class: Ce(C.$style["accounts-balance"]),
69196
+ value: B.balance,
69188
69197
  precision: 2
69189
69198
  }, null, 8, ["class", "value"]),
69190
- nn(" " + at(I.currency), 1)
69199
+ nn(" " + at(B.currency), 1)
69191
69200
  ])
69192
69201
  ], 2)
69193
69202
  ], 2)
@@ -69203,7 +69212,7 @@ const zTe = ["disabled"], UTe = /* @__PURE__ */ rt({
69203
69212
  Re("button", {
69204
69213
  class: "pb-w-sync_primary-button",
69205
69214
  "data-testid": "accounts-button",
69206
- disabled: T.buttonDisabledStyle && c.value,
69215
+ disabled: C.buttonDisabledStyle && c.value,
69207
69216
  type: "submit"
69208
69217
  }, at(Y(a)("accounts_selection.done")), 9, zTe)
69209
69218
  ]),
@@ -69211,13 +69220,13 @@ const zTe = ["disabled"], UTe = /* @__PURE__ */ rt({
69211
69220
  }, 8, ["class", "autocomplete", "disabled", "model", "rules"])),
69212
69221
  l.value ? (de(), Be("div", {
69213
69222
  key: 2,
69214
- class: Ce(T.$style["accounts-error-button-container"])
69223
+ class: Ce(C.$style["accounts-error-button-container"])
69215
69224
  }, [
69216
69225
  Re("button", {
69217
69226
  class: "pb-w-sync_primary-button",
69218
69227
  "data-testid": "accounts-button",
69219
69228
  type: "button",
69220
- onClick: C[4] || (C[4] = () => t("done"))
69229
+ onClick: I[4] || (I[4] = () => t("done"))
69221
69230
  }, at(Y(a)("accounts_selection.done")), 1)
69222
69231
  ], 2)) : Ye("", !0)
69223
69232
  ], 64));
@@ -69649,8 +69658,10 @@ const MAe = { key: 1 }, CAe = ["alt", "src"], TAe = ["aria-label"], AAe = { clas
69649
69658
  assetsPath: { default: "https://s.paybook.com" },
69650
69659
  buttonDisabledStyle: { type: Boolean, default: !1 },
69651
69660
  disableFormAutocomplete: { type: Boolean, default: !1 },
69661
+ displayPrivacyScreen: { type: Boolean },
69652
69662
  errorMessage: { default: null },
69653
69663
  loaderMessage: {},
69664
+ oneSiteFlow: { type: Boolean },
69654
69665
  selectClass: { default: "" },
69655
69666
  showLogo: { type: Boolean, default: !0 },
69656
69667
  showPasswordStyle: { default: "icon" },
@@ -69904,12 +69915,13 @@ const MAe = { key: 1 }, CAe = ["alt", "src"], TAe = ["aria-label"], AAe = { clas
69904
69915
  Re("div", {
69905
69916
  class: Ce(M.$style["site-buttons"])
69906
69917
  }, [
69907
- Re("button", {
69918
+ !r.oneSiteFlow || r.displayPrivacyScreen ? (de(), Be("button", {
69919
+ key: 0,
69908
69920
  class: "pb-w-sync_secondary-button",
69909
69921
  "data-testid": "site-button-back",
69910
69922
  type: "button",
69911
69923
  onClick: s[4] || (s[4] = () => t("back"))
69912
- }, at(Y(B)("common.back")), 1),
69924
+ }, at(Y(B)("common.back")), 1)) : Ye("", !0),
69913
69925
  Re("button", {
69914
69926
  class: "pb-w-sync_primary-button",
69915
69927
  "data-testid": "site-button",
@@ -73476,7 +73488,7 @@ const rBe = ["aria-label"], nBe = { key: 1 }, iBe = ["aria-label"], aBe = { key:
73476
73488
  return typeof ce == "string" ? ce : ce.response && ce.response.data && ce.response.data.message === "Credential error, please consider updating credential password" ? "api_errors.credential_error." : `api_errors.${ce.response ? ce.response.status ? ce.response.status : 500 : "no_internet"}.`;
73477
73489
  }
73478
73490
  function F() {
73479
- L.value ? L.value === "finish" ? fe() : L.value === "twofa" ? Qe() : n.navigation.oneSiteFlow && n.navigation.displayPrivacyScreen ? (a("back"), T.value = !0) : Me() : B.value ? ne() : O.value ? (a("back"), O.value = null) : (a("back"), T.value = !0);
73491
+ L.value ? L.value === "finish" ? fe() : L.value === "twofa" ? Qe() : Me() : B.value ? ne() : O.value ? (a("back"), O.value = null) : (a("back"), T.value = !0);
73480
73492
  }
73481
73493
  function U() {
73482
73494
  C.value = !0, re();
@@ -74104,9 +74116,9 @@ const rBe = ["aria-label"], nBe = { key: 1 }, iBe = ["aria-label"], aBe = { key:
74104
74116
  return _e ? A.strictMode({ token: ce, strict: _e }) : A.updateToken(ce);
74105
74117
  }
74106
74118
  function Me() {
74107
- a("back"), Un("close_site", {
74119
+ a("back"), n.navigation.oneSiteFlow && n.navigation.displayPrivacyScreen ? T.value = !0 : (Un("close_site", {
74108
74120
  id_site: y.config.id_site
74109
- }), L.value = y = null, $.value = null, R.value.length === 1 && (B.value = null);
74121
+ }), L.value = y = null, $.value = null, R.value.length === 1 && (B.value = null));
74110
74122
  }
74111
74123
  function Qe(ce = !0) {
74112
74124
  ce && a("back"), L.value = y = null, G(w, !1);
@@ -74203,8 +74215,10 @@ const rBe = ["aria-label"], nBe = { key: 1 }, iBe = ["aria-label"], aBe = { key:
74203
74215
  "assets-path": Y(K),
74204
74216
  "button-disabled-style": n.navigation.formButtonsDisabledStyle,
74205
74217
  "disable-form-autocomplete": n.navigation.disableFormAutocomplete,
74218
+ "display-privacy-screen": n.navigation.displayPrivacyScreen,
74206
74219
  "error-message": $.value,
74207
74220
  "loader-message": q.value,
74221
+ "one-site-flow": n.navigation.oneSiteFlow,
74208
74222
  "select-class": n.navigation.selectClass,
74209
74223
  "show-logo": n.navigation.displayLogoImages,
74210
74224
  "show-password-style": n.navigation.formShowPasswordStyle,
@@ -74218,7 +74232,7 @@ const rBe = ["aria-label"], nBe = { key: 1 }, iBe = ["aria-label"], aBe = { key:
74218
74232
  onValid: _e[4] || (_e[4] = () => {
74219
74233
  S.value = Y(i)("site.login.authenticating"), $.value = null;
74220
74234
  })
74221
- }, null, 8, ["assets-path", "button-disabled-style", "disable-form-autocomplete", "error-message", "loader-message", "select-class", "show-logo", "show-password-style", "site", "test-mode"])) : Ye("", !0),
74235
+ }, null, 8, ["assets-path", "button-disabled-style", "disable-form-autocomplete", "display-privacy-screen", "error-message", "loader-message", "one-site-flow", "select-class", "show-logo", "show-password-style", "site", "test-mode"])) : Ye("", !0),
74222
74236
  L.value === "twofa" || L.value === "twofa-loading" ? (de(), nt(rw, {
74223
74237
  key: 1,
74224
74238
  avatar: `${Y(K)}${Y(y).config.avatar}`,