@ozdao/prometheus-framework 0.2.59 → 0.2.61

Sign up to get free protection for your applications and to get access to all the features.
Files changed (193) hide show
  1. package/dist/auth.server.js +12 -223
  2. package/dist/auth.server.mjs +12 -223
  3. package/dist/community.server.js +3 -2
  4. package/dist/community.server.mjs +2 -1
  5. package/dist/events.server.js +117 -25
  6. package/dist/events.server.mjs +116 -24
  7. package/dist/files.server.js +7 -7
  8. package/dist/files.server.mjs +7 -7
  9. package/dist/gallery.server.js +2 -2
  10. package/dist/gallery.server.mjs +2 -2
  11. package/dist/main-DsseFd2d.mjs +13753 -0
  12. package/dist/main-U466Gwzt.js +91 -0
  13. package/dist/main.css +1 -1
  14. package/dist/metadata.schema-CS6_9GLU.js +174 -0
  15. package/dist/metadata.schema-CjpDDEnW.mjs +210 -0
  16. package/dist/metadata.schema-D88c1Ebp.mjs +175 -0
  17. package/dist/metadata.schema-doiYQfuO.js +209 -0
  18. package/dist/organizations.server.js +212 -16
  19. package/dist/organizations.server.mjs +212 -16
  20. package/dist/ownership.schema-DN0SlQL6.js +36 -0
  21. package/dist/ownership.schema-oyx6eNkZ.mjs +37 -0
  22. package/dist/products.server.js +8 -5
  23. package/dist/products.server.mjs +8 -5
  24. package/dist/prometheus-framework/src/components/Chips/Chips.vue.cjs +1 -1
  25. package/dist/prometheus-framework/src/components/Chips/Chips.vue.js +19 -14
  26. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  27. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +26 -26
  28. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.cjs +1 -1
  29. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.js +1 -373
  30. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  31. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +1 -72
  32. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  33. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +72 -1
  34. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  35. package/dist/prometheus-framework/src/components/Select/Select.vue.js +1 -97
  36. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  37. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +97 -1
  38. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +46 -1
  40. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  41. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +1 -46
  42. package/dist/prometheus-framework/src/modules/auth/auth.client.cjs +1 -1
  43. package/dist/prometheus-framework/src/modules/auth/auth.client.js +12 -14
  44. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +1 -1
  46. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +1 -1
  48. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +2 -2
  50. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +1 -1
  52. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +1 -1
  54. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +1 -1
  56. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  58. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  60. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
  62. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  63. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  64. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -5
  65. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +0 -66
  66. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
  67. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +66 -0
  68. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  69. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  70. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  72. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +199 -185
  74. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -0
  75. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +168 -0
  76. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue2.cjs +1 -0
  77. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue2.js +1 -0
  78. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +2 -2
  79. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +43 -43
  80. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +2 -2
  82. package/dist/prometheus-framework/src/modules/events/router/events.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/events/router/events.js +11 -2
  84. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  86. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  87. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
  88. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  89. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +59 -56
  90. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  91. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  92. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +1 -13
  94. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +13 -1
  96. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +167 -124
  98. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  99. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +56 -45
  100. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
  101. package/dist/prometheus-framework/src/modules/orders/store/orders.js +19 -24
  102. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  103. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
  104. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  105. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +3 -3
  106. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  107. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +3 -3
  108. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  109. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +25 -25
  110. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  111. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
  112. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  113. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  114. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  115. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  116. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  117. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  118. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  119. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  120. package/dist/prometheus-framework/src/modules/organizations/organizations.client.cjs +1 -1
  121. package/dist/prometheus-framework/src/modules/organizations/organizations.client.js +40 -38
  122. package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
  123. package/dist/prometheus-framework/src/modules/organizations/store/departments.js +19 -19
  124. package/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -1
  125. package/dist/prometheus-framework/src/modules/organizations/store/invites.js +5 -5
  126. package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.cjs +1 -1
  127. package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.js +36 -27
  128. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  129. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +16 -16
  130. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  131. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  132. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  133. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  134. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  135. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +11 -11
  136. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  137. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +21 -21
  138. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  139. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
  140. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  141. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +36 -50
  142. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  143. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  144. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  145. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  146. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  147. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
  148. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  149. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  150. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  151. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +1 -1
  152. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  153. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  154. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
  155. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +2 -2
  156. package/dist/prometheus-framework.cjs.js +1 -1
  157. package/dist/prometheus-framework.es.js +1 -1
  158. package/dist/style.css +1 -1
  159. package/dist/web-D7bW32Ul.mjs +54 -0
  160. package/dist/web-DpE9HxA3.js +1 -0
  161. package/package.json +1 -1
  162. package/src/components/Chips/Chips.vue +2 -2
  163. package/src/components/Feed/Feed.vue +2 -1
  164. package/src/modules/auth/auth.client.js +0 -2
  165. package/src/modules/auth/auth.server.js +1 -7
  166. package/src/modules/auth/components/pages/Invite.vue +1 -1
  167. package/src/modules/events/components/pages/EditEvent.vue +19 -0
  168. package/src/modules/events/components/pages/EditEventTickets.vue +194 -0
  169. package/src/modules/events/controllers/tickets.controller.js +103 -28
  170. package/src/modules/events/models/ticket.model.js +22 -4
  171. package/src/modules/events/router/events.js +5 -0
  172. package/src/modules/events/routes/tickets.routes.js +2 -2
  173. package/src/modules/events/store/tickets.js +1 -0
  174. package/src/modules/globals/components/blocks/CardHeader.vue +6 -6
  175. package/src/modules/organizations/components/pages/Members.vue +1 -1
  176. package/src/modules/organizations/components/pages/Organization.vue +4 -4
  177. package/src/modules/organizations/components/sections/MembersAdd.vue +1 -1
  178. package/src/modules/organizations/controllers/departments.controller.js +14 -1
  179. package/src/modules/organizations/models/department.model.js +5 -1
  180. package/src/modules/organizations/organizations.client.js +2 -0
  181. package/src/modules/organizations/organizations.server.js +6 -2
  182. package/src/modules/organizations/routes/departments.routes.js +1 -1
  183. package/src/modules/organizations/store/departments.js +3 -2
  184. package/src/modules/products/components/blocks/CardLeftover.vue +19 -7
  185. package/src/modules/products/components/pages/EditLeftover.vue +1 -1
  186. package/src/modules/products/components/pages/Leftovers.vue +14 -3
  187. package/src/modules/products/components/pages/Products.vue +8 -8
  188. package/src/modules/products/models/leftover.model.js +9 -5
  189. package/src/modules/users/models/client.model.js +60 -0
  190. /package/src/modules/{auth → organizations}/controllers/invites.controller.js +0 -0
  191. /package/src/modules/{auth → organizations}/models/invite.model.js +0 -0
  192. /package/src/modules/{auth → organizations}/routes/invites.routes.js +0 -0
  193. /package/src/modules/{auth → organizations}/store/invites.js +0 -0
