@ozdao/prometheus-framework 0.2.200 → 0.2.202

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. package/dist/prometheus-framework/src/components/Address/Address.vue.cjs +113 -1
  2. package/dist/prometheus-framework/src/components/Address/Address.vue.cjs.map +1 -0
  3. package/dist/prometheus-framework/src/components/Address/Address.vue.js +76 -51
  4. package/dist/prometheus-framework/src/components/Address/Address.vue.js.map +1 -0
  5. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +133 -1
  6. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs.map +1 -0
  7. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +82 -44
  8. package/dist/prometheus-framework/src/components/Button/Button.vue2.js.map +1 -0
  9. package/dist/prometheus-framework/src/components/Chips/Chips.vue.cjs +32 -1
  10. package/dist/prometheus-framework/src/components/Chips/Chips.vue.cjs.map +1 -0
  11. package/dist/prometheus-framework/src/components/Chips/Chips.vue.js +20 -14
  12. package/dist/prometheus-framework/src/components/Chips/Chips.vue.js.map +1 -0
  13. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +64 -1
  14. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs.map +1 -0
  15. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +45 -38
  16. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js.map +1 -0
  17. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +121 -1
  18. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs.map +1 -0
  19. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +97 -76
  20. package/dist/prometheus-framework/src/components/Field/Field.vue2.js.map +1 -0
  21. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  23. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +169 -1
  24. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs.map +1 -0
  25. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +125 -82
  26. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js.map +1 -0
  27. package/dist/prometheus-framework/src/components/Menu/Menu.vue.cjs +17 -1
  28. package/dist/prometheus-framework/src/components/Menu/Menu.vue.cjs.map +1 -0
  29. package/dist/prometheus-framework/src/components/Menu/Menu.vue.js +11 -7
  30. package/dist/prometheus-framework/src/components/Menu/Menu.vue.js.map +1 -0
  31. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +92 -1
  32. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs.map +1 -0
  33. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +69 -54
  34. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js.map +1 -0
  35. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +127 -1
  36. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs.map +1 -0
  37. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +75 -51
  38. package/dist/prometheus-framework/src/components/Select/Select.vue2.js.map +1 -0
  39. package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.cjs +2 -2
  40. package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.js +2 -2
  41. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -1
  43. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +2 -2
  44. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.js +2 -2
  45. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.cjs +2 -2
  46. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.js +2 -2
  47. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +2 -2
  48. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.js +2 -2
  49. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs +2 -2
  50. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js +2 -2
  51. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.cjs +2 -2
  52. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.js +2 -2
  53. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  55. package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.js +1 -1
  57. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +2 -2
  58. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +2 -2
  59. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +2 -2
  60. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  61. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
  63. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  65. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  67. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  69. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +2 -2
  70. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  71. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +2 -2
  72. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
  73. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +2 -2
  74. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  75. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.js +1 -1
  77. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js +1 -1
  79. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs.map +1 -1
  80. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js.map +1 -1
  81. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.js +1 -1
  83. package/dist/prometheus-framework/src/modules/globals/views/components/partials/LocationSelection.vue.cjs +2 -2
  84. package/dist/prometheus-framework/src/modules/globals/views/components/partials/LocationSelection.vue.js +2 -2
  85. package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.js +1 -1
  87. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +3 -3
  88. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +3 -3
  89. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +2 -2
  90. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
  91. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +2 -2
  92. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -2
  93. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  95. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +3 -3
  96. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +3 -3
  97. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  98. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  99. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +4 -4
  100. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +4 -4
  101. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
  103. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  105. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
  107. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +2 -2
  108. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  109. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +2 -2
  110. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
  111. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +2 -2
  112. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  113. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +2 -2
  114. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
  115. package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.cjs +2 -2
  116. package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.js +2 -2
  117. package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.cjs +2 -2
  118. package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.js +2 -2
  119. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
  121. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  122. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  123. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  125. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  127. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  128. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
  129. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +2 -2
  130. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
  131. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  132. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  133. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +2 -2
  134. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
  135. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  136. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  137. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +2 -2
  138. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +2 -2
  139. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  140. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  141. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  142. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  143. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
  144. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
  145. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
  146. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +1 -1
  147. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +1 -1
  148. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +1 -1
  149. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +4 -4
  150. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +4 -4
  151. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +3 -3
  152. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
  153. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +2 -2
  154. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +2 -2
  155. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -1
  156. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
  157. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  158. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
  159. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  160. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +1 -1
  161. package/package.json +1 -1
  162. package/src/modules/globals/views/components/layouts/Client.vue +2 -2
@@ -1,77 +1,92 @@
1
- import { watch as y, openBlock as s, createBlock as i, Transition as l, withCtx as a, Teleport as k, createElementBlock as p, createVNode as m, createElementVNode as u, mergeProps as P, toDisplayString as b, createCommentVNode as n, renderSlot as g, normalizeClass as x } from "vue";
2
- import { useRoute as T, useRouter as $ } from "vue-router";
3
- import { useI18n as z } from "vue-i18n";
4
- import C from "../../modules/icons/navigation/IconCross.vue.js";
1
+ import { watch, openBlock, createBlock, Transition, withCtx, Teleport, createElementBlock, createVNode, createElementVNode, mergeProps, toDisplayString, createCommentVNode, renderSlot, normalizeClass } from "vue";
2
+ import { useRoute, useRouter } from "vue-router";
3
+ import { useI18n } from "vue-i18n";
4
+ import _sfc_main$1 from "../../modules/icons/navigation/IconCross.vue.js";
5
5
  /* empty css */
