@ozdao/prometheus-framework 0.2.89 → 0.2.91

Sign up to get free protection for your applications and to get access to all the features.
Files changed (182) hide show
  1. package/dist/auth.server.js +1 -0
  2. package/dist/auth.server.mjs +1 -0
  3. package/dist/main-BQisDfLk.js +92 -0
  4. package/dist/main-BV1Yv9Hy.js +92 -0
  5. package/dist/main-DTlUA63C.mjs +13617 -0
  6. package/dist/main-DmNP-t33.mjs +13625 -0
  7. package/dist/main.css +1 -1
  8. package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.cjs +1 -1
  9. package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +748 -750
  10. package/dist/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.cjs +1 -1
  11. package/dist/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js +40 -39
  12. package/dist/node_modules/web3/lib/esm/index.cjs +1 -1
  13. package/dist/node_modules/web3/lib/esm/index.js +42 -41
  14. package/dist/node_modules/web3/lib/esm/version.cjs +1 -1
  15. package/dist/node_modules/web3/lib/esm/version.js +1 -1
  16. package/dist/node_modules/web3-eth/lib/esm/schemas.cjs +1 -1
  17. package/dist/node_modules/web3-eth/lib/esm/schemas.js +113 -88
  18. package/dist/node_modules/web3-eth-contract/lib/esm/contract.cjs +3 -1
  19. package/dist/node_modules/web3-eth-contract/lib/esm/contract.js +242 -217
  20. package/dist/node_modules/web3-eth-contract/lib/esm/encoding.cjs +1 -1
  21. package/dist/node_modules/web3-eth-contract/lib/esm/encoding.js +43 -37
  22. package/dist/node_modules/web3-eth-ens/lib/esm/config.cjs +1 -1
  23. package/dist/node_modules/web3-eth-ens/lib/esm/config.js +3 -1
  24. package/dist/node_modules/web3-eth-ens/lib/esm/ens.cjs +1 -1
  25. package/dist/node_modules/web3-eth-ens/lib/esm/ens.js +34 -13
  26. package/dist/node_modules/web3-eth-ens/lib/esm/resolver.cjs +1 -1
  27. package/dist/node_modules/web3-eth-ens/lib/esm/resolver.js +48 -36
  28. package/dist/node_modules/web3-utils/lib/esm/chunk_response_parser.cjs +1 -1
  29. package/dist/node_modules/web3-utils/lib/esm/chunk_response_parser.js +2 -2
  30. package/dist/node_modules/web3-utils/lib/esm/converters.cjs +1 -1
  31. package/dist/node_modules/web3-utils/lib/esm/converters.js +52 -50
  32. package/dist/node_modules/web3-utils/lib/esm/uint8array.cjs +1 -1
  33. package/dist/node_modules/web3-utils/lib/esm/uint8array.js +13 -13
  34. package/dist/node_modules/web3-validator/lib/esm/utils.cjs +1 -1
  35. package/dist/node_modules/web3-validator/lib/esm/utils.js +76 -87
  36. package/dist/node_modules/web3-validator/lib/esm/validator.cjs +1 -1
  37. package/dist/node_modules/web3-validator/lib/esm/validator.js +49 -47
  38. package/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.cjs +1 -1
  39. package/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.js +168 -158
  40. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/components/Button/Button.vue.js +94 -1
  42. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  43. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +1 -102
  44. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/components/Field/Field.vue.js +84 -1
  46. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  47. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +1 -84
  48. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  50. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +17 -16
  52. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +73 -1
  54. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  55. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +1 -73
  56. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +9 -8
  58. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  60. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +2 -2
  62. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  63. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +2 -2
  64. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  65. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +28 -29
  66. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +65 -65
  68. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  69. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +38 -39
  70. package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/auth/store/auth.js +35 -37
  72. package/dist/prometheus-framework/src/modules/auth/store/twofa.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/auth/store/twofa.js +3 -3
  74. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  76. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +11 -10
  78. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +3 -3
  80. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
  82. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  84. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +2 -2
  86. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  87. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  88. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  89. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +3 -3
  90. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  91. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +3 -3
  92. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  94. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +2 -2
  96. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
  98. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  99. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +4 -3
  100. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  101. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +6 -5
  102. package/dist/prometheus-framework/src/modules/middlewares/client/inputs.validation.cjs +1 -1
  103. package/dist/prometheus-framework/src/modules/middlewares/client/inputs.validation.js +10 -13
  104. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  105. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +13 -1
  106. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  107. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +1 -13
  108. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  109. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +3 -3
  110. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  111. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -2
  112. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  113. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  114. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  115. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  116. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  117. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
  118. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  119. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  120. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  121. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +3 -3
  122. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  123. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
  124. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  125. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  126. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  127. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
  128. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  129. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +6 -5
  130. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  131. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  132. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  133. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +6 -5
  134. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  135. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  136. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  137. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  138. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  139. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  140. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  141. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  142. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  143. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
  144. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  145. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
  146. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  147. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
  148. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs +1 -1
  149. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js +20 -25
  150. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  151. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
  152. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  153. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  154. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  155. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +8 -7
  156. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  157. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  158. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  159. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  160. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  161. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +6 -5
  162. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  163. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +2 -2
  164. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  165. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +5 -4
  166. package/dist/prometheus-framework.cjs.js +1 -1
  167. package/dist/prometheus-framework.es.js +1 -1
  168. package/dist/style.css +1 -1
  169. package/dist/web-Bk_OtXgv.js +1 -0
  170. package/dist/web-CXzcKdk4.mjs +54 -0
  171. package/dist/web-D9Cfcy5k.js +1 -0
  172. package/dist/web-VFuzUsNl.mjs +54 -0
  173. package/package.json +1 -1
  174. package/src/components/Button/Button.vue +5 -8
  175. package/src/components/FieldPhone/FieldPhone.vue +4 -0
  176. package/src/modules/auth/components/pages/ResetPassword.vue +1 -1
  177. package/src/modules/auth/components/pages/SignIn.vue +3 -3
  178. package/src/modules/auth/components/pages/SignUp.vue +1 -1
  179. package/src/modules/auth/controllers/auth.controller.js +1 -0
  180. package/src/modules/auth/store/auth.js +3 -5
  181. package/src/modules/auth/store/twofa.js +1 -1
  182. package/src/modules/middlewares/client/inputs.validation.js +0 -13
