@syncfy/authentication-widget 2.1.2 → 2.2.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.
- package/README.md +26 -0
- package/dist/syncfy-authentication-widget.cjs.js +564 -204
- package/dist/syncfy-authentication-widget.css +125 -35
- package/dist/syncfy-authentication-widget.esm.js +566 -206
- package/dist/syncfy-authentication-widget.umd.js +113 -128
- package/package.json +1 -1
|
@@ -2466,6 +2466,7 @@ const configValidator = yup.object().noUnknown().shape({
|
|
|
2466
2466
|
displayBusinessSites: yup.boolean(),
|
|
2467
2467
|
displayCredentialInModal: yup.boolean(),
|
|
2468
2468
|
displayErrorsInToast: yup.boolean(),
|
|
2469
|
+
displayFullSiteList: yup.boolean(),
|
|
2469
2470
|
displayLogoImages: yup.boolean(),
|
|
2470
2471
|
displayLongDescription: yup.boolean(),
|
|
2471
2472
|
displayPersonalSites: yup.boolean(),
|
|
@@ -2586,9 +2587,9 @@ const paramsValidator = yup.object().shape({
|
|
|
2586
2587
|
}).strict().noUnknown();
|
|
2587
2588
|
let __VERSION__ = {
|
|
2588
2589
|
"git": {
|
|
2589
|
-
"hash": "
|
|
2590
|
+
"hash": "g689b636",
|
|
2590
2591
|
"distance": 0,
|
|
2591
|
-
"tag": "v2.1
|
|
2592
|
+
"tag": "v2.2.1"
|
|
2592
2593
|
}
|
|
2593
2594
|
};
|
|
2594
2595
|
function getVersion() {
|
|
@@ -3680,21 +3681,21 @@ function getSantanderWebSocketScript() {
|
|
|
3680
3681
|
};
|
|
3681
3682
|
});
|
|
3682
3683
|
}
|
|
3683
|
-
const _hoisted_1$
|
|
3684
|
+
const _hoisted_1$d = {
|
|
3684
3685
|
key: 0,
|
|
3685
3686
|
width: "30",
|
|
3686
3687
|
height: "28",
|
|
3687
3688
|
fill: "none",
|
|
3688
3689
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3689
3690
|
};
|
|
3690
|
-
const _hoisted_2$
|
|
3691
|
+
const _hoisted_2$b = {
|
|
3691
3692
|
key: 1,
|
|
3692
3693
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3693
3694
|
width: "23",
|
|
3694
3695
|
height: "23",
|
|
3695
3696
|
fill: "none"
|
|
3696
3697
|
};
|
|
3697
|
-
const _hoisted_3$
|
|
3698
|
+
const _hoisted_3$8 = {
|
|
3698
3699
|
key: 2,
|
|
3699
3700
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3700
3701
|
viewBox: "0 0 50 50"
|
|
@@ -3772,7 +3773,7 @@ const _hoisted_11 = {
|
|
|
3772
3773
|
"stroke-width": "1.5",
|
|
3773
3774
|
"xmlns:v": "https://vecta.io/nano"
|
|
3774
3775
|
};
|
|
3775
|
-
const _sfc_main$
|
|
3776
|
+
const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
3776
3777
|
__name: "CustomIcon",
|
|
3777
3778
|
props: {
|
|
3778
3779
|
icon: {}
|
|
@@ -3780,7 +3781,7 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
3780
3781
|
setup(__props) {
|
|
3781
3782
|
const props = __props;
|
|
3782
3783
|
return (_ctx, _cache) => {
|
|
3783
|
-
return props.icon === "back" ? (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
3784
|
+
return props.icon === "back" ? (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$d, _cache[0] || (_cache[0] = [
|
|
3784
3785
|
vue.createElementVNode("path", {
|
|
3785
3786
|
d: "M2 14.219h26.5M2 13.781 13.781 2M2 14.219 13.781 26",
|
|
3786
3787
|
stroke: "#000",
|
|
@@ -3788,7 +3789,7 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
3788
3789
|
"stroke-linecap": "round",
|
|
3789
3790
|
"stroke-linejoin": "round"
|
|
3790
3791
|
}, null, -1)
|
|
3791
|
-
]))) : props.icon === "close" ? (vue.openBlock(), vue.createElementBlock("svg", _hoisted_2$
|
|
3792
|
+
]))) : props.icon === "close" ? (vue.openBlock(), vue.createElementBlock("svg", _hoisted_2$b, _cache[1] || (_cache[1] = [
|
|
3792
3793
|
vue.createElementVNode("path", {
|
|
3793
3794
|
d: "m2 2 18.738 18.738M2.12 21.107 20.857 2.37",
|
|
3794
3795
|
stroke: "#000",
|
|
@@ -3796,7 +3797,7 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
3796
3797
|
"stroke-linecap": "round",
|
|
3797
3798
|
"stroke-linejoin": "round"
|
|
3798
3799
|
}, null, -1)
|
|
3799
|
-
]))) : props.icon === "error" ? (vue.openBlock(), vue.createElementBlock("svg", _hoisted_3$
|
|
3800
|
+
]))) : props.icon === "error" ? (vue.openBlock(), vue.createElementBlock("svg", _hoisted_3$8, _cache[2] || (_cache[2] = [
|
|
3800
3801
|
vue.createElementVNode("circle", {
|
|
3801
3802
|
cx: "25",
|
|
3802
3803
|
cy: "25",
|
|
@@ -3867,8 +3868,8 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
3867
3868
|
};
|
|
3868
3869
|
}
|
|
3869
3870
|
});
|
|
3870
|
-
const _hoisted_1$
|
|
3871
|
-
const _sfc_main$
|
|
3871
|
+
const _hoisted_1$c = ["src"];
|
|
3872
|
+
const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
3872
3873
|
__name: "AppLoader",
|
|
3873
3874
|
props: {
|
|
3874
3875
|
avatar: { default: void 0 },
|
|
@@ -3915,8 +3916,8 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
|
3915
3916
|
width: "1",
|
|
3916
3917
|
height: "1",
|
|
3917
3918
|
onLoad: _cache[0] || (_cache[0] = () => emit("imagesLoaded"))
|
|
3918
|
-
}, null, 40, _hoisted_1$
|
|
3919
|
-
_ctx.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
3919
|
+
}, null, 40, _hoisted_1$c)) : vue.createCommentVNode("", true),
|
|
3920
|
+
_ctx.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$j, {
|
|
3920
3921
|
key: 1,
|
|
3921
3922
|
icon: _ctx.icon
|
|
3922
3923
|
}, null, 8, ["icon"])) : vue.createCommentVNode("", true)
|
|
@@ -3941,7 +3942,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
|
3941
3942
|
}
|
|
3942
3943
|
});
|
|
3943
3944
|
const loader = "pb-w-sync_loader";
|
|
3944
|
-
const style0$
|
|
3945
|
+
const style0$h = {
|
|
3945
3946
|
loader,
|
|
3946
3947
|
"loader-container-animation": "pb-w-sync_loader-container-animation",
|
|
3947
3948
|
"loader-clip-animation": "pb-w-sync_loader-clip-animation",
|
|
@@ -3966,12 +3967,12 @@ const _export_sfc = (sfc, props) => {
|
|
|
3966
3967
|
}
|
|
3967
3968
|
return target;
|
|
3968
3969
|
};
|
|
3969
|
-
const cssModules$
|
|
3970
|
-
"$style": style0$
|
|
3970
|
+
const cssModules$h = {
|
|
3971
|
+
"$style": style0$h
|
|
3971
3972
|
};
|
|
3972
|
-
const AppLoader = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3973
|
-
const _hoisted_1$
|
|
3974
|
-
const _sfc_main$
|
|
3973
|
+
const AppLoader = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__cssModules", cssModules$h]]);
|
|
3974
|
+
const _hoisted_1$b = ["disabled"];
|
|
3975
|
+
const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
3975
3976
|
__name: "AccountsSelection",
|
|
3976
3977
|
props: {
|
|
3977
3978
|
avatar: { default: void 0 },
|
|
@@ -4165,7 +4166,7 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
|
4165
4166
|
"data-testid": "accounts-button",
|
|
4166
4167
|
disabled: _ctx.buttonDisabledStyle && isInvalid.value,
|
|
4167
4168
|
type: "submit"
|
|
4168
|
-
}, vue.toDisplayString(vue.unref(t)("accounts_selection.done")), 9, _hoisted_1$
|
|
4169
|
+
}, vue.toDisplayString(vue.unref(t)("accounts_selection.done")), 9, _hoisted_1$b)
|
|
4169
4170
|
]),
|
|
4170
4171
|
_: 1
|
|
4171
4172
|
}, 8, ["class", "autocomplete", "disabled", "model", "rules"])),
|
|
@@ -4184,7 +4185,7 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
|
4184
4185
|
};
|
|
4185
4186
|
}
|
|
4186
4187
|
});
|
|
4187
|
-
const style0$
|
|
4188
|
+
const style0$g = {
|
|
4188
4189
|
"accounts-balance": "pb-w-sync_accounts-balance",
|
|
4189
4190
|
"accounts-checkbox": "pb-w-sync_accounts-checkbox",
|
|
4190
4191
|
"accounts-checkbox-content": "pb-w-sync_accounts-checkbox-content",
|
|
@@ -4195,11 +4196,11 @@ const style0$f = {
|
|
|
4195
4196
|
"accounts-selection": "pb-w-sync_accounts-selection",
|
|
4196
4197
|
"accounts-api-error": "pb-w-sync_accounts-api-error"
|
|
4197
4198
|
};
|
|
4198
|
-
const cssModules$
|
|
4199
|
-
"$style": style0$
|
|
4199
|
+
const cssModules$g = {
|
|
4200
|
+
"$style": style0$g
|
|
4200
4201
|
};
|
|
4201
|
-
const AccountsSelection = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4202
|
-
const _sfc_main$
|
|
4202
|
+
const AccountsSelection = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__cssModules", cssModules$g]]);
|
|
4203
|
+
const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
4203
4204
|
__name: "FinalResponse",
|
|
4204
4205
|
props: {
|
|
4205
4206
|
avatar: {},
|
|
@@ -4245,127 +4246,21 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
|
4245
4246
|
};
|
|
4246
4247
|
}
|
|
4247
4248
|
});
|
|
4248
|
-
const style0$
|
|
4249
|
+
const style0$f = {
|
|
4249
4250
|
"final-response-container": "pb-w-sync_final-response-container"
|
|
4250
4251
|
};
|
|
4251
|
-
const cssModules$
|
|
4252
|
-
"$style": style0$
|
|
4253
|
-
};
|
|
4254
|
-
const FinalResponse = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__cssModules", cssModules$e]]);
|
|
4255
|
-
const _hoisted_1$9 = ["src"];
|
|
4256
|
-
const _hoisted_2$9 = ["src"];
|
|
4257
|
-
const _hoisted_3$6 = ["onClick"];
|
|
4258
|
-
const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
4259
|
-
__name: "InstitutionFilters",
|
|
4260
|
-
props: {
|
|
4261
|
-
countryId: {},
|
|
4262
|
-
filteredCountries: {},
|
|
4263
|
-
filteredOrganizationTypes: {},
|
|
4264
|
-
showCountries: { type: Boolean },
|
|
4265
|
-
organizationTypeId: {},
|
|
4266
|
-
selectClass: {}
|
|
4267
|
-
},
|
|
4268
|
-
emits: ["update:countryId", "update:organizationTypeId"],
|
|
4269
|
-
setup(__props, { emit: __emit }) {
|
|
4270
|
-
const props = __props;
|
|
4271
|
-
const emit = __emit;
|
|
4272
|
-
const { t } = vueI18n.useI18n();
|
|
4273
|
-
const selectedCountryFlag = vue.computed(
|
|
4274
|
-
() => countryFlag(
|
|
4275
|
-
props.filteredCountries.find(
|
|
4276
|
-
(country) => country.id_country === props.countryId
|
|
4277
|
-
)
|
|
4278
|
-
)
|
|
4279
|
-
);
|
|
4280
|
-
function countryChanged(id_country) {
|
|
4281
|
-
measureEvent("open_country", {
|
|
4282
|
-
id_country
|
|
4283
|
-
});
|
|
4284
|
-
emit("update:countryId", id_country);
|
|
4285
|
-
}
|
|
4286
|
-
function countryFlag(country) {
|
|
4287
|
-
return `https://hatscripts.github.io/circle-flags/flags/${country.code.toLocaleLowerCase()}.svg`;
|
|
4288
|
-
}
|
|
4289
|
-
function selectOrganizationType(id) {
|
|
4290
|
-
measureEvent("open_site_organization_type", {
|
|
4291
|
-
id_site_organization_type: id
|
|
4292
|
-
});
|
|
4293
|
-
emit("update:organizationTypeId", id);
|
|
4294
|
-
}
|
|
4295
|
-
return (_ctx, _cache) => {
|
|
4296
|
-
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
4297
|
-
vue.createElementVNode("p", {
|
|
4298
|
-
class: vue.normalizeClass(_ctx.$style["institution-filters-intro"])
|
|
4299
|
-
}, vue.toDisplayString(vue.unref(t)("common.intro")), 3),
|
|
4300
|
-
_ctx.showCountries ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElSelect), {
|
|
4301
|
-
key: 0,
|
|
4302
|
-
class: vue.normalizeClass(_ctx.$style["widget-country"]),
|
|
4303
|
-
"model-value": props.countryId,
|
|
4304
|
-
"popper-class": props.selectClass,
|
|
4305
|
-
onChange: countryChanged
|
|
4306
|
-
}, {
|
|
4307
|
-
prefix: vue.withCtx(() => [
|
|
4308
|
-
vue.createElementVNode("img", {
|
|
4309
|
-
src: selectedCountryFlag.value,
|
|
4310
|
-
width: "44",
|
|
4311
|
-
height: "44",
|
|
4312
|
-
alt: ""
|
|
4313
|
-
}, null, 8, _hoisted_1$9)
|
|
4314
|
-
]),
|
|
4315
|
-
default: vue.withCtx(() => [
|
|
4316
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.filteredCountries, (country) => {
|
|
4317
|
-
return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElOption), {
|
|
4318
|
-
key: country.id_country,
|
|
4319
|
-
class: vue.normalizeClass(_ctx.$style["widget-country-option"]),
|
|
4320
|
-
value: country.id_country,
|
|
4321
|
-
label: country.name
|
|
4322
|
-
}, {
|
|
4323
|
-
default: vue.withCtx(() => [
|
|
4324
|
-
vue.createElementVNode("img", {
|
|
4325
|
-
src: countryFlag(country),
|
|
4326
|
-
width: "44",
|
|
4327
|
-
height: "44",
|
|
4328
|
-
alt: ""
|
|
4329
|
-
}, null, 8, _hoisted_2$9),
|
|
4330
|
-
vue.createElementVNode("span", null, vue.toDisplayString(country.name), 1)
|
|
4331
|
-
]),
|
|
4332
|
-
_: 2
|
|
4333
|
-
}, 1032, ["class", "value", "label"]);
|
|
4334
|
-
}), 128))
|
|
4335
|
-
]),
|
|
4336
|
-
_: 1
|
|
4337
|
-
}, 8, ["class", "model-value", "popper-class"])) : vue.createCommentVNode("", true),
|
|
4338
|
-
vue.createElementVNode("div", {
|
|
4339
|
-
class: vue.normalizeClass(_ctx.$style["organization-types-list"])
|
|
4340
|
-
}, [
|
|
4341
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.filteredOrganizationTypes, (organizationType) => {
|
|
4342
|
-
return vue.openBlock(), vue.createElementBlock("button", {
|
|
4343
|
-
key: organizationType.id_site_organization_type,
|
|
4344
|
-
onClick: () => selectOrganizationType(organizationType.id_site_organization_type)
|
|
4345
|
-
}, vue.toDisplayString(vue.unref(t)(`common.${organizationType.label}`)), 9, _hoisted_3$6);
|
|
4346
|
-
}), 128))
|
|
4347
|
-
], 2)
|
|
4348
|
-
], 64);
|
|
4349
|
-
};
|
|
4350
|
-
}
|
|
4351
|
-
});
|
|
4352
|
-
const style0$d = {
|
|
4353
|
-
"institution-filters-intro": "pb-w-sync_institution-filters-intro",
|
|
4354
|
-
"organization-types-list": "pb-w-sync_organization-types-list",
|
|
4355
|
-
"widget-country": "pb-w-sync_widget-country",
|
|
4356
|
-
"widget-country-option": "pb-w-sync_widget-country-option"
|
|
4357
|
-
};
|
|
4358
|
-
const cssModules$d = {
|
|
4359
|
-
"$style": style0$d
|
|
4252
|
+
const cssModules$f = {
|
|
4253
|
+
"$style": style0$f
|
|
4360
4254
|
};
|
|
4361
|
-
const
|
|
4362
|
-
const _hoisted_1$
|
|
4363
|
-
const _hoisted_2$
|
|
4364
|
-
const _hoisted_3$
|
|
4365
|
-
const _sfc_main$
|
|
4255
|
+
const FinalResponse = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__cssModules", cssModules$f]]);
|
|
4256
|
+
const _hoisted_1$a = ["onClick"];
|
|
4257
|
+
const _hoisted_2$a = ["alt", "src"];
|
|
4258
|
+
const _hoisted_3$7 = { key: 1 };
|
|
4259
|
+
const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
4366
4260
|
__name: "OrganizationSitesList",
|
|
4367
4261
|
props: {
|
|
4368
4262
|
assetsPath: { default: "https://s.paybook.com" },
|
|
4263
|
+
embedded: { type: Boolean, default: false },
|
|
4369
4264
|
items: { default: () => [] },
|
|
4370
4265
|
showLogo: { type: Boolean, default: true },
|
|
4371
4266
|
showPlaidSitesButton: { type: Boolean, default: false }
|
|
@@ -4388,7 +4283,7 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
|
4388
4283
|
});
|
|
4389
4284
|
});
|
|
4390
4285
|
vue.onMounted(() => {
|
|
4391
|
-
if (props.items.length > 0 && props.showLogo) {
|
|
4286
|
+
if (!props.embedded && props.items.length > 0 && props.showLogo) {
|
|
4392
4287
|
imagesLoaded = 0;
|
|
4393
4288
|
rootEmit("images-loading");
|
|
4394
4289
|
}
|
|
@@ -4396,7 +4291,7 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
|
4396
4291
|
vue.watch(
|
|
4397
4292
|
() => props.items,
|
|
4398
4293
|
(val) => {
|
|
4399
|
-
if (val.length > 0 && props.showLogo) {
|
|
4294
|
+
if (!props.embedded && val.length > 0 && props.showLogo) {
|
|
4400
4295
|
imagesLoaded = 0;
|
|
4401
4296
|
rootEmit("images-loading");
|
|
4402
4297
|
}
|
|
@@ -4404,7 +4299,7 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
|
4404
4299
|
);
|
|
4405
4300
|
function imageLoaded() {
|
|
4406
4301
|
imagesLoaded++;
|
|
4407
|
-
if (imagesLoaded === props.items.length) {
|
|
4302
|
+
if (!props.embedded && imagesLoaded === props.items.length) {
|
|
4408
4303
|
rootEmit("images-loaded");
|
|
4409
4304
|
}
|
|
4410
4305
|
}
|
|
@@ -4421,17 +4316,18 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
|
4421
4316
|
onClick: _cache[0] || (_cache[0] = () => vue.unref(rootEmit)("__internal__.plaid-sites-clicked"))
|
|
4422
4317
|
}, vue.toDisplayString(vue.unref(t)("common.find_your_institution")), 1)
|
|
4423
4318
|
], 2)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
4424
|
-
vue.
|
|
4319
|
+
!_ctx.embedded ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElInput), {
|
|
4320
|
+
key: 0,
|
|
4425
4321
|
modelValue: searchQuery.value,
|
|
4426
4322
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => searchQuery.value = $event),
|
|
4427
4323
|
"data-testid": "search-organization",
|
|
4428
4324
|
placeholder: vue.unref(t)("common.search")
|
|
4429
4325
|
}, {
|
|
4430
4326
|
prefix: vue.withCtx(() => [
|
|
4431
|
-
vue.createVNode(_sfc_main$
|
|
4327
|
+
vue.createVNode(_sfc_main$j, { icon: "search" })
|
|
4432
4328
|
]),
|
|
4433
4329
|
_: 1
|
|
4434
|
-
}, 8, ["modelValue", "placeholder"]),
|
|
4330
|
+
}, 8, ["modelValue", "placeholder"])) : vue.createCommentVNode("", true),
|
|
4435
4331
|
vue.createElementVNode("div", {
|
|
4436
4332
|
class: vue.normalizeClass(_ctx.$style["organization-sites"])
|
|
4437
4333
|
}, [
|
|
@@ -4450,8 +4346,8 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
|
4450
4346
|
height: "66",
|
|
4451
4347
|
width: "220",
|
|
4452
4348
|
onLoad: imageLoaded
|
|
4453
|
-
}, null, 40, _hoisted_2$
|
|
4454
|
-
], 10, _hoisted_1$
|
|
4349
|
+
}, null, 40, _hoisted_2$a)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$7, vue.toDisplayString(item.name), 1))
|
|
4350
|
+
], 10, _hoisted_1$a)), [
|
|
4455
4351
|
[vue.vShow, item.show]
|
|
4456
4352
|
]);
|
|
4457
4353
|
}), 128))
|
|
@@ -4460,15 +4356,333 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
|
4460
4356
|
};
|
|
4461
4357
|
}
|
|
4462
4358
|
});
|
|
4463
|
-
const style0$
|
|
4359
|
+
const style0$e = {
|
|
4464
4360
|
"widget-plaid-container": "pb-w-sync_widget-plaid-container",
|
|
4465
4361
|
"organization-sites": "pb-w-sync_organization-sites",
|
|
4466
4362
|
"organization-button": "pb-w-sync_organization-button"
|
|
4467
4363
|
};
|
|
4364
|
+
const cssModules$e = {
|
|
4365
|
+
"$style": style0$e
|
|
4366
|
+
};
|
|
4367
|
+
const OrganizationSitesList = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__cssModules", cssModules$e]]);
|
|
4368
|
+
function countryFlagUrl(country2) {
|
|
4369
|
+
return `https://hatscripts.github.io/circle-flags/flags/${country2.code.toLocaleLowerCase()}.svg`;
|
|
4370
|
+
}
|
|
4371
|
+
function orderCountries(countries, requestedCountry) {
|
|
4372
|
+
const first = requestedCountry ? countries.find(
|
|
4373
|
+
(country2) => country2.code === requestedCountry || country2.id_country === requestedCountry
|
|
4374
|
+
) : void 0;
|
|
4375
|
+
return first ? [first, ...countries.filter((country2) => country2 !== first)] : countries;
|
|
4376
|
+
}
|
|
4377
|
+
function buildSiteCatalog(countries, organizationTypesOf, organizationSitesOf, categoryLabel) {
|
|
4378
|
+
return countries.map((country2) => ({
|
|
4379
|
+
country: country2,
|
|
4380
|
+
categories: organizationTypesOf(country2.id_country).map((organizationType) => ({
|
|
4381
|
+
organizationType,
|
|
4382
|
+
organizationSites: organizationSitesOf(
|
|
4383
|
+
country2.id_country,
|
|
4384
|
+
organizationType.id_site_organization_type
|
|
4385
|
+
)
|
|
4386
|
+
})).filter((category) => category.organizationSites.length).sort(
|
|
4387
|
+
(a, b) => categoryLabel(a.organizationType).localeCompare(
|
|
4388
|
+
categoryLabel(b.organizationType)
|
|
4389
|
+
)
|
|
4390
|
+
)
|
|
4391
|
+
})).filter((entry) => entry.categories.length);
|
|
4392
|
+
}
|
|
4393
|
+
function searchSiteCatalog(catalog, search2) {
|
|
4394
|
+
const query = search2.toLocaleLowerCase();
|
|
4395
|
+
if (!query) {
|
|
4396
|
+
return catalog;
|
|
4397
|
+
}
|
|
4398
|
+
return catalog.map((entry) => ({
|
|
4399
|
+
...entry,
|
|
4400
|
+
categories: entry.categories.map((category) => ({
|
|
4401
|
+
...category,
|
|
4402
|
+
organizationSites: category.organizationSites.filter(
|
|
4403
|
+
(item) => item.name.toLocaleLowerCase().includes(query)
|
|
4404
|
+
)
|
|
4405
|
+
})).filter((category) => category.organizationSites.length)
|
|
4406
|
+
})).filter((entry) => entry.categories.length);
|
|
4407
|
+
}
|
|
4408
|
+
const _hoisted_1$9 = ["aria-expanded", "disabled", "onClick"];
|
|
4409
|
+
const _hoisted_2$9 = ["src"];
|
|
4410
|
+
const _hoisted_3$6 = ["aria-expanded", "disabled", "onClick"];
|
|
4411
|
+
const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
4412
|
+
__name: "FullSiteList",
|
|
4413
|
+
props: {
|
|
4414
|
+
assetsPath: {},
|
|
4415
|
+
catalog: {},
|
|
4416
|
+
search: { default: "" },
|
|
4417
|
+
showLogo: { type: Boolean, default: true }
|
|
4418
|
+
},
|
|
4419
|
+
emits: ["select", "update:search"],
|
|
4420
|
+
setup(__props, { emit: __emit }) {
|
|
4421
|
+
const props = __props;
|
|
4422
|
+
const emit = __emit;
|
|
4423
|
+
const { t } = vueI18n.useI18n();
|
|
4424
|
+
const visibleCatalog = vue.computed(
|
|
4425
|
+
() => searchSiteCatalog(props.catalog, props.search)
|
|
4426
|
+
);
|
|
4427
|
+
const collapsed = vue.reactive(/* @__PURE__ */ new Set());
|
|
4428
|
+
const searching = vue.computed(() => !!props.search);
|
|
4429
|
+
function categoryKey(entry, category) {
|
|
4430
|
+
return `${entry.country.id_country}:${category.organizationType.id_site_organization_type}`;
|
|
4431
|
+
}
|
|
4432
|
+
function isOpen(key) {
|
|
4433
|
+
return searching.value || !collapsed.has(key);
|
|
4434
|
+
}
|
|
4435
|
+
function scrollParent(element) {
|
|
4436
|
+
let node = element.parentElement;
|
|
4437
|
+
while (node && !["auto", "scroll"].includes(getComputedStyle(node).overflowY)) {
|
|
4438
|
+
node = node.parentElement;
|
|
4439
|
+
}
|
|
4440
|
+
return node;
|
|
4441
|
+
}
|
|
4442
|
+
async function toggle2(key, event2) {
|
|
4443
|
+
if (!collapsed.has(key)) {
|
|
4444
|
+
const heading = event2.currentTarget.parentElement;
|
|
4445
|
+
const section = heading.parentElement;
|
|
4446
|
+
const scroller = scrollParent(section);
|
|
4447
|
+
const offset = heading.getBoundingClientRect().top - section.getBoundingClientRect().top;
|
|
4448
|
+
collapsed.add(key);
|
|
4449
|
+
if (scroller && offset > 0) {
|
|
4450
|
+
const scrollTop = scroller.scrollTop;
|
|
4451
|
+
await vue.nextTick();
|
|
4452
|
+
scroller.scrollTop = scrollTop - offset;
|
|
4453
|
+
}
|
|
4454
|
+
return;
|
|
4455
|
+
}
|
|
4456
|
+
collapsed.delete(key);
|
|
4457
|
+
}
|
|
4458
|
+
return (_ctx, _cache) => {
|
|
4459
|
+
return vue.openBlock(), vue.createElementBlock("div", null, [
|
|
4460
|
+
vue.createElementVNode("div", {
|
|
4461
|
+
class: vue.normalizeClass(_ctx.$style["search"])
|
|
4462
|
+
}, [
|
|
4463
|
+
vue.createVNode(vue.unref(elementPlus.ElInput), {
|
|
4464
|
+
"data-testid": "search-organization",
|
|
4465
|
+
"model-value": props.search,
|
|
4466
|
+
placeholder: vue.unref(t)("common.search"),
|
|
4467
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = (value) => emit("update:search", value))
|
|
4468
|
+
}, {
|
|
4469
|
+
prefix: vue.withCtx(() => [
|
|
4470
|
+
vue.createVNode(_sfc_main$j, { icon: "search" })
|
|
4471
|
+
]),
|
|
4472
|
+
_: 1
|
|
4473
|
+
}, 8, ["model-value", "placeholder"])
|
|
4474
|
+
], 2),
|
|
4475
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(visibleCatalog.value, (entry) => {
|
|
4476
|
+
return vue.openBlock(), vue.createElementBlock("section", {
|
|
4477
|
+
key: entry.country.id_country,
|
|
4478
|
+
"data-testid": "full-site-list-country"
|
|
4479
|
+
}, [
|
|
4480
|
+
vue.createElementVNode("h2", {
|
|
4481
|
+
class: vue.normalizeClass(_ctx.$style["country"])
|
|
4482
|
+
}, [
|
|
4483
|
+
vue.createElementVNode("button", {
|
|
4484
|
+
type: "button",
|
|
4485
|
+
class: vue.normalizeClass(_ctx.$style["toggle"]),
|
|
4486
|
+
"aria-expanded": isOpen(entry.country.id_country),
|
|
4487
|
+
disabled: searching.value,
|
|
4488
|
+
"data-testid": "full-site-list-toggle",
|
|
4489
|
+
onClick: (event2) => toggle2(entry.country.id_country, event2)
|
|
4490
|
+
}, [
|
|
4491
|
+
vue.createElementVNode("img", {
|
|
4492
|
+
class: vue.normalizeClass(_ctx.$style["flag"]),
|
|
4493
|
+
src: vue.unref(countryFlagUrl)(entry.country),
|
|
4494
|
+
width: "20",
|
|
4495
|
+
height: "20",
|
|
4496
|
+
alt: ""
|
|
4497
|
+
}, null, 10, _hoisted_2$9),
|
|
4498
|
+
vue.createElementVNode("span", null, vue.toDisplayString(entry.country.name), 1),
|
|
4499
|
+
!searching.value ? (vue.openBlock(), vue.createElementBlock("svg", {
|
|
4500
|
+
key: 0,
|
|
4501
|
+
class: vue.normalizeClass(_ctx.$style["caret"]),
|
|
4502
|
+
viewBox: "0 0 10 10",
|
|
4503
|
+
"aria-hidden": "true"
|
|
4504
|
+
}, _cache[2] || (_cache[2] = [
|
|
4505
|
+
vue.createElementVNode("path", { d: "M1 3h8L5 8z" }, null, -1)
|
|
4506
|
+
]), 2)) : vue.createCommentVNode("", true)
|
|
4507
|
+
], 10, _hoisted_1$9)
|
|
4508
|
+
], 2),
|
|
4509
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(entry.categories, (category) => {
|
|
4510
|
+
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("section", {
|
|
4511
|
+
key: category.organizationType.id_site_organization_type,
|
|
4512
|
+
"data-testid": "full-site-list-category"
|
|
4513
|
+
}, [
|
|
4514
|
+
vue.createElementVNode("h3", {
|
|
4515
|
+
class: vue.normalizeClass(_ctx.$style["category-title"])
|
|
4516
|
+
}, [
|
|
4517
|
+
vue.createElementVNode("button", {
|
|
4518
|
+
type: "button",
|
|
4519
|
+
class: vue.normalizeClass(_ctx.$style["toggle"]),
|
|
4520
|
+
"aria-expanded": isOpen(categoryKey(entry, category)),
|
|
4521
|
+
disabled: searching.value,
|
|
4522
|
+
"data-testid": "full-site-list-toggle",
|
|
4523
|
+
onClick: (event2) => toggle2(categoryKey(entry, category), event2)
|
|
4524
|
+
}, [
|
|
4525
|
+
vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(t)(`common.${category.organizationType.label}`)), 1),
|
|
4526
|
+
!searching.value ? (vue.openBlock(), vue.createElementBlock("svg", {
|
|
4527
|
+
key: 0,
|
|
4528
|
+
class: vue.normalizeClass(_ctx.$style["caret"]),
|
|
4529
|
+
viewBox: "0 0 10 10",
|
|
4530
|
+
"aria-hidden": "true"
|
|
4531
|
+
}, _cache[3] || (_cache[3] = [
|
|
4532
|
+
vue.createElementVNode("path", { d: "M1 3h8L5 8z" }, null, -1)
|
|
4533
|
+
]), 2)) : vue.createCommentVNode("", true)
|
|
4534
|
+
], 10, _hoisted_3$6)
|
|
4535
|
+
], 2),
|
|
4536
|
+
vue.withDirectives(vue.createElementVNode("div", {
|
|
4537
|
+
class: vue.normalizeClass(_ctx.$style["category-sites"])
|
|
4538
|
+
}, [
|
|
4539
|
+
vue.createVNode(OrganizationSitesList, {
|
|
4540
|
+
"assets-path": props.assetsPath,
|
|
4541
|
+
embedded: "",
|
|
4542
|
+
items: category.organizationSites,
|
|
4543
|
+
"show-logo": props.showLogo,
|
|
4544
|
+
onSelect: _cache[1] || (_cache[1] = (item) => emit("select", item))
|
|
4545
|
+
}, null, 8, ["assets-path", "items", "show-logo"])
|
|
4546
|
+
], 2), [
|
|
4547
|
+
[vue.vShow, isOpen(categoryKey(entry, category))]
|
|
4548
|
+
])
|
|
4549
|
+
])), [
|
|
4550
|
+
[vue.vShow, isOpen(entry.country.id_country)]
|
|
4551
|
+
]);
|
|
4552
|
+
}), 128))
|
|
4553
|
+
]);
|
|
4554
|
+
}), 128)),
|
|
4555
|
+
!visibleCatalog.value.length ? (vue.openBlock(), vue.createElementBlock("p", {
|
|
4556
|
+
key: 0,
|
|
4557
|
+
class: vue.normalizeClass(_ctx.$style["no-results"])
|
|
4558
|
+
}, vue.toDisplayString(vue.unref(t)("common.no_filtered_data")), 3)) : vue.createCommentVNode("", true)
|
|
4559
|
+
]);
|
|
4560
|
+
};
|
|
4561
|
+
}
|
|
4562
|
+
});
|
|
4563
|
+
const search = "pb-w-sync_search";
|
|
4564
|
+
const country = "pb-w-sync_country";
|
|
4565
|
+
const toggle = "pb-w-sync_toggle";
|
|
4566
|
+
const caret = "pb-w-sync_caret";
|
|
4567
|
+
const flag = "pb-w-sync_flag";
|
|
4568
|
+
const style0$d = {
|
|
4569
|
+
search,
|
|
4570
|
+
country,
|
|
4571
|
+
"category-title": "pb-w-sync_category-title",
|
|
4572
|
+
toggle,
|
|
4573
|
+
caret,
|
|
4574
|
+
flag,
|
|
4575
|
+
"category-sites": "pb-w-sync_category-sites",
|
|
4576
|
+
"no-results": "pb-w-sync_no-results"
|
|
4577
|
+
};
|
|
4578
|
+
const cssModules$d = {
|
|
4579
|
+
"$style": style0$d
|
|
4580
|
+
};
|
|
4581
|
+
const FullSiteList = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__cssModules", cssModules$d]]);
|
|
4582
|
+
const _hoisted_1$8 = ["src"];
|
|
4583
|
+
const _hoisted_2$8 = ["src"];
|
|
4584
|
+
const _hoisted_3$5 = ["onClick"];
|
|
4585
|
+
const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
4586
|
+
__name: "InstitutionFilters",
|
|
4587
|
+
props: {
|
|
4588
|
+
countryId: {},
|
|
4589
|
+
filteredCountries: {},
|
|
4590
|
+
filteredOrganizationTypes: {},
|
|
4591
|
+
showCountries: { type: Boolean },
|
|
4592
|
+
organizationTypeId: {},
|
|
4593
|
+
selectClass: {}
|
|
4594
|
+
},
|
|
4595
|
+
emits: ["update:countryId", "update:organizationTypeId"],
|
|
4596
|
+
setup(__props, { emit: __emit }) {
|
|
4597
|
+
const props = __props;
|
|
4598
|
+
const emit = __emit;
|
|
4599
|
+
const { t } = vueI18n.useI18n();
|
|
4600
|
+
const selectedCountryFlag = vue.computed(
|
|
4601
|
+
() => countryFlagUrl(
|
|
4602
|
+
props.filteredCountries.find(
|
|
4603
|
+
(country2) => country2.id_country === props.countryId
|
|
4604
|
+
)
|
|
4605
|
+
)
|
|
4606
|
+
);
|
|
4607
|
+
function countryChanged(id_country) {
|
|
4608
|
+
measureEvent("open_country", {
|
|
4609
|
+
id_country
|
|
4610
|
+
});
|
|
4611
|
+
emit("update:countryId", id_country);
|
|
4612
|
+
}
|
|
4613
|
+
function selectOrganizationType(id) {
|
|
4614
|
+
measureEvent("open_site_organization_type", {
|
|
4615
|
+
id_site_organization_type: id
|
|
4616
|
+
});
|
|
4617
|
+
emit("update:organizationTypeId", id);
|
|
4618
|
+
}
|
|
4619
|
+
return (_ctx, _cache) => {
|
|
4620
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
4621
|
+
vue.createElementVNode("p", {
|
|
4622
|
+
class: vue.normalizeClass(_ctx.$style["institution-filters-intro"])
|
|
4623
|
+
}, vue.toDisplayString(vue.unref(t)("common.intro")), 3),
|
|
4624
|
+
_ctx.showCountries ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElSelect), {
|
|
4625
|
+
key: 0,
|
|
4626
|
+
class: vue.normalizeClass(_ctx.$style["widget-country"]),
|
|
4627
|
+
"model-value": props.countryId,
|
|
4628
|
+
"popper-class": props.selectClass,
|
|
4629
|
+
onChange: countryChanged
|
|
4630
|
+
}, {
|
|
4631
|
+
prefix: vue.withCtx(() => [
|
|
4632
|
+
vue.createElementVNode("img", {
|
|
4633
|
+
src: selectedCountryFlag.value,
|
|
4634
|
+
width: "44",
|
|
4635
|
+
height: "44",
|
|
4636
|
+
alt: ""
|
|
4637
|
+
}, null, 8, _hoisted_1$8)
|
|
4638
|
+
]),
|
|
4639
|
+
default: vue.withCtx(() => [
|
|
4640
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.filteredCountries, (country2) => {
|
|
4641
|
+
return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElOption), {
|
|
4642
|
+
key: country2.id_country,
|
|
4643
|
+
class: vue.normalizeClass(_ctx.$style["widget-country-option"]),
|
|
4644
|
+
value: country2.id_country,
|
|
4645
|
+
label: country2.name
|
|
4646
|
+
}, {
|
|
4647
|
+
default: vue.withCtx(() => [
|
|
4648
|
+
vue.createElementVNode("img", {
|
|
4649
|
+
src: vue.unref(countryFlagUrl)(country2),
|
|
4650
|
+
width: "44",
|
|
4651
|
+
height: "44",
|
|
4652
|
+
alt: ""
|
|
4653
|
+
}, null, 8, _hoisted_2$8),
|
|
4654
|
+
vue.createElementVNode("span", null, vue.toDisplayString(country2.name), 1)
|
|
4655
|
+
]),
|
|
4656
|
+
_: 2
|
|
4657
|
+
}, 1032, ["class", "value", "label"]);
|
|
4658
|
+
}), 128))
|
|
4659
|
+
]),
|
|
4660
|
+
_: 1
|
|
4661
|
+
}, 8, ["class", "model-value", "popper-class"])) : vue.createCommentVNode("", true),
|
|
4662
|
+
vue.createElementVNode("div", {
|
|
4663
|
+
class: vue.normalizeClass(_ctx.$style["organization-types-list"])
|
|
4664
|
+
}, [
|
|
4665
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.filteredOrganizationTypes, (organizationType) => {
|
|
4666
|
+
return vue.openBlock(), vue.createElementBlock("button", {
|
|
4667
|
+
key: organizationType.id_site_organization_type,
|
|
4668
|
+
onClick: () => selectOrganizationType(organizationType.id_site_organization_type)
|
|
4669
|
+
}, vue.toDisplayString(vue.unref(t)(`common.${organizationType.label}`)), 9, _hoisted_3$5);
|
|
4670
|
+
}), 128))
|
|
4671
|
+
], 2)
|
|
4672
|
+
], 64);
|
|
4673
|
+
};
|
|
4674
|
+
}
|
|
4675
|
+
});
|
|
4676
|
+
const style0$c = {
|
|
4677
|
+
"institution-filters-intro": "pb-w-sync_institution-filters-intro",
|
|
4678
|
+
"organization-types-list": "pb-w-sync_organization-types-list",
|
|
4679
|
+
"widget-country": "pb-w-sync_widget-country",
|
|
4680
|
+
"widget-country-option": "pb-w-sync_widget-country-option"
|
|
4681
|
+
};
|
|
4468
4682
|
const cssModules$c = {
|
|
4469
4683
|
"$style": style0$c
|
|
4470
4684
|
};
|
|
4471
|
-
const
|
|
4685
|
+
const InstitutionFilters = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__cssModules", cssModules$c]]);
|
|
4472
4686
|
const _hoisted_1$7 = { key: 0 };
|
|
4473
4687
|
const _hoisted_2$7 = ["src"];
|
|
4474
4688
|
const _hoisted_3$4 = ["src"];
|
|
@@ -4533,15 +4747,15 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
|
|
|
4533
4747
|
vue.createElementVNode("h1", null, vue.toDisplayString(props.client.name ? vue.unref(t)("privacy.title_client", { client: props.client.name }) : vue.unref(t)("privacy.title")), 1),
|
|
4534
4748
|
vue.createElementVNode("ul", null, [
|
|
4535
4749
|
vue.createElementVNode("li", null, [
|
|
4536
|
-
vue.createVNode(_sfc_main$
|
|
4750
|
+
vue.createVNode(_sfc_main$j, { icon: "files" }),
|
|
4537
4751
|
vue.createTextVNode(" " + vue.toDisplayString(vue.unref(t)("privacy.list.first")), 1)
|
|
4538
4752
|
]),
|
|
4539
4753
|
vue.createElementVNode("li", null, [
|
|
4540
|
-
vue.createVNode(_sfc_main$
|
|
4754
|
+
vue.createVNode(_sfc_main$j, { icon: "lock" }),
|
|
4541
4755
|
vue.createTextVNode(" " + vue.toDisplayString(vue.unref(t)("privacy.list.second")), 1)
|
|
4542
4756
|
]),
|
|
4543
4757
|
vue.createElementVNode("li", null, [
|
|
4544
|
-
vue.createVNode(_sfc_main$
|
|
4758
|
+
vue.createVNode(_sfc_main$j, { icon: "users" }),
|
|
4545
4759
|
vue.createTextVNode(" " + vue.toDisplayString(vue.unref(t)("privacy.list.third")), 1)
|
|
4546
4760
|
])
|
|
4547
4761
|
]),
|
|
@@ -4590,7 +4804,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
|
4590
4804
|
const emit = __emit;
|
|
4591
4805
|
const { t } = vueI18n.useI18n();
|
|
4592
4806
|
const segments = vue.computed(() => parseConsentText(props.consent));
|
|
4593
|
-
function
|
|
4807
|
+
function toggle2(event2) {
|
|
4594
4808
|
emit("update:modelValue", event2.target.checked);
|
|
4595
4809
|
}
|
|
4596
4810
|
return (_ctx, _cache) => {
|
|
@@ -4606,7 +4820,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
|
4606
4820
|
checked: props.modelValue,
|
|
4607
4821
|
"data-testid": "consent-checkbox",
|
|
4608
4822
|
type: "checkbox",
|
|
4609
|
-
onChange:
|
|
4823
|
+
onChange: toggle2
|
|
4610
4824
|
}, null, 40, _hoisted_1$6),
|
|
4611
4825
|
vue.createElementVNode("span", {
|
|
4612
4826
|
class: vue.normalizeClass(_ctx.$style["consent-text"]),
|
|
@@ -4779,7 +4993,7 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
|
4779
4993
|
class: vue.normalizeClass(_ctx.$style["widget-back-button"]),
|
|
4780
4994
|
onClick: _cache[0] || (_cache[0] = ($event) => remove($event))
|
|
4781
4995
|
}, [
|
|
4782
|
-
vue.createVNode(_sfc_main$
|
|
4996
|
+
vue.createVNode(_sfc_main$j, { icon: "x-circle" })
|
|
4783
4997
|
], 10, _hoisted_2$5)
|
|
4784
4998
|
], 2)) : (vue.openBlock(), vue.createElementBlock("button", {
|
|
4785
4999
|
key: 1,
|
|
@@ -4913,7 +5127,9 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
|
|
|
4913
5127
|
});
|
|
4914
5128
|
const { t } = vueI18n.useI18n();
|
|
4915
5129
|
vue.onBeforeUnmount(() => {
|
|
5130
|
+
var _a;
|
|
4916
5131
|
clearTimeout(testModeTimeout);
|
|
5132
|
+
(_a = props.site) == null ? void 0 : _a.removeListener("status-update", onStatusUpdate);
|
|
4917
5133
|
});
|
|
4918
5134
|
vue.onMounted(() => {
|
|
4919
5135
|
if (props.showLogo) {
|
|
@@ -4921,14 +5137,21 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
|
|
|
4921
5137
|
}
|
|
4922
5138
|
focusFirstInput();
|
|
4923
5139
|
validateChanged();
|
|
4924
|
-
props.site.on("status-update",
|
|
4925
|
-
if (newStatus === "loading") {
|
|
4926
|
-
loading.value = true;
|
|
4927
|
-
} else {
|
|
4928
|
-
loading.value = false;
|
|
4929
|
-
}
|
|
4930
|
-
});
|
|
5140
|
+
props.site.on("status-update", onStatusUpdate);
|
|
4931
5141
|
});
|
|
5142
|
+
vue.watch(
|
|
5143
|
+
() => props.site,
|
|
5144
|
+
(newSite, oldSite) => {
|
|
5145
|
+
oldSite == null ? void 0 : oldSite.removeListener("status-update", onStatusUpdate);
|
|
5146
|
+
if (newSite) {
|
|
5147
|
+
newSite.on("status-update", onStatusUpdate);
|
|
5148
|
+
loading.value = newSite.status === "loading";
|
|
5149
|
+
}
|
|
5150
|
+
}
|
|
5151
|
+
);
|
|
5152
|
+
function onStatusUpdate(newStatus) {
|
|
5153
|
+
loading.value = newStatus === "loading";
|
|
5154
|
+
}
|
|
4932
5155
|
function disabledDate(time) {
|
|
4933
5156
|
return time.getTime() > Date.now();
|
|
4934
5157
|
}
|
|
@@ -5213,10 +5436,10 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
|
|
|
5213
5436
|
showPassword.value = !showPassword.value;
|
|
5214
5437
|
})
|
|
5215
5438
|
}, [
|
|
5216
|
-
showPassword.value ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
5439
|
+
showPassword.value ? (vue.openBlock(), vue.createBlock(_sfc_main$j, {
|
|
5217
5440
|
key: 0,
|
|
5218
5441
|
icon: "eye-slash"
|
|
5219
|
-
})) : (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
5442
|
+
})) : (vue.openBlock(), vue.createBlock(_sfc_main$j, {
|
|
5220
5443
|
key: 1,
|
|
5221
5444
|
icon: "eye"
|
|
5222
5445
|
}))
|
|
@@ -5823,10 +6046,10 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
5823
6046
|
vue.isRef(showPassword) ? showPassword.value = !vue.unref(showPassword) : showPassword = !vue.unref(showPassword);
|
|
5824
6047
|
})
|
|
5825
6048
|
}, [
|
|
5826
|
-
!vue.unref(showPassword) ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
6049
|
+
!vue.unref(showPassword) ? (vue.openBlock(), vue.createBlock(_sfc_main$j, {
|
|
5827
6050
|
key: 0,
|
|
5828
6051
|
icon: "eye"
|
|
5829
|
-
})) : (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
6052
|
+
})) : (vue.openBlock(), vue.createBlock(_sfc_main$j, {
|
|
5830
6053
|
key: 1,
|
|
5831
6054
|
icon: "eye-slash"
|
|
5832
6055
|
}))
|
|
@@ -8256,6 +8479,7 @@ class SiteBase extends events.EventEmitter {
|
|
|
8256
8479
|
__publicField(this, "socketOpened", false);
|
|
8257
8480
|
__publicField(this, "socketTimeoutAfterError");
|
|
8258
8481
|
__publicField(this, "timer", null);
|
|
8482
|
+
__publicField(this, "disposed", false);
|
|
8259
8483
|
this.httpService = httpService;
|
|
8260
8484
|
this.userConfig = userConfig;
|
|
8261
8485
|
this.config = site;
|
|
@@ -8314,6 +8538,16 @@ class SiteBase extends events.EventEmitter {
|
|
|
8314
8538
|
toggleTestMode() {
|
|
8315
8539
|
this.testMode = !this.testMode;
|
|
8316
8540
|
}
|
|
8541
|
+
// Called when the widget drops this connection, so a stale timer or socket cannot act on a later login.
|
|
8542
|
+
dispose() {
|
|
8543
|
+
this.disposed = true;
|
|
8544
|
+
this.clearTimer();
|
|
8545
|
+
this.removeAllListeners();
|
|
8546
|
+
if (this.socket) {
|
|
8547
|
+
this.socket.onclose = this.socket.onerror = this.socket.onmessage = null;
|
|
8548
|
+
this.socket.close();
|
|
8549
|
+
}
|
|
8550
|
+
}
|
|
8317
8551
|
configuredMeasureEvent(eventAction, params) {
|
|
8318
8552
|
if (!this.userConfig.isHeadless) {
|
|
8319
8553
|
measureEvent(eventAction, params);
|
|
@@ -8375,6 +8609,9 @@ class SiteBase extends events.EventEmitter {
|
|
|
8375
8609
|
return _rules;
|
|
8376
8610
|
}
|
|
8377
8611
|
setSocket(url) {
|
|
8612
|
+
if (this.disposed) {
|
|
8613
|
+
return;
|
|
8614
|
+
}
|
|
8378
8615
|
this.socket = new WebSocket(url);
|
|
8379
8616
|
this.socket.onclose = (event2) => this.reopenSocket(event2);
|
|
8380
8617
|
this.socket.onerror = () => this.socketError();
|
|
@@ -8391,6 +8628,9 @@ class SiteBase extends events.EventEmitter {
|
|
|
8391
8628
|
return Object.keys(cleanOptions).length ? { options: { ...cleanOptions } } : {};
|
|
8392
8629
|
}
|
|
8393
8630
|
startTimer() {
|
|
8631
|
+
if (this.disposed) {
|
|
8632
|
+
return;
|
|
8633
|
+
}
|
|
8394
8634
|
this.timer = setTimeout(() => {
|
|
8395
8635
|
this.socketTimeout();
|
|
8396
8636
|
}, this.userConfig.socketTimeoutTime);
|
|
@@ -8408,7 +8648,9 @@ class SiteBase extends events.EventEmitter {
|
|
|
8408
8648
|
this.socketTimeoutAfterError = (/* @__PURE__ */ new Date()).getTime() + 12e4;
|
|
8409
8649
|
this.setSocket(this.response.ws);
|
|
8410
8650
|
const intervalHandler = setInterval(() => {
|
|
8411
|
-
if (
|
|
8651
|
+
if (this.disposed) {
|
|
8652
|
+
clearInterval(intervalHandler);
|
|
8653
|
+
} else if (!this.isSocketOpen) {
|
|
8412
8654
|
if ((/* @__PURE__ */ new Date()).getTime() < this.socketTimeoutAfterError) {
|
|
8413
8655
|
this.socket.close();
|
|
8414
8656
|
this.setSocket(this.response.ws);
|
|
@@ -8727,6 +8969,7 @@ class Credential extends events.EventEmitter {
|
|
|
8727
8969
|
__publicField(this, "socketOpened", false);
|
|
8728
8970
|
__publicField(this, "socketTimeoutAfterError");
|
|
8729
8971
|
__publicField(this, "timer", null);
|
|
8972
|
+
__publicField(this, "disposed", false);
|
|
8730
8973
|
this.syncService = syncService;
|
|
8731
8974
|
this.httpService = httpService;
|
|
8732
8975
|
this.socketTimeoutTime = socketTimeoutTime;
|
|
@@ -8823,6 +9066,16 @@ class Credential extends events.EventEmitter {
|
|
|
8823
9066
|
setOption(name, value) {
|
|
8824
9067
|
this.options[name] = value;
|
|
8825
9068
|
}
|
|
9069
|
+
// Called when the widget drops this credential, so a stale timer or socket cannot act on a later flow.
|
|
9070
|
+
dispose() {
|
|
9071
|
+
this.disposed = true;
|
|
9072
|
+
this.clearTimer();
|
|
9073
|
+
this.removeAllListeners();
|
|
9074
|
+
if (this.socket) {
|
|
9075
|
+
this.socket.onclose = this.socket.onerror = this.socket.onmessage = null;
|
|
9076
|
+
this.socket.close();
|
|
9077
|
+
}
|
|
9078
|
+
}
|
|
8826
9079
|
sync() {
|
|
8827
9080
|
this.configuredMeasureEvent("sync_credential", {
|
|
8828
9081
|
id_credential: this.config.id_credential,
|
|
@@ -8940,7 +9193,9 @@ class Credential extends events.EventEmitter {
|
|
|
8940
9193
|
this.socketTimeoutAfterError = (/* @__PURE__ */ new Date()).getTime() + 12e4;
|
|
8941
9194
|
this.setSocket(this.response.ws);
|
|
8942
9195
|
const intervalHandler = setInterval(() => {
|
|
8943
|
-
if (
|
|
9196
|
+
if (this.disposed) {
|
|
9197
|
+
clearInterval(intervalHandler);
|
|
9198
|
+
} else if (!this.isSocketOpen) {
|
|
8944
9199
|
if ((/* @__PURE__ */ new Date()).getTime() < this.socketTimeoutAfterError) {
|
|
8945
9200
|
this.socket.close();
|
|
8946
9201
|
this.setSocket(this.response.ws);
|
|
@@ -8957,6 +9212,9 @@ class Credential extends events.EventEmitter {
|
|
|
8957
9212
|
}
|
|
8958
9213
|
}
|
|
8959
9214
|
setSocket(url) {
|
|
9215
|
+
if (this.disposed) {
|
|
9216
|
+
return;
|
|
9217
|
+
}
|
|
8960
9218
|
this.socket = new WebSocket(url);
|
|
8961
9219
|
this.socket.onclose = (event2) => this.reopenSocket(event2);
|
|
8962
9220
|
this.socket.onerror = () => this.socketError();
|
|
@@ -9069,6 +9327,9 @@ class Credential extends events.EventEmitter {
|
|
|
9069
9327
|
return Object.keys(cleanOptions).length ? { options: { ...cleanOptions } } : {};
|
|
9070
9328
|
}
|
|
9071
9329
|
startTimer() {
|
|
9330
|
+
if (this.disposed) {
|
|
9331
|
+
return;
|
|
9332
|
+
}
|
|
9072
9333
|
this.timer = setTimeout(() => {
|
|
9073
9334
|
this.socketTimeout();
|
|
9074
9335
|
}, this.socketTimeoutTime);
|
|
@@ -9631,14 +9892,25 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
9631
9892
|
const { t } = vueI18n.useI18n();
|
|
9632
9893
|
const loading = vue.ref(false);
|
|
9633
9894
|
vue.onMounted(() => {
|
|
9634
|
-
props.site.on("status-update",
|
|
9635
|
-
|
|
9636
|
-
|
|
9637
|
-
|
|
9638
|
-
|
|
9639
|
-
}
|
|
9640
|
-
});
|
|
9895
|
+
props.site.on("status-update", onStatusUpdate);
|
|
9896
|
+
});
|
|
9897
|
+
vue.onBeforeUnmount(() => {
|
|
9898
|
+
var _a;
|
|
9899
|
+
(_a = props.site) == null ? void 0 : _a.removeListener("status-update", onStatusUpdate);
|
|
9641
9900
|
});
|
|
9901
|
+
vue.watch(
|
|
9902
|
+
() => props.site,
|
|
9903
|
+
(newSite, oldSite) => {
|
|
9904
|
+
oldSite == null ? void 0 : oldSite.removeListener("status-update", onStatusUpdate);
|
|
9905
|
+
if (newSite) {
|
|
9906
|
+
newSite.on("status-update", onStatusUpdate);
|
|
9907
|
+
loading.value = newSite.status === "loading";
|
|
9908
|
+
}
|
|
9909
|
+
}
|
|
9910
|
+
);
|
|
9911
|
+
function onStatusUpdate(newStatus) {
|
|
9912
|
+
loading.value = newStatus === "loading";
|
|
9913
|
+
}
|
|
9642
9914
|
return (_ctx, _cache) => {
|
|
9643
9915
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
9644
9916
|
class: vue.normalizeClass(_ctx.$style["back-up-connection"])
|
|
@@ -9714,6 +9986,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
9714
9986
|
locale: {},
|
|
9715
9987
|
navigation: {},
|
|
9716
9988
|
refreshTokenFunction: { type: Function },
|
|
9989
|
+
requestedCountry: {},
|
|
9717
9990
|
strict: {},
|
|
9718
9991
|
token: {}
|
|
9719
9992
|
},
|
|
@@ -9724,9 +9997,9 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
9724
9997
|
const rootEmit = vue.inject(rootEmitter);
|
|
9725
9998
|
const { t, locale } = vueI18n.useI18n({ useScope: "global" });
|
|
9726
9999
|
const { mobile } = useMobile();
|
|
9727
|
-
const countries = vue.ref([]), countryId = vue.ref(null), credentialFlow = vue.ref(null), consent = vue.ref(null), consentLoading = vue.ref(false), dataError = vue.ref(false), displayBackUpConnection = vue.ref(false), finalLongMessage = vue.ref(null), finalMessage = vue.ref(null), fromBackUpConnection = vue.ref(null), infoLongMessage = vue.ref(""), infoMessage = vue.ref(""), inPrivacyPolicy = vue.ref(props.navigation.displayPrivacyScreen), loading = vue.ref(true), noFilteredData = vue.ref(false), organizationSiteId = vue.ref(null), organizationSites = vue.ref([]), organizationTypeId = vue.ref(null), selectingAccounts = vue.ref(false), siteStatus = vue.ref(null), siteFormError = vue.ref(null), updatingCredential = vue.ref(false), visible = vue.ref(false);
|
|
10000
|
+
const countries = vue.ref([]), countryId = vue.ref(null), credentialFlow = vue.ref(null), consent = vue.ref(null), consentLoading = vue.ref(false), dataError = vue.ref(false), displayBackUpConnection = vue.ref(false), finalLongMessage = vue.ref(null), finalMessage = vue.ref(null), fullSiteListSearch = vue.ref(""), fromBackUpConnection = vue.ref(null), infoLongMessage = vue.ref(""), infoMessage = vue.ref(""), inPrivacyPolicy = vue.ref(props.navigation.displayPrivacyScreen), loading = vue.ref(true), noFilteredData = vue.ref(false), organizationSiteId = vue.ref(null), organizationSites = vue.ref([]), organizationTypeId = vue.ref(null), selectingAccounts = vue.ref(false), siteStatus = vue.ref(null), siteFormError = vue.ref(null), updatingCredential = vue.ref(false), visible = vue.ref(false), widgetContent = vue.ref(null);
|
|
9728
10001
|
const consentCache = /* @__PURE__ */ new Map();
|
|
9729
|
-
let assetsPath = "https://s.paybook.com", credential = null, gitVersion = `${getVersion()}${props.strict ? "-strict" : ""}`, infoNotification = null, notificationUpdater, openCredentialToast = null, organizationTypes = [], site = null, siteRaw = null, sync = null;
|
|
10002
|
+
let assetsPath = "https://s.paybook.com", credential = null, fullSiteListScrollTop = 0, gitVersion = `${getVersion()}${props.strict ? "-strict" : ""}`, infoNotification = null, notificationUpdater, openCredentialToast = null, organizationTypes = [], site = null, siteRaw = null, sync = null;
|
|
9730
10003
|
const backUpSite = vue.computed(() => {
|
|
9731
10004
|
var _a;
|
|
9732
10005
|
return ((_a = credentialFlow.value) == null ? void 0 : _a.displayBackUpConnection) || displayBackUpConnection.value ? site : null;
|
|
@@ -9751,8 +10024,8 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
9751
10024
|
}
|
|
9752
10025
|
return props.navigation.enableBackNavigation && siteStatus.value === "start";
|
|
9753
10026
|
}), filteredCountries = vue.computed(() => {
|
|
9754
|
-
return countries.value.filter((
|
|
9755
|
-
return (
|
|
10027
|
+
return countries.value.filter((country2) => {
|
|
10028
|
+
return (country2.id_country === "51ad44db3b8e77631200047d" || country2.id_country === "51ad44793b8e77631200027a") && props.internal.plaidSites || filterOrganizationTypes(country2.id_country).length;
|
|
9756
10029
|
}).sort((a, b) => {
|
|
9757
10030
|
return a.name.localeCompare(b.name);
|
|
9758
10031
|
});
|
|
@@ -9766,6 +10039,20 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
9766
10039
|
organizationTypeId.value,
|
|
9767
10040
|
organizationSiteId.value
|
|
9768
10041
|
);
|
|
10042
|
+
}), fullSiteCatalog = vue.computed(() => {
|
|
10043
|
+
if (!props.navigation.displayFullSiteList) {
|
|
10044
|
+
return [];
|
|
10045
|
+
}
|
|
10046
|
+
return buildSiteCatalog(
|
|
10047
|
+
props.navigation.hideSelectCountry ? filteredCountries.value.filter(
|
|
10048
|
+
(country2) => country2.id_country === countryId.value
|
|
10049
|
+
) : orderCountries(filteredCountries.value, props.requestedCountry),
|
|
10050
|
+
filterOrganizationTypes,
|
|
10051
|
+
filterOrganizationSites,
|
|
10052
|
+
(organizationType) => t(`common.${organizationType.label}`)
|
|
10053
|
+
);
|
|
10054
|
+
}), fullSiteListOnScreen = vue.computed(() => {
|
|
10055
|
+
return visible.value && !inPrivacyPolicy.value && !loading.value && !credentialFlow.value && !siteStatus.value && !organizationSiteId.value && props.navigation.displayFullSiteList;
|
|
9769
10056
|
}), loaderMessage = vue.computed(() => {
|
|
9770
10057
|
return { short: infoMessage.value, long: infoLongMessage.value };
|
|
9771
10058
|
}), sitesMap = vue.computed(() => {
|
|
@@ -9805,6 +10092,9 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
9805
10092
|
}
|
|
9806
10093
|
return "";
|
|
9807
10094
|
} else {
|
|
10095
|
+
if (props.navigation.displayFullSiteList) {
|
|
10096
|
+
return t("common.header.select");
|
|
10097
|
+
}
|
|
9808
10098
|
if (!organizationTypeId.value) {
|
|
9809
10099
|
return t("common.header.link");
|
|
9810
10100
|
}
|
|
@@ -9862,6 +10152,29 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
9862
10152
|
loadData();
|
|
9863
10153
|
}
|
|
9864
10154
|
);
|
|
10155
|
+
vue.watch(
|
|
10156
|
+
() => props.navigation.displayFullSiteList,
|
|
10157
|
+
() => {
|
|
10158
|
+
if (!siteStatus.value) {
|
|
10159
|
+
organizationTypeId.value = organizationSiteId.value = null;
|
|
10160
|
+
}
|
|
10161
|
+
}
|
|
10162
|
+
);
|
|
10163
|
+
vue.watch(fullSiteListOnScreen, (onScreen) => {
|
|
10164
|
+
if (!onScreen && widgetContent.value) {
|
|
10165
|
+
fullSiteListScrollTop = widgetContent.value.scrollTop;
|
|
10166
|
+
}
|
|
10167
|
+
vue.nextTick(() => {
|
|
10168
|
+
if (widgetContent.value) {
|
|
10169
|
+
widgetContent.value.scrollTop = onScreen ? fullSiteListScrollTop : 0;
|
|
10170
|
+
}
|
|
10171
|
+
});
|
|
10172
|
+
});
|
|
10173
|
+
vue.watch(fullSiteListSearch, () => {
|
|
10174
|
+
if (widgetContent.value) {
|
|
10175
|
+
widgetContent.value.scrollTop = 0;
|
|
10176
|
+
}
|
|
10177
|
+
});
|
|
9865
10178
|
vue.watch(infoMessage, (short) => {
|
|
9866
10179
|
if (infoNotification) {
|
|
9867
10180
|
notificationUpdater.updateMessages({ short });
|
|
@@ -9901,7 +10214,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
9901
10214
|
onBack: () => {
|
|
9902
10215
|
rootEmit("back");
|
|
9903
10216
|
closeInfoNotification();
|
|
9904
|
-
|
|
10217
|
+
dropSite();
|
|
9905
10218
|
selectSite(siteRaw, false);
|
|
9906
10219
|
visible.value = true;
|
|
9907
10220
|
},
|
|
@@ -9945,6 +10258,11 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
9945
10258
|
rootEmit("dom-updated");
|
|
9946
10259
|
});
|
|
9947
10260
|
});
|
|
10261
|
+
vue.onBeforeUnmount(() => {
|
|
10262
|
+
closeInfoNotification();
|
|
10263
|
+
dropSite();
|
|
10264
|
+
credential == null ? void 0 : credential.dispose();
|
|
10265
|
+
});
|
|
9948
10266
|
vue.onUpdated(() => {
|
|
9949
10267
|
vue.nextTick(() => {
|
|
9950
10268
|
rootEmit("dom-updated");
|
|
@@ -9978,7 +10296,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
9978
10296
|
measureEvent("close");
|
|
9979
10297
|
visible.value = false;
|
|
9980
10298
|
if (siteStatus.value === "start" || siteStatus.value === "finish") {
|
|
9981
|
-
|
|
10299
|
+
dropSite();
|
|
9982
10300
|
}
|
|
9983
10301
|
rootEmit("closed");
|
|
9984
10302
|
}
|
|
@@ -10104,6 +10422,10 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10104
10422
|
});
|
|
10105
10423
|
}
|
|
10106
10424
|
});
|
|
10425
|
+
function dropSite() {
|
|
10426
|
+
site == null ? void 0 : site.dispose();
|
|
10427
|
+
siteStatus.value = site = null;
|
|
10428
|
+
}
|
|
10107
10429
|
function emitApiError(error2, errorTranslationCore) {
|
|
10108
10430
|
rootEmit("api-error", error2.response ? error2.response.status : 500, {
|
|
10109
10431
|
longMessage: t(`${errorTranslationCore}real.long_description`),
|
|
@@ -10263,6 +10585,10 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10263
10585
|
rootEmit("back");
|
|
10264
10586
|
}
|
|
10265
10587
|
organizationSiteId.value = null;
|
|
10588
|
+
if (props.navigation.displayFullSiteList) {
|
|
10589
|
+
organizationTypeId.value = null;
|
|
10590
|
+
return;
|
|
10591
|
+
}
|
|
10266
10592
|
if (filteredOrganizationSites.value.length === 1) {
|
|
10267
10593
|
organizationTypeBack(false);
|
|
10268
10594
|
}
|
|
@@ -10278,13 +10604,18 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10278
10604
|
}
|
|
10279
10605
|
function privacyPolicyAccepted() {
|
|
10280
10606
|
inPrivacyPolicy.value = false;
|
|
10281
|
-
if ((filteredCountries.value.length === 1 || props.navigation.hideSelectCountry) && filteredOrganizationTypes.value.length === 1) {
|
|
10607
|
+
if (!props.navigation.displayFullSiteList && (filteredCountries.value.length === 1 || props.navigation.hideSelectCountry) && filteredOrganizationTypes.value.length === 1) {
|
|
10282
10608
|
organizationTypeId.value = filteredOrganizationTypes.value[0].id_site_organization_type;
|
|
10283
10609
|
}
|
|
10284
10610
|
}
|
|
10285
10611
|
function resetSites() {
|
|
10286
10612
|
organizationTypeId.value = fromBackUpConnection.value = siteStatus.value = organizationSiteId.value = site = null;
|
|
10287
10613
|
}
|
|
10614
|
+
function selectFullSiteListOrganization(item) {
|
|
10615
|
+
countryId.value = item.id_country;
|
|
10616
|
+
organizationTypeId.value = item.id_site_organization_type;
|
|
10617
|
+
selectOrganizationSite(item);
|
|
10618
|
+
}
|
|
10288
10619
|
function selectOrganizationSite(item) {
|
|
10289
10620
|
rootEmit("organization-selected", item);
|
|
10290
10621
|
measureEvent("open_site_organization", {
|
|
@@ -10357,6 +10688,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10357
10688
|
});
|
|
10358
10689
|
}
|
|
10359
10690
|
if (!site || !site.loading) {
|
|
10691
|
+
site == null ? void 0 : site.dispose();
|
|
10360
10692
|
siteRaw = item;
|
|
10361
10693
|
thisSite = site = sync.siteConnection(item);
|
|
10362
10694
|
siteStatus.value = "start";
|
|
@@ -10449,7 +10781,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10449
10781
|
} else if (props.navigation.returnToSiteFormOnUserError !== false && (props.navigation.returnToSiteFormOnUserError === true && [401, 403, 411].includes(data.code) || props.navigation.returnToSiteFormOnUserError !== true && props.navigation.returnToSiteFormOnUserError.includes(
|
|
10450
10782
|
data.code
|
|
10451
10783
|
))) {
|
|
10452
|
-
|
|
10784
|
+
dropSite();
|
|
10453
10785
|
selectSite(siteRaw, false);
|
|
10454
10786
|
siteFormError.value = {
|
|
10455
10787
|
short: shortMessage,
|
|
@@ -10669,6 +11001,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10669
11001
|
}
|
|
10670
11002
|
openCredentialToast();
|
|
10671
11003
|
}
|
|
11004
|
+
credential == null ? void 0 : credential.dispose();
|
|
10672
11005
|
credential = sync.syncCredential(idCredential, update);
|
|
10673
11006
|
credential.on("error", () => {
|
|
10674
11007
|
const { code } = credential.error, messageCore = credential.error.response ? getApiErrorTranslationCore(credential.error) : `socket.message.${code ? code : 500}.`, shortMessage = t(`${messageCore}short_description`), longMessage = t(`${messageCore}long_description`);
|
|
@@ -11129,14 +11462,14 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
11129
11462
|
if (dataError.value) {
|
|
11130
11463
|
return;
|
|
11131
11464
|
}
|
|
11132
|
-
let
|
|
11465
|
+
let country2;
|
|
11133
11466
|
if (props.entrypoint.country) {
|
|
11134
|
-
|
|
11135
|
-
return
|
|
11467
|
+
country2 = filteredCountries.value.find((country22) => {
|
|
11468
|
+
return country22.code === props.entrypoint.country || country22.id_country === props.entrypoint.country;
|
|
11136
11469
|
});
|
|
11137
11470
|
}
|
|
11138
11471
|
if (filteredCountries.value.length) {
|
|
11139
|
-
countryId.value =
|
|
11472
|
+
countryId.value = country2 ? country2.id_country : filteredCountries.value[0].id_country;
|
|
11140
11473
|
measureEvent("open_country", {
|
|
11141
11474
|
id_country: countryId.value
|
|
11142
11475
|
});
|
|
@@ -11147,7 +11480,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
11147
11480
|
}
|
|
11148
11481
|
}
|
|
11149
11482
|
function setOrganizationTypeEntrypoint() {
|
|
11150
|
-
if (props.entrypoint.siteOrganizationType) {
|
|
11483
|
+
if (props.entrypoint.siteOrganizationType && !props.navigation.displayFullSiteList) {
|
|
11151
11484
|
const siteOrganizationType = filteredOrganizationTypes.value.find(
|
|
11152
11485
|
(organizationType) => {
|
|
11153
11486
|
return organizationType.id_site_organization_type === props.entrypoint.siteOrganizationType;
|
|
@@ -11266,7 +11599,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
11266
11599
|
measureEvent("close_site", {
|
|
11267
11600
|
id_site: site.config.id_site
|
|
11268
11601
|
});
|
|
11269
|
-
|
|
11602
|
+
dropSite();
|
|
11270
11603
|
siteFormError.value = null;
|
|
11271
11604
|
if (filteredSites.value.length === 1) {
|
|
11272
11605
|
organizationSiteBack(false);
|
|
@@ -11297,7 +11630,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
11297
11630
|
if (emit2) {
|
|
11298
11631
|
rootEmit("back");
|
|
11299
11632
|
}
|
|
11300
|
-
|
|
11633
|
+
dropSite();
|
|
11301
11634
|
selectSite(siteRaw, false);
|
|
11302
11635
|
}
|
|
11303
11636
|
function updateCredential2(idCredential, emitLoaded = false) {
|
|
@@ -11341,7 +11674,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
11341
11674
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
11342
11675
|
vue.createVNode(TheModal, {
|
|
11343
11676
|
visible: visible.value,
|
|
11344
|
-
"onUpdate:visible": _cache[
|
|
11677
|
+
"onUpdate:visible": _cache[6] || (_cache[6] = ($event) => visible.value = $event),
|
|
11345
11678
|
mobile: vue.unref(mobile)
|
|
11346
11679
|
}, {
|
|
11347
11680
|
default: vue.withCtx(() => [
|
|
@@ -11368,7 +11701,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
11368
11701
|
class: vue.normalizeClass(_ctx.$style["widget-back-button"]),
|
|
11369
11702
|
onClick: headerBack
|
|
11370
11703
|
}, [
|
|
11371
|
-
vue.createVNode(_sfc_main$
|
|
11704
|
+
vue.createVNode(_sfc_main$j, { icon: "back" })
|
|
11372
11705
|
], 10, _hoisted_1)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_2)),
|
|
11373
11706
|
vue.createElementVNode("h1", null, vue.toDisplayString(siteStatus.value && props.entrypoint.site ? vue.unref(t)("common.update_title") : title.value), 1),
|
|
11374
11707
|
vue.createElementVNode("button", {
|
|
@@ -11376,10 +11709,12 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
11376
11709
|
"aria-label": vue.unref(t)("common.close"),
|
|
11377
11710
|
onClick: close
|
|
11378
11711
|
}, [
|
|
11379
|
-
vue.createVNode(_sfc_main$
|
|
11712
|
+
vue.createVNode(_sfc_main$j, { icon: "close" })
|
|
11380
11713
|
], 10, _hoisted_3)
|
|
11381
11714
|
], 2),
|
|
11382
11715
|
vue.createElementVNode("div", {
|
|
11716
|
+
ref_key: "widgetContent",
|
|
11717
|
+
ref: widgetContent,
|
|
11383
11718
|
class: vue.normalizeClass(_ctx.$style["widget-content"])
|
|
11384
11719
|
}, [
|
|
11385
11720
|
credentialFlow.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -11458,19 +11793,28 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
11458
11793
|
loading.value ? (vue.openBlock(), vue.createBlock(AppLoader, { key: 0 })) : vue.createCommentVNode("", true),
|
|
11459
11794
|
!loading.value && !dataError.value && !noFilteredData.value ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
11460
11795
|
!siteStatus.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
|
|
11461
|
-
|
|
11796
|
+
props.navigation.displayFullSiteList && !organizationSiteId.value ? (vue.openBlock(), vue.createBlock(FullSiteList, {
|
|
11462
11797
|
key: 0,
|
|
11798
|
+
search: fullSiteListSearch.value,
|
|
11799
|
+
"onUpdate:search": _cache[1] || (_cache[1] = ($event) => fullSiteListSearch.value = $event),
|
|
11800
|
+
"assets-path": vue.unref(assetsPath),
|
|
11801
|
+
catalog: fullSiteCatalog.value,
|
|
11802
|
+
"show-logo": props.navigation.displayLogoImages,
|
|
11803
|
+
onSelect: selectFullSiteListOrganization
|
|
11804
|
+
}, null, 8, ["search", "assets-path", "catalog", "show-logo"])) : vue.createCommentVNode("", true),
|
|
11805
|
+
!props.navigation.displayFullSiteList && countryId.value && !organizationTypeId.value ? (vue.openBlock(), vue.createBlock(InstitutionFilters, {
|
|
11806
|
+
key: 1,
|
|
11463
11807
|
"country-id": countryId.value,
|
|
11464
|
-
"onUpdate:countryId": _cache[
|
|
11808
|
+
"onUpdate:countryId": _cache[2] || (_cache[2] = ($event) => countryId.value = $event),
|
|
11465
11809
|
"organization-type-id": organizationTypeId.value,
|
|
11466
|
-
"onUpdate:organizationTypeId": _cache[
|
|
11810
|
+
"onUpdate:organizationTypeId": _cache[3] || (_cache[3] = ($event) => organizationTypeId.value = $event),
|
|
11467
11811
|
"filtered-countries": filteredCountries.value,
|
|
11468
11812
|
"filtered-organization-types": filteredOrganizationTypes.value,
|
|
11469
11813
|
"select-class": props.navigation.selectClass,
|
|
11470
11814
|
"show-countries": !props.navigation.hideSelectCountry
|
|
11471
11815
|
}, null, 8, ["country-id", "organization-type-id", "filtered-countries", "filtered-organization-types", "select-class", "show-countries"])) : vue.createCommentVNode("", true),
|
|
11472
11816
|
countryId.value && organizationTypeId.value && !organizationSiteId.value ? (vue.openBlock(), vue.createBlock(OrganizationSitesList, {
|
|
11473
|
-
key:
|
|
11817
|
+
key: 2,
|
|
11474
11818
|
"assets-path": vue.unref(assetsPath),
|
|
11475
11819
|
items: filteredOrganizationSites.value,
|
|
11476
11820
|
"show-logo": props.navigation.displayLogoImages,
|
|
@@ -11478,7 +11822,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
11478
11822
|
onSelect: selectOrganizationSite
|
|
11479
11823
|
}, null, 8, ["assets-path", "items", "show-logo", "show-plaid-sites-button"])) : vue.createCommentVNode("", true),
|
|
11480
11824
|
countryId.value && organizationTypeId.value && organizationSiteId.value ? (vue.openBlock(), vue.createBlock(SitesList, {
|
|
11481
|
-
key:
|
|
11825
|
+
key: 3,
|
|
11482
11826
|
"assets-path": vue.unref(assetsPath),
|
|
11483
11827
|
items: filteredSites.value,
|
|
11484
11828
|
organization: filteredOrganizationSites.value.find(
|
|
@@ -11509,7 +11853,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
11509
11853
|
onConsentRejected: consentRejected,
|
|
11510
11854
|
onError: connectError,
|
|
11511
11855
|
onSuccess: siteSucess,
|
|
11512
|
-
onValid: _cache[
|
|
11856
|
+
onValid: _cache[4] || (_cache[4] = () => siteSubmitted(true))
|
|
11513
11857
|
}, null, 8, ["assets-path", "button-disabled-style", "consent", "consent-loading", "disable-form-autocomplete", "display-back-button", "error-message", "loader-message", "require-consent", "select-class", "show-logo", "show-password-style", "site", "test-mode"])) : siteStatus.value === "start" || siteStatus.value === "loading" ? (vue.openBlock(), vue.createBlock(SiteForm, {
|
|
11514
11858
|
key: 1,
|
|
11515
11859
|
"assets-path": vue.unref(assetsPath),
|
|
@@ -11569,7 +11913,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
11569
11913
|
"show-logo": props.navigation.displayLogoImages,
|
|
11570
11914
|
type: vue.unref(site).finalResponse,
|
|
11571
11915
|
onAddOther: resetSites,
|
|
11572
|
-
onSelectAccounts: _cache[
|
|
11916
|
+
onSelectAccounts: _cache[5] || (_cache[5] = () => {
|
|
11573
11917
|
selectingAccounts.value = true;
|
|
11574
11918
|
})
|
|
11575
11919
|
}, null, 8, ["avatar", "display-accounts-selection", "display-add-another-button", "long-message", "message", "show-logo", "type"]))
|
|
@@ -11580,7 +11924,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
11580
11924
|
key: 2,
|
|
11581
11925
|
class: vue.normalizeClass(_ctx.$style["widget-data-error"])
|
|
11582
11926
|
}, [
|
|
11583
|
-
vue.createVNode(_sfc_main$
|
|
11927
|
+
vue.createVNode(_sfc_main$j, { icon: "x-circle" }),
|
|
11584
11928
|
vue.createElementVNode("h2", null, vue.toDisplayString(vue.unref(t)(`${dataError.value}short_description`)), 1),
|
|
11585
11929
|
vue.createElementVNode("p", null, vue.toDisplayString(vue.unref(t)(`${dataError.value}long_description`)), 1),
|
|
11586
11930
|
vue.createElementVNode("button", {
|
|
@@ -11592,7 +11936,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
11592
11936
|
key: 3,
|
|
11593
11937
|
class: vue.normalizeClass(_ctx.$style["widget-data-error"])
|
|
11594
11938
|
}, [
|
|
11595
|
-
vue.createVNode(_sfc_main$
|
|
11939
|
+
vue.createVNode(_sfc_main$j, { icon: "x-circle" }),
|
|
11596
11940
|
vue.createElementVNode("p", null, vue.toDisplayString(vue.unref(t)("common.no_filtered_data")), 1),
|
|
11597
11941
|
vue.createElementVNode("button", {
|
|
11598
11942
|
class: "pb-w-sync_primary-button",
|
|
@@ -11649,6 +11993,7 @@ const defaultConfig = {
|
|
|
11649
11993
|
displayBusinessSites: true,
|
|
11650
11994
|
displayCredentialInModal: false,
|
|
11651
11995
|
displayErrorsInToast: true,
|
|
11996
|
+
displayFullSiteList: false,
|
|
11652
11997
|
displayLogoImages: true,
|
|
11653
11998
|
displayLongDescription: false,
|
|
11654
11999
|
displayPersonalSites: true,
|
|
@@ -11696,6 +12041,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
11696
12041
|
token: {}
|
|
11697
12042
|
},
|
|
11698
12043
|
setup(__props, { expose: __expose }) {
|
|
12044
|
+
var _a;
|
|
11699
12045
|
const props = __props;
|
|
11700
12046
|
const widgetComponent = vue.ref(null);
|
|
11701
12047
|
const { t } = vueI18n.useI18n();
|
|
@@ -11720,6 +12066,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
11720
12066
|
...removeUndefineds(props.config.navigation)
|
|
11721
12067
|
},
|
|
11722
12068
|
refreshTokenFunction: props.refreshTokenFunction,
|
|
12069
|
+
requestedCountry: (_a = props.config.entrypoint) == null ? void 0 : _a.country,
|
|
11723
12070
|
strict: props.strict,
|
|
11724
12071
|
token: props.token,
|
|
11725
12072
|
onTokenRefreshed: (newToken) => {
|
|
@@ -11738,6 +12085,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
11738
12085
|
});
|
|
11739
12086
|
}
|
|
11740
12087
|
function setConfig(config = {}) {
|
|
12088
|
+
var _a2;
|
|
11741
12089
|
try {
|
|
11742
12090
|
configValidator.validateSync(config);
|
|
11743
12091
|
} catch (error2) {
|
|
@@ -11753,6 +12101,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
11753
12101
|
...defaultConfig.entrypoint,
|
|
11754
12102
|
...removeUndefineds(config.entrypoint)
|
|
11755
12103
|
};
|
|
12104
|
+
childProperties.requestedCountry = (_a2 = config.entrypoint) == null ? void 0 : _a2.country;
|
|
11756
12105
|
childProperties.internal = {
|
|
11757
12106
|
...defaultConfig.__internal__,
|
|
11758
12107
|
...removeUndefineds(config.__internal__)
|
|
@@ -11777,6 +12126,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
11777
12126
|
return widgetComponent.value.setToken(token, strict);
|
|
11778
12127
|
}
|
|
11779
12128
|
function upsertConfig(config = {}) {
|
|
12129
|
+
var _a2;
|
|
11780
12130
|
try {
|
|
11781
12131
|
configValidator.validateSync(config);
|
|
11782
12132
|
} catch (error2) {
|
|
@@ -11792,6 +12142,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
11792
12142
|
...childProperties.entrypoint,
|
|
11793
12143
|
...removeUndefineds(config.entrypoint)
|
|
11794
12144
|
};
|
|
12145
|
+
childProperties.requestedCountry = ((_a2 = config.entrypoint) == null ? void 0 : _a2.country) ?? childProperties.requestedCountry;
|
|
11795
12146
|
childProperties.internal = {
|
|
11796
12147
|
...childProperties.internal,
|
|
11797
12148
|
...removeUndefineds(config.__internal__)
|
|
@@ -12016,6 +12367,7 @@ const staticMethods = {
|
|
|
12016
12367
|
updateCredential
|
|
12017
12368
|
};
|
|
12018
12369
|
initFirebase();
|
|
12370
|
+
const mountedApps = /* @__PURE__ */ new WeakMap();
|
|
12019
12371
|
class SyncfyWidget {
|
|
12020
12372
|
/**
|
|
12021
12373
|
*
|
|
@@ -12050,6 +12402,7 @@ class SyncfyWidget {
|
|
|
12050
12402
|
* @param {Boolean} params.config.navigation.displayBusinessSites
|
|
12051
12403
|
* @param {Boolean} params.config.navigation.displayCredentialInModal
|
|
12052
12404
|
* @param {Boolean} params.config.navigation.displayErrorsInToast
|
|
12405
|
+
* @param {Boolean} params.config.navigation.displayFullSiteList Lists every site by country and category instead of asking for filters.
|
|
12053
12406
|
* @param {Boolean} params.config.navigation.displayLogoImages Indicates if widget should show organizations logo.
|
|
12054
12407
|
* @param {Boolean} params.config.navigation.displayLongDescription
|
|
12055
12408
|
* @param {Boolean} params.config.navigation.displayPersonalSites
|
|
@@ -12087,6 +12440,7 @@ class SyncfyWidget {
|
|
|
12087
12440
|
*
|
|
12088
12441
|
*/
|
|
12089
12442
|
constructor(params) {
|
|
12443
|
+
var _a;
|
|
12090
12444
|
const rollbar = new Rollbar({
|
|
12091
12445
|
accessToken: "2d928ea9aa674c6ea84dbf6f3901a403",
|
|
12092
12446
|
captureUncaught: false,
|
|
@@ -12147,7 +12501,13 @@ class SyncfyWidget {
|
|
|
12147
12501
|
});
|
|
12148
12502
|
}
|
|
12149
12503
|
app2.provide(rootEmitter, emitter);
|
|
12150
|
-
const
|
|
12504
|
+
const element = _params.element || "#widget";
|
|
12505
|
+
const container2 = typeof element === "string" ? document.querySelector(element) : element;
|
|
12506
|
+
if (container2) {
|
|
12507
|
+
(_a = mountedApps.get(container2)) == null ? void 0 : _a.unmount();
|
|
12508
|
+
mountedApps.set(container2, app2);
|
|
12509
|
+
}
|
|
12510
|
+
const rootComponent = app2.mount(element);
|
|
12151
12511
|
return {
|
|
12152
12512
|
on,
|
|
12153
12513
|
close: rootComponent.close,
|