6
- const O = {
6
+ const _hoisted_1 = {
7
7
  key: "popup-content",
8
8
  class: "pd-small z-index-6 popup-wrapper"
9
- }, h = {
9
+ };
10
+ const _hoisted_2 = {
10
11
  key: 0,
11
12
  class: "mn-b-small"
12
- }, L = {
13
+ };
14
+ const _sfc_main = {
13
15
  __name: "Popup",
14
16
  props: {
15
17
  isPopupOpen: {
16
18
  type: Boolean,
17
- default: !1
19
+ default: false
18
20
  },
19
21
  style: String,
20
22
  title: String
21
23
  },
22
24
  emits: ["close-popup"],
23
- setup(e, { emit: c }) {
24
- const d = e, f = c;
25
- function r() {
26
- f("close-popup");
25
+ setup(__props, { emit: __emit }) {
26
+ const props = __props;
27
+ const emits = __emit;
28
+ function closePopup() {
29
+ emits("close-popup");
27
30
  }
28
- return y(() => d.isPopupOpen, (t) => {
29
- t ? document.body.classList.add("no-scroll") : document.body.classList.remove("no-scroll");
30
- }), T(), $(), z({
31
+ watch(() => props.isPopupOpen, (newVal) => {
32
+ if (newVal) {
33
+ document.body.classList.add("no-scroll");
34
+ } else {
35
+ document.body.classList.remove("no-scroll");
36
+ }
37
+ });
38
+ useRoute();
39
+ useRouter();
40
+ const text = {
31
41
  messages: {
32
42
  en: {},
33
43
  ru: {}
34
44
  }
35
- }), (t, o) => (s(), i(l, {
36
- name: "TransitionTranslateY",
37
- appear: ""
38
- }, {
39
- default: a(() => [
40
- e.isPopupOpen ? (s(), i(k, {
41
- key: 0,
42
- to: "body"
43
- }, [
44
- e.isPopupOpen ? (s(), p("div", O, [
45
- m(l, {
46
- name: "TransitionTranslateY",
47
- mode: "out-in"
48
- }, {
49
- default: a(() => [
50
- u("section", P({ class: "pos-relative z-index-4" }, t.$attrs, {
51
- class: t.$attrs.class
52
- }), [
53
- e.title ? (s(), p("h4", h, b(e.title), 1)) : n("", !0),
54
- m(C, {
55
- fill: "rgb(var(--white))",
56
- onClick: o[0] || (o[0] = (v) => r()),
57
- class: "cursor-pointer bg-second pd-micro radius-extra pos-absolute pos-t-0 pos-r-0 mn-t-semi mn-r-semi hover-scale-1 i-medium z-index-5"
58
- }),
59
- g(t.$slots, "default")
60
- ], 16)
61
- ]),
62
- _: 3
63
- }),
64
- u("div", {
65
- onClick: o[1] || (o[1] = (v) => r()),
66
- class: x([{ active: e.isPopupOpen === !0 }, "color-overlay z-index-3"])
67
- }, null, 2)
68
- ])) : n("", !0)
69
- ])) : n("", !0)
70
- ]),
71
- _: 3
72
- }));
45
+ };
46
+ useI18n(text);
47
+ return (_ctx, _cache) => {
48
+ return openBlock(), createBlock(Transition, {
49
+ name: "TransitionTranslateY",
50
+ appear: ""
51
+ }, {
52
+ default: withCtx(() => [
53
+ __props.isPopupOpen ? (openBlock(), createBlock(Teleport, {
54
+ key: 0,
55
+ to: "body"
56
+ }, [
57
+ __props.isPopupOpen ? (openBlock(), createElementBlock("div", _hoisted_1, [
58
+ createVNode(Transition, {
59
+ name: "TransitionTranslateY",
60
+ mode: "out-in"
61
+ }, {
62
+ default: withCtx(() => [
63
+ createElementVNode("section", mergeProps({ class: "pos-relative z-index-4" }, _ctx.$attrs, {
64
+ class: _ctx.$attrs.class
65
+ }), [
66
+ __props.title ? (openBlock(), createElementBlock("h4", _hoisted_2, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
67
+ createVNode(_sfc_main$1, {
68
+ fill: "rgb(var(--white))",
69
+ onClick: _cache[0] || (_cache[0] = ($event) => closePopup()),
70
+ class: "cursor-pointer bg-second pd-micro radius-extra pos-absolute pos-t-0 pos-r-0 mn-t-semi mn-r-semi hover-scale-1 i-medium z-index-5"
71
+ }),
72
+ renderSlot(_ctx.$slots, "default")
73
+ ], 16)
74
+ ]),
75
+ _: 3
76
+ }),
77
+ createElementVNode("div", {
78
+ onClick: _cache[1] || (_cache[1] = ($event) => closePopup()),
79
+ class: normalizeClass([{ "active": __props.isPopupOpen === true }, "color-overlay z-index-3"])
80
+ }, null, 2)
81
+ ])) : createCommentVNode("", true)
82
+ ])) : createCommentVNode("", true)
83
+ ]),
84
+ _: 3
85
+ });
86
+ };
73
87
  }
74
88
  };
75
89
  export {
76
- L as default
90
+ _sfc_main as default
77
91
  };
92
+ //# sourceMappingURL=Popup.vue2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Popup.vue2.js","sources":["../../../../../src/components/Popup/Popup.vue"],"sourcesContent":["<template>\n\n\t\t<transition name=\"TransitionTranslateY\" appear>\n\t\t\t\t<teleport to=\"body\" v-if=\"isPopupOpen\">\n\t\t\t\t\t<div v-if=\"isPopupOpen\" key=\"popup-content\" class=\"pd-small z-index-6 popup-wrapper\">\n\n\t\t\t\t\t\t<transition name=\"TransitionTranslateY\" mode=\"out-in\">\n\t\t\t\t\t\t\t<section class=\"pos-relative z-index-4\" v-bind=\"$attrs\" :class=\"$attrs.class\">\n\t\t\t\t\t\t\t\t\t<h4 v-if=\"title\" class=\"mn-b-small\">{{title}}</h4>\n\t\t\t\t\t\t\t\t\t<IconCross :fill=\"'rgb(var(--white))'\" @click=\"closePopup()\" class=\"cursor-pointer bg-second pd-micro radius-extra pos-absolute pos-t-0 pos-r-0 mn-t-semi mn-r-semi hover-scale-1 i-medium z-index-5\"/>\n\t\t\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t\t</section> \n\t\t\t\t\t\t</transition>\n\n\t\t\t\t\t\t<div \n\t\t\t\t\t\t\t@click=\"closePopup()\" \n\t\t\t\t\t :class=\"{'active':isPopupOpen === true}\" \n\t\t\t\t\t class=\"color-overlay z-index-3\">\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t</div>\n\t\t\t</teleport>\n\t\t</transition>\n\n</template>\n\n<script setup>\nimport { computed, watch, onMounted, ref, nextTick } from 'vue';\n// Import libs\nimport { useRoute, useRouter } from 'vue-router'\nimport { useI18n } from 'vue-i18n'\n// Icons\nimport IconCross from '@pf/src/modules/icons/navigation/IconCross.vue';\n// Define props\nconst props = defineProps({\n isPopupOpen: {\n \ttype: Boolean,\n\t default: false\n },\n style: String,\n title: String,\n});\nconst emits = defineEmits(['close-popup'])\n\nfunction closePopup() {\n emits(\"close-popup\");\n} \n\nwatch(() => props.isPopupOpen, (newVal) => {\n if (newVal) {\n document.body.classList.add('no-scroll');\n } else {\n document.body.classList.remove('no-scroll');\n }\n});\n\n// Accessing router and store\nconst route = useRoute()\nconst router = useRouter()\n// Localization\nconst text = {\n \tmessages: {\n\t en: {},\n\t ru: {}\n\t}\n}\nconst { t } = useI18n(text)\n</script>\n\n<style lang=\"scss\">\n\t.no-scroll {\n\t overflow: hidden;\n\t}\n\n\t.popup-wrapper {\n\t\tdisplay: flex;\n\t\tposition: fixed;\n\n\t\talign-items: center;\n\t\tjustify-content: center;\n\n\t\twidth: 100%;\n\t\theight: 100%;\n\n\t\tleft: 0;\n\t\ttop: 0;\n\n\t\tz-index: 40;\n\n\t\t.popup {\n\t\t\tposition: absolute;\n\t\t\theight: auto;\n\t\t\tpadding: 2rem;\n\t\t\tmin-width: 24rem;\n\t\t\tborder-radius: 2rem;\n\t\t\toverflow: hidden;\n\n\t\t\tcolor: white;\n\t\t\tbackground: black;\n\n\t\t\tz-index: 40;\n\t\t}\n\t}\n\n\t.color-overlay {\n\t\tdisplay: block;\n\t\tposition: fixed;\n\n\t\tleft: 0;\n\t\ttop: 0;\n\n\t\twidth: 100%;\n\t\theight: 100%;\n\n\t\tbackground: rgba(0,0,0,0.0);\n\t\tpointer-events: none;\n\n\t\ttransform: scale(1.5);\n\n\t\ttransition: all 0.5s cubic-bezier(.31,.79,.24,.92);\n\n\t\t&.active {\n\t\t\tbackground: rgba(#000,0.25);\n\t\t\tpointer-events: all;\n\t\t}\n\t}\n</style>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,UAAM,QAAQ;AAQd,UAAM,QAAQ;AAEd,aAAS,aAAa;AACpB,YAAM,aAAa;AAAA,IACrB;AAEA,UAAM,MAAM,MAAM,aAAa,CAAC,WAAW;AACzC,UAAI,QAAQ;AACV,iBAAS,KAAK,UAAU,IAAI,WAAW;AAAA,MAC3C,OAAS;AACL,iBAAS,KAAK,UAAU,OAAO,WAAW;AAAA,MAC3C;AAAA,IACH,CAAC;AAGa,aAAU;AACT,cAAW;AAE1B,UAAM,OAAO;AAAA,MACV,UAAU;AAAA,QACR,IAAI,CAAE;AAAA,QACN,IAAI,CAAE;AAAA,MACT;AAAA,IACF;AACc,YAAQ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1,127 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),y=require("../FieldPhone/click-outside.cjs");;/* empty css */const g=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),B={key:0,class:"t-transp mn-r-small"},b={class:"w-100"},w=["onClick"],S={key:0,class:"w-100"},_={key:0,class:"mn-t-thin invalid-feedback"},C={__name:"Select",props:{label:String,placeholder:{type:String,default:"Please select an item"},select:[String,Object],property:String,options:{type:Array,default:()=>[]},validation:Boolean},emits:["update:select","focus","blur"],setup(n,{emit:m}){let f=y.default;const i=m,t=n,a=e.ref(!1),o=e.ref(t.property?d(t.select,t.property,t.options):t.select),v=e.computed(()=>t.select?t.options.filter(l=>l!==t.select):t.options);e.watch(()=>t.select,l=>{o.value=t.property?d(t.select,t.property,t.options):t.select});const u=()=>{a.value=!a.value,i(a.value?"focus":"blur")};function k(){a.value=!1}const h=l=>{o.value=l,u(),t.property?i("update:select",o.value[t.property]):i("update:select",o.value)};function d(l,p,c){for(const s of c)if(s[p]===l||s===l)return s;return null}return(l,p)=>{var c,s;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.withDirectives((e.openBlock(),e.createElementBlock("div",{onClick:e.withModifiers(u,["stop"]),class:e.normalizeClass([l.$attrs.class,"cursor-pointer flex-v-center flex-nowrap flex pos-relative"])},[n.label?(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("span",null,e.toDisplayString(n.label),1)])):e.createCommentVNode("",!0),e.createElementVNode("li",b,[e.createElementVNode("span",null,e.toDisplayString((c=o.value)!=null&&c.name?(s=o.value)==null?void 0:s.name:o.value||n.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(v.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,w))),256))],2),[[e.vShow,a.value]])]),_:1})],2)),[[e.unref(f),k]]),e.createVNode(e.Transition,{mode:"out-in",name:"fade"},{default:e.withCtx(()=>[n.validation?(e.openBlock(),e.createElementBlock("div",_," * "+e.toDisplayString(n.validation.message),1)):e.createCommentVNode("",!0)]),_:1})],64)}}},E=g.default(C,[["__scopeId","data-v-bf25c24d"]]);exports.default=E;
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const vue = require("vue");
4
+ const clickOutside = require("../FieldPhone/click-outside.cjs");
5
+ ;/* empty css */
6
+ const _pluginVue_exportHelper = require("../../../../_virtual/_plugin-vue_export-helper.cjs");
7
+ const _hoisted_1 = {
8
+ key: 0,
9
+ class: "t-transp mn-r-small"
10
+ };
11
+ const _hoisted_2 = { class: "w-100" };
12
+ const _hoisted_3 = ["onClick"];
13
+ const _hoisted_4 = {
14
+ key: 0,
15
+ class: "w-100"
16
+ };
17
+ const _hoisted_5 = {
18
+ key: 0,
19
+ class: "mn-t-thin invalid-feedback"
20
+ };
21
+ const _sfc_main = {
22
+ __name: "Select",
23
+ props: {
24
+ label: String,
25
+ placeholder: { type: String, default: "Please select an item" },
26
+ select: [String, Object],
27
+ property: String,
28
+ options: { type: Array, default: () => [] },
29
+ validation: Boolean
30
+ },
31
+ emits: [
32
+ "update:select",
33
+ "focus",
34
+ "blur"
35
+ ],
36
+ setup(__props, { emit: __emit }) {
37
+ let vClickOutside = clickOutside.default;
38
+ const emit = __emit;
39
+ const props = __props;
40
+ const showMenu = vue.ref(false);
41
+ const optionsSelected = vue.ref(
42
+ props.property ? findObjectByValue(props.select, props.property, props.options) : props.select
43
+ );
44
+ const optionsListed = vue.computed(() => {
45
+ return props.select ? props.options.filter((option) => option !== props.select) : props.options;
46
+ });
47
+ vue.watch(() => props.select, (newSelect) => {
48
+ optionsSelected.value = props.property ? findObjectByValue(props.select, props.property, props.options) : props.select;
49
+ });
50
+ const toggleMenu = () => {
51
+ showMenu.value = !showMenu.value;
52
+ emit(showMenu.value ? "focus" : "blur");
53
+ };
54
+ function clickedOutside() {
55
+ showMenu.value = false;
56
+ }
57
+ const selectOption = (option) => {
58
+ optionsSelected.value = option;
59
+ toggleMenu();
60
+ if (props.property) {
61
+ emit("update:select", optionsSelected.value[props.property]);
62
+ } else {
63
+ emit("update:select", optionsSelected.value);
64
+ }
65
+ };
66
+ function findObjectByValue(value, property, objects) {
67
+ for (const object of objects) {
68
+ if (object[property] === value || object === value) {
69
+ return object;
70
+ }
71
+ }
72
+ return null;
73
+ }
74
+ return (_ctx, _cache) => {
75
+ var _a, _b;
76
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
77
+ vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
78
+ onClick: vue.withModifiers(toggleMenu, ["stop"]),
79
+ class: vue.normalizeClass([_ctx.$attrs.class, "cursor-pointer flex-v-center flex-nowrap flex pos-relative"])
80
+ }, [
81
+ __props.label ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
82
+ vue.createElementVNode("span", null, vue.toDisplayString(__props.label), 1)
83
+ ])) : vue.createCommentVNode("", true),
84
+ vue.createElementVNode("li", _hoisted_2, [
85
+ vue.createElementVNode("span", null, vue.toDisplayString(((_a = optionsSelected.value) == null ? void 0 : _a.name) ? (_b = optionsSelected.value) == null ? void 0 : _b.name : optionsSelected.value || __props.placeholder), 1)
86
+ ]),
87
+ vue.createVNode(vue.Transition, {
88
+ mode: "out-in",
89
+ name: "TransitionTranslateY"
90
+ }, {
91
+ default: vue.withCtx(() => [
92
+ vue.withDirectives(vue.createElementVNode("ul", {
93
+ class: vue.normalizeClass([_ctx.$attrs.class, "bs-black pos-absolute pos-t-100 pos-l-0 z-index-5 w-100 mn-t-thin"]),
94
+ style: { "min-width": "max-content" }
95
+ }, [
96
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(optionsListed.value, (option) => {
97
+ return vue.openBlock(), vue.createElementBlock("li", {
98
+ onClick: vue.withModifiers(($event) => selectOption(option), ["stop"])
99
+ }, [
100
+ option ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4, vue.toDisplayString(option.name || option), 1)) : vue.createCommentVNode("", true)
101
+ ], 8, _hoisted_3);
102
+ }), 256))
103
+ ], 2), [
104
+ [vue.vShow, showMenu.value]
105
+ ])
106
+ ]),
107
+ _: 1
108
+ })
109
+ ], 2)), [
110
+ [vue.unref(vClickOutside), clickedOutside]
111
+ ]),
112
+ vue.createVNode(vue.Transition, {
113
+ mode: "out-in",
114
+ name: "fade"
115
+ }, {
116
+ default: vue.withCtx(() => [
117
+ __props.validation ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, " * " + vue.toDisplayString(__props.validation.message), 1)) : vue.createCommentVNode("", true)
118
+ ]),
119
+ _: 1
120
+ })
121
+ ], 64);
122
+ };
123
+ }
124
+ };
125
+ const Select = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-bf25c24d"]]);
126
+ exports.default = Select;
127
+ //# sourceMappingURL=Select.vue2.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Select.vue2.cjs","sources":["../../../../../src/components/Select/Select.vue"],"sourcesContent":["<template>\n <!-- Input Wrapper -->\n <div \n @click.stop=\"toggleMenu\" \n v-click-outside=\"clickedOutside\" \n :class=\"$attrs.class\" \n class=\"cursor-pointer flex-v-center flex-nowrap flex pos-relative\"\n >\n <!-- Label -->\n <div v-if=\"label\" class=\"t-transp mn-r-small\">\n <span>{{label}}</span>\n </div>\n \n <!-- Input -->\n <li class=\"w-100\">\n <!-- Selected Value -->\n <span>\n {{ optionsSelected?.name ? optionsSelected?.name : optionsSelected || placeholder }}\n </span>\n </li>\n\n <!-- Dropdown menu -->\n <transition mode=\"out-in\" name=\"TransitionTranslateY\">\n <ul \n v-show=\"showMenu\" \n :class=\"$attrs.class\"\n class=\"bs-black pos-absolute pos-t-100 pos-l-0 z-index-5 w-100 mn-t-thin\"\n style=\"min-width: max-content;\"\n >\n <li @click.stop=\"selectOption(option)\" v-for=\"option in optionsListed\">\n <span v-if=\"option\" class=\"w-100\">\n {{ option.name || option }}\n </span>\n </li>\n </ul>\n </transition>\n </div>\n\n <!-- Validation -->\n <transition mode=\"out-in\" name=\"fade\">\n <div v-if=\"validation\" class=\"mn-t-thin invalid-feedback\">\n * {{validation.message}}\n </div>\n </transition>\n</template>\n\n<script setup>\nimport { ref, computed, watch } from 'vue'\n\nimport clickOutside from '../FieldPhone/click-outside';\n\nlet vClickOutside = clickOutside\n\nconst emit = defineEmits([\n 'update:select', \n 'focus', \n 'blur'\n])\n\nconst props = defineProps({\n label: String,\n placeholder: { type: String, default: 'Please select an item' },\n select: [String, Object],\n property: String,\n options: { type: Array, default: () => [] },\n validation: Boolean,\n})\n\nconst showMenu = ref(false)\n\nconst optionsSelected = ref(\n props.property \n ? findObjectByValue(props.select, props.property, props.options) \n : props.select\n)\n\nconst optionsListed = computed(() => {\n return props.select \n ? props.options.filter(option => option !== props.select) \n : props.options\n})\n\nwatch(() => props.select, (newSelect) => {\n optionsSelected.value = \n props.property \n ? findObjectByValue(props.select, props.property, props.options) \n : props.select;\n});\n\nconst toggleMenu = () => {\n showMenu.value = !showMenu.value\n\n emit(showMenu.value ? 'focus' : 'blur')\n}\n\nfunction clickedOutside () {\n showMenu.value = false\n}\n\nconst selectOption = option => {\n optionsSelected.value = option\n \n toggleMenu()\n\n if (props.property) { \n emit('update:select', optionsSelected.value[props.property])\n } else {\n emit('update:select', optionsSelected.value)\n }\n}\n\nfunction findObjectByValue (value, property, objects) {\n for (const object of objects) {\n if (object[property] === value || object === value) {\n return object;\n }\n }\n return null;\n}\n</script>\n\n<style lang=\"scss\" scoped>\n li {\n list-style-type: none;\n }\n\n ul li {\n line-height: 2;\n }\n</style>\n"],"names":["clickOutside","ref","computed","watch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDA,QAAI,gBAAgBA,aAAY;AAEhC,UAAM,OAAO;AAMb,UAAM,QAAQ;AASd,UAAM,WAAWC,IAAG,IAAC,KAAK;AAE1B,UAAM,kBAAkBA,IAAG;AAAA,MACzB,MAAM,WACJ,kBAAkB,MAAM,QAAQ,MAAM,UAAU,MAAM,OAAO,IAC7D,MAAM;AAAA,IACV;AAEA,UAAM,gBAAgBC,IAAQ,SAAC,MAAM;AACnC,aAAO,MAAM,SACX,MAAM,QAAQ,OAAO,YAAU,WAAW,MAAM,MAAM,IACtD,MAAM;AAAA,IACV,CAAC;AAEDC,QAAK,MAAC,MAAM,MAAM,QAAQ,CAAC,cAAc;AACvC,sBAAgB,QAChB,MAAM,WACJ,kBAAkB,MAAM,QAAQ,MAAM,UAAU,MAAM,OAAO,IAC7D,MAAM;AAAA,IACV,CAAC;AAED,UAAM,aAAa,MAAM;AACvB,eAAS,QAAQ,CAAC,SAAS;AAE3B,WAAK,SAAS,QAAQ,UAAU,MAAM;AAAA,IACxC;AAEA,aAAS,iBAAkB;AACzB,eAAS,QAAQ;AAAA,IACnB;AAEA,UAAM,eAAe,YAAU;AAC7B,sBAAgB,QAAQ;AAExB,iBAAY;AAEZ,UAAI,MAAM,UAAU;AAClB,aAAK,iBAAiB,gBAAgB,MAAM,MAAM,QAAQ,CAAC;AAAA,MAC/D,OAAS;AACL,aAAK,iBAAiB,gBAAgB,KAAK;AAAA,MAC5C;AAAA,IACH;AAEA,aAAS,kBAAmB,OAAO,UAAU,SAAS;AACpD,iBAAW,UAAU,SAAS;AAC5B,YAAI,OAAO,QAAQ,MAAM,SAAS,WAAW,OAAO;AAClD,iBAAO;AAAA,QACR;AAAA,MACF;AACD,aAAO;AAAA,IACT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,17 +1,22 @@
1
- import { ref as y, computed as M, watch as N, openBlock as s, createElementBlock as n, Fragment as b, withDirectives as k, withModifiers as w, normalizeClass as S, createElementVNode as u, toDisplayString as d, createCommentVNode as m, createVNode as _, Transition as g, withCtx as x, renderList as T, vShow as $, unref as z } from "vue";
2
- import D from "../FieldPhone/click-outside.js";
1
+ import { ref, computed, watch, openBlock, createElementBlock, Fragment, withDirectives, withModifiers, normalizeClass, createElementVNode, toDisplayString, createCommentVNode, createVNode, Transition, withCtx, renderList, vShow, unref } from "vue";
2
+ import clickOutside from "../FieldPhone/click-outside.js";
3
3
  /* empty css */