@@ -1,102 +1 @@
1
- import { ref as r, openBlock as n, createElementBlock as c, withModifiers as h, createVNode as y, Transition as g, withCtx as k, renderSlot as p, toDisplayString as i, createCommentVNode as f, createElementVNode as w } from "vue";
2
- import "./Button.vue.js";
3
- const B = ["disabled"], L = {
4
- key: 1,
5
- class: "loading"
6
- }, _ = /* @__PURE__ */ w("svg", {
7
- class: "i-regular",
8
- width: "135",
9
- height: "140",
10
- viewBox: "0 0 135 140",
11
- xmlns: "http://www.w3.org/2000/svg",
12
- fill: "#fff"
13
- }, null, -1), S = [
14
- _
15
- ], x = {
16
- key: 2,
17
- class: "t-semi loading t-black"
18
- }, T = {
19
- key: 3,
20
- class: "error"
21
- }, N = {
22
- key: 0,
23
- class: "button-counter"
24
- }, F = {
25
- __name: "Button",
26
- props: {
27
- submit: {
28
- type: Function,
29
- default: async () => {
30
- console.log("Button click.");
31
- }
32
- },
33
- text: {
34
- type: Object,
35
- default: (e) => (console.log(e), e = {
36
- ...e.text,
37
- success: "✔",
38
- error: "✖"
39
- })
40
- },
41
- counter: {
42
- type: Object
43
- },
44
- callback: {
45
- type: Function,
46
- default: async () => {
47
- console.log("Button callback.");
48
- }
49
- },
50
- callbackDelay: {
51
- type: Number,
52
- default: 750
53
- },
54
- showSucces: {
55
- type: Boolean,
56
- default: !0
57
- },
58
- showLoader: {
59
- type: Boolean,
60
- default: !0
61
- },
62
- validation: {
63
- type: Boolean,
64
- default: !1
65
- }
66
- },
67
- emits: ["error"],
68
- setup(e, { emit: v }) {
69
- const l = e, b = v, t = r(null), a = r(null), s = r(!1), u = r(!1);
70
- async function m() {
71
- t.value.style["pointer-events"] = "none", a.value = null, s.value = !0;
72
- const o = () => {
73
- t.value && (t.value.classList.replace("bg-second", "bg-main"), t.value.style.pointerEvents = "auto", s.value = !1, u.value = !1, a.value = null);
74
- };
75
- try {
76
- await l.submit(), t.value.classList.replace("bg-main", "bg-second"), s.value = !1, l.showSucces ? (u.value = !0, setTimeout(o, 500)) : o(), l.callback && setTimeout(() => l.callback(), l.callbackDelay);
77
- } catch (d) {
78
- b("error", d), t.value.classList.replace("bg-main", "bg-fourth-nano"), a.value = l.error, setTimeout(() => {
79
- o(), t.value.classList.replace("bg-fourth-nano", "bg-main");
80
- }, 1330);
81
- }
82
- }
83
- return (o, d) => (n(), c("button", {
84
- onClick: h(m, ["stop"]),
85
- disabled: e.validation,
86
- ref_key: "button",
87
- ref: t,
88
- class: "button"
89
- }, [
90
- y(g, { name: "moveFromTopAbsolute" }, {
91
- default: k(() => [
92
- !s.value && !a.value && !u.value || !e.showLoader ? p(o.$slots, "default", { key: 0 }) : s.value && !a.value && e.showLoader ? (n(), c("span", L, S)) : u.value && e.showSucces ? (n(), c("span", x, i(e.text.success), 1)) : a.value ? (n(), c("span", T, i(a.value), 1)) : f("", !0)
93
- ]),
94
- _: 3
95
- }),
96
- e.counter ? (n(), c("p", N, i(e.counter), 1)) : f("", !0)
97
- ], 8, B));
98
- }
99
- };
100
- export {
101
- F as default
102
- };
1
+
@@ -1 +1 @@
1
- "use strict";
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Field.vue2.cjs");const u=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),r={key:0,class:"t-transp mn-r-small"},c={class:"w-100"},m=["type","value","placeholder","tabindex","disabled"],b=["value","placeholder","tabindex","disabled"],f={key:1,class:"t-transp mn-l-small"},v={key:0,class:"mn-t-thin mn-b-thin mn-b-thin invalid-feedback"},k={__name:"Field",props:{label:null,symbol:null,type:"text",placeholder:"Enter something here",field:null,value:null,validation:!1,disabled:null,tabindex:-1},emits:["update:field","focus","blur"],setup(l,{emit:s}){const a=s,d=l;d.value&&a("update:field",d.value);const i=e.ref(d.field);return(o,t)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass([[o.$attrs.class,{"bg-fourth-nano":l.validation}],"flex-center flex-nowrap flex"])},[l.label?(e.openBlock(),e.createElementBlock("div",r,[e.createElementVNode("span",null,e.toDisplayString(l.label),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",c,[l.type!=="textarea"?(e.openBlock(),e.createElementBlock("input",{key:0,onInput:t[0]||(t[0]=n=>i.value=a("update:field",n.target.value)),onFocus:t[1]||(t[1]=n=>a("focus",n)),onBlur:t[2]||(t[2]=n=>a("blur",n)),type:l.type,class:"w-100",value:l.field,placeholder:l.placeholder,tabindex:l.tabindex,disabled:l.disabled},null,40,m)):(e.openBlock(),e.createElementBlock("textarea",{key:1,onInput:t[3]||(t[3]=n=>i.value=a("update:field",n.target.value)),onFocus:t[4]||(t[4]=n=>a("focus",n)),onBlur:t[5]||(t[5]=n=>a("blur",n)),class:"w-100",style:{resize:"vertical"},value:l.field,placeholder:l.placeholder,tabindex:l.tabindex,disabled:l.disabled},null,40,b))]),e.renderSlot(o.$slots,"default",{},void 0,!0),l.symbol?(e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("span",null,e.toDisplayString(l.symbol),1)])):e.createCommentVNode("",!0)],2),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[l.validation?(e.openBlock(),e.createElementBlock("div",v," * "+e.toDisplayString(l.validation.message),1)):e.createCommentVNode("",!0)]),_:1})],64))}},y=u.default(k,[["__scopeId","data-v-47c78b3c"]]);exports.default=y;
@@ -1 +1,84 @@
1
-
1
+ import { ref as f, openBlock as n, createElementBlock as d, Fragment as v, createElementVNode as i, normalizeClass as c, toDisplayString as o, createCommentVNode as u, renderSlot as x, createVNode as y, Transition as h, withCtx as k } from "vue";
2
+ import "./Field.vue2.js";
3
+ import g from "../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const w = {
5
+ key: 0,
6
+ class: "t-transp mn-r-small"
7
+ }, F = { class: "w-100" }, B = ["type", "value", "placeholder", "tabindex", "disabled"], p = ["value", "placeholder", "tabindex", "disabled"], C = {
8
+ key: 1,
9
+ class: "t-transp mn-l-small"
10
+ }, E = {
11
+ key: 0,
12
+ class: "mn-t-thin mn-b-thin mn-b-thin invalid-feedback"
13
+ }, I = {
14
+ __name: "Field",
15
+ props: {
16
+ label: null,
17
+ symbol: null,
18
+ type: "text",
19
+ placeholder: "Enter something here",
20
+ field: null,
21
+ value: null,
22
+ validation: !1,
23
+ disabled: null,
24
+ tabindex: -1
25
+ },
26
+ emits: ["update:field", "focus", "blur"],
27
+ setup(e, { emit: b }) {
28
+ const a = b, s = e;
29
+ s.value && a("update:field", s.value);
30
+ const r = f(s.field);
31
+ return (m, l) => (n(), d(v, null, [
32
+ i("div", {
33
+ class: c([[
34
+ m.$attrs.class,
35
+ {
36
+ "bg-fourth-nano": e.validation
37
+ }
38
+ ], "flex-center flex-nowrap flex"])
39
+ }, [
40
+ e.label ? (n(), d("div", w, [
41
+ i("span", null, o(e.label), 1)
42
+ ])) : u("", !0),
43
+ i("div", F, [
44
+ e.type !== "textarea" ? (n(), d("input", {
45
+ key: 0,
46
+ onInput: l[0] || (l[0] = (t) => r.value = a("update:field", t.target.value)),
47
+ onFocus: l[1] || (l[1] = (t) => a("focus", t)),
48
+ onBlur: l[2] || (l[2] = (t) => a("blur", t)),
49
+ type: e.type,
50
+ class: "w-100",
51
+ value: e.field,
52
+ placeholder: e.placeholder,
53
+ tabindex: e.tabindex,
54
+ disabled: e.disabled
55
+ }, null, 40, B)) : (n(), d("textarea", {
56
+ key: 1,
57
+ onInput: l[3] || (l[3] = (t) => r.value = a("update:field", t.target.value)),
58
+ onFocus: l[4] || (l[4] = (t) => a("focus", t)),
59
+ onBlur: l[5] || (l[5] = (t) => a("blur", t)),
60
+ class: "w-100",
61
+ style: { resize: "vertical" },
62
+ value: e.field,
63
+ placeholder: e.placeholder,
64
+ tabindex: e.tabindex,
65
+ disabled: e.disabled
66
+ }, null, 40, p))
67
+ ]),
68
+ x(m.$slots, "default", {}, void 0, !0),
69
+ e.symbol ? (n(), d("div", C, [
70
+ i("span", null, o(e.symbol), 1)
71
+ ])) : u("", !0)
72
+ ], 2),
73
+ y(h, { name: "fade" }, {
74
+ default: k(() => [
75
+ e.validation ? (n(), d("div", E, " * " + o(e.validation.message), 1)) : u("", !0)
76
+ ]),
77
+ _: 1
78
+ })
79
+ ], 64));
80
+ }
81
+ }, S = /* @__PURE__ */ g(I, [["__scopeId", "data-v-47c78b3c"]]);
82
+ export {
83
+ S as default
84
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Field.vue.cjs");const u=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),r={key:0,class:"t-transp mn-r-small"},c={class:"w-100"},m=["type","value","placeholder","tabindex","disabled"],b=["value","placeholder","tabindex","disabled"],f={key:1,class:"t-transp mn-l-small"},v={key:0,class:"mn-t-thin mn-b-thin mn-b-thin invalid-feedback"},k={__name:"Field",props:{label:null,symbol:null,type:"text",placeholder:"Enter something here",field:null,value:null,validation:!1,disabled:null,tabindex:-1},emits:["update:field","focus","blur"],setup(l,{emit:s}){const a=s,d=l;d.value&&a("update:field",d.value);const i=e.ref(d.field);return(o,t)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass([[o.$attrs.class,{"bg-fourth-nano":l.validation}],"flex-center flex-nowrap flex"])},[l.label?(e.openBlock(),e.createElementBlock("div",r,[e.createElementVNode("span",null,e.toDisplayString(l.label),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",c,[l.type!=="textarea"?(e.openBlock(),e.createElementBlock("input",{key:0,onInput:t[0]||(t[0]=n=>i.value=a("update:field",n.target.value)),onFocus:t[1]||(t[1]=n=>a("focus",n)),onBlur:t[2]||(t[2]=n=>a("blur",n)),type:l.type,class:"w-100",value:l.field,placeholder:l.placeholder,tabindex:l.tabindex,disabled:l.disabled},null,40,m)):(e.openBlock(),e.createElementBlock("textarea",{key:1,onInput:t[3]||(t[3]=n=>i.value=a("update:field",n.target.value)),onFocus:t[4]||(t[4]=n=>a("focus",n)),onBlur:t[5]||(t[5]=n=>a("blur",n)),class:"w-100",style:{resize:"vertical"},value:l.field,placeholder:l.placeholder,tabindex:l.tabindex,disabled:l.disabled},null,40,b))]),e.renderSlot(o.$slots,"default",{},void 0,!0),l.symbol?(e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("span",null,e.toDisplayString(l.symbol),1)])):e.createCommentVNode("",!0)],2),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[l.validation?(e.openBlock(),e.createElementBlock("div",v," * "+e.toDisplayString(l.validation.message),1)):e.createCommentVNode("",!0)]),_:1})],64))}},y=u.default(k,[["__scopeId","data-v-47c78b3c"]]);exports.default=y;
1
+ "use strict";
@@ -1,84 +1 @@
1
- import { ref as f, openBlock as n, createElementBlock as d, Fragment as v, createElementVNode as i, normalizeClass as c, toDisplayString as o, createCommentVNode as u, renderSlot as x, createVNode as y, Transition as h, withCtx as k } from "vue";
2
- import "./Field.vue.js";
3
- import g from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const w = {
5
- key: 0,
6
- class: "t-transp mn-r-small"
7
- }, F = { class: "w-100" }, B = ["type", "value", "placeholder", "tabindex", "disabled"], p = ["value", "placeholder", "tabindex", "disabled"], C = {
8
- key: 1,
9
- class: "t-transp mn-l-small"
10
- }, E = {
11
- key: 0,
12
- class: "mn-t-thin mn-b-thin mn-b-thin invalid-feedback"
13
- }, I = {
14
- __name: "Field",
15
- props: {
16
- label: null,
17
- symbol: null,
18
- type: "text",
19
- placeholder: "Enter something here",
20
- field: null,
21
- value: null,
22
- validation: !1,
23
- disabled: null,
24
- tabindex: -1
25
- },
26
- emits: ["update:field", "focus", "blur"],
27
- setup(e, { emit: b }) {
28
- const a = b, s = e;
29
- s.value && a("update:field", s.value);
30
- const r = f(s.field);
31
- return (m, l) => (n(), d(v, null, [
32
- i("div", {
33
- class: c([[
34
- m.$attrs.class,
35
- {
36
- "bg-fourth-nano": e.validation
37
- }
38
- ], "flex-center flex-nowrap flex"])
39
- }, [
40
- e.label ? (n(), d("div", w, [
41
- i("span", null, o(e.label), 1)
42
- ])) : u("", !0),
43
- i("div", F, [
44
- e.type !== "textarea" ? (n(), d("input", {
45
- key: 0,
46
- onInput: l[0] || (l[0] = (t) => r.value = a("update:field", t.target.value)),
47
- onFocus: l[1] || (l[1] = (t) => a("focus", t)),
48
- onBlur: l[2] || (l[2] = (t) => a("blur", t)),
49
- type: e.type,
50
- class: "w-100",
51
- value: e.field,
52
- placeholder: e.placeholder,
53
- tabindex: e.tabindex,
54
- disabled: e.disabled
55
- }, null, 40, B)) : (n(), d("textarea", {
56
- key: 1,
57
- onInput: l[3] || (l[3] = (t) => r.value = a("update:field", t.target.value)),
58
- onFocus: l[4] || (l[4] = (t) => a("focus", t)),
59
- onBlur: l[5] || (l[5] = (t) => a("blur", t)),
60
- class: "w-100",
61
- style: { resize: "vertical" },
62
- value: e.field,
63
- placeholder: e.placeholder,
64
- tabindex: e.tabindex,
65
- disabled: e.disabled
66
- }, null, 40, p))
67
- ]),
68
- x(m.$slots, "default", {}, void 0, !0),
69
- e.symbol ? (n(), d("div", C, [
70
- i("span", null, o(e.symbol), 1)
71
- ])) : u("", !0)
72
- ], 2),
73
- y(h, { name: "fade" }, {
74
- default: k(() => [
75
- e.validation ? (n(), d("div", E, " * " + o(e.validation.message), 1)) : u("", !0)
76
- ]),
77
- _: 1
78
- })
79
- ], 64));
80
- }
81
- }, S = /* @__PURE__ */ g(I, [["__scopeId", "data-v-47c78b3c"]]);
82
- export {
83
- S as default
84
- };
1
+
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("../Field/Field.vue2.cjs"),B=require("vue-i18n"),S={class:"pd-thin radius-extra flex-nowrap flex"},w=["innerHTML"],_={__name:"FieldBig",props:{input:String,placeholder:{type:String},action:{type:String,default:"Action"},placeholderTexts:{type:Object,default:()=>({en:["Lowest THC, please!","Something with banana flavors?","I'm in the mood for trippy vibes."],ru:["Я хочу самый низкий THC","Я хочу чего-нибудь бананового","Я хочу курнуть хейза"]})},typingSpeed:{type:Number,default:200},loopTyping:{type:Boolean,default:!1},enableTyping:{type:Boolean,default:!1}},emits:["update:input","action"],setup(s,{emit:y}){const t=s,{t:F,locale:c}=B.useI18n();let r=e.ref(0),n=e.ref(t.input),p=e.ref(t.placeholder),i=e.ref(t.enableTyping),d=e.ref(null),f=e.ref(""),o=e.ref(!0),v=null;const g=y;function b(){g("action")}function T(a){g("update:input",a),f.value=a}function m(){r.value=(r.value+1)%t.placeholderTexts[c.value].length}function I(){i.value=!1,clearInterval(d.value),p.value=t.placeholder,f.value||(n.value="")}function x(){!f.value&&t.enableTyping&&(i.value=!0,p.value="",h())}function h(){let a=t.placeholderTexts[c.value][r.value],l=0,u=!1;v=setInterval(()=>{o.value=!o.value},200),d.value=setInterval(()=>{i.value&&(u?(n.value=n.value.slice(0,-1),n.value=a.substring(0,l)+(o.value&&l%2?"|":""),l--):(n.value=a.substring(0,l)+(o.value&&l%2?"|":""),l++),l>a.length&&t.loopTyping&&setTimeout(()=>{u=!0,n.value=a.substring(0,l)},333),l===0&&u&&(u=!1,m(),a=t.placeholderTexts[c.value][r.value]))},t.typingSpeed)}return e.onMounted(()=>{t.enableTyping&&h()}),e.watchEffect(()=>{i.value||(clearInterval(d.value),clearInterval(v))}),(a,l)=>(e.openBlock(),e.createElementBlock("div",S,[e.createVNode(k.default,{field:e.unref(n),"onUpdate:field":[l[0]||(l[0]=u=>e.isRef(n)?n.value=u:n=u),T],placeholder:e.unref(i)?" ":e.unref(p),onInput:m,onFocus:I,onBlur:x,class:"w-100 p-medium t-regular uppercase pd-small"},null,8,["field","placeholder"]),s.action?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:b,class:"t-medium radius-big uppercase cursor-pointer pd-l-semi pd-r-semi w-max hover-bg-fifth t-semi transition-linear transition-timing-1 t-black bg-main",innerHTML:s.action},null,8,w)):e.createCommentVNode("",!0)]))}};exports.default=_;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("../Field/Field.vue.cjs"),B=require("vue-i18n"),S={class:"pd-thin radius-extra flex-nowrap flex"},w=["innerHTML"],_={__name:"FieldBig",props:{input:String,placeholder:{type:String},action:{type:String,default:"Action"},placeholderTexts:{type:Object,default:()=>({en:["Lowest THC, please!","Something with banana flavors?","I'm in the mood for trippy vibes."],ru:["Я хочу самый низкий THC","Я хочу чего-нибудь бананового","Я хочу курнуть хейза"]})},typingSpeed:{type:Number,default:200},loopTyping:{type:Boolean,default:!1},enableTyping:{type:Boolean,default:!1}},emits:["update:input","action"],setup(s,{emit:y}){const t=s,{t:F,locale:c}=B.useI18n();let r=e.ref(0),n=e.ref(t.input),p=e.ref(t.placeholder),i=e.ref(t.enableTyping),d=e.ref(null),f=e.ref(""),o=e.ref(!0),v=null;const g=y;function b(){g("action")}function T(a){g("update:input",a),f.value=a}function m(){r.value=(r.value+1)%t.placeholderTexts[c.value].length}function I(){i.value=!1,clearInterval(d.value),p.value=t.placeholder,f.value||(n.value="")}function x(){!f.value&&t.enableTyping&&(i.value=!0,p.value="",h())}function h(){let a=t.placeholderTexts[c.value][r.value],l=0,u=!1;v=setInterval(()=>{o.value=!o.value},200),d.value=setInterval(()=>{i.value&&(u?(n.value=n.value.slice(0,-1),n.value=a.substring(0,l)+(o.value&&l%2?"|":""),l--):(n.value=a.substring(0,l)+(o.value&&l%2?"|":""),l++),l>a.length&&t.loopTyping&&setTimeout(()=>{u=!0,n.value=a.substring(0,l)},333),l===0&&u&&(u=!1,m(),a=t.placeholderTexts[c.value][r.value]))},t.typingSpeed)}return e.onMounted(()=>{t.enableTyping&&h()}),e.watchEffect(()=>{i.value||(clearInterval(d.value),clearInterval(v))}),(a,l)=>(e.openBlock(),e.createElementBlock("div",S,[e.createVNode(k.default,{field:e.unref(n),"onUpdate:field":[l[0]||(l[0]=u=>e.isRef(n)?n.value=u:n=u),T],placeholder:e.unref(i)?" ":e.unref(p),onInput:m,onFocus:I,onBlur:x,class:"w-100 p-medium t-regular uppercase pd-small"},null,8,["field","placeholder"]),s.action?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:b,class:"t-medium radius-big uppercase cursor-pointer pd-l-semi pd-r-semi w-max hover-bg-fifth t-semi transition-linear transition-timing-1 t-black bg-main",innerHTML:s.action},null,8,w)):e.createCommentVNode("",!0)]))}};exports.default=_;
@@ -1,5 +1,5 @@
1
1
  import { ref as i, onMounted as S, watchEffect as F, openBlock as T, createElementBlock as b, createVNode as C, unref as v, isRef as H, createCommentVNode as _ } from "vue";
