@ozdao/prometheus-framework 0.1.77 → 0.1.79

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. package/dist/main.css +1 -1
  2. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  3. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +33 -30
  4. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
  5. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +2 -44
  6. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  7. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +44 -2
  8. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  9. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +1 -1
  10. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  11. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +41 -43
  12. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  13. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +33 -35
  14. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  15. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +1 -1
  16. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  17. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +43 -45
  18. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  19. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +87 -84
  20. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  21. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +44 -46
  22. package/dist/prometheus-framework/src/modules/auth/localization/SignIn.json.cjs +1 -0
  23. package/dist/prometheus-framework/src/modules/auth/localization/SignIn.json.js +38 -0
  24. package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
  25. package/dist/prometheus-framework/src/modules/auth/store/auth.js +93 -75
  26. package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.cjs +1 -1
  27. package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.js +4 -3
  28. package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.cjs +1 -1
  29. package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.js +12 -11
  30. package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.cjs +2 -2
  31. package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.js +12 -11
  32. package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.cjs +1 -1
  33. package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.js +5 -4
  34. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +2 -2
  35. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +20 -19
  36. package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.cjs +1 -1
  37. package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.js +15 -13
  38. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
  40. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  42. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
  44. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  46. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.js +1 -1
  48. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.js +1 -1
  50. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
  52. package/dist/prometheus-framework/src/modules/spots/components/sections/Feed.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/spots/components/sections/Feed.vue.js +1 -1
  54. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  56. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +1 -1
  58. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  60. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileOrganizations.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileOrganizations.vue.js +1 -1
  62. package/dist/prometheus-framework.cjs.js +10 -10
  63. package/dist/prometheus-framework.es.js +8 -5
  64. package/dist/style.css +1 -1
  65. package/package.json +1 -2
  66. package/src/components/Field/Field.vue +4 -1
  67. package/src/components/Status/Status.vue +5 -8
  68. package/src/modules/auth/components/layouts/Auth.vue +45 -36
  69. package/src/modules/auth/components/pages/EnterCode.vue +0 -17
  70. package/src/modules/auth/components/pages/EnterPassword.vue +0 -23
  71. package/src/modules/auth/components/pages/ResetPassword.vue +0 -27
  72. package/src/modules/auth/components/pages/SignIn.vue +17 -47
  73. package/src/modules/auth/components/pages/SignUp.vue +0 -29
  74. package/src/modules/auth/localization/EnterCode.json +14 -0
  75. package/src/modules/auth/localization/EnterPassword.json +20 -0
  76. package/src/modules/auth/localization/ResetPassword.json +24 -0
  77. package/src/modules/auth/localization/SignIn.json +34 -0
  78. package/src/modules/auth/localization/SignUp.json +26 -0
  79. package/src/modules/auth/store/auth.js +20 -20
  80. package/src/modules/constructor/components/elements/Bullets.vue +1 -0
  81. package/src/modules/constructor/components/elements/Caption.vue +1 -0
  82. package/src/modules/constructor/components/elements/H2.vue +1 -0
  83. package/src/modules/constructor/components/elements/ImageUpload.vue +1 -1
  84. package/src/modules/constructor/components/elements/Textarea.vue +1 -0
  85. package/src/modules/globals/localization/methods/get-app-locales.js +13 -0
  86. package/src/modules/globals/localization/vue-i18n.js +20 -14
  87. package/src/modules/globals/localization/vue-i18n.singleton.js +1 -1
  88. package/src/modules/globals/localization/vue-i18n-new.js +0 -70
@@ -1,10 +1,10 @@
1
- import { ref as f, openBlock as n, createElementBlock as o, Fragment as m, createElementVNode as s, normalizeClass as v, toDisplayString as d, createCommentVNode as u, renderSlot as c, createVNode as b, Transition as y, withCtx as p } from "vue";
1
+ import { ref as f, openBlock as a, createElementBlock as d, Fragment as m, createElementVNode as o, normalizeClass as b, toDisplayString as s, createCommentVNode as i, renderSlot as c, createVNode as v, Transition as x, withCtx as y } from "vue";
2
2
  import "./Field.vue.js";