@@ -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("./FieldPhone2.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:"FieldPhone2",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-medium"]),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-thin"},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-0ab16817"]]);exports.default=Ce;
1
+ "use strict";
@@ -1,373 +1 @@
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";
2
- import je from "./click-outside.js";
3
- import Ae from "./all-countries.js";
4
- import "./FieldPhone2.vue2.js";
5
- import De from "../../../../_virtual/_plugin-vue_export-helper.js";
6
- import { parsePhoneNumber as H } from "../../../node_modules/libphonenumber-js/min/exports/parsePhoneNumber.js";
7
- const Be = ["tabindex"], Ee = { class: "flex-nowrap flex flex-v-center p-medium vti__selection" }, Fe = ["innerHTML"], Me = {
8
- key: 1,
9
- class: "vti__country-code"
10
- }, Pe = ["onClick", "onMousemove"], He = ["innerHTML"], Ve = { key: 1 }, Le = ["type", "autocomplete", "autofocus", "disabled", "id", "maxlength", "name", "placeholder", "readonly", "required", "tabindex"], Re = {
11
- key: 0,
12
- class: "mn-t-thin mn-b-thin invalid-feedback"
13
- }, Ne = {
14
- __name: "FieldPhone2",
15
- props: {
16
- modelValue: { type: String, default: "" },
17
- badClass: { type: [String, Array, Object], default: "" },
18
- goodClass: { type: [String, Array, Object], default: "" },
19
- badStyle: { type: [String, Array, Object], default: "" },
20
- goodStyle: { type: [String, Array, Object], default: "" },
21
- badInputClass: { type: [String, Array, Object], default: "" },
22
- goodInputClass: { type: [String, Array, Object], default: "" },
23
- badInputStyle: { type: [String, Array, Object], default: "" },
24
- goodInputStyle: { type: [String, Array, Object], default: "" },
25
- allCountries: { type: Array, default: () => Ae },
26
- autoFormat: { type: Boolean, default: () => !0 },
27
- validation: { type: [Boolean, Object], default: !1 },
28
- customValidate: { type: [Boolean, RegExp], default: () => !1 },
29
- defaultCountry: { type: String, default: () => "" },
30
- disabled: { type: Boolean, default: () => !1 },
31
- autoDefaultCountry: { type: Boolean, default: () => !0 },
32
- ignoredCountries: { type: Array, default: () => [] },
33
- invalidMsg: { type: String, default: () => "" },
34
- mode: { type: String, default: () => "auto" },
35
- onlyCountries: { type: Array, default: () => [] },
36
- preferredCountries: { type: Array, default: () => [] },
37
- validCharactersOnly: { type: Boolean, default: () => !1 },
38
- rootClass: { type: [String, Array, Object], default: () => "" },
39
- inputClass: { type: [String, Array, Object], default: () => "" },
40
- divInputClass: { type: [String, Array, Object], default: () => "" },
41
- rootStyle: { type: [String, Array, Object], default: () => "" },
42
- dropdownStyle: { type: [String, Array, Object], default: () => "" },
43
- listStyle: { type: [String, Array, Object], default: () => "" },
44
- inputStyle: { type: [String, Array, Object], default: () => "" },
45
- inputId: { type: [String, Array, Object], default: () => "" },
46
- Placeholder: { type: [String, Object, Function], default: () => "" },
47
- dropdownOptions: {
48
- type: Object,
49
- default: () => ({
50
- showDialCodeInList: !0,
51
- showDialCodeInSelection: !1,
52
- showFlags: !0,
53
- tabindex: 0
54
- })
55
- },
56
- inputOptions: {
57
- type: Object,
58
- default: () => ({
59
- autocomplete: "on",
60
- autofocus: !1,
61
- id: "",
62
- maxlength: 25,
63
- name: "telephone",
64
- placeholder: "Enter a phone number",
65
- readonly: !1,
66
- required: !1,
67
- tabindex: 0,
68
- type: "tel",
69
- styleClasses: ""
70
- })
71
- }
72
- },
73
- emits: [
74
- "update:modelValue",
75
- "validate",
76
- "country-changed",
77
- "open",
78
- "close",
79
- "blur",
80
- "focus",
81
- "enter",
82
- "space"
83
- ],
84
- setup(l, { emit: W }) {
85
- let G = je;
86
- const t = l, c = W;
87
- d(5), d(5), Ce({
88
- action: null,
89
- amount: null
90
- });
91
- 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
- t.modelValue && (o.value = t.modelValue), ue(), le().then(() => {
94
- var e;
95
- !o.value && ((e = t.inputOptions) != null && e.showDialCode) && v.value && (o.value = `+${v.value}`), c("validate", u.value);
96
- }).catch(console.error).then(() => {
97
- J.value = !0;
98
- });
99
- });
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
- ({ 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
- var j, q, z;
104
- let e = {};
105
- ((j = o.value) == null ? void 0 : j[0]) === "+" ? e = H(o.value) || {} : e = H(o.value, v.value) || {};
106
- const { metadata: n, ...a } = e;
107
- let r = (q = e.isValid) == null ? void 0 : q.call(e), O = o.value;
108
- return r && (O = (z = e.format) == null ? void 0 : z.call(e, X.value.toUpperCase(), { nationalPrefix: !1 })), e.country && (t.ignoredCountries.length || t.onlyCountries.length) && (T(e.country) || (r = !1, e = { ...e, country: null })), {
109
- ...a,
110
- countryCode: e.country,
111
- valid: r,
112
- country: C.value,
113
- formatted: O
114
- };
115
- }), 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
- if (!e && (n != null && n.iso2)) {
118
- v.value = n.iso2;
119
- return;
120
- }
121
- e != null && e.iso2 && (c("country-changed", e), $());
122
- }), h(() => u.value.countryCode, (e) => {
123
- v.value = e;
124
- }), h(() => u.value.valid, () => {
125
- c("validate", u.value);
126
- }), h(() => u.value.formatted, (e) => {
127
- !t.autoFormat || t.customValidate || (k(e), S(() => {
128
- e && !t.modelValue && (o.value = e);
129
- }));
130
- }), h(() => t.inputOptions.placeholder, () => {
131
- $();
132
- }), h(() => t.modelValue, (e, n) => {
133
- re() ? o.value = e : S(() => {
134
- o.value = n, U();
135
- });
136
- }), h(f, (e) => {
137
- e ? (he(), c("open")) : c("close");
138
- });
139
- function te() {
140
- return fetch("https://ip2c.org/s").then((e) => e.text()).then((e) => {
141
- const n = (e || "").toString();
142
- if (!n || n[0] !== "1")
143
- throw new Error("unable to fetch the country");
144
- return n.substr(2, 2);
145
- });
146
- }
147
- function ne(e, n) {
148
- if (e.setSelectionRange)
149
- e.focus(), e.setSelectionRange(n, n);
150
- else if (e.createTextRange) {
151
- const a = e.createTextRange();
152
- a.collapse(!0), a.moveEnd("character", n), a.moveStart("character", n), a.select();
153
- }
154
- }
155
- function $() {
156
- R.value = t.inputOptions.placeholder;
157
- }
158
- function le() {
159
- return new Promise((e) => {
160
- var a;
161
- if (((a = o.value) == null ? void 0 : a[0]) === "+") {
162
- e();
163
- return;
164
- }
165
- if (t.defaultCountry) {
166
- b(t.defaultCountry), e();
167
- return;
168
- }
169
- const n = t.preferredCountries[0] || F.value[0];
170
- t.autoDefaultCountry ? te().then((r) => {
171
- b(r || v.value);
172
- }).catch((r) => {
173
- console.warn(r), b(n);
174
- }).finally(() => {
175
- e();
176
- }) : (b(n), e());
177
- });
178
- }
179
- function ae(e = []) {
180
- return e.map((n) => T(n)).filter(Boolean);
181
- }
182
- function T(e = "") {
183
- return F.value.find((n) => n.iso2 === e.toUpperCase());
184
- }
185
- function oe(e, n) {
186
- const a = i.value === e, r = e === t.preferredCountries.length - 1, O = t.preferredCountries.some((j) => j.toUpperCase() === n);
187
- return { highlighted: a, "last-preferred": r, preferred: O };
188
- }
189
- function b(e) {
190
- var a, r;
191
- let n = typeof e == "string" ? T(e) : e;
192
- if (n) {
193
- if (((a = o.value) == null ? void 0 : a[0]) === "+" && n.iso2 && u.value.nationalNumber) {
194
- v.value = n.iso2, o.value = H(u.value.nationalNumber, n.iso2).formatInternational();
195
- return;
196
- }
197
- if ((r = t.inputOptions) != null && r.showDialCode && n) {
198
- o.value = `+${n.dialCode}`;
199
- return;
200
- }
201
- v.value = n.iso2, k(o.value);
202
- }
203
- }
204
- function ue() {
205
- const e = o.value;
206
- if (t.validCharactersOnly) {
207
- const n = o.value.match(/[()\-+0-9\s]*/g);
208
- o.value = n.join("");
209
- }
210
- if (t.customValidate && t.customValidate instanceof RegExp) {
211
- const n = o.value.match(t.customValidate);
212
- o.value = n ? n.join("") : "";
213
- }
214
- e !== o.value && k(o.value);
215
- }
216
- function re() {
217
- return t.validCharactersOnly && !/^[()\-+0-9\s]*$/.test(o.value) ? !1 : t.customValidate ? ie() : !0;
218
- }
219
- function ie() {
220
- return t.customValidate instanceof RegExp ? t.customValidate.test(o.value) : !1;
221
- }
222
- function U() {
223
- E.value.setCustomValidity(u.valid ? "" : t.invalidMsg), k(o.value);
224
- }
225
- function k(e) {
226
- c("update:modelValue", e), u.value.valid ? c("country", u.value.number) : c("country", null);
227
- }
228
- function se() {
229
- c("blur");
230
- }
231
- function de() {
232
- ne(E.value, o.value.length), c("focus");
233
- }
234
- function ce() {
235
- c("enter");
236
- }
237
- function fe() {
238
- c("space");
239
- }
240
- function ve() {
241
- t.disabled || (f.value = !f.value);
242
- }
243
- function pe() {
244
- f.value = !1;
245
- }
246
- 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
- const n = s.value.children[i.value];
249
- 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
- const n = s.value.children[i.value];
252
- 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
- B.value = "";
255
- }, 700), S(() => {
256
- const n = g.value.slice(t.preferredCountries.length).findIndex((a) => a.name.toLowerCase().startsWith(B.value));
257
- if (n >= 0) {
258
- i.value = t.preferredCountries.length + n;
259
- const a = s.value.children[i.value];
260
- (a.offsetTop < s.value.scrollTop || a.offsetTop + a.clientHeight > s.value.scrollTop + s.value.clientHeight) && (s.value.scrollTop = a.offsetTop - s.value.clientHeight / 2);
261
- }
262
- }));
263
- }
264
- function me() {
265
- i.value = g.value.map((e) => e.iso2).indexOf(v.value), f.value = !1;
266
- }
267
- function he() {
268
- const n = window.innerHeight - N.value.getBoundingClientRect().bottom > 200;
269
- L.value = n ? "below" : "above";
270
- }
271
- return (e, n) => (y(), m(K, null, [
272
- w("div", {
273
- class: I([[
274
- l.rootClass,
275
- Y.value,
276
- e.$attrs.class,
277
- { "bg-fourth-nano": l.validation },
278
- { disabled: l.disabled }
279
- ], "vue3-reactive-tel-input"]),
280
- style: A([
281
- l.rootStyle,
282
- Z.value
283
- ]),
284
- ref_key: "rootElement",
285
- ref: N
286
- }, [
287
- M((y(), m("div", {
288
- class: I([["vti__dropdown", { open: f.value }], "br-solid br-black-transp br-1px radius-medium"]),
289
- style: A([l.dropdownStyle]),
290
- tabindex: l.dropdownOptions.tabindex,
291
- onKeydown: [
292
- ye,
293
- P(me, ["esc"])
294
- ],
295
- onClick: ve
296
- }, [
297
- w("span", Ee, [
298
- l.dropdownOptions.showFlags ? (y(), m("span", {
299
- key: 0,
300
- innerHTML: Q.value,
301
- class: "mn-r-thin"
302
- }, null, 8, Fe)) : x("", !0),
303
- l.dropdownOptions.showDialCodeInSelection ? (y(), m("span", Me, " +" + D(C.value && C.value.dialCode), 1)) : x("", !0)
304
- ]),
305
- M(w("ul", {
306
- ref_key: "list",
307
- ref: s,
308
- class: I(["bs-black radius-small vti__dropdown-list", L.value]),
309
- style: A([l.listStyle])
310
- }, [
311
- (y(!0), m(K, null, be(g.value, (a, r) => (y(), m("li", {
312
- class: I(["flex-nowrap flex w-max", ["vti__dropdown-item", oe(r, a.iso2)]]),
313
- key: a.iso2 + (a.preferred ? "-preferred" : ""),
314
- onClick: (O) => b(a),
315
- onMousemove: (O) => i.value = r
316
- }, [
317
- l.dropdownOptions.showFlags ? (y(), m("span", {
318
- key: 0,
319
- innerHTML: a.flag,
320
- class: "mn-r-thin"
321
- }, null, 8, He)) : x("", !0),
322
- w("strong", null, D(a.name), 1),
323
- l.dropdownOptions.showDialCodeInList ? (y(), m("span", Ve, " +" + D(a.dialCode), 1)) : x("", !0)
324
- ], 42, Pe))), 128))
325
- ], 6), [
326
- [Oe, f.value]
327
- ])
328
- ], 46, Be)), [
329
- [Se(G), pe]
330
- ]),
331
- M(w("input", {
332
- "onUpdate:modelValue": n[0] || (n[0] = (a) => o.value = a),
333
- inputmode: "numeric",
334
- pattern: "\\d*",
335
- ref_key: "input",
336
- ref: E,
337
- type: l.inputOptions.type,
338
- autocomplete: l.inputOptions.autocomplete,
339
- autofocus: l.inputOptions.autofocus,
340
- class: I(["vti__input", l.inputOptions.styleClasses, l.inputClass, _.value]),
341
- style: A([l.inputStyle, ee.value]),
342
- disabled: l.disabled,
343
- id: l.inputId !== "" ? l.inputId : l.inputOptions.id,
344
- maxlength: l.inputOptions.maxlength,
345
- name: l.inputId !== "" ? l.inputId : l.inputOptions.name,
346
- placeholder: R.value,
347
- readonly: l.inputOptions.readonly,
348
- required: l.inputOptions.required,
349
- tabindex: l.inputOptions.tabindex,
350
- onBlur: se,
351
- onFocus: de,
352
- onInput: U,
353
- onKeyup: [
354
- P(ce, ["enter"]),
355
- P(fe, ["space"])
356
- ]
357
- }, null, 46, Le), [
358
- [we, o.value]
359
- ]),
360
- Ie(e.$slots, "default", {}, void 0, !0)
361
- ], 6),
362
- xe(Te, { name: "fade" }, {
363
- default: ke(() => [
364
- l.validation ? (y(), m("div", Re, " * " + D(l.validation.message), 1)) : x("", !0)
365
- ]),
366
- _: 1
367
- })
368
- ], 64));
369
- }
370
- }, Ge = /* @__PURE__ */ De(Ne, [["__scopeId", "data-v-0ab16817"]]);
371
- export {
372
- Ge as default
373
- };
1
+
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("vue-router"),c=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={__name:"Popup",props:{isPopupOpen:{type:Boolean,default:!1},style:String},emits:["close-popup"],setup(o,{emit:l}){const u=o,a=l;function n(){a("close-popup")}e.watch(()=>u.isPopupOpen,t=>{t?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll")}),r.useRoute(),r.useRouter();const i={messages:{en:{},ru:{}}};return c.useI18n(i),(t,s)=>o.isPopupOpen?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.createVNode(e.Transition,{name:"TransitionTranslateY",appear:""},{default:e.withCtx(()=>[o.isPopupOpen?(e.openBlock(),e.createElementBlock("div",m,[e.createVNode(e.Transition,{name:"TransitionTranslateY",mode:"out-in"},{default:e.withCtx(()=>[o.isPopupOpen?(e.openBlock(),e.createElementBlock("section",e.mergeProps({key:0,class:"pos-relative z-index-4"},t.$attrs),[e.createVNode(d.default,{onClick:s[0]||(s[0]=p=>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(t.$slots,"default")],16)):e.createCommentVNode("",!0)]),_:3}),e.createElementVNode("div",{onClick:s[1]||(s[1]=p=>n()),class:e.normalizeClass([{active:o.isPopupOpen===!0},"color-overlay z-index-3"])},null,2)])):e.createCommentVNode("",!0)]),_:3})])):e.createCommentVNode("",!0)}};exports.default=v;
1
+ "use strict";
@@ -1,72 +1 @@
1
- import { watch as f, openBlock as s, createBlock as v, Teleport as y, createVNode as n, Transition as l, withCtx as i, createElementBlock as a, mergeProps as P, renderSlot as k, createCommentVNode as r, createElementVNode as x, normalizeClass as C } from "vue";
2
- import { useRoute as O, useRouter as T } from "vue-router";
3
- import { useI18n as b } from "vue-i18n";
4
- import g 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
- }, I = {
10
- __name: "Popup",
11
- props: {
12
- isPopupOpen: {
13
- type: Boolean,
14
- default: !1
15
- },
16
- style: String
17
- },
18
- emits: ["close-popup"],
19
- setup(e, { emit: u }) {
20
- const m = e, c = u;
21
- function p() {
22
- c("close-popup");
23
- }
24
- return f(() => m.isPopupOpen, (o) => {
25
- o ? document.body.classList.add("no-scroll") : document.body.classList.remove("no-scroll");
26
- }), O(), T(), b({
27
- messages: {
28
- en: {},
29
- ru: {}
30
- }
31
- }), (o, t) => e.isPopupOpen ? (s(), v(y, {
32
- key: 0,
33
- to: "body"
34
- }, [
35
- n(l, {
36
- name: "TransitionTranslateY",
37
- appear: ""
38
- }, {
39
- default: i(() => [
40
- e.isPopupOpen ? (s(), a("div", z, [
41
- n(l, {
42
- name: "TransitionTranslateY",
43
- mode: "out-in"
44
- }, {
45
- default: i(() => [
46
- e.isPopupOpen ? (s(), a("section", P({
47
- key: 0,
48
- class: "pos-relative z-index-4"
49
- }, o.$attrs), [
50
- n(g, {
51
- onClick: t[0] || (t[0] = (d) => p()),
52
- 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"
53
- }),
54
- k(o.$slots, "default")
55
- ], 16)) : r("", !0)
56
- ]),
57
- _: 3
58
- }),
59
- x("div", {
60
- onClick: t[1] || (t[1] = (d) => p()),
61
- class: C([{ active: e.isPopupOpen === !0 }, "color-overlay z-index-3"])
62
- }, null, 2)
63
- ])) : r("", !0)
64
- ]),
65
- _: 3
66
- })
67
- ])) : r("", !0);
68
- }
69
- };
70
- export {
71
- I as default
72
- };
1
+
@@ -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"),c=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={__name:"Popup",props:{isPopupOpen:{type:Boolean,default:!1},style:String},emits:["close-popup"],setup(o,{emit:l}){const u=o,a=l;function n(){a("close-popup")}e.watch(()=>u.isPopupOpen,t=>{t?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll")}),r.useRoute(),r.useRouter();const i={messages:{en:{},ru:{}}};return c.useI18n(i),(t,s)=>o.isPopupOpen?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.createVNode(e.Transition,{name:"TransitionTranslateY",appear:""},{default:e.withCtx(()=>[o.isPopupOpen?(e.openBlock(),e.createElementBlock("div",m,[e.createVNode(e.Transition,{name:"TransitionTranslateY",mode:"out-in"},{default:e.withCtx(()=>[o.isPopupOpen?(e.openBlock(),e.createElementBlock("section",e.mergeProps({key:0,class:"pos-relative z-index-4"},t.$attrs),[e.createVNode(d.default,{onClick:s[0]||(s[0]=p=>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(t.$slots,"default")],16)):e.createCommentVNode("",!0)]),_:3}),e.createElementVNode("div",{onClick:s[1]||(s[1]=p=>n()),class:e.normalizeClass([{active:o.isPopupOpen===!0},"color-overlay z-index-3"])},null,2)])):e.createCommentVNode("",!0)]),_:3})])):e.createCommentVNode("",!0)}};exports.default=v;
@@ -1 +1,72 @@
1
-
1
+ import { watch as f, openBlock as s, createBlock as v, Teleport as y, createVNode as n, Transition as l, withCtx as i, createElementBlock as a, mergeProps as P, renderSlot as k, createCommentVNode as r, createElementVNode as x, normalizeClass as C } from "vue";
2
+ import { useRoute as O, useRouter as T } from "vue-router";
3
+ import { useI18n as b } from "vue-i18n";
4
+ import g from "../../modules/icons/navigation/IconCross.vue.js";
5
+ import "./Popup.vue.js";
6
+ const z = {
7
+ key: "popup-content",
8
+ class: "pd-small popup-wrapper"
9
+ }, I = {
10
+ __name: "Popup",
11
+ props: {
12
+ isPopupOpen: {
13
+ type: Boolean,
14
+ default: !1
15
+ },
16
+ style: String
17
+ },
18
+ emits: ["close-popup"],
19
+ setup(e, { emit: u }) {
20
+ const m = e, c = u;
21
+ function p() {
22
+ c("close-popup");
23
+ }
24
+ return f(() => m.isPopupOpen, (o) => {
25
+ o ? document.body.classList.add("no-scroll") : document.body.classList.remove("no-scroll");
26
+ }), O(), T(), b({
27
+ messages: {
28
+ en: {},
29
+ ru: {}
30
+ }
31
+ }), (o, t) => e.isPopupOpen ? (s(), v(y, {
32
+ key: 0,
33
+ to: "body"
34
+ }, [
35
+ n(l, {
36
+ name: "TransitionTranslateY",
37
+ appear: ""
38
+ }, {
39
+ default: i(() => [
40
+ e.isPopupOpen ? (s(), a("div", z, [
41
+ n(l, {
42
+ name: "TransitionTranslateY",
43
+ mode: "out-in"
44
+ }, {
45
+ default: i(() => [
46
+ e.isPopupOpen ? (s(), a("section", P({
47
+ key: 0,
48
+ class: "pos-relative z-index-4"
49
+ }, o.$attrs), [
50
+ n(g, {
51
+ onClick: t[0] || (t[0] = (d) => p()),
52
+ 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"
53
+ }),
54
+ k(o.$slots, "default")
55
+ ], 16)) : r("", !0)
56
+ ]),
57
+ _: 3
58
+ }),
59
+ x("div", {
60
+ onClick: t[1] || (t[1] = (d) => p()),
61
+ class: C([{ active: e.isPopupOpen === !0 }, "color-overlay z-index-3"])
62
+ }, null, 2)
63
+ ])) : r("", !0)
64
+ ]),
65
+ _: 3
66
+ })
67
+ ])) : r("", !0);
68
+ }
69
+ };
70
+ export {
71
+ I as default
72
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),y=require("../FieldPhone/click-outside.cjs");require("./Select.vue2.cjs");const g=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),B={key:0,class:"t-transp mn-r-small"},w={class:"w-100"},b=["onClick"],S={key:0,class:"w-100"},_={key:0,class:"mn-t-thin invalid-feedback"},C={__name:"Select",props:{label:String,select:[String,Object],property:String,placeholder:{type:String,default:"Please select an item"},options:{type:Array,default:()=>[]},validation:Boolean},emits:["update:select","focus","blur"],setup(o,{emit:m}){const i=m;let f=y.default;const t=o,n=e.ref(t.property?u(t.select,t.property,t.options):t.select),a=e.ref(!1);function v(){a.value=!1}function u(l,p,c){for(const s of c)if(s[p]===l||s===l)return s;return null}e.watch(()=>t.select,l=>{n.value=t.property?u(t.select,t.property,t.options):t.select});const k=e.computed(()=>t.select?t.options.filter(l=>l!==t.select):t.options),d=()=>{a.value=!a.value,i(a.value?"focus":"blur")},h=l=>{n.value=l,d(),t.property?i("update:select",n.value[t.property]):i("update:select",n.value)};return(l,p)=>{var c,s;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.withDirectives((e.openBlock(),e.createElementBlock("div",{onClick:e.withModifiers(d,["stop"]),class:e.normalizeClass([l.$attrs.class,"cursor-pointer flex-v-center flex-nowrap flex pos-relative"])},[o.label?(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("span",null,e.toDisplayString(o.label),1)])):e.createCommentVNode("",!0),e.createElementVNode("li",w,[e.createElementVNode("span",null,e.toDisplayString((c=n.value)!=null&&c.name?(s=n.value)==null?void 0:s.name:n.value||o.placeholder),1)]),e.createVNode(e.Transition,{mode:"out-in",name:"TransitionTranslateY"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("ul",{class:e.normalizeClass([l.$attrs.class,"bs-black pos-absolute pos-t-100 pos-l-0 z-index-5 w-100 mn-t-thin"]),style:{"min-width":"max-content"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,r=>(e.openBlock(),e.createElementBlock("li",{onClick:e.withModifiers(V=>h(r),["stop"])},[r?(e.openBlock(),e.createElementBlock("span",S,e.toDisplayString(r.name||r),1)):e.createCommentVNode("",!0)],8,b))),256))],2),[[e.vShow,a.value]])]),_:1})],2)),[[e.unref(f),v]]),e.createVNode(e.Transition,{mode:"out-in",name:"fade"},{default:e.withCtx(()=>[o.validation?(e.openBlock(),e.createElementBlock("div",_," * "+e.toDisplayString(o.validation.message),1)):e.createCommentVNode("",!0)]),_:1})],64)}}},E=g.default(C,[["__scopeId","data-v-67f55841"]]);exports.default=E;
1
+ "use strict";
@@ -1,97 +1 @@
1
- import { ref as y, watch as M, computed as N, openBlock as s, createElementBlock as n, Fragment as k, withDirectives as b, withModifiers as w, normalizeClass as _, createElementVNode as u, toDisplayString as d, createCommentVNode as m, createVNode as g, Transition as S, withCtx as x, renderList as T, vShow as $, unref as z } from "vue";
2
- import D from "../FieldPhone/click-outside.js";
3
- import "./Select.vue2.js";
4
- import E from "../../../../_virtual/_plugin-vue_export-helper.js";
5
- const L = {
6
- key: 0,
7
- class: "t-transp mn-r-small"
8
- }, A = { class: "w-100" }, F = ["onClick"], I = {
9
- key: 0,
10
- class: "w-100"
11
- }, P = {
12
- key: 0,
13
- class: "mn-t-thin invalid-feedback"
14
- }, Y = {
15
- __name: "Select",
16
- props: {
17
- label: String,
18
- select: [String, Object],
19
- property: String,
20
- placeholder: { type: String, default: "Please select an item" },
21
- options: { type: Array, default: () => [] },
22
- validation: Boolean
23
- },
24
- emits: ["update:select", "focus", "blur"],
25
- setup(o, { emit: C }) {
26
- const p = C;
27
- let O = D;
28
- const e = o, l = y(e.property ? f(e.select, e.property, e.options) : e.select), i = y(!1);
29
- function B() {
30
- i.value = !1;
31
- }
32
- function f(t, h, c) {
33
- for (const a of c)
34
- if (a[h] === t || a === t)
35
- return a;
36
- return null;
37
- }
38
- M(() => e.select, (t) => {
39
- l.value = e.property ? f(e.select, e.property, e.options) : e.select;
40
- });
41
- const V = N(() => e.select ? e.options.filter((t) => t !== e.select) : e.options), v = () => {
42
- i.value = !i.value, p(i.value ? "focus" : "blur");
43
- }, j = (t) => {
44
- l.value = t, v(), e.property ? p("update:select", l.value[e.property]) : p("update:select", l.value);
45
- };
46
- return (t, h) => {
47
- var c, a;
48
- return s(), n(k, null, [
49
- b((s(), n("div", {
50
- onClick: w(v, ["stop"]),
51
- class: _([t.$attrs.class, "cursor-pointer flex-v-center flex-nowrap flex pos-relative"])
52
- }, [
53
- o.label ? (s(), n("div", L, [
54
- u("span", null, d(o.label), 1)
55
- ])) : m("", !0),
56
- u("li", A, [
57
- u("span", null, d((c = l.value) != null && c.name ? (a = l.value) == null ? void 0 : a.name : l.value || o.placeholder), 1)
58
- ]),
59
- g(S, {
60
- mode: "out-in",
61
- name: "TransitionTranslateY"
62
- }, {
63
- default: x(() => [
64
- b(u("ul", {
65
- class: _([t.$attrs.class, "bs-black pos-absolute pos-t-100 pos-l-0 z-index-5 w-100 mn-t-thin"]),
66
- style: { "min-width": "max-content" }
67
- }, [
68
- (s(!0), n(k, null, T(V.value, (r) => (s(), n("li", {
69
- onClick: w((q) => j(r), ["stop"])
70
- }, [
71
- r ? (s(), n("span", I, d(r.name || r), 1)) : m("", !0)
72
- ], 8, F))), 256))
73
- ], 2), [
74
- [$, i.value]
75
- ])
76
- ]),
77
- _: 1
78
- })
79
- ], 2)), [
80
- [z(O), B]
81
- ]),
82
- g(S, {
83
- mode: "out-in",
84
- name: "fade"
85
- }, {
86
- default: x(() => [
87
- o.validation ? (s(), n("div", P, " * " + d(o.validation.message), 1)) : m("", !0)
88
- ]),
89
- _: 1
90
- })
91
- ], 64);
92
- };
93
- }
94
- }, Q = /* @__PURE__ */ E(Y, [["__scopeId", "data-v-67f55841"]]);
95
- export {
96
- Q as default
97
- };
1
+