2
- import L from "../Field/Field.vue2.js";
2
+ import L from "../Field/Field.vue.js";
3
3
  import { useI18n as M } from "vue-i18n";
4
4
  const N = { class: "pd-thin radius-extra flex-nowrap flex" }, V = ["innerHTML"], P = {
5
5
  __name: "FieldBig",
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),oe=require("./click-outside.cjs"),re=require("./all-countries.cjs");require("./FieldPhone.vue2.cjs");const ue=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),w=require("../../../node_modules/libphonenumber-js/min/exports/parsePhoneNumber.cjs"),ie=["tabindex"],se={class:"flex-nowrap flex flex-v-center p-medium vti__selection"},de=["innerHTML"],ce={key:1,class:"vti__country-code"},fe=["onClick","onMousemove"],ve=["innerHTML"],pe={key:1},ye=["type","autocomplete","autofocus","disabled","id","maxlength","name","placeholder","readonly","required","tabindex"],me={key:0,class:"mn-t-thin mn-b-thin invalid-feedback"},he={__name:"FieldPhone",props:{modelValue:{type:String,default:""},badClass:{type:[String,Array,Object],default:""},goodClass:{type:[String,Array,Object],default:""},badStyle:{type:[String,Array,Object],default:""},goodStyle:{type:[String,Array,Object],default:""},badInputClass:{type:[String,Array,Object],default:""},goodInputClass:{type:[String,Array,Object],default:""},badInputStyle:{type:[String,Array,Object],default:""},goodInputStyle:{type:[String,Array,Object],default:""},allCountries:{type:Array,default:()=>re.default},autoFormat:{type:Boolean,default:()=>!0},validation:{type:[Boolean,Object],default:!1},customValidate:{type:[Boolean,RegExp],default:()=>!1},defaultCountry:{type:String,default:()=>""},disabled:{type:Boolean,default:()=>!1},autoDefaultCountry:{type:Boolean,default:()=>!0},ignoredCountries:{type:Array,default:()=>[]},invalidMsg:{type:String,default:()=>""},mode:{type:String,default:()=>"auto"},onlyCountries:{type:Array,default:()=>[]},preferredCountries:{type:Array,default:()=>[]},validCharactersOnly:{type:Boolean,default:()=>!1},rootClass:{type:[String,Array,Object],default:()=>""},inputClass:{type:[String,Array,Object],default:()=>""},divInputClass:{type:[String,Array,Object],default:()=>""},rootStyle:{type:[String,Array,Object],default:()=>""},dropdownStyle:{type:[String,Array,Object],default:()=>""},listStyle:{type:[String,Array,Object],default:()=>""},inputStyle:{type:[String,Array,Object],default:()=>""},inputId:{type:[String,Array,Object],default:()=>""},Placeholder:{type:[String,Object,Function],default:()=>""},dropdownOptions:{type:Object,default:()=>({showDialCodeInList:!0,showDialCodeInSelection:!1,showFlags:!0,tabindex:0})},inputOptions:{type:Object,default:()=>({autocomplete:"on",autofocus:!1,id:"",maxlength:25,name:"telephone",placeholder:"Enter a phone number",readonly:!1,required:!1,tabindex:0,type:"tel",styleClasses:""})}},emits:["update:modelValue","validate","country-changed","open","close","blur","focus","enter","space"],setup(a,{emit:V}){let N=oe.default;const n=a,c=V;e.ref(5),e.ref(5),e.reactive({action:null,amount:null});const r=e.ref(n.modelValue?n.modelValue:""),v=e.ref(""),f=e.ref(!1),P=e.ref(!1),s=e.ref(null),S=e.ref(""),x=e.ref(null),T=e.ref("below"),I=e.ref(n.Placeholder!==""?n.Placeholder:n.inputOptions.placeholder),B=e.ref(null),d=e.ref(null),O=e.ref(null);e.onMounted(async()=>{n.modelValue&&(r.value=n.modelValue),G(),U().then(()=>{var t;!r.value&&((t=n.inputOptions)!=null&&t.showDialCode)&&v.value&&(r.value=`+${v.value}`),c("validate",u.value)}).catch(console.error).then(()=>{P.value=!0})});const p=e.computed(()=>C(v.value)),M=e.computed(()=>p.value?p.value.flag:null),F=e.computed(()=>n.mode==="auto"?!r.value||r.value[0]!=="+"?"national":"international":["international","national"].includes(n.mode)?n.mode:(console.error('Invalid value of prop "mode"'),"international")),k=e.computed(()=>n.onlyCountries&&n.onlyCountries.length?n.allCountries.filter(({iso2:t})=>n.onlyCountries.includes(t.toUpperCase())):n.ignoredCountries&&n.ignoredCountries.length?n.allCountries.filter(({iso2:t})=>!n.ignoredCountries.includes(t.toUpperCase())&&!n.ignoredCountries.includes(t.toLowerCase())):n.allCountries),y=e.computed(()=>[...K(n.preferredCountries).map(l=>({...l,preferred:!0})),...k.value]),u=e.computed(()=>{var b,D,A;let t={};((b=r.value)==null?void 0:b[0])==="+"?t=w.parsePhoneNumber(r.value)||{}:t=w.parsePhoneNumber(r.value,v.value)||{};const{metadata:l,...o}=t;let i=(D=t.isValid)==null?void 0:D.call(t),h=r.value;return i&&(h=(A=t.format)==null?void 0:A.call(t,F.value.toUpperCase(),{nationalPrefix:!1})),t.country&&(n.ignoredCountries.length||n.onlyCountries.length)&&(C(t.country)||(i=!1,t={...t,country:null})),{...o,countryCode:t.country,valid:i,country:p.value,formatted:h}}),H=e.computed(()=>u.value.valid===!0?n.goodClass:u.value.valid===!1?n.badClass:void 0),q=e.computed(()=>u.value.valid===!0?n.goodStyle:u.value.valid===!1?n.badStyle:void 0),z=e.computed(()=>u.value.valid===!0?n.goodInputClass:u.value.valid===!1?n.badInputClass:void 0),L=e.computed(()=>u.value.valid===!0?n.goodInputStyle:u.value.valid===!1?n.badInputStyle:void 0);e.watch(p,(t,l)=>{if(!t&&(l!=null&&l.iso2)){v.value=l.iso2;return}t!=null&&t.iso2&&(c("country-changed",t),E())}),e.watch(()=>u.value.countryCode,t=>{v.value=t}),e.watch(()=>u.value.valid,()=>{c("validate",u.value)}),e.watch(()=>u.value.formatted,t=>{!n.autoFormat||n.customValidate||(g(t),e.nextTick(()=>{t&&!n.modelValue&&(r.value=t)}))}),e.watch(()=>n.inputOptions.placeholder,()=>{E()}),e.watch(()=>n.modelValue,(t,l)=>{J()?r.value=t:e.nextTick(()=>{r.value=l,j()})}),e.watch(f,t=>{t?(ae(),c("open")):c("close")});function R(){return fetch("https://ip2c.org/s").then(t=>t.text()).then(t=>{const l=(t||"").toString();if(!l||l[0]!=="1")throw new Error("unable to fetch the country");return l.substr(2,2)})}function $(t,l){if(t.setSelectionRange)t.focus(),t.setSelectionRange(l,l);else if(t.createTextRange){const o=t.createTextRange();o.collapse(!0),o.moveEnd("character",l),o.moveStart("character",l),o.select()}}function E(){I.value=n.inputOptions.placeholder}function U(){return new Promise(t=>{var o;if(((o=r.value)==null?void 0:o[0])==="+"){t();return}if(n.defaultCountry){m(n.defaultCountry),t();return}const l=n.preferredCountries[0]||k.value[0];n.autoDefaultCountry?R().then(i=>{m(i||v.value)}).catch(i=>{console.warn(i),m(l)}).finally(()=>{t()}):(m(l),t())})}function K(t=[]){return t.map(l=>C(l)).filter(Boolean)}function C(t=""){return k.value.find(l=>l.iso2===t.toUpperCase())}function W(t,l){const o=s.value===t,i=t===n.preferredCountries.length-1,h=n.preferredCountries.some(b=>b.toUpperCase()===l);return{highlighted:o,"last-preferred":i,preferred:h}}function m(t){var o,i;let l=typeof t=="string"?C(t):t;if(l){if(((o=r.value)==null?void 0:o[0])==="+"&&l.iso2&&u.value.nationalNumber){v.value=l.iso2,r.value=w.parsePhoneNumber(u.value.nationalNumber,l.iso2).formatInternational();return}if((i=n.inputOptions)!=null&&i.showDialCode&&l){r.value=`+${l.dialCode}`;return}v.value=l.iso2,g(r.value)}}function G(){const t=r.value;if(n.validCharactersOnly){const l=r.value.match(/[()\-+0-9\s]*/g);r.value=l.join("")}if(n.customValidate&&n.customValidate instanceof RegExp){const l=r.value.match(n.customValidate);r.value=l?l.join(""):""}t!==r.value&&g(r.value)}function J(){return n.validCharactersOnly&&!/^[()\-+0-9\s]*$/.test(r.value)?!1:n.customValidate?Q():!0}function Q(){return n.customValidate instanceof RegExp?n.customValidate.test(r.value):!1}function j(){O.value.setCustomValidity(u.valid?"":n.invalidMsg),g(r.value)}function g(t){c("update:modelValue",t),u.value.valid?c("country",u.value.number):c("country",null)}function X(){c("blur")}function Y(){$(O.value,r.value.length),c("focus")}function Z(){c("enter")}function _(){c("space")}function ee(){n.disabled||(f.value=!f.value)}function te(){f.value=!1}function ne(t){t.keyCode===40?(t.preventDefault(),f.value=!0,s.value=s.value===null?0:Math.min(y.value.length-1,s.value+1),e.nextTick(()=>{const l=d.value.children[s.value];l.offsetTop+l.clientHeight>d.value.scrollTop+d.value.clientHeight&&(d.value.scrollTop=l.offsetTop-d.value.clientHeight+l.clientHeight)})):t.keyCode===38?(t.preventDefault(),f.value=!0,s.value=s.value===null?y.value.length-1:Math.max(0,s.value-1),e.nextTick(()=>{const l=d.value.children[s.value];l.offsetTop<d.value.scrollTop&&(d.value.scrollTop=l.offsetTop)})):t.keyCode===13?(t.preventDefault(),s.value!==null&&m(y.value[s.value]),f.value=!f.value):(S.value+=t.key,clearTimeout(x),x=setTimeout(()=>{S.value=""},700),e.nextTick(()=>{const l=y.value.slice(n.preferredCountries.length).findIndex(o=>o.name.toLowerCase().startsWith(S.value));if(l>=0){s.value=n.preferredCountries.length+l;const o=d.value.children[s.value];(o.offsetTop<d.value.scrollTop||o.offsetTop+o.clientHeight>d.value.scrollTop+d.value.clientHeight)&&(d.value.scrollTop=o.offsetTop-d.value.clientHeight/2)}}))}function le(){s.value=y.value.map(t=>t.iso2).indexOf(v.value),f.value=!1}function ae(){const l=window.innerHeight-B.value.getBoundingClientRect().bottom>200;T.value=l?"below":"above"}return(t,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass([[a.rootClass,H.value,t.$attrs.class,{"bg-fourth-nano":a.validation},{disabled:a.disabled}],"vue3-reactive-tel-input"]),style:e.normalizeStyle([a.rootStyle,q.value]),ref_key:"rootElement",ref:B},[e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([["vti__dropdown",{open:f.value}],"br-solid br-black-transp br-1px radius-thin"]),style:e.normalizeStyle([a.dropdownStyle]),tabindex:a.dropdownOptions.tabindex,onKeydown:[ne,e.withKeys(le,["esc"])],onClick:ee},[e.createElementVNode("span",se,[a.dropdownOptions.showFlags?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:M.value,class:"mn-r-nano"},null,8,de)):e.createCommentVNode("",!0),a.dropdownOptions.showDialCodeInSelection?(e.openBlock(),e.createElementBlock("span",ce," +"+e.toDisplayString(p.value&&p.value.dialCode),1)):e.createCommentVNode("",!0)]),e.withDirectives(e.createElementVNode("ul",{ref_key:"list",ref:d,class:e.normalizeClass(["bs-black radius-small vti__dropdown-list",T.value]),style:e.normalizeStyle([a.listStyle])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(o,i)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["flex-nowrap flex w-max",["vti__dropdown-item",W(i,o.iso2)]]),key:o.iso2+(o.preferred?"-preferred":""),onClick:h=>m(o),onMousemove:h=>s.value=i},[a.dropdownOptions.showFlags?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:o.flag,class:"mn-r-thin"},null,8,ve)):e.createCommentVNode("",!0),e.createElementVNode("strong",null,e.toDisplayString(o.name),1),a.dropdownOptions.showDialCodeInList?(e.openBlock(),e.createElementBlock("span",pe," +"+e.toDisplayString(o.dialCode),1)):e.createCommentVNode("",!0)],42,fe))),128))],6),[[e.vShow,f.value]])],46,ie)),[[e.unref(N),te]]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=o=>r.value=o),inputmode:"numeric",pattern:"\\d*",ref_key:"input",ref:O,type:a.inputOptions.type,autocomplete:a.inputOptions.autocomplete,autofocus:a.inputOptions.autofocus,class:e.normalizeClass(["vti__input",a.inputOptions.styleClasses,a.inputClass,z.value]),style:e.normalizeStyle([a.inputStyle,L.value]),disabled:a.disabled,id:a.inputId!==""?a.inputId:a.inputOptions.id,maxlength:a.inputOptions.maxlength,name:a.inputId!==""?a.inputId:a.inputOptions.name,placeholder:I.value,readonly:a.inputOptions.readonly,required:a.inputOptions.required,tabindex:a.inputOptions.tabindex,onBlur:X,onFocus:Y,onInput:j,onKeyup:[e.withKeys(Z,["enter"]),e.withKeys(_,["space"])]},null,46,ye),[[e.vModelDynamic,r.value]]),e.renderSlot(t.$slots,"default",{},void 0,!0)],6),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[a.validation?(e.openBlock(),e.createElementBlock("div",me," * "+e.toDisplayString(a.validation.message),1)):e.createCommentVNode("",!0)]),_:1})],64))}},Ce=ue.default(he,[["__scopeId","data-v-6cc570f0"]]);exports.default=Ce;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),oe=require("./click-outside.cjs"),re=require("./all-countries.cjs");require("./FieldPhone.vue2.cjs");const ue=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),w=require("../../../node_modules/libphonenumber-js/min/exports/parsePhoneNumber.cjs"),ie=["tabindex"],se={class:"flex-nowrap flex flex-v-center p-medium vti__selection"},de=["innerHTML"],ce={key:1,class:"vti__country-code"},fe=["onClick","onMousemove"],ve=["innerHTML"],pe={key:1},ye=["type","autocomplete","autofocus","disabled","id","maxlength","name","placeholder","readonly","required","tabindex"],me={key:0,class:"mn-t-thin mn-b-thin invalid-feedback"},he={__name:"FieldPhone",props:{modelValue:{type:String,default:""},badClass:{type:[String,Array,Object],default:""},goodClass:{type:[String,Array,Object],default:""},badStyle:{type:[String,Array,Object],default:""},goodStyle:{type:[String,Array,Object],default:""},badInputClass:{type:[String,Array,Object],default:""},goodInputClass:{type:[String,Array,Object],default:""},badInputStyle:{type:[String,Array,Object],default:""},goodInputStyle:{type:[String,Array,Object],default:""},allCountries:{type:Array,default:()=>re.default},autoFormat:{type:Boolean,default:()=>!0},validation:{type:[Boolean,Object],default:!1},customValidate:{type:[Boolean,RegExp],default:()=>!1},defaultCountry:{type:String,default:()=>""},disabled:{type:Boolean,default:()=>!1},autoDefaultCountry:{type:Boolean,default:()=>!0},ignoredCountries:{type:Array,default:()=>[]},invalidMsg:{type:String,default:()=>""},mode:{type:String,default:()=>"auto"},onlyCountries:{type:Array,default:()=>[]},preferredCountries:{type:Array,default:()=>[]},validCharactersOnly:{type:Boolean,default:()=>!1},rootClass:{type:[String,Array,Object],default:()=>""},inputClass:{type:[String,Array,Object],default:()=>""},divInputClass:{type:[String,Array,Object],default:()=>""},rootStyle:{type:[String,Array,Object],default:()=>""},dropdownStyle:{type:[String,Array,Object],default:()=>""},listStyle:{type:[String,Array,Object],default:()=>""},inputStyle:{type:[String,Array,Object],default:()=>""},inputId:{type:[String,Array,Object],default:()=>""},Placeholder:{type:[String,Object,Function],default:()=>""},dropdownOptions:{type:Object,default:()=>({showDialCodeInList:!0,showDialCodeInSelection:!1,showFlags:!0,tabindex:0})},inputOptions:{type:Object,default:()=>({autocomplete:"on",autofocus:!1,id:"",maxlength:25,name:"telephone",placeholder:"Enter a phone number",readonly:!1,required:!1,tabindex:0,type:"tel",styleClasses:""})}},emits:["update:modelValue","change","validate","country-changed","open","close","blur","focus","enter","space"],setup(a,{emit:V}){let N=oe.default;const n=a,c=V;e.ref(5),e.ref(5),e.reactive({action:null,amount:null});const r=e.ref(n.modelValue?n.modelValue:""),v=e.ref(""),f=e.ref(!1),P=e.ref(!1),s=e.ref(null),S=e.ref(""),x=e.ref(null),T=e.ref("below"),I=e.ref(n.Placeholder!==""?n.Placeholder:n.inputOptions.placeholder),B=e.ref(null),d=e.ref(null),O=e.ref(null);e.onMounted(async()=>{n.modelValue&&(r.value=n.modelValue),G(),U().then(()=>{var t;!r.value&&((t=n.inputOptions)!=null&&t.showDialCode)&&v.value&&(r.value=`+${v.value}`),c("validate",u.value)}).catch(console.error).then(()=>{P.value=!0})});const p=e.computed(()=>C(v.value)),M=e.computed(()=>p.value?p.value.flag:null),F=e.computed(()=>n.mode==="auto"?!r.value||r.value[0]!=="+"?"national":"international":["international","national"].includes(n.mode)?n.mode:(console.error('Invalid value of prop "mode"'),"international")),k=e.computed(()=>n.onlyCountries&&n.onlyCountries.length?n.allCountries.filter(({iso2:t})=>n.onlyCountries.includes(t.toUpperCase())):n.ignoredCountries&&n.ignoredCountries.length?n.allCountries.filter(({iso2:t})=>!n.ignoredCountries.includes(t.toUpperCase())&&!n.ignoredCountries.includes(t.toLowerCase())):n.allCountries),y=e.computed(()=>[...K(n.preferredCountries).map(l=>({...l,preferred:!0})),...k.value]),u=e.computed(()=>{var b,D,A;let t={};((b=r.value)==null?void 0:b[0])==="+"?t=w.parsePhoneNumber(r.value)||{}:t=w.parsePhoneNumber(r.value,v.value)||{};const{metadata:l,...o}=t;let i=(D=t.isValid)==null?void 0:D.call(t),h=r.value;return i&&(h=(A=t.format)==null?void 0:A.call(t,F.value.toUpperCase(),{nationalPrefix:!1})),t.country&&(n.ignoredCountries.length||n.onlyCountries.length)&&(C(t.country)||(i=!1,t={...t,country:null})),{...o,countryCode:t.country,valid:i,country:p.value,formatted:h}}),H=e.computed(()=>u.value.valid===!0?n.goodClass:u.value.valid===!1?n.badClass:void 0),q=e.computed(()=>u.value.valid===!0?n.goodStyle:u.value.valid===!1?n.badStyle:void 0),z=e.computed(()=>u.value.valid===!0?n.goodInputClass:u.value.valid===!1?n.badInputClass:void 0),L=e.computed(()=>u.value.valid===!0?n.goodInputStyle:u.value.valid===!1?n.badInputStyle:void 0);e.watch(p,(t,l)=>{if(!t&&(l!=null&&l.iso2)){v.value=l.iso2;return}t!=null&&t.iso2&&(c("country-changed",t),E())}),e.watch(()=>u.value.countryCode,t=>{v.value=t}),e.watch(()=>u.value.valid,()=>{c("validate",u.value)}),e.watch(()=>u.value.formatted,t=>{!n.autoFormat||n.customValidate||(g(t),e.nextTick(()=>{t&&!n.modelValue&&(r.value=t)}))}),e.watch(()=>n.inputOptions.placeholder,()=>{E()}),e.watch(()=>n.modelValue,(t,l)=>{J()?r.value=t:e.nextTick(()=>{r.value=l,j()})}),e.watch(f,t=>{t?(ae(),c("open")):c("close")});function R(){return fetch("https://ip2c.org/s").then(t=>t.text()).then(t=>{const l=(t||"").toString();if(!l||l[0]!=="1")throw new Error("unable to fetch the country");return l.substr(2,2)})}function $(t,l){if(t.setSelectionRange)t.focus(),t.setSelectionRange(l,l);else if(t.createTextRange){const o=t.createTextRange();o.collapse(!0),o.moveEnd("character",l),o.moveStart("character",l),o.select()}}function E(){I.value=n.inputOptions.placeholder}function U(){return new Promise(t=>{var o;if(((o=r.value)==null?void 0:o[0])==="+"){t();return}if(n.defaultCountry){m(n.defaultCountry),t();return}const l=n.preferredCountries[0]||k.value[0];n.autoDefaultCountry?R().then(i=>{m(i||v.value)}).catch(i=>{console.warn(i),m(l)}).finally(()=>{t()}):(m(l),t())})}function K(t=[]){return t.map(l=>C(l)).filter(Boolean)}function C(t=""){return k.value.find(l=>l.iso2===t.toUpperCase())}function W(t,l){const o=s.value===t,i=t===n.preferredCountries.length-1,h=n.preferredCountries.some(b=>b.toUpperCase()===l);return{highlighted:o,"last-preferred":i,preferred:h}}function m(t){var o,i;let l=typeof t=="string"?C(t):t;if(l){if(((o=r.value)==null?void 0:o[0])==="+"&&l.iso2&&u.value.nationalNumber){v.value=l.iso2,r.value=w.parsePhoneNumber(u.value.nationalNumber,l.iso2).formatInternational();return}if((i=n.inputOptions)!=null&&i.showDialCode&&l){r.value=`+${l.dialCode}`;return}v.value=l.iso2,g(r.value)}}function G(){const t=r.value;if(n.validCharactersOnly){const l=r.value.match(/[()\-+0-9\s]*/g);r.value=l.join("")}if(n.customValidate&&n.customValidate instanceof RegExp){const l=r.value.match(n.customValidate);r.value=l?l.join(""):""}t!==r.value&&g(r.value)}function J(){return n.validCharactersOnly&&!/^[()\-+0-9\s]*$/.test(r.value)?!1:n.customValidate?Q():!0}function Q(){return n.customValidate instanceof RegExp?n.customValidate.test(r.value):!1}function j(){O.value.setCustomValidity(u.valid?"":n.invalidMsg),g(r.value)}function g(t){c("update:modelValue",t),u.value.valid?(c("change",u.value.number),c("country",u.value.number)):c("country",null)}function X(){c("blur")}function Y(){$(O.value,r.value.length),c("focus")}function Z(){c("enter")}function _(){c("space")}function ee(){n.disabled||(f.value=!f.value)}function te(){f.value=!1}function ne(t){t.keyCode===40?(t.preventDefault(),f.value=!0,s.value=s.value===null?0:Math.min(y.value.length-1,s.value+1),e.nextTick(()=>{const l=d.value.children[s.value];l.offsetTop+l.clientHeight>d.value.scrollTop+d.value.clientHeight&&(d.value.scrollTop=l.offsetTop-d.value.clientHeight+l.clientHeight)})):t.keyCode===38?(t.preventDefault(),f.value=!0,s.value=s.value===null?y.value.length-1:Math.max(0,s.value-1),e.nextTick(()=>{const l=d.value.children[s.value];l.offsetTop<d.value.scrollTop&&(d.value.scrollTop=l.offsetTop)})):t.keyCode===13?(t.preventDefault(),s.value!==null&&m(y.value[s.value]),f.value=!f.value):(S.value+=t.key,clearTimeout(x),x=setTimeout(()=>{S.value=""},700),e.nextTick(()=>{const l=y.value.slice(n.preferredCountries.length).findIndex(o=>o.name.toLowerCase().startsWith(S.value));if(l>=0){s.value=n.preferredCountries.length+l;const o=d.value.children[s.value];(o.offsetTop<d.value.scrollTop||o.offsetTop+o.clientHeight>d.value.scrollTop+d.value.clientHeight)&&(d.value.scrollTop=o.offsetTop-d.value.clientHeight/2)}}))}function le(){s.value=y.value.map(t=>t.iso2).indexOf(v.value),f.value=!1}function ae(){const l=window.innerHeight-B.value.getBoundingClientRect().bottom>200;T.value=l?"below":"above"}return(t,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass([[a.rootClass,H.value,t.$attrs.class,{"bg-fourth-nano":a.validation},{disabled:a.disabled}],"vue3-reactive-tel-input"]),style:e.normalizeStyle([a.rootStyle,q.value]),ref_key:"rootElement",ref:B},[e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([["vti__dropdown",{open:f.value}],"br-solid br-black-transp br-1px radius-thin"]),style:e.normalizeStyle([a.dropdownStyle]),tabindex:a.dropdownOptions.tabindex,onKeydown:[ne,e.withKeys(le,["esc"])],onClick:ee},[e.createElementVNode("span",se,[a.dropdownOptions.showFlags?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:M.value,class:"mn-r-nano"},null,8,de)):e.createCommentVNode("",!0),a.dropdownOptions.showDialCodeInSelection?(e.openBlock(),e.createElementBlock("span",ce," +"+e.toDisplayString(p.value&&p.value.dialCode),1)):e.createCommentVNode("",!0)]),e.withDirectives(e.createElementVNode("ul",{ref_key:"list",ref:d,class:e.normalizeClass(["bs-black radius-small vti__dropdown-list",T.value]),style:e.normalizeStyle([a.listStyle])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(o,i)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["flex-nowrap flex w-max",["vti__dropdown-item",W(i,o.iso2)]]),key:o.iso2+(o.preferred?"-preferred":""),onClick:h=>m(o),onMousemove:h=>s.value=i},[a.dropdownOptions.showFlags?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:o.flag,class:"mn-r-thin"},null,8,ve)):e.createCommentVNode("",!0),e.createElementVNode("strong",null,e.toDisplayString(o.name),1),a.dropdownOptions.showDialCodeInList?(e.openBlock(),e.createElementBlock("span",pe," +"+e.toDisplayString(o.dialCode),1)):e.createCommentVNode("",!0)],42,fe))),128))],6),[[e.vShow,f.value]])],46,ie)),[[e.unref(N),te]]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=o=>r.value=o),inputmode:"numeric",pattern:"\\d*",ref_key:"input",ref:O,type:a.inputOptions.type,autocomplete:a.inputOptions.autocomplete,autofocus:a.inputOptions.autofocus,class:e.normalizeClass(["vti__input",a.inputOptions.styleClasses,a.inputClass,z.value]),style:e.normalizeStyle([a.inputStyle,L.value]),disabled:a.disabled,id:a.inputId!==""?a.inputId:a.inputOptions.id,maxlength:a.inputOptions.maxlength,name:a.inputId!==""?a.inputId:a.inputOptions.name,placeholder:I.value,readonly:a.inputOptions.readonly,required:a.inputOptions.required,tabindex:a.inputOptions.tabindex,onBlur:X,onFocus:Y,onInput:j,onKeyup:[e.withKeys(Z,["enter"]),e.withKeys(_,["space"])]},null,46,ye),[[e.vModelDynamic,r.value]]),e.renderSlot(t.$slots,"default",{},void 0,!0)],6),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[a.validation?(e.openBlock(),e.createElementBlock("div",me," * "+e.toDisplayString(a.validation.message),1)):e.createCommentVNode("",!0)]),_:1})],64))}},Ce=ue.default(he,[["__scopeId","data-v-550fb753"]]);exports.default=Ce;
@@ -1,4 +1,4 @@
1
- import { ref as d, reactive as Ce, onMounted as ge, computed as p, watch as h, nextTick as S, openBlock as y, createElementBlock as m, Fragment as K, createElementVNode as w, normalizeClass as I, normalizeStyle as A, withDirectives as M, withKeys as P, createCommentVNode as x, toDisplayString as D, renderList as be, vShow as Oe, unref as Se, vModelDynamic as we, renderSlot as Ie, createVNode as xe, Transition as Te, withCtx as ke } from "vue";
1
+ import { ref as d, reactive as ge, onMounted as Ce, computed as p, watch as h, nextTick as S, openBlock as y, createElementBlock as m, Fragment as K, createElementVNode as w, normalizeClass as I, normalizeStyle as A, withDirectives as M, withKeys as P, createCommentVNode as x, toDisplayString as D, renderList as be, vShow as Oe, unref as Se, vModelDynamic as we, renderSlot as Ie, createVNode as xe, Transition as Te, withCtx as ke } from "vue";
2
2
  import je from "./click-outside.js";
