@syncfy/authentication-widget 2.2.0 → 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.
@@ -2587,9 +2587,9 @@ const paramsValidator = yup.object().shape({
2587
2587
  }).strict().noUnknown();
2588
2588
  let __VERSION__ = {
2589
2589
  "git": {
2590
- "hash": "g94d4e81",
2590
+ "hash": "g689b636",
2591
2591
  "distance": 0,
2592
- "tag": "v2.2.0"
2592
+ "tag": "v2.2.1"
2593
2593
  }
2594
2594
  };
2595
2595
  function getVersion() {
@@ -5127,7 +5127,9 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
5127
5127
  });
5128
5128
  const { t } = vueI18n.useI18n();
5129
5129
  vue.onBeforeUnmount(() => {
5130
+ var _a;
5130
5131
  clearTimeout(testModeTimeout);
5132
+ (_a = props.site) == null ? void 0 : _a.removeListener("status-update", onStatusUpdate);
5131
5133
  });
5132
5134
  vue.onMounted(() => {
5133
5135
  if (props.showLogo) {
@@ -5135,14 +5137,21 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
5135
5137
  }
5136
5138
  focusFirstInput();
5137
5139
  validateChanged();
5138
- props.site.on("status-update", (newStatus) => {
5139
- if (newStatus === "loading") {
5140
- loading.value = true;
5141
- } else {
5142
- loading.value = false;
5143
- }
5144
- });
5140
+ props.site.on("status-update", onStatusUpdate);
5145
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
+ }
5146
5155
  function disabledDate(time) {
5147
5156
  return time.getTime() > Date.now();
5148
5157
  }
@@ -9883,14 +9892,25 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
9883
9892
  const { t } = vueI18n.useI18n();
9884
9893
  const loading = vue.ref(false);
9885
9894
  vue.onMounted(() => {
9886
- props.site.on("status-update", (newStatus) => {
9887
- if (newStatus === "loading") {
9888
- loading.value = true;
9889
- } else {
9890
- loading.value = false;
9891
- }
9892
- });
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);
9893
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
+ }
9894
9914
  return (_ctx, _cache) => {
9895
9915
  return vue.openBlock(), vue.createElementBlock("div", {
9896
9916
  class: vue.normalizeClass(_ctx.$style["back-up-connection"])
@@ -10239,6 +10259,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
10239
10259
  });
10240
10260
  });
10241
10261
  vue.onBeforeUnmount(() => {
10262
+ closeInfoNotification();
10242
10263
  dropSite();
10243
10264
  credential == null ? void 0 : credential.dispose();
10244
10265
  });
@@ -2585,9 +2585,9 @@ const paramsValidator = object().shape({
2585
2585
  }).strict().noUnknown();
2586
2586
  let __VERSION__ = {
2587
2587
  "git": {
2588
- "hash": "g94d4e81",
2588
+ "hash": "g689b636",
2589
2589
  "distance": 0,
2590
- "tag": "v2.2.0"
2590
+ "tag": "v2.2.1"
2591
2591
  }
2592
2592
  };
2593
2593
  function getVersion() {
@@ -5125,7 +5125,9 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
5125
5125
  });
5126
5126
  const { t } = useI18n();
5127
5127
  onBeforeUnmount(() => {
5128
+ var _a;
5128
5129
  clearTimeout(testModeTimeout);
5130
+ (_a = props.site) == null ? void 0 : _a.removeListener("status-update", onStatusUpdate);
5129
5131
  });
5130
5132
  onMounted(() => {
5131
5133
  if (props.showLogo) {
@@ -5133,14 +5135,21 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
5133
5135
  }
5134
5136
  focusFirstInput();
5135
5137
  validateChanged();
5136
- props.site.on("status-update", (newStatus) => {
5137
- if (newStatus === "loading") {
5138
- loading.value = true;
5139
- } else {
5140
- loading.value = false;
5141
- }
5142
- });
5138
+ props.site.on("status-update", onStatusUpdate);
5143
5139
  });
5140
+ watch(
5141
+ () => props.site,
5142
+ (newSite, oldSite) => {
5143
+ oldSite == null ? void 0 : oldSite.removeListener("status-update", onStatusUpdate);
5144
+ if (newSite) {
5145
+ newSite.on("status-update", onStatusUpdate);
5146
+ loading.value = newSite.status === "loading";
5147
+ }
5148
+ }
5149
+ );
5150
+ function onStatusUpdate(newStatus) {
5151
+ loading.value = newStatus === "loading";
5152
+ }
5144
5153
  function disabledDate(time) {
5145
5154
  return time.getTime() > Date.now();
5146
5155
  }
@@ -9881,14 +9890,25 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
9881
9890
  const { t } = useI18n();
9882
9891
  const loading = ref(false);
9883
9892
  onMounted(() => {
9884
- props.site.on("status-update", (newStatus) => {
9885
- if (newStatus === "loading") {
9886
- loading.value = true;
9887
- } else {
9888
- loading.value = false;
9889
- }
9890
- });
9893
+ props.site.on("status-update", onStatusUpdate);
9894
+ });
9895
+ onBeforeUnmount(() => {
9896
+ var _a;
9897
+ (_a = props.site) == null ? void 0 : _a.removeListener("status-update", onStatusUpdate);
9891
9898
  });
9899
+ watch(
9900
+ () => props.site,
9901
+ (newSite, oldSite) => {
9902
+ oldSite == null ? void 0 : oldSite.removeListener("status-update", onStatusUpdate);
9903
+ if (newSite) {
9904
+ newSite.on("status-update", onStatusUpdate);
9905
+ loading.value = newSite.status === "loading";
9906
+ }
9907
+ }
9908
+ );
9909
+ function onStatusUpdate(newStatus) {
9910
+ loading.value = newStatus === "loading";
9911
+ }
9892
9912
  return (_ctx, _cache) => {
9893
9913
  return openBlock(), createElementBlock("div", {
9894
9914
  class: normalizeClass(_ctx.$style["back-up-connection"])
@@ -10237,6 +10257,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
10237
10257
  });
10238
10258
  });
10239
10259
  onBeforeUnmount(() => {
10260
+ closeInfoNotification();
10240
10261
  dropSite();
10241
10262
  credential == null ? void 0 : credential.dispose();
10242
10263
  });