@eid-easy/eideasy-widget 3.3.0 → 3.3.1

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.
@@ -14171,9 +14171,11 @@ function formatInputValues(inputValues, props) {
14171
14171
  ...inputValues
14172
14172
  };
14173
14173
  if (formattedInputValues.phone) {
14174
- const { phone, callingCode } = splitPhoneCallingCode(formattedInputValues.phone);
14175
- formattedInputValues.phone = phone;
14176
- formattedInputValues.callingCode = formattedInputValues.callingCode || callingCode;
14174
+ const { phone } = splitPhoneCallingCode(formattedInputValues.phone);
14175
+ if (formattedInputValues.callingCode) {
14176
+ formattedInputValues.phone = formattedInputValues.callingCode + phone;
14177
+ }
14178
+ formattedInputValues.phoneWithoutCallingCode = phone;
14177
14179
  }
14178
14180
  if (props.emailToken) {
14179
14181
  formattedInputValues.email_token = props.emailToken;
@@ -14253,7 +14255,7 @@ const createAppStore = ({ methodsConfig }) => {
14253
14255
  signingMethodsInCurrentCountry() {
14254
14256
  return filterMethodsByCountry(this.signingMethods, this.countryCode);
14255
14257
  },
14256
- callingCode() {
14258
+ callingCodeForCurrentCountry() {
14257
14259
  return callingCodes[this.countryCode];
14258
14260
  },
14259
14261
  userActionsEnabled() {
@@ -25415,7 +25417,7 @@ const _sfc_main$U = {
25415
25417
  const useAppStore = inject("useAppStore");
25416
25418
  const appStore = useAppStore();
25417
25419
  const { updateInputValues, loadingStart, loadingEnd, addFlashMessage, clearFlashMessages } = appStore;
25418
- const { inputValues, callingCode, additionalMethodConfig } = storeToRefs(appStore);
25420
+ const { inputValues, callingCodeForCurrentCountry, additionalMethodConfig } = storeToRefs(appStore);
25419
25421
  const fieldErrors = ref({});
25420
25422
  const challenge2 = ref();
25421
25423
  const authProcess = ref({});
@@ -25431,10 +25433,10 @@ const _sfc_main$U = {
25431
25433
  const schema = computed(() => [
25432
25434
  {
25433
25435
  type: "tel",
25434
- name: "phone",
25436
+ name: "phoneWithoutCallingCode",
25435
25437
  label: i18n2.t("phone-number"),
25436
25438
  validation: ["required"],
25437
- callingCode: callingCode.value
25439
+ callingCode: callingCodeForCurrentCountry.value
25438
25440
  },
25439
25441
  {
25440
25442
  type: "text",
@@ -25450,7 +25452,7 @@ const _sfc_main$U = {
25450
25452
  const formValue = computed({
25451
25453
  get() {
25452
25454
  return {
25453
- phone: inputValues.value.phone,
25455
+ phoneWithoutCallingCode: inputValues.value.phoneWithoutCallingCode,
25454
25456
  idcode: inputValues.value.idcode
25455
25457
  };
25456
25458
  },
@@ -25465,7 +25467,7 @@ const _sfc_main$U = {
25465
25467
  const dataToSubmit = {
25466
25468
  ...formValue.value
25467
25469
  };
25468
- dataToSubmit.phone = callingCode.value + dataToSubmit.phone;
25470
+ dataToSubmit.phone = callingCodeForCurrentCountry.value + dataToSubmit.phoneWithoutCallingCode;
25469
25471
  const extraConfig = additionalMethodConfig.value || {};
25470
25472
  authProcess.value = eidEasyClient.identification.mobileId.start({
25471
25473
  ...dataToSubmit,
@@ -25930,7 +25932,7 @@ const _sfc_main$Q = {
25930
25932
  startSignatureProcessing,
25931
25933
  endSignatureProcessing
25932
25934
  } = appStore;
25933
- const { inputValues, additionalMethodConfig, mode, callingCode } = storeToRefs(appStore);
25935
+ const { inputValues, additionalMethodConfig, mode, callingCodeForCurrentCountry } = storeToRefs(appStore);
25934
25936
  const fieldErrors = ref({});
25935
25937
  function clearErrors() {
25936
25938
  fieldErrors.value = {};
@@ -25941,10 +25943,10 @@ const _sfc_main$Q = {
25941
25943
  return [
25942
25944
  {
25943
25945
  type: "tel",
25944
- name: "phone",
25946
+ name: "phoneWithoutCallingCode",
25945
25947
  label: i18n2.t("phone-number"),
25946
25948
  validation: ["required"],
25947
- callingCode: callingCode.value
25949
+ callingCode: callingCodeForCurrentCountry.value
25948
25950
  },
25949
25951
  {
25950
25952
  type: "text",
@@ -25961,7 +25963,7 @@ const _sfc_main$Q = {
25961
25963
  const formValue = computed({
25962
25964
  get() {
25963
25965
  return {
25964
- phone: inputValues.value.phone,
25966
+ phoneWithoutCallingCode: inputValues.value.phoneWithoutCallingCode,
25965
25967
  idcode: inputValues.value.idcode
25966
25968
  };
25967
25969
  },
@@ -25976,7 +25978,7 @@ const _sfc_main$Q = {
25976
25978
  const dataToSubmit = {
25977
25979
  ...formValue.value
25978
25980
  };
25979
- dataToSubmit.phone = callingCode.value + dataToSubmit.phone;
25981
+ dataToSubmit.phone = callingCodeForCurrentCountry.value + dataToSubmit.phoneWithoutCallingCode;
25980
25982
  signingProcess.value = eidEasyClient.signature.mobileIdSignature.start({
25981
25983
  ...dataToSubmit,
25982
25984
  action: mode.value,
@@ -27543,7 +27545,7 @@ const _sfc_main$J = {
27543
27545
  startSignatureProcessing,
27544
27546
  endSignatureProcessing
27545
27547
  } = appStore;
27546
- const { inputValues, callingCode, additionalMethodConfig, mode } = storeToRefs(appStore);
27548
+ const { inputValues, callingCodeForCurrentCountry, additionalMethodConfig, mode } = storeToRefs(appStore);
27547
27549
  const fieldErrors = ref({});
27548
27550
  const evroTransactionId = ref(null);
27549
27551
  const signingProcess = ref({});
@@ -27568,7 +27570,7 @@ const _sfc_main$J = {
27568
27570
  name: "phone",
27569
27571
  label: i18n2.t("phone-number"),
27570
27572
  validation: ["required"],
27571
- placeholder: callingCode.value + "00000000"
27573
+ placeholder: callingCodeForCurrentCountry.value + "00000000"
27572
27574
  },
27573
27575
  {
27574
27576
  type: "submit",
@@ -27578,7 +27580,7 @@ const _sfc_main$J = {
27578
27580
  const formValue = computed({
27579
27581
  get() {
27580
27582
  return {
27581
- phone: [inputValues.value.callingCode, inputValues.value.phone].join("")
27583
+ phone: inputValues.value.phone
27582
27584
  };
27583
27585
  },
27584
27586
  set(newValues) {
@@ -27730,7 +27732,7 @@ const _sfc_main$I = {
27730
27732
  startSignatureProcessing,
27731
27733
  endSignatureProcessing
27732
27734
  } = appStore;
27733
- const { inputValues, callingCode, additionalMethodConfig, mode } = storeToRefs(appStore);
27735
+ const { inputValues, callingCodeForCurrentCountry, additionalMethodConfig, mode } = storeToRefs(appStore);
27734
27736
  const fieldErrors = ref({});
27735
27737
  const evroTransactionId = ref(null);
27736
27738
  const signingProcess = ref({});
@@ -27755,7 +27757,7 @@ const _sfc_main$I = {
27755
27757
  name: "phone",
27756
27758
  label: i18n2.t("phone-number"),
27757
27759
  validation: ["required"],
27758
- placeholder: callingCode.value + "00000000"
27760
+ placeholder: callingCodeForCurrentCountry.value + "00000000"
27759
27761
  },
27760
27762
  {
27761
27763
  type: "submit",
@@ -27765,7 +27767,7 @@ const _sfc_main$I = {
27765
27767
  const formValue = computed({
27766
27768
  get() {
27767
27769
  return {
27768
- phone: [inputValues.value.callingCode, inputValues.value.phone].join("")
27770
+ phone: inputValues.value.phone
27769
27771
  };
27770
27772
  },
27771
27773
  set(newValues) {
@@ -28278,7 +28280,7 @@ const _sfc_main$F = {
28278
28280
  const userCredentialsFormValue = computed({
28279
28281
  get() {
28280
28282
  return {
28281
- phone: [inputValues.value.callingCode, inputValues.value.phone].join(""),
28283
+ phone: inputValues.value.phone,
28282
28284
  signingPin: inputValues.value.signingPin
28283
28285
  };
28284
28286
  },
@@ -28669,7 +28671,7 @@ const _sfc_main$C = {
28669
28671
  get() {
28670
28672
  return {
28671
28673
  email: inputValues.value.email,
28672
- phone: [inputValues.value.callingCode, inputValues.value.phone].join("")
28674
+ phone: inputValues.value.phone
28673
28675
  };
28674
28676
  },
28675
28677
  set(newValues) {
@@ -29355,7 +29357,7 @@ const _sfc_main$x = {
29355
29357
  startSignatureProcessing,
29356
29358
  endSignatureProcessing
29357
29359
  } = appStore;
29358
- const { inputValues, callingCode, additionalMethodConfig, mode } = storeToRefs(appStore);
29360
+ const { inputValues, callingCodeForCurrentCountry, additionalMethodConfig, mode } = storeToRefs(appStore);
29359
29361
  const fieldErrors = ref({});
29360
29362
  const challenge2 = ref();
29361
29363
  const authProcess = ref({});
@@ -29374,9 +29376,9 @@ const _sfc_main$x = {
29374
29376
  },
29375
29377
  {
29376
29378
  type: "tel",
29377
- name: "phone",
29379
+ name: "phoneWithoutCallingCode",
29378
29380
  label: i18n2.t("phone-number"),
29379
- callingCode: callingCode.value
29381
+ callingCode: callingCodeForCurrentCountry.value
29380
29382
  },
29381
29383
  {
29382
29384
  type: "sectionSpacer",
@@ -29397,7 +29399,7 @@ const _sfc_main$x = {
29397
29399
  return {
29398
29400
  username: inputValues.value.username,
29399
29401
  email: inputValues.value.email,
29400
- phone: inputValues.value.phone
29402
+ phoneWithoutCallingCode: inputValues.value.phoneWithoutCallingCode
29401
29403
  };
29402
29404
  },
29403
29405
  set(newValues) {
@@ -29411,7 +29413,7 @@ const _sfc_main$x = {
29411
29413
  const dataToSubmit = {
29412
29414
  ...formValue.value
29413
29415
  };
29414
- dataToSubmit.phone = dataToSubmit.phone ? callingCode.value + dataToSubmit.phone : "";
29416
+ dataToSubmit.phone = dataToSubmit.phoneWithoutCallingCode ? callingCodeForCurrentCountry.value + dataToSubmit.phoneWithoutCallingCode : "";
29415
29417
  const extraConfig = additionalMethodConfig.value || {};
29416
29418
  authProcess.value = eidEasyClient.signature.halcomQesSignature.start({
29417
29419
  ...dataToSubmit,