3
3
  import Ae from "./all-countries.js";
4
4
  import "./FieldPhone.vue2.js";
@@ -72,6 +72,7 @@ const Be = ["tabindex"], Ee = { class: "flex-nowrap flex flex-v-center p-medium
72
72
  },
73
73
  emits: [
74
74
  "update:modelValue",
75
+ "change",
75
76
  "validate",
76
77
  "country-changed",
77
78
  "open",
@@ -84,12 +85,12 @@ const Be = ["tabindex"], Ee = { class: "flex-nowrap flex flex-v-center p-medium
84
85
  setup(l, { emit: W }) {
85
86
  let G = je;
86
87
  const t = l, c = W;
87
- d(5), d(5), Ce({
88
+ d(5), d(5), ge({
88
89
  action: null,
89
90
  amount: null
90
91
  });
91
92
  const o = d(t.modelValue ? t.modelValue : ""), v = d(""), f = d(!1), J = d(!1), i = d(null), B = d(""), V = d(null), L = d("below"), R = d(t.Placeholder !== "" ? t.Placeholder : t.inputOptions.placeholder), N = d(null), s = d(null), E = d(null);
92
- ge(async () => {
93
+ Ce(async () => {
93
94
  t.modelValue && (o.value = t.modelValue), ue(), le().then(() => {
94
95
  var e;
95
96
  !o.value && ((e = t.inputOptions) != null && e.showDialCode) && v.value && (o.value = `+${v.value}`), c("validate", u.value);
@@ -97,9 +98,9 @@ const Be = ["tabindex"], Ee = { class: "flex-nowrap flex flex-v-center p-medium
97
98
  J.value = !0;
98
99
  });
99
100
  });
100
- const C = p(() => T(v.value)), Q = p(() => C.value ? C.value.flag : null), X = p(() => t.mode === "auto" ? !o.value || o.value[0] !== "+" ? "national" : "international" : ["international", "national"].includes(t.mode) ? t.mode : (console.error('Invalid value of prop "mode"'), "international")), F = p(() => t.onlyCountries && t.onlyCountries.length ? t.allCountries.filter(({ iso2: e }) => t.onlyCountries.includes(e.toUpperCase())) : t.ignoredCountries && t.ignoredCountries.length ? t.allCountries.filter(
101
+ const g = p(() => T(v.value)), Q = p(() => g.value ? g.value.flag : null), X = p(() => t.mode === "auto" ? !o.value || o.value[0] !== "+" ? "national" : "international" : ["international", "national"].includes(t.mode) ? t.mode : (console.error('Invalid value of prop "mode"'), "international")), F = p(() => t.onlyCountries && t.onlyCountries.length ? t.allCountries.filter(({ iso2: e }) => t.onlyCountries.includes(e.toUpperCase())) : t.ignoredCountries && t.ignoredCountries.length ? t.allCountries.filter(
101
102
  ({ iso2: e }) => !t.ignoredCountries.includes(e.toUpperCase()) && !t.ignoredCountries.includes(e.toLowerCase())
102
- ) : t.allCountries), g = p(() => [...ae(t.preferredCountries).map((n) => ({ ...n, preferred: !0 })), ...F.value]), u = p(() => {
103
+ ) : t.allCountries), C = p(() => [...ae(t.preferredCountries).map((n) => ({ ...n, preferred: !0 })), ...F.value]), u = p(() => {
103
104
  var j, q, z;
104
105
  let e = {};
105
106
  ((j = o.value) == null ? void 0 : j[0]) === "+" ? e = H(o.value) || {} : e = H(o.value, v.value) || {};
@@ -109,11 +110,11 @@ const Be = ["tabindex"], Ee = { class: "flex-nowrap flex flex-v-center p-medium
109
110
  ...a,
110
111
  countryCode: e.country,
111
112
  valid: r,
112
- country: C.value,
113
+ country: g.value,
113
114
  formatted: O
114
115
  };
115
116
  }), Y = p(() => u.value.valid === !0 ? t.goodClass : u.value.valid === !1 ? t.badClass : void 0), Z = p(() => u.value.valid === !0 ? t.goodStyle : u.value.valid === !1 ? t.badStyle : void 0), _ = p(() => u.value.valid === !0 ? t.goodInputClass : u.value.valid === !1 ? t.badInputClass : void 0), ee = p(() => u.value.valid === !0 ? t.goodInputStyle : u.value.valid === !1 ? t.badInputStyle : void 0);
116
- h(C, (e, n) => {
117
+ h(g, (e, n) => {
117
118
  if (!e && (n != null && n.iso2)) {
118
119
  v.value = n.iso2;
119
120
  return;
@@ -223,7 +224,7 @@ const Be = ["tabindex"], Ee = { class: "flex-nowrap flex flex-v-center p-medium
223
224
  E.value.setCustomValidity(u.valid ? "" : t.invalidMsg), k(o.value);
224
225
  }
225
226
  function k(e) {
226
- c("update:modelValue", e), u.value.valid ? c("country", u.value.number) : c("country", null);
227
+ c("update:modelValue", e), u.value.valid ? (c("change", u.value.number), c("country", u.value.number)) : c("country", null);
227
228
  }
228
229
  function se() {
229
230
  c("blur");
@@ -244,16 +245,16 @@ const Be = ["tabindex"], Ee = { class: "flex-nowrap flex flex-v-center p-medium
244
245
  f.value = !1;
245
246
  }
246
247
  function ye(e) {
247
- e.keyCode === 40 ? (e.preventDefault(), f.value = !0, i.value = i.value === null ? 0 : Math.min(g.value.length - 1, i.value + 1), S(() => {
248
+ e.keyCode === 40 ? (e.preventDefault(), f.value = !0, i.value = i.value === null ? 0 : Math.min(C.value.length - 1, i.value + 1), S(() => {
248
249
  const n = s.value.children[i.value];
249
250
  n.offsetTop + n.clientHeight > s.value.scrollTop + s.value.clientHeight && (s.value.scrollTop = n.offsetTop - s.value.clientHeight + n.clientHeight);
250
- })) : e.keyCode === 38 ? (e.preventDefault(), f.value = !0, i.value = i.value === null ? g.value.length - 1 : Math.max(0, i.value - 1), S(() => {
251
+ })) : e.keyCode === 38 ? (e.preventDefault(), f.value = !0, i.value = i.value === null ? C.value.length - 1 : Math.max(0, i.value - 1), S(() => {
251
252
  const n = s.value.children[i.value];
252
253
  n.offsetTop < s.value.scrollTop && (s.value.scrollTop = n.offsetTop);
253
- })) : e.keyCode === 13 ? (e.preventDefault(), i.value !== null && b(g.value[i.value]), f.value = !f.value) : (B.value += e.key, clearTimeout(V), V = setTimeout(() => {
254
+ })) : e.keyCode === 13 ? (e.preventDefault(), i.value !== null && b(C.value[i.value]), f.value = !f.value) : (B.value += e.key, clearTimeout(V), V = setTimeout(() => {
254
255
  B.value = "";
255
256
  }, 700), S(() => {
256
- const n = g.value.slice(t.preferredCountries.length).findIndex((a) => a.name.toLowerCase().startsWith(B.value));
257
+ const n = C.value.slice(t.preferredCountries.length).findIndex((a) => a.name.toLowerCase().startsWith(B.value));
257
258
  if (n >= 0) {
258
259
  i.value = t.preferredCountries.length + n;
259
260
  const a = s.value.children[i.value];
@@ -262,7 +263,7 @@ const Be = ["tabindex"], Ee = { class: "flex-nowrap flex flex-v-center p-medium
262
263
  }));
263
264
  }
264
265
  function me() {
265
- i.value = g.value.map((e) => e.iso2).indexOf(v.value), f.value = !1;
266
+ i.value = C.value.map((e) => e.iso2).indexOf(v.value), f.value = !1;
266
267
  }
267
268
  function he() {
268
269
  const n = window.innerHeight - N.value.getBoundingClientRect().bottom > 200;
@@ -300,7 +301,7 @@ const Be = ["tabindex"], Ee = { class: "flex-nowrap flex flex-v-center p-medium
300
301
  innerHTML: Q.value,
301
302
  class: "mn-r-nano"
302
303
  }, null, 8, Fe)) : x("", !0),
303
- l.dropdownOptions.showDialCodeInSelection ? (y(), m("span", Me, " +" + D(C.value && C.value.dialCode), 1)) : x("", !0)
304
+ l.dropdownOptions.showDialCodeInSelection ? (y(), m("span", Me, " +" + D(g.value && g.value.dialCode), 1)) : x("", !0)
304
305
  ]),
305
306
  M(w("ul", {
306
307
  ref_key: "list",
@@ -308,7 +309,7 @@ const Be = ["tabindex"], Ee = { class: "flex-nowrap flex flex-v-center p-medium
308
309
  class: I(["bs-black radius-small vti__dropdown-list", L.value]),
309
310
  style: A([l.listStyle])
310
311
  }, [
311
- (y(!0), m(K, null, be(g.value, (a, r) => (y(), m("li", {
312
+ (y(!0), m(K, null, be(C.value, (a, r) => (y(), m("li", {
312
313
  class: I(["flex-nowrap flex w-max", ["vti__dropdown-item", oe(r, a.iso2)]]),
313
314
  key: a.iso2 + (a.preferred ? "-preferred" : ""),
314
315
  onClick: (O) => b(a),
@@ -367,7 +368,7 @@ const Be = ["tabindex"], Ee = { class: "flex-nowrap flex flex-v-center p-medium
367
368
  })
368
369
  ], 64));
369
370
  }
370
- }, Ge = /* @__PURE__ */ De(Ne, [["__scopeId", "data-v-6cc570f0"]]);
371
+ }, Ge = /* @__PURE__ */ De(Ne, [["__scopeId", "data-v-550fb753"]]);
371
372
  export {
372
373
  Ge as default
373
374
  };
@@ -1 +1 @@
1
- "use strict";
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("vue-router"),p=require("vue-i18n"),d=require("../../modules/icons/navigation/IconCross.vue.cjs");require("./Popup.vue2.cjs");const m={key:"popup-content",class:"pd-small popup-wrapper"},v={class:"mn-b-small"},f={__name:"Popup",props:{isPopupOpen:{type:Boolean,default:!1},style:String,title:String},emits:["close-popup"],setup(t,{emit:l}){const a=t,i=l;function n(){i("close-popup")}e.watch(()=>a.isPopupOpen,o=>{o?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll")}),r.useRoute(),r.useRouter();const u={messages:{en:{},ru:{}}};return p.useI18n(u),(o,s)=>(e.openBlock(),e.createBlock(e.Transition,{name:"TransitionTranslateY",appear:""},{default:e.withCtx(()=>[t.isPopupOpen?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[t.isPopupOpen?(e.openBlock(),e.createElementBlock("div",m,[e.createVNode(e.Transition,{name:"TransitionTranslateY",mode:"out-in"},{default:e.withCtx(()=>[e.createElementVNode("section",e.mergeProps({class:"pos-relative z-index-4"},o.$attrs,{class:o.$attrs.class}),[e.createElementVNode("h4",v,e.toDisplayString(t.title),1),e.createVNode(d.default,{onClick:s[0]||(s[0]=c=>n()),class:"cursor-pointer pos-absolute pos-t-0 pos-r-0 mn-t-semi mn-r-semi hover-scale-1 i-regular z-index-5"}),e.renderSlot(o.$slots,"default")],16)]),_:3}),e.createElementVNode("div",{onClick:s[1]||(s[1]=c=>n()),class:e.normalizeClass([{active:t.isPopupOpen===!0},"color-overlay z-index-3"])},null,2)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:3}))}};exports.default=f;
@@ -1 +1,73 @@
1
-
1
+ import { watch as v, openBlock as s, createBlock as l, Transition as a, withCtx as i, Teleport as y, createElementBlock as P, createVNode as p, createElementVNode as n, mergeProps as k, toDisplayString as g, renderSlot as C, normalizeClass as T, createCommentVNode as u } from "vue";
2
+ import { useRoute as b, useRouter as x } from "vue-router";
3
+ import { useI18n as O } from "vue-i18n";
4
+ import $ from "../../modules/icons/navigation/IconCross.vue.js";
5
+ import "./Popup.vue2.js";
6
+ const z = {
7
+ key: "popup-content",
8
+ class: "pd-small popup-wrapper"
9
+ }, B = { class: "mn-b-small" }, I = {
10
+ __name: "Popup",
11
+ props: {
12
+ isPopupOpen: {
13
+ type: Boolean,
14
+ default: !1
15
+ },
16
+ style: String,
17
+ title: String
18
+ },
19
+ emits: ["close-popup"],
20
+ setup(e, { emit: c }) {
21
+ const m = e, d = c;
22
+ function r() {
23
+ d("close-popup");
24
+ }
25
+ return v(() => m.isPopupOpen, (t) => {
26
+ t ? document.body.classList.add("no-scroll") : document.body.classList.remove("no-scroll");
27
+ }), b(), x(), O({
28
+ messages: {
29
+ en: {},
30
+ ru: {}
31
+ }
32
+ }), (t, o) => (s(), l(a, {
33
+ name: "TransitionTranslateY",
34
+ appear: ""
35
+ }, {
36
+ default: i(() => [
37
+ e.isPopupOpen ? (s(), l(y, {
38
+ key: 0,
39
+ to: "body"
40
+ }, [
41
+ e.isPopupOpen ? (s(), P("div", z, [
42
+ p(a, {
43
+ name: "TransitionTranslateY",
44
+ mode: "out-in"
45
+ }, {
46
+ default: i(() => [
47
+ n("section", k({ class: "pos-relative z-index-4" }, t.$attrs, {
48
+ class: t.$attrs.class
49
+ }), [
50
+ n("h4", B, g(e.title), 1),
51
+ p($, {
52
+ onClick: o[0] || (o[0] = (f) => r()),
53
+ class: "cursor-pointer pos-absolute pos-t-0 pos-r-0 mn-t-semi mn-r-semi hover-scale-1 i-regular z-index-5"
54
+ }),
55
+ C(t.$slots, "default")
56
+ ], 16)
57
+ ]),
58
+ _: 3
59
+ }),
60
+ n("div", {
61
+ onClick: o[1] || (o[1] = (f) => r()),
62
+ class: T([{ active: e.isPopupOpen === !0 }, "color-overlay z-index-3"])
63
+ }, null, 2)
64
+ ])) : u("", !0)
65
+ ])) : u("", !0)
66
+ ]),
67
+ _: 3
68
+ }));
69
+ }
70
+ };
71
+ export {
72
+ I as default
73
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("vue-router"),p=require("vue-i18n"),d=require("../../modules/icons/navigation/IconCross.vue.cjs");require("./Popup.vue.cjs");const m={key:"popup-content",class:"pd-small popup-wrapper"},v={class:"mn-b-small"},f={__name:"Popup",props:{isPopupOpen:{type:Boolean,default:!1},style:String,title:String},emits:["close-popup"],setup(t,{emit:l}){const a=t,i=l;function n(){i("close-popup")}e.watch(()=>a.isPopupOpen,o=>{o?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll")}),r.useRoute(),r.useRouter();const u={messages:{en:{},ru:{}}};return p.useI18n(u),(o,s)=>(e.openBlock(),e.createBlock(e.Transition,{name:"TransitionTranslateY",appear:""},{default:e.withCtx(()=>[t.isPopupOpen?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[t.isPopupOpen?(e.openBlock(),e.createElementBlock("div",m,[e.createVNode(e.Transition,{name:"TransitionTranslateY",mode:"out-in"},{default:e.withCtx(()=>[e.createElementVNode("section",e.mergeProps({class:"pos-relative z-index-4"},o.$attrs,{class:o.$attrs.class}),[e.createElementVNode("h4",v,e.toDisplayString(t.title),1),e.createVNode(d.default,{onClick:s[0]||(s[0]=c=>n()),class:"cursor-pointer pos-absolute pos-t-0 pos-r-0 mn-t-semi mn-r-semi hover-scale-1 i-regular z-index-5"}),e.renderSlot(o.$slots,"default")],16)]),_:3}),e.createElementVNode("div",{onClick:s[1]||(s[1]=c=>n()),class:e.normalizeClass([{active:t.isPopupOpen===!0},"color-overlay z-index-3"])},null,2)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:3}))}};exports.default=f;
1
+ "use strict";