3
3
  import h from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const x = {
4
+ const k = {
5
5
  key: 0,
6
6
  class: "t-transp mn-r-small"
7
- }, k = { class: "w-100" }, g = ["type", "value", "placeholder"], w = ["value", "placeholder"], F = {
7
+ }, p = { class: "w-100" }, g = ["type", "value", "placeholder", "tabindex"], w = ["value", "placeholder", "tabindex"], F = {
8
8
  key: 1,
9
9
  class: "t-transp mn-l-small"
10
10
  }, B = {
@@ -19,57 +19,60 @@ const x = {
19
19
  placeholder: "Enter something here",
20
20
  field: null,
21
21
  validation: !1,
22
- disabled: !1
22
+ disabled: !1,
23
+ tabindex: -1
23
24
  },
24
25
  emits: ["update:field", "focus", "blur"],
25
- setup(e, { emit: a }) {
26
- const i = f(e.field);
27
- return (r, l) => (n(), o(m, null, [
28
- s("div", {
29
- class: v([[
26
+ setup(e, { emit: n }) {
27
+ const u = f(e.field);
28
+ return (r, l) => (a(), d(m, null, [
29
+ o("div", {
30
+ class: b([[
30
31
  r.$attrs.class,
31
32
  {
32
33
  "bg-fourth-nano": e.validation
33
34
  }
34
35
  ], "flex-center flex-nowrap flex"])
35
36
  }, [
36
- e.label ? (n(), o("div", x, [
37
- s("span", null, d(e.label), 1)
38
- ])) : u("", !0),
39
- s("div", k, [
40
- e.type !== "textarea" ? (n(), o("input", {
37
+ e.label ? (a(), d("div", k, [
38
+ o("span", null, s(e.label), 1)
39
+ ])) : i("", !0),
40
+ o("div", p, [
41
+ e.type !== "textarea" ? (a(), d("input", {
41
42
  key: 0,
42
- onInput: l[0] || (l[0] = (t) => i.value = a("update:field", t.target.value)),
43
- onFocus: l[1] || (l[1] = (t) => a("focus", t)),
44
- onBlur: l[2] || (l[2] = (t) => a("blur", t)),
43
+ onInput: l[0] || (l[0] = (t) => u.value = n("update:field", t.target.value)),
44
+ onFocus: l[1] || (l[1] = (t) => n("focus", t)),
45
+ onBlur: l[2] || (l[2] = (t) => n("blur", t)),
45
46
  type: e.type,
46
47
  class: "w-100",
47
48
  value: e.field,
48
- placeholder: e.placeholder
49
- }, null, 40, g)) : (n(), o("textarea", {
49
+ placeholder: e.placeholder,
50
+ tabindex: e.tabindex
51
+ }, null, 40, g)) : (a(), d("textarea", {
50
52
  key: 1,
51
- onInput: l[3] || (l[3] = (t) => i.value = a("update:field", t.target.value)),
52
- onFocus: l[4] || (l[4] = (t) => a("focus", t)),
53
- onBlur: l[5] || (l[5] = (t) => a("blur", t)),
53
+ onInput: l[3] || (l[3] = (t) => u.value = n("update:field", t.target.value)),
54
+ onFocus: l[4] || (l[4] = (t) => n("focus", t)),
55
+ onBlur: l[5] || (l[5] = (t) => n("blur", t)),
54
56
  class: "w-100",
55
57
  value: e.field,
56
- placeholder: e.placeholder
58
+ placeholder: e.placeholder,
59
+ tabindex: e.tabindex
57
60
  }, null, 40, w))
58
61
  ]),
59
62
  c(r.$slots, "default", {}, void 0, !0),
60
- e.symbol ? (n(), o("div", F, [
61
- s("span", null, d(e.symbol), 1)
62
- ])) : u("", !0)
63
+ e.symbol ? (a(), d("div", F, [
64
+ o("span", null, s(e.symbol), 1)
65
+ ])) : i("", !0)
63
66
  ], 2),
64
- b(y, { name: "fade" }, {
65
- default: p(() => [
66
- e.validation ? (n(), o("div", B, " * " + d(e.validation.message), 1)) : u("", !0)
67
+ v(x, { name: "fade" }, {
68
+ default: y(() => [
69
+ e.validation ? (a(), d("div", B, " * " + s(e.validation.message), 1)) : i("", !0)
67
70
  ]),
68
71
  _: 1
69
72
  })
70
73
  ], 64));
71
74
  }
72
- }, S = /* @__PURE__ */ h(C, [["__scopeId", "data-v-f4a29b0d"]]);
75
+ }, S = /* @__PURE__ */ h(C, [["__scopeId", "data-v-839e7ced"]]);
73
76
  export {
74
77
  S as default
75
78
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Tab.vue2.cjs");const b={class:""},m={class:"flex-nowrap flex-v-center flex"},v=["onClick"],p={__name:"Tab",props:{tabs:Array,selected:String,callback:Function},emits:["update:selected"],setup(s,{emit:o}){const l=s,n=e.ref(0);if(l.selected){const t=l.tabs.findIndex(c=>c.value===l.selected);t!==-1&&(n.value=t)}function i(t,c){n.value=t,o("update:selected",c.value),l.callback&&l.callback()}function u(t){return`${100/l.tabs.length*t}%`}function d(){return`${100/l.tabs.length}%`}const f=e.computed(()=>({left:u(n.value),width:d()}));return(t,c)=>(e.openBlock(),e.createElementBlock("div",b,[e.createElementVNode("div",m,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.tabs,(r,a)=>(e.openBlock(),e.createElementBlock("div",{key:a,onClick:k=>i(a,r),class:e.normalizeClass([{"t-transp":a!==n.value},"z-index-1 t-center pd-small w-100"])},[e.createElementVNode("label",null,e.toDisplayString(r.name),1)],10,v))),128)),e.createElementVNode("div",{style:e.normalizeStyle(e.unref(f)),class:"radius-extra bg-main t-white tab-selector"},null,4)])]))}};exports.default=p;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="";exports.default=e;
@@ -1,46 +1,4 @@
1
- import { ref as p, computed as v, openBlock as c, createElementBlock as s, createElementVNode as r, Fragment as h, renderList as _, normalizeClass as g, toDisplayString as k, normalizeStyle as x, unref as y } from "vue";
2
- import "./Tab.vue2.js";
3
- const S = { class: "" }, T = { class: "flex-nowrap flex-v-center flex" }, w = ["onClick"], W = {
4
- __name: "Tab",
5
- props: {
6
- tabs: Array,
7
- selected: String,
8
- callback: Function
9
- },
10
- emits: ["update:selected"],
11
- setup(o, { emit: d }) {
12
- const t = o, a = p(0);
13
- if (t.selected) {
14
- const e = t.tabs.findIndex((l) => l.value === t.selected);
15
- e !== -1 && (a.value = e);
16
- }
17
- function u(e, l) {
18
- a.value = e, d("update:selected", l.value), t.callback && t.callback();
19
- }
20
- function f(e) {
21
- return `${100 / t.tabs.length * e}%`;
22
- }
23
- function b() {
24
- return `${100 / t.tabs.length}%`;
25
- }
26
- const m = v(() => ({ left: f(a.value), width: b() }));
27
- return (e, l) => (c(), s("div", S, [
28
- r("div", T, [
29
- (c(!0), s(h, null, _(o.tabs, (i, n) => (c(), s("div", {
30
- key: n,
31
- onClick: (z) => u(n, i),
32
- class: g([{ "t-transp": n !== a.value }, "z-index-1 t-center pd-small w-100"])
33
- }, [
34
- r("label", null, k(i.name), 1)
35
- ], 10, w))), 128)),
36
- r("div", {
37
- style: x(y(m)),
38
- class: "radius-extra bg-main t-white tab-selector"
39
- }, null, 4)
40
- ])
41
- ]));
42
- }
43
- };
1
+ const e = "";
44
2
  export {
45
- W as default
3
+ e as default
46
4
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="";exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Tab.vue.cjs");const b={class:""},m={class:"flex-nowrap flex-v-center flex"},v=["onClick"],p={__name:"Tab",props:{tabs:Array,selected:String,callback:Function},emits:["update:selected"],setup(s,{emit:o}){const l=s,n=e.ref(0);if(l.selected){const t=l.tabs.findIndex(c=>c.value===l.selected);t!==-1&&(n.value=t)}function i(t,c){n.value=t,o("update:selected",c.value),l.callback&&l.callback()}function u(t){return`${100/l.tabs.length*t}%`}function d(){return`${100/l.tabs.length}%`}const f=e.computed(()=>({left:u(n.value),width:d()}));return(t,c)=>(e.openBlock(),e.createElementBlock("div",b,[e.createElementVNode("div",m,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.tabs,(r,a)=>(e.openBlock(),e.createElementBlock("div",{key:a,onClick:k=>i(a,r),class:e.normalizeClass([{"t-transp":a!==n.value},"z-index-1 t-center pd-small w-100"])},[e.createElementVNode("label",null,e.toDisplayString(r.name),1)],10,v))),128)),e.createElementVNode("div",{style:e.normalizeStyle(e.unref(f)),class:"radius-extra bg-main t-white tab-selector"},null,4)])]))}};exports.default=p;
@@ -1,4 +1,46 @@
1
- const e = "";
1
+ import { ref as p, computed as v, openBlock as c, createElementBlock as s, createElementVNode as r, Fragment as h, renderList as _, normalizeClass as g, toDisplayString as k, normalizeStyle as x, unref as y } from "vue";
2
+ import "./Tab.vue.js";
3
+ const S = { class: "" }, T = { class: "flex-nowrap flex-v-center flex" }, w = ["onClick"], W = {
4
+ __name: "Tab",
5
+ props: {
6
+ tabs: Array,
7
+ selected: String,
8
+ callback: Function
9
+ },
10
+ emits: ["update:selected"],
11
+ setup(o, { emit: d }) {
12
+ const t = o, a = p(0);
13
+ if (t.selected) {
14
+ const e = t.tabs.findIndex((l) => l.value === t.selected);
15
+ e !== -1 && (a.value = e);
16
+ }
17
+ function u(e, l) {
18
+ a.value = e, d("update:selected", l.value), t.callback && t.callback();
19
+ }
20
+ function f(e) {
21
+ return `${100 / t.tabs.length * e}%`;
22
+ }
23
+ function b() {
24
+ return `${100 / t.tabs.length}%`;
25
+ }
26
+ const m = v(() => ({ left: f(a.value), width: b() }));
27
+ return (e, l) => (c(), s("div", S, [
28
+ r("div", T, [
29
+ (c(!0), s(h, null, _(o.tabs, (i, n) => (c(), s("div", {
30
+ key: n,
31
+ onClick: (z) => u(n, i),
32
+ class: g([{ "t-transp": n !== a.value }, "z-index-1 t-center pd-small w-100"])
33
+ }, [
34
+ r("label", null, k(i.name), 1)
35
+ ], 10, w))), 128)),
36
+ r("div", {
37
+ style: x(y(m)),
38
+ class: "radius-extra bg-main t-white tab-selector"
39
+ }, null, 4)
40
+ ])
41
+ ]));
42
+ }
43
+ };
2
44
  export {
3
- e as default
45
+ W as default
4
46
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue2.cjs");require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../../../../node_modules/vue3-carousel/dist/carousel.css.cjs");require("vue-i18n");require("../../../../../../node_modules/vue3-carousel/dist/carousel.es.cjs");require("../sections/SliderFeatures.vue2.cjs");const r=require("vue-router");require("../../store/auth.cjs");require("../../../middlewares/client/inputs.validation.cjs");const u={class:"cols-2-1_2 gap-small pd-small bg-white"},n=e.createElementVNode("section",{class:"w-100 desktop-only o-hidden radius-big bg-grad-main"},null,-1),s={__name:"Auth",setup(a){return e.ref(null),e.ref(null),e.ref(null),r.useRoute(),r.useRouter(),e.ref("email"),(o,c)=>{const t=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",u,[e.createVNode(t,{class:"pd-medium br-solid br-1px br-grey radius-big w-m-66r t-center"},{default:e.withCtx(({Component:i,route:l})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i),{ref:"page",key:l.path,localPosition:o.localPosition},null,8,["localPosition"]))]),_:2},1024)]),_:1}),n])}}};exports.default=s;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue.cjs");require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../../../../node_modules/vue3-carousel/dist/carousel.css.cjs");require("vue-i18n");require("../../../../../../node_modules/vue3-carousel/dist/carousel.es.cjs");require("../sections/SliderFeatures.vue2.cjs");const r=require("vue-router");require("../../store/auth.cjs");require("../../../middlewares/client/inputs.validation.cjs");const u={class:"cols-2-1_2 gap-small pd-small bg-white"},n=e.createElementVNode("section",{class:"w-100 desktop-only o-hidden radius-big bg-grad-main"},null,-1),s={__name:"Auth",setup(a){return e.ref(null),e.ref(null),e.ref(null),r.useRoute(),r.useRouter(),e.ref("email"),(o,c)=>{const t=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",u,[e.createVNode(t,{class:"pd-medium br-solid br-1px br-grey radius-big w-m-66r t-center"},{default:e.withCtx(({Component:i,route:l})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i),{ref:"page",key:l.path,localPosition:o.localPosition},null,8,["localPosition"]))]),_:2},1024)]),_:1}),n])}}};exports.default=s;
@@ -1,5 +1,5 @@
1
1
  import { ref as e, resolveComponent as a, openBlock as o, createElementBlock as m, createVNode as t, withCtx as r, Transition as c, createBlock as p, resolveDynamicComponent as u, createElementVNode as d } from "vue";
2
- import "../../../../components/Tab/Tab.vue2.js";
2
+ import "../../../../components/Tab/Tab.vue.js";
3
3
  import "../../../../components/Field/Field.vue.js";
4
4
  import "../../../../components/Button/Button.vue.js";
5
5
  import "../../../../../../node_modules/vue3-carousel/dist/carousel.css.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue");require("../../../../components/Field/Field.vue.cjs");const f=require("vue-router"),D=require("vue-i18n"),c=require("../../store/auth.cjs"),p=require("../../store/twofa.cjs"),y=require("../../../globals/store/globals.cjs"),v=require("./EnterCode.vue2.cjs"),I={class:"t-center pd-medium"},q={class:"mn-medium"},k={class:"mn-big t-transp"},C={class:"w-100 mn-big flex-nowrap flex"},N={key:1},E={__name:"EnterCode",setup(P){const m=f.useRoute(),w=f.useRouter(),{t:d}=D.useI18n({inheritLocale:!0,useScope:"local"}),o=n.reactive({digits:["","","",""],error:null});n.watch(()=>o.digits[0],s=>{if(console.log(String(s)),console.log(String(s).length),s&&String(s).length>1){let e=String(s).split("");console.log(e);let t=[...o.digits];e.forEach((l,r)=>{console.log(r),console.log(t[r]),console.log(l),t[r]=l}),o.digits=t,u(3)}});const g=n.ref(null),i=n.ref(0);async function S(){try{await p.sendCode(c.state.user,m.query.type,c.state.user.phone?"phone":"email"),i.value=30;const s=setInterval(()=>{i.value>0?i.value-=1:clearInterval(s)},1e3)}catch{y.setError({response:{data:{errorCode:"CODE_NOT_SENT"}}})}}const a=(s,e)=>{if(s.key==="Backspace"&&(o.digits[e]===null||o.digits[e]===void 0||o.digits[e]==="")){s.preventDefault();const t=document.querySelectorAll("input"),l=e>0?t[e-1]:null;l&&(l.focus(),l.setSelectionRange(l.value.length,l.value.length))}},u=s=>{const e=document.querySelectorAll("input"),t=e[s+1],l=s>0?e[s-1]:null;if(o.digits[s]!==""&&o.digits[s]!==null&&o.digits[s]!==void 0&&s<4&&(s<3?t.focus():g.value.focus()),(o.digits[s]===null||o.digits[s]===void 0||o.digits[s]==="")&&s>0&&l.focus(),o.digits.every(r=>r!=="")){const r=o.digits.join(""),b=p.state.code.code.toString();r===b?(p.state.code.isValid=!0,w.push({path:"/auth/enter-password",query:{type:p.state.code.type,method:m.query.method}})):(y.setError({response:{data:{errorCode:"WRONG_CODE"}}}),g.value.focus(),o.digits=["","","",""])}};return(s,e)=>(n.openBlock(),n.createElementBlock("section",I,[n.createElementVNode("h3",q,n.toDisplayString(n.unref(d)("verifyNumberTitle")),1),n.createElementVNode("p",k,n.toDisplayString(n.unref(d)("instructions")),1),n.createElementVNode("div",C,[n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[0]||(e[0]=t=>o.digits[0]=t),ref_key:"firstInput",ref:g,maxlength:"1",onInput:e[1]||(e[1]=t=>u(0)),onPaste:e[2]||(e[2]=t=>s.onPaste(t,0)),onKeydown:e[3]||(e[3]=t=>a(t,0)),class:"w-100 h1 pd-small t-center bg-grey radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[0]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[4]||(e[4]=t=>o.digits[1]=t),maxlength:"1",onInput:e[5]||(e[5]=t=>u(1)),onPaste:e[6]||(e[6]=t=>s.onPaste(t,1)),onKeydown:e[7]||(e[7]=t=>a(t,1)),class:"w-100 h1 pd-small t-center bg-grey radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[1]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[8]||(e[8]=t=>o.digits[2]=t),maxlength:"1",onInput:e[9]||(e[9]=t=>u(2)),onPaste:e[10]||(e[10]=t=>s.onPaste(t,2)),onKeydown:e[11]||(e[11]=t=>a(t,2)),class:"w-100 h1 pd-small t-center bg-grey radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[2]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[12]||(e[12]=t=>o.digits[3]=t),maxlength:"1",onInput:e[13]||(e[13]=t=>u(3)),onPaste:e[14]||(e[14]=t=>s.onPaste(t,3)),onKeydown:e[15]||(e[15]=t=>a(t,3)),class:"w-100 h1 pd-small t-center bg-grey radius-small"},null,544),[[n.vModelText,o.digits[3]]])]),i.value<1?(n.openBlock(),n.createElementBlock("a",{key:0,onClick:S,class:"t-blue"},n.toDisplayString(n.unref(d)("resendCode")),1)):(n.openBlock(),n.createElementBlock("span",N,n.toDisplayString(i.value)+" "+n.toDisplayString(n.unref(d)("secondsResend")),1))]))}};typeof v.default=="function"&&v.default(E);exports.default=E;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue");require("../../../../components/Field/Field.vue.cjs");const c=require("vue-router"),S=require("vue-i18n"),f=require("../../store/auth.cjs"),g=require("../../store/twofa.cjs"),y=require("../../../globals/store/globals.cjs"),b={class:"t-center pd-medium"},D={class:"mn-medium"},I={class:"mn-big t-transp"},k={class:"w-100 mn-big flex-nowrap flex"},q={key:1},N={__name:"EnterCode",setup(C){const m=c.useRoute(),v=c.useRouter(),{t:d}=S.useI18n({inheritLocale:!0,useScope:"local"}),o=n.reactive({digits:["","","",""],error:null});n.watch(()=>o.digits[0],s=>{if(console.log(String(s)),console.log(String(s).length),s&&String(s).length>1){let e=String(s).split("");console.log(e);let t=[...o.digits];e.forEach((l,r)=>{console.log(r),console.log(t[r]),console.log(l),t[r]=l}),o.digits=t,u(3)}});const p=n.ref(null),i=n.ref(0);async function w(){try{await g.sendCode(f.state.user,m.query.type,f.state.user.phone?"phone":"email"),i.value=30;const s=setInterval(()=>{i.value>0?i.value-=1:clearInterval(s)},1e3)}catch{y.setError({response:{data:{errorCode:"CODE_NOT_SENT"}}})}}const a=(s,e)=>{if(s.key==="Backspace"&&(o.digits[e]===null||o.digits[e]===void 0||o.digits[e]==="")){s.preventDefault();const t=document.querySelectorAll("input"),l=e>0?t[e-1]:null;l&&(l.focus(),l.setSelectionRange(l.value.length,l.value.length))}},u=s=>{const e=document.querySelectorAll("input"),t=e[s+1],l=s>0?e[s-1]:null;if(o.digits[s]!==""&&o.digits[s]!==null&&o.digits[s]!==void 0&&s<4&&(s<3?t.focus():p.value.focus()),(o.digits[s]===null||o.digits[s]===void 0||o.digits[s]==="")&&s>0&&l.focus(),o.digits.every(r=>r!=="")){const r=o.digits.join(""),E=g.state.code.code.toString();r===E?(g.state.code.isValid=!0,v.push({path:"/auth/enter-password",query:{type:g.state.code.type,method:m.query.method}})):(y.setError({response:{data:{errorCode:"WRONG_CODE"}}}),p.value.focus(),o.digits=["","","",""])}};return(s,e)=>(n.openBlock(),n.createElementBlock("section",b,[n.createElementVNode("h3",D,n.toDisplayString(n.unref(d)("verifyNumberTitle")),1),n.createElementVNode("p",I,n.toDisplayString(n.unref(d)("instructions")),1),n.createElementVNode("div",k,[n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[0]||(e[0]=t=>o.digits[0]=t),ref_key:"firstInput",ref:p,maxlength:"1",onInput:e[1]||(e[1]=t=>u(0)),onPaste:e[2]||(e[2]=t=>s.onPaste(t,0)),onKeydown:e[3]||(e[3]=t=>a(t,0)),class:"w-100 h1 pd-small t-center bg-grey radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[0]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[4]||(e[4]=t=>o.digits[1]=t),maxlength:"1",onInput:e[5]||(e[5]=t=>u(1)),onPaste:e[6]||(e[6]=t=>s.onPaste(t,1)),onKeydown:e[7]||(e[7]=t=>a(t,1)),class:"w-100 h1 pd-small t-center bg-grey radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[1]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[8]||(e[8]=t=>o.digits[2]=t),maxlength:"1",onInput:e[9]||(e[9]=t=>u(2)),onPaste:e[10]||(e[10]=t=>s.onPaste(t,2)),onKeydown:e[11]||(e[11]=t=>a(t,2)),class:"w-100 h1 pd-small t-center bg-grey radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[2]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[12]||(e[12]=t=>o.digits[3]=t),maxlength:"1",onInput:e[13]||(e[13]=t=>u(3)),onPaste:e[14]||(e[14]=t=>s.onPaste(t,3)),onKeydown:e[15]||(e[15]=t=>a(t,3)),class:"w-100 h1 pd-small t-center bg-grey radius-small"},null,544),[[n.vModelText,o.digits[3]]])]),i.value<1?(n.openBlock(),n.createElementBlock("a",{key:0,onClick:w,class:"t-blue"},n.toDisplayString(n.unref(d)("resendCode")),1)):(n.openBlock(),n.createElementBlock("span",q,n.toDisplayString(i.value)+" "+n.toDisplayString(n.unref(d)("secondsResend")),1))]))}};exports.default=N;
@@ -1,38 +1,37 @@
1
- import { reactive as $, watch as q, ref as I, openBlock as v, createElementBlock as c, createElementVNode as r, toDisplayString as d, unref as m, withDirectives as g, vModelText as f } from "vue";
1
+ import { reactive as D, watch as $, ref as b, openBlock as v, createElementBlock as c, createElementVNode as r, toDisplayString as d, unref as m, withDirectives as g, vModelText as f } from "vue";
2
2
  import "../../../../components/Field/Field.vue.js";
3
- import { useRoute as K, useRouter as N } from "vue-router";
4
- import { useI18n as R } from "vue-i18n";
3
+ import { useRoute as q, useRouter as K } from "vue-router";
4
+ import { useI18n as N } from "vue-i18n";
5
5
  import { state as S } from "../../store/auth.js";
6
- import { state as b, sendCode as T } from "../../store/twofa.js";
6
+ import { state as w, sendCode as R } from "../../store/twofa.js";
7
7
  import { setError as C } from "../../../globals/store/globals.js";
8
- import k from "./EnterCode.vue2.js";
9
- const A = { class: "t-center pd-medium" }, O = { class: "mn-medium" }, U = { class: "mn-big t-transp" }, B = { class: "w-100 mn-big flex-nowrap flex" }, V = { key: 1 }, j = {
8
+ const T = { class: "t-center pd-medium" }, A = { class: "mn-medium" }, O = { class: "mn-big t-transp" }, U = { class: "w-100 mn-big flex-nowrap flex" }, B = { key: 1 }, H = {
10
9
  __name: "EnterCode",
11
- setup(G) {
12
- const w = K(), E = N(), { t: p } = R({
10
+ setup(V) {
11
+ const I = q(), k = K(), { t: p } = N({
13
12
  inheritLocale: !0,
14
13
  useScope: "local"
15
- }), o = $({
14
+ }), n = D({
16
15
  digits: ["", "", "", ""],
17
16
  error: null
18
17
  });
19
- q(
20
- () => o.digits[0],
18
+ $(
19
+ () => n.digits[0],
21
20
  (s) => {
22
21
  if (console.log(String(s)), console.log(String(s).length), s && String(s).length > 1) {
23
22
  let t = String(s).split("");
24
23
  console.log(t);
25
- let e = [...o.digits];
26
- t.forEach((n, l) => {
27
- console.log(l), console.log(e[l]), console.log(n), e[l] = n;
28
- }), o.digits = e, u(3);
24
+ let e = [...n.digits];
25
+ t.forEach((o, l) => {
26
+ console.log(l), console.log(e[l]), console.log(o), e[l] = o;
27
+ }), n.digits = e, u(3);
29
28
  }
30
29
  }
31
30
  );
32
- const y = I(null), i = I(0);
33
- async function P() {
31
+ const y = b(null), i = b(0);
32
+ async function E() {
34
33
  try {
35
- await T(S.user, w.query.type, S.user.phone ? "phone" : "email"), i.value = 30;
34
+ await R(S.user, I.query.type, S.user.phone ? "phone" : "email"), i.value = 30;
36
35
  const s = setInterval(() => {
37
36
  i.value > 0 ? i.value -= 1 : clearInterval(s);
38
37
  }, 1e3);
@@ -41,28 +40,28 @@ const A = { class: "t-center pd-medium" }, O = { class: "mn-medium" }, U = { cla
41
40
  }
42
41
  }
43
42
  const a = (s, t) => {
44
- if (s.key === "Backspace" && (o.digits[t] === null || o.digits[t] === void 0 || o.digits[t] === "")) {
43
+ if (s.key === "Backspace" && (n.digits[t] === null || n.digits[t] === void 0 || n.digits[t] === "")) {
45
44
  s.preventDefault();
46
- const e = document.querySelectorAll("input"), n = t > 0 ? e[t - 1] : null;
47
- n && (n.focus(), n.setSelectionRange(n.value.length, n.value.length));
45
+ const e = document.querySelectorAll("input"), o = t > 0 ? e[t - 1] : null;
46
+ o && (o.focus(), o.setSelectionRange(o.value.length, o.value.length));
48
47
  }
49
48
  }, u = (s) => {
50
- const t = document.querySelectorAll("input"), e = t[s + 1], n = s > 0 ? t[s - 1] : null;
51
- if (o.digits[s] !== "" && o.digits[s] !== null && o.digits[s] !== void 0 && s < 4 && (s < 3 ? e.focus() : y.value.focus()), (o.digits[s] === null || o.digits[s] === void 0 || o.digits[s] === "") && s > 0 && n.focus(), o.digits.every((l) => l !== "")) {
52
- const l = o.digits.join(""), D = b.code.code.toString();
53
- l === D ? (b.code.isValid = !0, E.push({
49
+ const t = document.querySelectorAll("input"), e = t[s + 1], o = s > 0 ? t[s - 1] : null;
50
+ if (n.digits[s] !== "" && n.digits[s] !== null && n.digits[s] !== void 0 && s < 4 && (s < 3 ? e.focus() : y.value.focus()), (n.digits[s] === null || n.digits[s] === void 0 || n.digits[s] === "") && s > 0 && o.focus(), n.digits.every((l) => l !== "")) {
51
+ const l = n.digits.join(""), P = w.code.code.toString();
52
+ l === P ? (w.code.isValid = !0, k.push({
54
53
  path: "/auth/enter-password",
55
- query: { type: b.code.type, method: w.query.method }
56
- })) : (C({ response: { data: { errorCode: "WRONG_CODE" } } }), y.value.focus(), o.digits = ["", "", "", ""]);
54
+ query: { type: w.code.type, method: I.query.method }
55
+ })) : (C({ response: { data: { errorCode: "WRONG_CODE" } } }), y.value.focus(), n.digits = ["", "", "", ""]);
57
56
  }
58
57
  };
59
- return (s, t) => (v(), c("section", A, [
60
- r("h3", O, d(m(p)("verifyNumberTitle")), 1),
61
- r("p", U, d(m(p)("instructions")), 1),
62
- r("div", B, [
58
+ return (s, t) => (v(), c("section", T, [
59
+ r("h3", A, d(m(p)("verifyNumberTitle")), 1),
60
+ r("p", O, d(m(p)("instructions")), 1),
61
+ r("div", U, [
63
62
  g(r("input", {
64
63
  type: "number",
65
- "onUpdate:modelValue": t[0] || (t[0] = (e) => o.digits[0] = e),
64
+ "onUpdate:modelValue": t[0] || (t[0] = (e) => n.digits[0] = e),
66
65
  ref_key: "firstInput",
67
66
  ref: y,
68
67
  maxlength: "1",
@@ -71,51 +70,50 @@ const A = { class: "t-center pd-medium" }, O = { class: "mn-medium" }, U = { cla
71
70
  onKeydown: t[3] || (t[3] = (e) => a(e, 0)),
72
71
  class: "w-100 h1 pd-small t-center bg-grey radius-small mn-r-small"
73
72
  }, null, 544), [
74
- [f, o.digits[0]]
73
+ [f, n.digits[0]]
75
74
  ]),
76
75
  g(r("input", {
77
76
  type: "number",
78
- "onUpdate:modelValue": t[4] || (t[4] = (e) => o.digits[1] = e),
77
+ "onUpdate:modelValue": t[4] || (t[4] = (e) => n.digits[1] = e),
79
78
  maxlength: "1",
80
79
  onInput: t[5] || (t[5] = (e) => u(1)),
81
80
  onPaste: t[6] || (t[6] = (e) => s.onPaste(e, 1)),
82
81
  onKeydown: t[7] || (t[7] = (e) => a(e, 1)),
83
82
  class: "w-100 h1 pd-small t-center bg-grey radius-small mn-r-small"
84
83
  }, null, 544), [
85
- [f, o.digits[1]]
84
+ [f, n.digits[1]]
86
85
  ]),
87
86
  g(r("input", {
88
87
  type: "number",
89
- "onUpdate:modelValue": t[8] || (t[8] = (e) => o.digits[2] = e),
88
+ "onUpdate:modelValue": t[8] || (t[8] = (e) => n.digits[2] = e),
90
89
  maxlength: "1",
91
90
  onInput: t[9] || (t[9] = (e) => u(2)),
92
91
  onPaste: t[10] || (t[10] = (e) => s.onPaste(e, 2)),
93
92
  onKeydown: t[11] || (t[11] = (e) => a(e, 2)),
94
93
  class: "w-100 h1 pd-small t-center bg-grey radius-small mn-r-small"
95
94
  }, null, 544), [
96
- [f, o.digits[2]]
95
+ [f, n.digits[2]]
97
96
  ]),
98
97
  g(r("input", {
99
98
  type: "number",
100
- "onUpdate:modelValue": t[12] || (t[12] = (e) => o.digits[3] = e),
99
+ "onUpdate:modelValue": t[12] || (t[12] = (e) => n.digits[3] = e),
101
100
  maxlength: "1",
102
101
  onInput: t[13] || (t[13] = (e) => u(3)),
103
102
  onPaste: t[14] || (t[14] = (e) => s.onPaste(e, 3)),
104
103
  onKeydown: t[15] || (t[15] = (e) => a(e, 3)),
105
104
  class: "w-100 h1 pd-small t-center bg-grey radius-small"
106
105
  }, null, 544), [
107
- [f, o.digits[3]]
106
+ [f, n.digits[3]]
108
107
  ])
109
108
  ]),
110
109
  i.value < 1 ? (v(), c("a", {
111
110
  key: 0,
112
- onClick: P,
111
+ onClick: E,
113
112
  class: "t-blue"
114
- }, d(m(p)("resendCode")), 1)) : (v(), c("span", V, d(i.value) + " " + d(m(p)("secondsResend")), 1))
113
+ }, d(m(p)("resendCode")), 1)) : (v(), c("span", B, d(i.value) + " " + d(m(p)("secondsResend")), 1))
115
114
  ]));
116
115
  }
117
116
  };
118
- typeof k == "function" && k(j);
119
117
  export {
120
- j as default
118
+ H as default
121
119
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue2.cjs");const l=require("../../../../components/Field/Field.vue2.cjs"),h=require("../../../../components/Button/Button.vue2.cjs"),i=require("vue-router"),y=require("vue-i18n"),t=require("../../store/auth.cjs"),u=require("../../../middlewares/client/inputs.validation.cjs");require("./EnterPassword.vue2.cjs");const d=require("./EnterPassword.vue3.cjs"),w={class:"t-left pd-medium"},g={class:"mn-small"},k={key:0,class:"mn-semi t-transp"},q={key:1,class:"mn-semi t-transp"},B={class:"mn-semi radius-small o-hidden"},v={key:2,class:"p-medium t-semi mn-semi"},E=e.createElementVNode("a",{class:"t-second",href:"https://thecommunephuket.com/legal/eula",target:"_blank",rel:"noopener noreferrer"},"End User License Agreement (EULA)",-1),P={key:0},b={key:1},c={__name:"EnterPassword",setup(S){const n=e.ref(null),{t:s}=y.useI18n({inheritLocale:!0,useScope:"local"}),r=i.useRoute(),p=i.useRouter();e.ref("phone");async function m(){try{await u.validateInputs(n,u.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}r.query.method==="reset-password"&&await t.actions.updatePassword(t.state.user,r.query.type),r.query.method!=="reset-password"&&await t.actions.signup(t.state.user,r.query.type)}function f(){p.push({name:"User Profile",params:{_id:t.state.user._id},query:{afterAuth:"true"}})}return(_,o)=>(e.openBlock(),e.createElementBlock("section",w,[e.createElementVNode("h3",g,e.toDisplayString(e.unref(s)("almostDone")),1),e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("p",k,e.toDisplayString(e.unref(s)("newPasswordPrompt")),1)):(e.openBlock(),e.createElementBlock("p",q,e.toDisplayString(e.unref(s)("registrationPasswordPrompt")),1)),e.createElementVNode("div",B,[e.createVNode(l.default,{field:t.state.user.password,"onUpdate:field":o[0]||(o[0]=a=>t.state.user.password=a),type:"password",validation:n.value,placeholder:e.unref(s)("passwordPlaceholder"),class:"bg-grey pd-small radius-small mn-thin"},null,8,["field","validation","placeholder"]),e.createVNode(l.default,{field:t.state.user.passwordRepeat,"onUpdate:field":o[1]||(o[1]=a=>t.state.user.passwordRepeat=a),type:"password",placeholder:e.unref(s)("repeatPasswordPlaceholder"),class:"bg-grey pd-small radius-small mn-thin"},null,8,["field","placeholder"])]),e.unref(r).query.method!=="reset-password"?(e.openBlock(),e.createElementBlock("div",v,[e.createTextVNode(" By registering, you agree to our "),E])):e.createCommentVNode("",!0),e.createVNode(h.default,{submit:m,callback:f,class:"mn-big"},{default:e.withCtx(()=>[e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("span",P,e.toDisplayString(e.unref(s)("changePasswordBtn")),1)):(e.openBlock(),e.createElementBlock("span",b,e.toDisplayString(e.unref(s)("registerBtn")),1))]),_:1})]))}};typeof d.default=="function"&&d.default(c);exports.default=c;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue.cjs");const l=require("../../../../components/Field/Field.vue2.cjs"),f=require("../../../../components/Button/Button.vue2.cjs"),i=require("vue-router"),h=require("vue-i18n"),t=require("../../store/auth.cjs"),d=require("../../../middlewares/client/inputs.validation.cjs");require("./EnterPassword.vue2.cjs");const y={class:"t-left pd-medium"},_={class:"mn-small"},w={key:0,class:"mn-semi t-transp"},g={key:1,class:"mn-semi t-transp"},k={class:"mn-semi radius-small o-hidden"},q={key:2,class:"p-medium t-semi mn-semi"},B=e.createElementVNode("a",{class:"t-second",href:"https://thecommunephuket.com/legal/eula",target:"_blank",rel:"noopener noreferrer"},"End User License Agreement (EULA)",-1),v={key:0},E={key:1},P={__name:"EnterPassword",setup(b){const n=e.ref(null),{t:s}=h.useI18n({inheritLocale:!0,useScope:"local"}),r=i.useRoute(),u=i.useRouter();e.ref("phone");async function c(){try{await d.validateInputs(n,d.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}r.query.method==="reset-password"&&await t.actions.updatePassword(t.state.user,r.query.type),r.query.method!=="reset-password"&&await t.actions.signup(t.state.user,r.query.type)}function p(){u.push({name:"User Profile",params:{_id:t.state.user._id},query:{afterAuth:"true"}})}return(m,o)=>(e.openBlock(),e.createElementBlock("section",y,[e.createElementVNode("h3",_,e.toDisplayString(e.unref(s)("almostDone")),1),e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("p",w,e.toDisplayString(e.unref(s)("newPasswordPrompt")),1)):(e.openBlock(),e.createElementBlock("p",g,e.toDisplayString(e.unref(s)("registrationPasswordPrompt")),1)),e.createElementVNode("div",k,[e.createVNode(l.default,{field:t.state.user.password,"onUpdate:field":o[0]||(o[0]=a=>t.state.user.password=a),type:"password",validation:n.value,placeholder:e.unref(s)("passwordPlaceholder"),class:"bg-grey pd-small radius-small mn-thin"},null,8,["field","validation","placeholder"]),e.createVNode(l.default,{field:t.state.user.passwordRepeat,"onUpdate:field":o[1]||(o[1]=a=>t.state.user.passwordRepeat=a),type:"password",placeholder:e.unref(s)("repeatPasswordPlaceholder"),class:"bg-grey pd-small radius-small mn-thin"},null,8,["field","placeholder"])]),e.unref(r).query.method!=="reset-password"?(e.openBlock(),e.createElementBlock("div",q,[e.createTextVNode(" By registering, you agree to our "),B])):e.createCommentVNode("",!0),e.createVNode(f.default,{submit:c,callback:p,class:"mn-big"},{default:e.withCtx(()=>[e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("span",v,e.toDisplayString(e.unref(s)("changePasswordBtn")),1)):(e.openBlock(),e.createElementBlock("span",E,e.toDisplayString(e.unref(s)("registerBtn")),1))]),_:1})]))}};exports.default=P;
@@ -1,40 +1,39 @@
1
- import { ref as u, openBlock as o, createElementBlock as a, createElementVNode as p, toDisplayString as n, unref as e, createVNode as l, createTextVNode as P, createCommentVNode as k, withCtx as b } from "vue";
2
- import "../../../../components/Tab/Tab.vue2.js";
1
+ import { ref as u, openBlock as o, createElementBlock as a, createElementVNode as p, toDisplayString as n, unref as e, createVNode as l, createTextVNode as g, createCommentVNode as P, withCtx as k } from "vue";
2
+ import "../../../../components/Tab/Tab.vue.js";
3
3
  import c from "../../../../components/Field/Field.vue2.js";
4
4
  import q from "../../../../components/Button/Button.vue2.js";
5
- import { useRoute as v, useRouter as E } from "vue-router";
6
- import { useI18n as B } from "vue-i18n";
5
+ import { useRoute as b, useRouter as v } from "vue-router";
6
+ import { useI18n as E } from "vue-i18n";
7
7
  import { state as s, actions as h } from "../../store/auth.js";
8
- import { validateInputs as U, validatePassword as V } from "../../../middlewares/client/inputs.validation.js";
8
+ import { validateInputs as B, validatePassword as U } from "../../../middlewares/client/inputs.validation.js";
9
9
  import "./EnterPassword.vue2.js";
10
- import f from "./EnterPassword.vue3.js";
11
- const x = { class: "t-left pd-medium" }, N = { class: "mn-small" }, R = {
10
+ const V = { class: "t-left pd-medium" }, x = { class: "mn-small" }, N = {
12
11
  key: 0,
13
12
  class: "mn-semi t-transp"
14
- }, A = {
13
+ }, R = {
15
14
  key: 1,
16
15
  class: "mn-semi t-transp"
17
- }, L = { class: "mn-semi radius-small o-hidden" }, S = {
16
+ }, A = { class: "mn-semi radius-small o-hidden" }, L = {
18
17
  key: 2,
19
18
  class: "p-medium t-semi mn-semi"
20
- }, C = /* @__PURE__ */ p("a", {
19
+ }, S = /* @__PURE__ */ p("a", {
21
20
  class: "t-second",
22
21
  href: "https://thecommunephuket.com/legal/eula",
23
22
  target: "_blank",
24
23
  rel: "noopener noreferrer"
25
- }, "End User License Agreement (EULA)", -1), D = { key: 0 }, I = { key: 1 }, T = {
24
+ }, "End User License Agreement (EULA)", -1), C = { key: 0 }, D = { key: 1 }, M = {
26
25
  __name: "EnterPassword",
27
- setup(F) {
28
- const m = u(null), { t } = B({
26
+ setup(I) {
27
+ const m = u(null), { t } = E({
29
28
  inheritLocale: !0,
30
29
  useScope: "local"
31
- }), r = v(), w = E();
30
+ }), r = b(), f = v();
32
31
  u("phone");
33
- async function _() {
32
+ async function w() {
34
33
  try {
35
- await U(
34
+ await B(
36
35
  m,
37
- V,
36
+ U,
38
37
  s.user.password,
39
38
  "Некорректный пароль"
40
39
  );
@@ -43,8 +42,8 @@ const x = { class: "t-left pd-medium" }, N = { class: "mn-small" }, R = {
43
42
  }
44
43
  r.query.method === "reset-password" && await h.updatePassword(s.user, r.query.type), r.query.method !== "reset-password" && await h.signup(s.user, r.query.type);
45
44
  }
46
- function y() {
47
- w.push({
45
+ function _() {
46
+ f.push({
48
47
  name: "User Profile",
49
48
  params: {
50
49
  _id: s.user._id
@@ -52,13 +51,13 @@ const x = { class: "t-left pd-medium" }, N = { class: "mn-small" }, R = {
52
51
  query: { afterAuth: "true" }
53
52
  });
54
53
  }
55
- return (g, i) => (o(), a("section", x, [
56
- p("h3", N, n(e(t)("almostDone")), 1),
57
- e(r).query.method === "reset-password" ? (o(), a("p", R, n(e(t)("newPasswordPrompt")), 1)) : (o(), a("p", A, n(e(t)("registrationPasswordPrompt")), 1)),
58
- p("div", L, [
54
+ return (y, d) => (o(), a("section", V, [
55
+ p("h3", x, n(e(t)("almostDone")), 1),
56
+ e(r).query.method === "reset-password" ? (o(), a("p", N, n(e(t)("newPasswordPrompt")), 1)) : (o(), a("p", R, n(e(t)("registrationPasswordPrompt")), 1)),
57
+ p("div", A, [
59
58
  l(c, {
60
59
  field: s.user.password,
61
- "onUpdate:field": i[0] || (i[0] = (d) => s.user.password = d),
60
+ "onUpdate:field": d[0] || (d[0] = (i) => s.user.password = i),
62
61
  type: "password",
63
62
  validation: m.value,
64
63
  placeholder: e(t)("passwordPlaceholder"),
@@ -66,30 +65,29 @@ const x = { class: "t-left pd-medium" }, N = { class: "mn-small" }, R = {
66
65
  }, null, 8, ["field", "validation", "placeholder"]),
67
66
  l(c, {
68
67
  field: s.user.passwordRepeat,
69
- "onUpdate:field": i[1] || (i[1] = (d) => s.user.passwordRepeat = d),
68
+ "onUpdate:field": d[1] || (d[1] = (i) => s.user.passwordRepeat = i),
70
69
  type: "password",
71
70
  placeholder: e(t)("repeatPasswordPlaceholder"),
72
71
  class: "bg-grey pd-small radius-small mn-thin"
73
72
  }, null, 8, ["field", "placeholder"])
74
73
  ]),
75
- e(r).query.method !== "reset-password" ? (o(), a("div", S, [
76
- P(" By registering, you agree to our "),
77
- C
78
- ])) : k("", !0),
74
+ e(r).query.method !== "reset-password" ? (o(), a("div", L, [
75
+ g(" By registering, you agree to our "),
76
+ S
77
+ ])) : P("", !0),
79
78
  l(q, {
80
- submit: _,
81
- callback: y,
79
+ submit: w,
80
+ callback: _,
82
81
  class: "mn-big"
83
82
  }, {
84
- default: b(() => [
85
- e(r).query.method === "reset-password" ? (o(), a("span", D, n(e(t)("changePasswordBtn")), 1)) : (o(), a("span", I, n(e(t)("registerBtn")), 1))
83
+ default: k(() => [
84
+ e(r).query.method === "reset-password" ? (o(), a("span", C, n(e(t)("changePasswordBtn")), 1)) : (o(), a("span", D, n(e(t)("registerBtn")), 1))
86
85
  ]),
87
86
  _: 1
88
87
  })
89
88
  ]));
90
89
  }
91
90
  };
92
- typeof f == "function" && f(T);
93
91
  export {
94
- T as default
92
+ M as default
95
93
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue2.cjs");const l=require("../../../../components/Field/Field.vue2.cjs"),f=require("../../../../components/Button/Button.vue2.cjs"),d=require("vue-router"),t=require("../../store/auth.cjs"),u=require("../../store/invites.cjs"),c=require("../../../middlewares/client/inputs.validation.cjs");require("./Invite.vue2.cjs");const h={class:"t-left pd-medium"},v=e.createElementVNode("h3",{class:"mn-small"},"Вы были пригилашены в организацию",-1),y=e.createElementVNode("p",{class:"mn-semi t-transp"},"Пожалуйста, укажите пароль, на этом регистрация будет закочена.",-1),b={class:"mn-semi radius-small o-hidden"},q={key:0},k={key:1},B={__name:"Invite",async setup(E){let r,n;const i=e.ref(null),s=d.useRoute(),p=d.useRouter();[r,n]=e.withAsyncContext(()=>u.actions.readOne(s.query.inviteCode)),await r,n();async function m(){try{await c.validateInputs(i,c.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}await t.actions.signup(t.state.user,s.query.type,s.query.inviteCode)}function _(){p.push({name:"Dashboard"})}return(w,a)=>(e.openBlock(),e.createElementBlock("section",h,[v,y,e.createElementVNode("div",b,[e.createVNode(l.default,{field:t.state.user.password,"onUpdate:field":a[0]||(a[0]=o=>t.state.user.password=o),type:"password",validation:i.value,label:"Пароль",placeholder:"******",class:"bg-white radius-small mn-small"},null,8,["field","validation"]),e.createVNode(l.default,{field:t.state.user.passwordRepeat,"onUpdate:field":a[1]||(a[1]=o=>t.state.user.passwordRepeat=o),type:"password",label:"Повторите пароль",placeholder:"******",class:"bg-white radius-small mn-semi"},null,8,["field"])]),e.createVNode(f.default,{disabled:u.state.invite===null,submit:m,callback:_,class:"mn-big"},{default:e.withCtx(()=>[e.unref(s).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("span",q,"Поменять пароль")):(e.openBlock(),e.createElementBlock("span",k,"Зарегистрироваться"))]),_:1},8,["disabled"])]))}};exports.default=B;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue.cjs");const l=require("../../../../components/Field/Field.vue2.cjs"),f=require("../../../../components/Button/Button.vue2.cjs"),d=require("vue-router"),t=require("../../store/auth.cjs"),u=require("../../store/invites.cjs"),c=require("../../../middlewares/client/inputs.validation.cjs");require("./Invite.vue2.cjs");const h={class:"t-left pd-medium"},v=e.createElementVNode("h3",{class:"mn-small"},"Вы были пригилашены в организацию",-1),y=e.createElementVNode("p",{class:"mn-semi t-transp"},"Пожалуйста, укажите пароль, на этом регистрация будет закочена.",-1),b={class:"mn-semi radius-small o-hidden"},q={key:0},k={key:1},B={__name:"Invite",async setup(E){let r,n;const i=e.ref(null),s=d.useRoute(),p=d.useRouter();[r,n]=e.withAsyncContext(()=>u.actions.readOne(s.query.inviteCode)),await r,n();async function m(){try{await c.validateInputs(i,c.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}await t.actions.signup(t.state.user,s.query.type,s.query.inviteCode)}function _(){p.push({name:"Dashboard"})}return(w,a)=>(e.openBlock(),e.createElementBlock("section",h,[v,y,e.createElementVNode("div",b,[e.createVNode(l.default,{field:t.state.user.password,"onUpdate:field":a[0]||(a[0]=o=>t.state.user.password=o),type:"password",validation:i.value,label:"Пароль",placeholder:"******",class:"bg-white radius-small mn-small"},null,8,["field","validation"]),e.createVNode(l.default,{field:t.state.user.passwordRepeat,"onUpdate:field":a[1]||(a[1]=o=>t.state.user.passwordRepeat=o),type:"password",label:"Повторите пароль",placeholder:"******",class:"bg-white radius-small mn-semi"},null,8,["field"])]),e.createVNode(f.default,{disabled:u.state.invite===null,submit:m,callback:_,class:"mn-big"},{default:e.withCtx(()=>[e.unref(s).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("span",q,"Поменять пароль")):(e.openBlock(),e.createElementBlock("span",k,"Зарегистрироваться"))]),_:1},8,["disabled"])]))}};exports.default=B;
@@ -1,5 +1,5 @@
1
1
  import { ref as w, withAsyncContext as h, openBlock as o, createElementBlock as r, createElementVNode as n, createVNode as i, withCtx as y, unref as b } from "vue";
2
- import "../../../../components/Tab/Tab.vue2.js";
2
+ import "../../../../components/Tab/Tab.vue.js";
3
3
  import p from "../../../../components/Field/Field.vue2.js";
4
4
  import v from "../../../../components/Button/Button.vue2.js";
5
5
  import { useRoute as k, useRouter as g } from "vue-router";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../../../../components/Tab/Tab.vue.cjs"),_=require("../../../../components/Field/Field.vue2.cjs"),w=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),V=require("../../../../components/Button/Button.vue2.cjs"),d=require("vue-router"),g=require("vue-i18n"),l=require("../../store/auth.cjs");require("../../store/twofa.cjs");const n=require("../../../middlewares/client/inputs.validation.cjs");require("./ResetPassword.vue2.cjs");const c=require("./ResetPassword.vue3.cjs"),y={class:"t-left pd-medium"},N={class:"mn-small"},b={class:"mn-small t-transp"},q={class:"mn-small p-small uppercase t-semi bg-grey radius-big o-hidden"},E={key:0,class:"mn-semi radius-small o-hidden"},S={class:"mn-small t-transp"},k={key:0,class:"mn-semi radius-small o-hidden"},C={class:"mn-small t-transp"},m={__name:"ResetPassword",setup(P){const{t}=g.useI18n({inheritLocale:!0,useScope:"local"}),i=e.ref(null),u=e.ref(null);d.useRoute();const p=d.useRouter(),a=e.ref("phone");async function f(){try{a.value==="phone"&&await n.validateInputs(i,n.validatePhone,l.state.user.phone,"Некорректный телефон"),a.value==="email"&&await n.validateInputs(u,n.validateEmail,l.state.user.email,"Некорректный email")}catch{throw new Error}try{await l.actions.resetPassword(l.state.user,a.value,"reset-password")}catch(r){throw console.log(r),new Error}}function h(){p.push({name:"Enter Code",query:{type:a.value,method:"reset-password"}})}return(r,o)=>(e.openBlock(),e.createElementBlock("section",y,[e.createElementVNode("h3",N,e.toDisplayString(e.unref(t)("forgotPasswordTitle")),1),e.createElementVNode("p",b,e.toDisplayString(e.unref(t)("instructions")),1),e.createElementVNode("div",q,[e.createVNode(v.default,{selected:a.value,"onUpdate:selected":o[0]||(o[0]=s=>a.value=s),tabs:[{name:e.unref(t)("phone"),value:"phone"},{name:e.unref(t)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",null,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="phone"?(e.openBlock(),e.createElementBlock("div",E,[e.createElementVNode("p",S,e.toDisplayString(e.unref(t)("smsInfo")),1),e.createVNode(w.default,{modelValue:l.state.user.phone,"onUpdate:modelValue":o[1]||(o[1]=s=>l.state.user.phone=s),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:i.value,mode:"national",inputOptions:{placeholder:e.unref(t)("phonePlaceholder")},class:"bg-grey pd-small radius-small mn-thin"},null,8,["modelValue","validation","inputOptions"])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="email"?(e.openBlock(),e.createElementBlock("div",k,[e.createElementVNode("p",C,e.toDisplayString(e.unref(t)("emailInfo")),1),e.createVNode(_.default,{field:l.state.user.email,"onUpdate:field":o[2]||(o[2]=s=>l.state.user.email=s),placeholder:e.unref(t)("emailPlaceholder"),validation:u.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])])):e.createCommentVNode("",!0)]),_:1})]),e.createVNode(V.default,{submit:f,callback:h,class:"mn-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1})]))}};typeof c.default=="function"&&c.default(m);exports.default=m;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("../../../../components/Tab/Tab.vue2.cjs"),f=require("../../../../components/Field/Field.vue2.cjs"),v=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),_=require("../../../../components/Button/Button.vue2.cjs"),d=require("vue-router"),V=require("vue-i18n"),l=require("../../store/auth.cjs");require("../../store/twofa.cjs");const n=require("../../../middlewares/client/inputs.validation.cjs");require("./ResetPassword.vue2.cjs");const w={class:"t-left pd-medium"},g={class:"mn-small"},y={class:"mn-small t-transp"},N={class:"mn-small p-small uppercase t-semi bg-grey radius-big o-hidden"},b={key:0,class:"mn-semi radius-small o-hidden"},E={class:"mn-small t-transp"},q={key:0,class:"mn-semi radius-small o-hidden"},S={class:"mn-small t-transp"},k={__name:"ResetPassword",setup(C){const{t}=V.useI18n({inheritLocale:!0,useScope:"local"}),i=e.ref(null),u=e.ref(null);d.useRoute();const c=d.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await n.validateInputs(i,n.validatePhone,l.state.user.phone,"Некорректный телефон"),a.value==="email"&&await n.validateInputs(u,n.validateEmail,l.state.user.email,"Некорректный email")}catch{throw new Error}try{await l.actions.resetPassword(l.state.user,a.value,"reset-password")}catch(r){throw console.log(r),new Error}}function p(){c.push({name:"Enter Code",query:{type:a.value,method:"reset-password"}})}return(r,o)=>(e.openBlock(),e.createElementBlock("section",w,[e.createElementVNode("h3",g,e.toDisplayString(e.unref(t)("forgotPasswordTitle")),1),e.createElementVNode("p",y,e.toDisplayString(e.unref(t)("instructions")),1),e.createElementVNode("div",N,[e.createVNode(h.default,{selected:a.value,"onUpdate:selected":o[0]||(o[0]=s=>a.value=s),tabs:[{name:e.unref(t)("phone"),value:"phone"},{name:e.unref(t)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",null,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="phone"?(e.openBlock(),e.createElementBlock("div",b,[e.createElementVNode("p",E,e.toDisplayString(e.unref(t)("smsInfo")),1),e.createVNode(v.default,{modelValue:l.state.user.phone,"onUpdate:modelValue":o[1]||(o[1]=s=>l.state.user.phone=s),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:i.value,mode:"national",inputOptions:{placeholder:e.unref(t)("phonePlaceholder")},class:"bg-grey pd-small radius-small mn-thin"},null,8,["modelValue","validation","inputOptions"])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="email"?(e.openBlock(),e.createElementBlock("div",q,[e.createElementVNode("p",S,e.toDisplayString(e.unref(t)("emailInfo")),1),e.createVNode(f.default,{field:l.state.user.email,"onUpdate:field":o[2]||(o[2]=s=>l.state.user.email=s),placeholder:e.unref(t)("emailPlaceholder"),validation:u.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])])):e.createCommentVNode("",!0)]),_:1})]),e.createVNode(_.default,{submit:m,callback:p,class:"mn-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1})]))}};exports.default=k;