4
- import E from "../../../../_virtual/_plugin-vue_export-helper.js";
5
- const L = {
4
+ import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.js";
5
+ const _hoisted_1 = {
6
6
  key: 0,
7
7
  class: "t-transp mn-r-small"
8
- }, A = { class: "w-100" }, F = ["onClick"], I = {
8
+ };
9
+ const _hoisted_2 = { class: "w-100" };
10
+ const _hoisted_3 = ["onClick"];
11
+ const _hoisted_4 = {
9
12
  key: 0,
10
13
  class: "w-100"
11
- }, P = {
14
+ };
15
+ const _hoisted_5 = {
12
16
  key: 0,
13
17
  class: "mn-t-thin invalid-feedback"
14
- }, Y = {
18
+ };
19
+ const _sfc_main = {
15
20
  __name: "Select",
16
21
  props: {
17
22
  label: String,
@@ -26,78 +31,97 @@ const L = {
26
31
  "focus",
27
32
  "blur"
28
33
  ],
29
- setup(o, { emit: C }) {
30
- let O = D;
31
- const p = C, e = o, c = y(!1), l = y(
32
- e.property ? v(e.select, e.property, e.options) : e.select
33
- ), B = M(() => e.select ? e.options.filter((t) => t !== e.select) : e.options);
34
- N(() => e.select, (t) => {
35
- l.value = e.property ? v(e.select, e.property, e.options) : e.select;
34
+ setup(__props, { emit: __emit }) {
35
+ let vClickOutside = clickOutside;
36
+ const emit = __emit;
37
+ const props = __props;
38
+ const showMenu = ref(false);
39
+ const optionsSelected = ref(
40
+ props.property ? findObjectByValue(props.select, props.property, props.options) : props.select
41
+ );
42
+ const optionsListed = computed(() => {
43
+ return props.select ? props.options.filter((option) => option !== props.select) : props.options;
36
44
  });
37
- const f = () => {
38
- c.value = !c.value, p(c.value ? "focus" : "blur");
45
+ watch(() => props.select, (newSelect) => {
46
+ optionsSelected.value = props.property ? findObjectByValue(props.select, props.property, props.options) : props.select;
47
+ });
48
+ const toggleMenu = () => {
49
+ showMenu.value = !showMenu.value;
50
+ emit(showMenu.value ? "focus" : "blur");
39
51
  };
40
- function V() {
41
- c.value = !1;
52
+ function clickedOutside() {
53
+ showMenu.value = false;
42
54
  }
43
- const j = (t) => {
44
- l.value = t, f(), e.property ? p("update:select", l.value[e.property]) : p("update:select", l.value);
55
+ const selectOption = (option) => {
56
+ optionsSelected.value = option;
57
+ toggleMenu();
58
+ if (props.property) {
59
+ emit("update:select", optionsSelected.value[props.property]);
60
+ } else {
61
+ emit("update:select", optionsSelected.value);
62
+ }
45
63
  };
46
- function v(t, h, i) {
47
- for (const a of i)
48
- if (a[h] === t || a === t)
49
- return a;
64
+ function findObjectByValue(value, property, objects) {
65
+ for (const object of objects) {
66
+ if (object[property] === value || object === value) {
67
+ return object;
68
+ }
69
+ }
50
70
  return null;
51
71
  }
52
- return (t, h) => {
53
- var i, a;
54
- return s(), n(b, null, [
55
- k((s(), n("div", {
56
- onClick: w(f, ["stop"]),
57
- class: S([t.$attrs.class, "cursor-pointer flex-v-center flex-nowrap flex pos-relative"])
72
+ return (_ctx, _cache) => {
73
+ var _a, _b;
74
+ return openBlock(), createElementBlock(Fragment, null, [
75
+ withDirectives((openBlock(), createElementBlock("div", {
76
+ onClick: withModifiers(toggleMenu, ["stop"]),
77
+ class: normalizeClass([_ctx.$attrs.class, "cursor-pointer flex-v-center flex-nowrap flex pos-relative"])
58
78
  }, [
59
- o.label ? (s(), n("div", L, [
60
- u("span", null, d(o.label), 1)
61
- ])) : m("", !0),
62
- u("li", A, [
63
- u("span", null, d((i = l.value) != null && i.name ? (a = l.value) == null ? void 0 : a.name : l.value || o.placeholder), 1)
79
+ __props.label ? (openBlock(), createElementBlock("div", _hoisted_1, [
80
+ createElementVNode("span", null, toDisplayString(__props.label), 1)
81
+ ])) : createCommentVNode("", true),
82
+ createElementVNode("li", _hoisted_2, [
83
+ createElementVNode("span", null, toDisplayString(((_a = optionsSelected.value) == null ? void 0 : _a.name) ? (_b = optionsSelected.value) == null ? void 0 : _b.name : optionsSelected.value || __props.placeholder), 1)
64
84
  ]),
65
- _(g, {
85
+ createVNode(Transition, {
66
86
  mode: "out-in",
67
87
  name: "TransitionTranslateY"
68
88
  }, {
69
- default: x(() => [
70
- k(u("ul", {
71
- class: S([t.$attrs.class, "bs-black pos-absolute pos-t-100 pos-l-0 z-index-5 w-100 mn-t-thin"]),
89
+ default: withCtx(() => [
90
+ withDirectives(createElementVNode("ul", {
91
+ class: normalizeClass([_ctx.$attrs.class, "bs-black pos-absolute pos-t-100 pos-l-0 z-index-5 w-100 mn-t-thin"]),
72
92
  style: { "min-width": "max-content" }
73
93
  }, [
74
- (s(!0), n(b, null, T(B.value, (r) => (s(), n("li", {
75
- onClick: w((q) => j(r), ["stop"])
76
- }, [
77
- r ? (s(), n("span", I, d(r.name || r), 1)) : m("", !0)
78
- ], 8, F))), 256))
94
+ (openBlock(true), createElementBlock(Fragment, null, renderList(optionsListed.value, (option) => {
95
+ return openBlock(), createElementBlock("li", {
96
+ onClick: withModifiers(($event) => selectOption(option), ["stop"])
97
+ }, [
98
+ option ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(option.name || option), 1)) : createCommentVNode("", true)
99
+ ], 8, _hoisted_3);
100
+ }), 256))
79
101
  ], 2), [
80
- [$, c.value]
102
+ [vShow, showMenu.value]
81
103
  ])
82
104
  ]),
83
105
  _: 1
84
106
  })
85
107
  ], 2)), [
86
- [z(O), V]
108
+ [unref(vClickOutside), clickedOutside]
87
109
  ]),
88
- _(g, {
110
+ createVNode(Transition, {
89
111
  mode: "out-in",
90
112
  name: "fade"
91
113
  }, {
92
- default: x(() => [
93
- o.validation ? (s(), n("div", P, " * " + d(o.validation.message), 1)) : m("", !0)
114
+ default: withCtx(() => [
115
+ __props.validation ? (openBlock(), createElementBlock("div", _hoisted_5, " * " + toDisplayString(__props.validation.message), 1)) : createCommentVNode("", true)
94
116
  ]),
95
117
  _: 1
96
118
  })
97
119
  ], 64);
98
120
  };
99
121
  }
100
- }, Q = /* @__PURE__ */ E(Y, [["__scopeId", "data-v-bf25c24d"]]);
122
+ };
123
+ const Select = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-bf25c24d"]]);
101
124
  export {
102
- Q as default
125
+ Select as default
103
126
  };
127
+ //# sourceMappingURL=Select.vue2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Select.vue2.js","sources":["../../../../../src/components/Select/Select.vue"],"sourcesContent":["<template>\n <!-- Input Wrapper -->\n <div \n @click.stop=\"toggleMenu\" \n v-click-outside=\"clickedOutside\" \n :class=\"$attrs.class\" \n class=\"cursor-pointer flex-v-center flex-nowrap flex pos-relative\"\n >\n <!-- Label -->\n <div v-if=\"label\" class=\"t-transp mn-r-small\">\n <span>{{label}}</span>\n </div>\n \n <!-- Input -->\n <li class=\"w-100\">\n <!-- Selected Value -->\n <span>\n {{ optionsSelected?.name ? optionsSelected?.name : optionsSelected || placeholder }}\n </span>\n </li>\n\n <!-- Dropdown menu -->\n <transition mode=\"out-in\" name=\"TransitionTranslateY\">\n <ul \n v-show=\"showMenu\" \n :class=\"$attrs.class\"\n class=\"bs-black pos-absolute pos-t-100 pos-l-0 z-index-5 w-100 mn-t-thin\"\n style=\"min-width: max-content;\"\n >\n <li @click.stop=\"selectOption(option)\" v-for=\"option in optionsListed\">\n <span v-if=\"option\" class=\"w-100\">\n {{ option.name || option }}\n </span>\n </li>\n </ul>\n </transition>\n </div>\n\n <!-- Validation -->\n <transition mode=\"out-in\" name=\"fade\">\n <div v-if=\"validation\" class=\"mn-t-thin invalid-feedback\">\n * {{validation.message}}\n </div>\n </transition>\n</template>\n\n<script setup>\nimport { ref, computed, watch } from 'vue'\n\nimport clickOutside from '../FieldPhone/click-outside';\n\nlet vClickOutside = clickOutside\n\nconst emit = defineEmits([\n 'update:select', \n 'focus', \n 'blur'\n])\n\nconst props = defineProps({\n label: String,\n placeholder: { type: String, default: 'Please select an item' },\n select: [String, Object],\n property: String,\n options: { type: Array, default: () => [] },\n validation: Boolean,\n})\n\nconst showMenu = ref(false)\n\nconst optionsSelected = ref(\n props.property \n ? findObjectByValue(props.select, props.property, props.options) \n : props.select\n)\n\nconst optionsListed = computed(() => {\n return props.select \n ? props.options.filter(option => option !== props.select) \n : props.options\n})\n\nwatch(() => props.select, (newSelect) => {\n optionsSelected.value = \n props.property \n ? findObjectByValue(props.select, props.property, props.options) \n : props.select;\n});\n\nconst toggleMenu = () => {\n showMenu.value = !showMenu.value\n\n emit(showMenu.value ? 'focus' : 'blur')\n}\n\nfunction clickedOutside () {\n showMenu.value = false\n}\n\nconst selectOption = option => {\n optionsSelected.value = option\n \n toggleMenu()\n\n if (props.property) { \n emit('update:select', optionsSelected.value[props.property])\n } else {\n emit('update:select', optionsSelected.value)\n }\n}\n\nfunction findObjectByValue (value, property, objects) {\n for (const object of objects) {\n if (object[property] === value || object === value) {\n return object;\n }\n }\n return null;\n}\n</script>\n\n<style lang=\"scss\" scoped>\n li {\n list-style-type: none;\n }\n\n ul li {\n line-height: 2;\n }\n</style>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDA,QAAI,gBAAgB;AAEpB,UAAM,OAAO;AAMb,UAAM,QAAQ;AASd,UAAM,WAAW,IAAI,KAAK;AAE1B,UAAM,kBAAkB;AAAA,MACtB,MAAM,WACJ,kBAAkB,MAAM,QAAQ,MAAM,UAAU,MAAM,OAAO,IAC7D,MAAM;AAAA,IACV;AAEA,UAAM,gBAAgB,SAAS,MAAM;AACnC,aAAO,MAAM,SACX,MAAM,QAAQ,OAAO,YAAU,WAAW,MAAM,MAAM,IACtD,MAAM;AAAA,IACV,CAAC;AAED,UAAM,MAAM,MAAM,QAAQ,CAAC,cAAc;AACvC,sBAAgB,QAChB,MAAM,WACJ,kBAAkB,MAAM,QAAQ,MAAM,UAAU,MAAM,OAAO,IAC7D,MAAM;AAAA,IACV,CAAC;AAED,UAAM,aAAa,MAAM;AACvB,eAAS,QAAQ,CAAC,SAAS;AAE3B,WAAK,SAAS,QAAQ,UAAU,MAAM;AAAA,IACxC;AAEA,aAAS,iBAAkB;AACzB,eAAS,QAAQ;AAAA,IACnB;AAEA,UAAM,eAAe,YAAU;AAC7B,sBAAgB,QAAQ;AAExB,iBAAY;AAEZ,UAAI,MAAM,UAAU;AAClB,aAAK,iBAAiB,gBAAgB,MAAM,MAAM,QAAQ,CAAC;AAAA,MAC/D,OAAS;AACL,aAAK,iBAAiB,gBAAgB,KAAK;AAAA,MAC5C;AAAA,IACH;AAEA,aAAS,kBAAmB,OAAO,UAAU,SAAS;AACpD,iBAAW,UAAU,SAAS;AAC5B,YAAI,OAAO,QAAQ,MAAM,SAAS,WAAW,OAAO;AAClD,iBAAO;AAAA,QACR;AAAA,MACF;AACD,aAAO;AAAA,IACT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,9 +2,9 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
4
  ;/* empty css */
5
- ;/* empty css */
5
+ ;/* empty css */
6
+ ;/* empty css */
6
7
  ;/* empty css */
7
- ;/* empty css */
8
8
  require("vue-i18n");
9
9
  ;/* empty css */
10
10
  const vueRouter = require("vue-router");
@@ -1,8 +1,8 @@
1
1
  import { ref, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, Transition, createBlock, resolveDynamicComponent, createElementVNode } from "vue";
2
2
  /* empty css */
3
- /* empty css */
3
+ /* empty css */
4
+ /* empty css */
4
5
  /* empty css */
5
- /* empty css */
6
6
  import "vue-i18n";
7
7
  /* empty css */
8
8
  import { useRoute, useRouter } from "vue-router";
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
- ;/* empty css */
4
+ ;/* empty css */
5
5
  const vueRouter = require("vue-router");
6
6
  const vueI18n = require("vue-i18n");
7
7
  const auth = require("../../store/auth.cjs");
@@ -1,5 +1,5 @@
1
1
  import { reactive, watch, ref, openBlock, createElementBlock, createElementVNode, toDisplayString, unref, withDirectives, vModelText } from "vue";
2
- /* empty css */
2
+ /* empty css */
3
3
  import { useRoute, useRouter } from "vue-router";
4
4
  import { useI18n } from "vue-i18n";
5
5
  import { state as state$1 } from "../../store/auth.js";
@@ -2,8 +2,8 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
4
  ;/* empty css */
5
- const Field = require("../../../../../components/Field/Field.vue.cjs");
6
- const Button = require("../../../../../components/Button/Button.vue.cjs");
5
+ const Field = require("../../../../../components/Field/Field.vue2.cjs");
6
+ const Button = require("../../../../../components/Button/Button.vue2.cjs");
7
7
  const vueRouter = require("vue-router");
8
8
  const vueI18n = require("vue-i18n");
9
9
  const auth = require("../../store/auth.cjs");
@@ -1,7 +1,7 @@
1
1
  import { ref, openBlock, createElementBlock, createElementVNode, toDisplayString, unref, createVNode, createTextVNode, createCommentVNode, withCtx } from "vue";
2
2
  /* empty css */
3
- import Field from "../../../../../components/Field/Field.vue.js";
4
- import _sfc_main$1 from "../../../../../components/Button/Button.vue.js";
3
+ import Field from "../../../../../components/Field/Field.vue2.js";
4
+ import _sfc_main$1 from "../../../../../components/Button/Button.vue2.js";
5
5
  import { useRoute, useRouter } from "vue-router";
6
6
  import { useI18n } from "vue-i18n";
7
7
  import { state, actions } from "../../store/auth.js";
@@ -2,8 +2,8 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
4
  ;/* empty css */
5
- const Field = require("../../../../../components/Field/Field.vue.cjs");
6
- const Button = require("../../../../../components/Button/Button.vue.cjs");
5
+ const Field = require("../../../../../components/Field/Field.vue2.cjs");
6
+ const Button = require("../../../../../components/Button/Button.vue2.cjs");
7
7
  const vueRouter = require("vue-router");
8
8
  const auth = require("../../store/auth.cjs");
9
9
  const invites = require("../../../../organizations/store/invites.cjs");
@@ -1,7 +1,7 @@
1
1
  import { ref, onMounted, openBlock, createElementBlock, createElementVNode, createVNode, withCtx } from "vue";
2
2
  /* empty css */
3
- import Field from "../../../../../components/Field/Field.vue.js";
4
- import _sfc_main$1 from "../../../../../components/Button/Button.vue.js";
3
+ import Field from "../../../../../components/Field/Field.vue2.js";
4
+ import _sfc_main$1 from "../../../../../components/Button/Button.vue2.js";
5
5
  import { useRoute, useRouter } from "vue-router";
6
6
  import { state, actions as actions$1 } from "../../store/auth.js";
7
7
  import { actions } from "../../../../organizations/store/invites.js";
@@ -2,9 +2,9 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
4
  const Tab = require("../../../../../components/Tab/Tab.vue2.cjs");
5
- const Field = require("../../../../../components/Field/Field.vue.cjs");
5
+ const Field = require("../../../../../components/Field/Field.vue2.cjs");
6
6
  const FieldPhone = require("../../../../../components/FieldPhone/FieldPhone.vue.cjs");
7
- const Button = require("../../../../../components/Button/Button.vue.cjs");
7
+ const Button = require("../../../../../components/Button/Button.vue2.cjs");
8
8
  const vueRouter = require("vue-router");
9
9
  const vueI18n = require("vue-i18n");
10
10
  const ResetPassword = require("../../localization/ResetPassword.json.cjs");
@@ -1,8 +1,8 @@
1
1
  import { ref, openBlock, createElementBlock, createElementVNode, toDisplayString, unref, createVNode, Transition, withCtx, createCommentVNode, createTextVNode } from "vue";
2
2
  import _sfc_main$1 from "../../../../../components/Tab/Tab.vue2.js";
3
- import Field from "../../../../../components/Field/Field.vue.js";
3
+ import Field from "../../../../../components/Field/Field.vue2.js";
4
4
  import _sfc_main$2 from "../../../../../components/FieldPhone/FieldPhone.vue.js";
5
- import _sfc_main$3 from "../../../../../components/Button/Button.vue.js";
5
+ import _sfc_main$3 from "../../../../../components/Button/Button.vue2.js";
6
6
  import { useRoute, useRouter } from "vue-router";
7
7
  import { useI18n } from "vue-i18n";
8
8
  import text from "../../localization/ResetPassword.json.js";
@@ -2,9 +2,9 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
4
  const Tab = require("../../../../../components/Tab/Tab.vue2.cjs");
5
- const Field = require("../../../../../components/Field/Field.vue.cjs");
5
+ const Field = require("../../../../../components/Field/Field.vue2.cjs");
6
6
  const FieldPhone = require("../../../../../components/FieldPhone/FieldPhone.vue.cjs");
7
- const Button = require("../../../../../components/Button/Button.vue.cjs");
7
+ const Button = require("../../../../../components/Button/Button.vue2.cjs");
8
8
  const vueRouter = require("vue-router");
9
9
  const vueI18n = require("vue-i18n");
10
10
  const SignIn = require("../../localization/SignIn.json.cjs");