@ozdao/prometheus-framework 0.2.53 → 0.2.55

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. package/dist/main-180a9315.js +91 -0
  2. package/dist/main-3b7bd446.mjs +13631 -0
  3. package/dist/main-B7GT1EB5.js +91 -0
  4. package/dist/main-Im8ovDCi.mjs +13609 -0
  5. package/dist/main-MjvO1l5U.js +91 -0
  6. package/dist/main-N_5Jg8Gx.mjs +13693 -0
  7. package/dist/main.css +1 -1
  8. package/dist/organizations.server.js +17 -3
  9. package/dist/organizations.server.mjs +17 -3
  10. package/dist/products.server.js +1 -1
  11. package/dist/products.server.mjs +1 -1
  12. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.cjs +1 -1
  13. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.js +20 -20
  14. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  15. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +28 -25
  16. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  17. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +70 -2
  18. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  19. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +2 -70
  20. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  21. package/dist/prometheus-framework/src/components/Select/Select.vue.js +95 -2
  22. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  23. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +2 -95
  24. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  25. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +57 -77
  26. package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs +1 -1
  27. package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js +1 -1
  28. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  29. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  30. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  31. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  32. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -1
  33. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +65 -2
  34. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -5
  35. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +2 -65
  36. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  37. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  38. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  40. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +98 -94
  42. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +2 -2
  44. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.js +59 -52
  46. package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.js +1 -1
  48. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  50. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
  52. package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.js +8 -13
  54. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  56. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +11 -2
  58. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +2 -11
  60. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +53 -77
  62. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
  63. package/dist/prometheus-framework/src/modules/orders/store/orders.js +42 -32
  64. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  65. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
  66. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  68. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  69. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
  70. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  72. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  74. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  76. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  78. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
  80. package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +5 -3
  82. package/dist/prometheus-framework/src/modules/organizations/router/organizations.router.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/organizations/router/organizations.router.js +20 -5
  84. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  86. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  87. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  88. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  89. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  90. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  91. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  92. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  94. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  96. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  98. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  99. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +61 -75
  100. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
  101. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +2 -2
  102. package/dist/prometheus-framework.cjs.js +1 -1
  103. package/dist/prometheus-framework.es.js +1 -1
  104. package/dist/style.css +1 -1
  105. package/dist/web-8b404cc2.js +1 -0
  106. package/dist/web-e9b09dc6.mjs +55 -0
  107. package/dist/web-i-suCpLM.mjs +55 -0
  108. package/dist/web-ktBiiov5.js +1 -0
  109. package/dist/web-vB7UhMOt.js +1 -0
  110. package/dist/web-xvjLzsHu.mjs +55 -0
  111. package/package.json +1 -1
  112. package/src/components/EditImages/EditImages.vue +1 -1
  113. package/src/components/Feed/Feed.vue +26 -0
  114. package/src/components/Field/Field.vue +5 -0
  115. package/src/components/LocationSelection/LocationSelection.vue +2 -2
  116. package/src/modules/backoffice/components/pages/Dashboard.vue +4 -25
  117. package/src/modules/backoffice/router/admin.js +0 -14
  118. package/src/modules/backoffice/router/backoffice.js +4 -1
  119. package/src/modules/events/components/pages/EditEvent.vue +10 -6
  120. package/src/modules/events/components/sections/HeroEvent.vue +12 -2
  121. package/src/modules/events/components/sections/SectionPreviousEvents.vue +1 -1
  122. package/src/modules/gallery/models/photo.model.js +5 -1
  123. package/src/modules/globals/components/blocks/BlockSearch.vue +4 -3
  124. package/src/modules/globals/store/globals.js +33 -2
  125. package/src/modules/landing/components/sections/MobileApp.vue +2 -6
  126. package/src/modules/orders/components/blocks/CardOrderItem.vue +24 -3
  127. package/src/modules/orders/components/blocks/StatusHistory.vue +91 -31
  128. package/src/modules/orders/components/pages/EditOrder.vue +114 -125
  129. package/src/modules/orders/components/pages/FormOrder.vue +53 -15
  130. package/src/modules/orders/components/pages/Order.vue +2 -2
  131. package/src/modules/orders/components/sections/FormClientDetails.vue +63 -0
  132. package/src/modules/orders/components/sections/FormDelivery.vue +72 -0
  133. package/src/modules/orders/components/sections/FormPayment.vue +27 -0
  134. package/src/modules/orders/controllers/orders.controller.js +63 -49
  135. package/src/modules/orders/models/order.model.js +9 -13
  136. package/src/modules/orders/routes/orders.routes.js +6 -20
  137. package/src/modules/orders/store/orders.js +24 -12
  138. package/src/modules/organizations/components/pages/Organization.vue +1 -0
  139. package/src/modules/organizations/controllers/organizations.controller.js +28 -9
  140. package/src/modules/organizations/router/organizations.js +4 -1
  141. package/src/modules/organizations/router/organizations.router.js +18 -2
  142. package/src/modules/products/components/blocks/CardPosition.vue +7 -7
  143. package/src/modules/products/controllers/products.controller.js +3 -2
  144. package/src/modules/products/store/products.js +2 -0
  145. package/src/modules/users/components/pages/Profile.vue +2 -2
  146. package/src/modules/orders/components/sections/FormOrderDetails.vue +0 -220
@@ -200,16 +200,30 @@ const controllerFactory$4 = (db) => {
200
200
  lat = location.coordinates[1];
201
201
  userLocation.coordinates = [lng, lat];
202
202
  }
203
- matchConditions.push({
203
+ const earthRadiusKm = 6378.1;
204
+ let radius = null;
205
+ if (locationRadius) {
206
+ radius = parseFloat(locationRadius) / earthRadiusKm;
207
+ } else if (city) {
208
+ radius = 500 / earthRadiusKm;
209
+ } else if (state) {
210
+ radius = 1e3 / earthRadiusKm;
211
+ } else {
212
+ radius = null;
213
+ }
214
+ const geoWithinCondition = {
204
215
  "spots.location.coordinates": {
205
216
  $geoWithin: {
206
217
  $centerSphere: [
207
218
  [parseFloat(lng), parseFloat(lat)],
208
- (locationRadius || 50) / 6378.1
219
+ radius
209
220
  ]
210
221
  }
211
222
  }
212
- });
223
+ };
224
+ if (radius !== null) {
225
+ matchConditions.push(geoWithinCondition);
226
+ }
213
227
  }
214
228
  const matchStage = matchConditions.length > 0 ? { $match: { $and: matchConditions } } : null;
215
229
  const stages = [
@@ -199,16 +199,30 @@ const controllerFactory$4 = (db) => {
199
199
  lat = location.coordinates[1];
200
200
  userLocation.coordinates = [lng, lat];
201
201
  }
202
- matchConditions.push({
202
+ const earthRadiusKm = 6378.1;
203
+ let radius = null;
204
+ if (locationRadius) {
205
+ radius = parseFloat(locationRadius) / earthRadiusKm;
206
+ } else if (city) {
207
+ radius = 500 / earthRadiusKm;
208
+ } else if (state) {
209
+ radius = 1e3 / earthRadiusKm;
210
+ } else {
211
+ radius = null;
212
+ }
213
+ const geoWithinCondition = {
203
214
  "spots.location.coordinates": {
204
215
  $geoWithin: {
205
216
  $centerSphere: [
206
217
  [parseFloat(lng), parseFloat(lat)],
207
- (locationRadius || 50) / 6378.1
218
+ radius
208
219
  ]
209
220
  }
210
221
  }
211
- });
222
+ };
223
+ if (radius !== null) {
224
+ matchConditions.push(geoWithinCondition);
225
+ }
212
226
  }
213
227
  const matchStage = matchConditions.length > 0 ? { $match: { $and: matchConditions } } : null;
214
228
  const stages = [
@@ -233,8 +233,8 @@ var leftover_model = (mongoose) => {
233
233
  const leftover_model$1 = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(leftover_model);
234
234
  const ObjectId = require$$0.Types.ObjectId;
235
235
  const OpenAI = require$$3;
236
- console.log(process.env.OPENAI_API_KEY);
237
236
  const openai = new OpenAI({
237
+ organization: process.env.OPENAI_ORG_KEY,
238
238
  apiKey: process.env.OPENAI_API_KEY
239
239
  });
240
240
  const controllerFactory$5 = (db) => {
@@ -231,8 +231,8 @@ var leftover_model = (mongoose) => {
231
231
  const leftover_model$1 = /* @__PURE__ */ getDefaultExportFromCjs(leftover_model);
232
232
  const ObjectId = require$$0.Types.ObjectId;
233
233
  const OpenAI = require$$3;
234
- console.log(process.env.OPENAI_API_KEY);
235
234
  const openai = new OpenAI({
235
+ organization: process.env.OPENAI_ORG_KEY,
236
236
  apiKey: process.env.OPENAI_API_KEY
237
237
  });
238
238
  const controllerFactory$5 = (db) => {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../../../node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs"),u=require("../UploadImageMultiple/UploadImageMultiple.vue.cjs"),v=require("../../modules/icons/navigation/IconCross.vue.cjs");require("./EditImages.vue2.cjs");const f={class:"flex-nowrap flex gap-small"},x={class:"pos-relative"},h=["src"],k={key:1,class:"i-extra uppercase flex-center flex radius-small o-hidden br-solid br-main br-2px pd-small"},_={__name:"EditImages",props:{images:Array,text:Object,options:Object,uploadPath:{type:Object,default:"unsorted"}},emits:["update:images"],setup(c,{emit:i}){const a=c,d=i,t=e.ref([...a.images]);e.watchEffect(()=>{t.value=[...a.images]});const o=()=>{d("update:images",t.value)},r=l=>{t.value=[...t.value,...l],o()},p=l=>{t.value.splice(l,1),o()};return(l,n)=>(e.openBlock(),e.createElementBlock("div",f,[t.value.length>0?(e.openBlock(),e.createBlock(e.unref(g.VueDraggableNext),{key:0,class:"gap-small flex dragArea list-group w-full",modelValue:t.value,"onUpdate:modelValue":n[0]||(n[0]=s=>t.value=s),onChange:o},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(s,m)=>(e.openBlock(),e.createElementBlock("div",x,[e.createElementVNode("img",{class:"i-extra radius-small o-hidden",src:(l.FILE_SERVER_URL||"")+s},null,8,h),e.createVNode(v.default,{onClick:b=>p(m),class:"cursor-pointer pos-absolute t-center flex-center flex radius-extra i-medium bg-red pos-t-10-negative pos-r-10-negative pd-micro"},null,8,["onClick"])]))),256))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),t.value.length>0?(e.openBlock(),e.createElementBlock("div",k,[e.createVNode(u.default,{"onUpdate:images":r,text:"Add",options:{showText:!1},uploadPath:"photos",class:"radius-big"})])):e.createCommentVNode("",!0),t.value.length<1?(e.openBlock(),e.createBlock(u.default,{key:2,"onUpdate:images":r,uploadPath:a.uploadPath,text:a.text,options:a.options,class:"w-100 pd-extra"},null,8,["uploadPath","text","options"])):e.createCommentVNode("",!0)]))}};exports.default=_;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../../../node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs"),c=require("../UploadImageMultiple/UploadImageMultiple.vue.cjs"),f=require("../../modules/icons/navigation/IconCross.vue.cjs");require("./EditImages.vue2.cjs");const v={class:"flex-nowrap flex gap-small"},x={class:"pos-relative"},h=["src"],k={key:1,class:"i-extra uppercase flex-center flex radius-small o-hidden br-solid br-main br-2px pd-small"},_={__name:"EditImages",props:{images:Array,text:Object,options:Object,uploadPath:{type:Object,default:"unsorted"}},emits:["update:images"],setup(u,{emit:i}){const a=u,d=i,t=e.ref([...a.images]);e.watchEffect(()=>{t.value=[...a.images]});const o=()=>{d("update:images",t.value)},r=l=>{t.value=[...t.value,...l],o()},p=l=>{t.value.splice(l,1),o()};return(l,n)=>(e.openBlock(),e.createElementBlock("div",v,[t.value.length>0?(e.openBlock(),e.createBlock(e.unref(g.VueDraggableNext),{key:0,class:"gap-small flex dragArea list-group w-full",modelValue:t.value,"onUpdate:modelValue":n[0]||(n[0]=s=>t.value=s),onChange:o},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(s,m)=>(e.openBlock(),e.createElementBlock("div",x,[e.createElementVNode("img",{class:"i-extra object-fit-contain bg-black-transp-5 pd-nano radius-small o-hidden",src:(l.FILE_SERVER_URL||"")+s},null,8,h),e.createVNode(f.default,{onClick:b=>p(m),class:"cursor-pointer pos-absolute t-center flex-center flex radius-extra i-medium bg-red pos-t-10-negative pos-r-10-negative pd-micro"},null,8,["onClick"])]))),256))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),t.value.length>0?(e.openBlock(),e.createElementBlock("div",k,[e.createVNode(c.default,{"onUpdate:images":r,text:"Add",options:{showText:!1},uploadPath:"photos",class:"radius-big"})])):e.createCommentVNode("",!0),t.value.length<1?(e.openBlock(),e.createBlock(c.default,{key:2,"onUpdate:images":r,uploadPath:a.uploadPath,text:a.text,options:a.options,class:"w-100 pd-extra"},null,8,["uploadPath","text","options"])):e.createCommentVNode("",!0)]))}};exports.default=_;
@@ -1,9 +1,9 @@
1
- import { ref as v, watchEffect as _, openBlock as t, createElementBlock as l, createBlock as d, unref as b, withCtx as k, Fragment as V, renderList as C, createElementVNode as E, createVNode as p, createCommentVNode as n } from "vue";
1
+ import { ref as v, watchEffect as _, openBlock as t, createElementBlock as s, createBlock as u, unref as b, withCtx as k, Fragment as V, renderList as C, createElementVNode as E, createVNode as c, createCommentVNode as n } from "vue";
2
2
  import { VueDraggableNext as w } from "../../../../node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js";
3
- import c from "../UploadImageMultiple/UploadImageMultiple.vue.js";
3
+ import p from "../UploadImageMultiple/UploadImageMultiple.vue.js";
4
4
  import I from "../../modules/icons/navigation/IconCross.vue.js";
5
5
  import "./EditImages.vue2.js";
6
- const y = { class: "flex-nowrap flex gap-small" }, P = { class: "pos-relative" }, U = ["src"], N = {
6
+ const y = { class: "flex-nowrap flex gap-small" }, P = { class: "pos-relative" }, U = ["src"], j = {
7
7
  key: 1,
8
8
  class: "i-extra uppercase flex-center flex radius-small o-hidden br-solid br-main br-2px pd-small"
9
9
  }, F = {
@@ -23,37 +23,37 @@ const y = { class: "flex-nowrap flex gap-small" }, P = { class: "pos-relative" }
23
23
  _(() => {
24
24
  e.value = [...a.images];
25
25
  });
26
- const o = () => {
26
+ const l = () => {
27
27
  f("update:images", e.value);
28
- }, i = (s) => {
29
- e.value = [...e.value, ...s], o();
30
- }, x = (s) => {
31
- e.value.splice(s, 1), o();
28
+ }, i = (o) => {
29
+ e.value = [...e.value, ...o], l();
30
+ }, x = (o) => {
31
+ e.value.splice(o, 1), l();
32
32
  };
33
- return (s, u) => (t(), l("div", y, [
34
- e.value.length > 0 ? (t(), d(b(w), {
33
+ return (o, d) => (t(), s("div", y, [
34
+ e.value.length > 0 ? (t(), u(b(w), {
35
35
  key: 0,
36
36
  class: "gap-small flex dragArea list-group w-full",
37
37
  modelValue: e.value,
38
- "onUpdate:modelValue": u[0] || (u[0] = (r) => e.value = r),
39
- onChange: o
38
+ "onUpdate:modelValue": d[0] || (d[0] = (r) => e.value = r),
39
+ onChange: l
40
40
  }, {
41
41
  default: k(() => [
42
- (t(!0), l(V, null, C(e.value, (r, h) => (t(), l("div", P, [
42
+ (t(!0), s(V, null, C(e.value, (r, h) => (t(), s("div", P, [
43
43
  E("img", {
44
- class: "i-extra radius-small o-hidden",
45
- src: (s.FILE_SERVER_URL || "") + r
44
+ class: "i-extra object-fit-contain bg-black-transp-5 pd-nano radius-small o-hidden",
45
+ src: (o.FILE_SERVER_URL || "") + r
46
46
  }, null, 8, U),
47
- p(I, {
48
- onClick: (j) => x(h),
47
+ c(I, {
48
+ onClick: (N) => x(h),
49
49
  class: "cursor-pointer pos-absolute t-center flex-center flex radius-extra i-medium bg-red pos-t-10-negative pos-r-10-negative pd-micro"
50
50
  }, null, 8, ["onClick"])
51
51
  ]))), 256))
52
52
  ]),
53
53
  _: 1
54
54
  }, 8, ["modelValue"])) : n("", !0),
55
- e.value.length > 0 ? (t(), l("div", N, [
56
- p(c, {
55
+ e.value.length > 0 ? (t(), s("div", j, [
56
+ c(p, {
57
57
  "onUpdate:images": i,
58
58
  text: "Add",
59
59
  options: {
@@ -63,7 +63,7 @@ const y = { class: "flex-nowrap flex gap-small" }, P = { class: "pos-relative" }
63
63
  class: "radius-big"
64
64
  })
65
65
  ])) : n("", !0),
66
- e.value.length < 1 ? (t(), d(c, {
66
+ e.value.length < 1 ? (t(), u(p, {
67
67
  key: 2,
68
68
  "onUpdate:images": i,
69
69
  uploadPath: a.uploadPath,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Field.vue.cjs");const u=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),r={key:0,class:"t-transp mn-r-small"},c={class:"w-100"},m=["type","value","placeholder","tabindex","disabled"],b=["value","placeholder","tabindex","disabled"],f={key:1,class:"t-transp mn-l-small"},v={key:0,class:"mn-t-thin mn-b-thin mn-b-thin invalid-feedback"},k={__name:"Field",props:{label:null,symbol:null,type:"text",placeholder:"Enter something here",field:null,validation:!1,disabled:null,tabindex:-1},emits:["update:field","focus","blur"],setup(l,{emit:i}){const a=i,s=l,d=e.ref(s.field);return(o,t)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass([[o.$attrs.class,{"bg-fourth-nano":l.validation}],"flex-center flex-nowrap flex"])},[l.label?(e.openBlock(),e.createElementBlock("div",r,[e.createElementVNode("span",null,e.toDisplayString(l.label),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",c,[l.type!=="textarea"?(e.openBlock(),e.createElementBlock("input",{key:0,onInput:t[0]||(t[0]=n=>d.value=a("update:field",n.target.value)),onFocus:t[1]||(t[1]=n=>a("focus",n)),onBlur:t[2]||(t[2]=n=>a("blur",n)),type:l.type,class:"w-100",value:l.field,placeholder:l.placeholder,tabindex:l.tabindex,disabled:l.disabled},null,40,m)):(e.openBlock(),e.createElementBlock("textarea",{key:1,onInput:t[3]||(t[3]=n=>d.value=a("update:field",n.target.value)),onFocus:t[4]||(t[4]=n=>a("focus",n)),onBlur:t[5]||(t[5]=n=>a("blur",n)),class:"w-100",value:l.field,placeholder:l.placeholder,tabindex:l.tabindex,disabled:l.disabled},null,40,b))]),e.renderSlot(o.$slots,"default",{},void 0,!0),l.symbol?(e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("span",null,e.toDisplayString(l.symbol),1)])):e.createCommentVNode("",!0)],2),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[l.validation?(e.openBlock(),e.createElementBlock("div",v," * "+e.toDisplayString(l.validation.message),1)):e.createCommentVNode("",!0)]),_:1})],64))}},y=u.default(k,[["__scopeId","data-v-3352d0f9"]]);exports.default=y;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Field.vue.cjs");const s=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),r={key:0,class:"t-transp mn-r-small"},c={class:"w-100"},m=["type","value","placeholder","tabindex","disabled"],b=["value","placeholder","tabindex","disabled"],f={key:1,class:"t-transp mn-l-small"},v={key:0,class:"mn-t-thin mn-b-thin mn-b-thin invalid-feedback"},k={__name:"Field",props:{label:null,symbol:null,type:"text",placeholder:"Enter something here",field:null,value:null,validation:!1,disabled:null,tabindex:-1},emits:["update:field","focus","blur"],setup(l,{emit:u}){const a=u,d=l;d.value&&a("update:field",d.value);const o=e.ref(d.field);return(i,t)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass([[i.$attrs.class,{"bg-fourth-nano":l.validation}],"flex-center flex-nowrap flex"])},[l.label?(e.openBlock(),e.createElementBlock("div",r,[e.createElementVNode("span",null,e.toDisplayString(l.label),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",c,[l.type!=="textarea"?(e.openBlock(),e.createElementBlock("input",{key:0,onInput:t[0]||(t[0]=n=>o.value=a("update:field",n.target.value)),onFocus:t[1]||(t[1]=n=>a("focus",n)),onBlur:t[2]||(t[2]=n=>a("blur",n)),type:l.type,class:"w-100",value:l.field,placeholder:l.placeholder,tabindex:l.tabindex,disabled:l.disabled},null,40,m)):(e.openBlock(),e.createElementBlock("textarea",{key:1,onInput:t[3]||(t[3]=n=>o.value=a("update:field",n.target.value)),onFocus:t[4]||(t[4]=n=>a("focus",n)),onBlur:t[5]||(t[5]=n=>a("blur",n)),class:"w-100",value:l.field,placeholder:l.placeholder,tabindex:l.tabindex,disabled:l.disabled},null,40,b))]),e.renderSlot(i.$slots,"default",{},void 0,!0),l.symbol?(e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("span",null,e.toDisplayString(l.symbol),1)])):e.createCommentVNode("",!0)],2),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[l.validation?(e.openBlock(),e.createElementBlock("div",v," * "+e.toDisplayString(l.validation.message),1)):e.createCommentVNode("",!0)]),_:1})],64))}},y=s.default(k,[["__scopeId","data-v-38ec9074"]]);exports.default=y;
@@ -1,16 +1,16 @@
1
- import { ref as b, openBlock as n, createElementBlock as d, Fragment as f, createElementVNode as i, normalizeClass as c, toDisplayString as s, createCommentVNode as o, renderSlot as v, createVNode as x, Transition as y, withCtx as h } from "vue";
1
+ import { ref as b, openBlock as n, createElementBlock as d, Fragment as v, createElementVNode as i, normalizeClass as c, toDisplayString as o, createCommentVNode as u, renderSlot as x, createVNode as y, Transition as h, withCtx as k } from "vue";
2
2
  import "./Field.vue.js";
3
- import k from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const g = {
3
+ import g from "../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const w = {
5
5
  key: 0,
6
6
  class: "t-transp mn-r-small"
7
- }, w = { class: "w-100" }, F = ["type", "value", "placeholder", "tabindex", "disabled"], p = ["value", "placeholder", "tabindex", "disabled"], B = {
7
+ }, F = { class: "w-100" }, B = ["type", "value", "placeholder", "tabindex", "disabled"], p = ["value", "placeholder", "tabindex", "disabled"], C = {
8
8
  key: 1,
9
9
  class: "t-transp mn-l-small"
10
- }, C = {
10
+ }, E = {
11
11
  key: 0,
12
12
  class: "mn-t-thin mn-b-thin mn-b-thin invalid-feedback"
13
- }, E = {
13
+ }, I = {
14
14
  __name: "Field",
15
15
  props: {
16
16
  label: null,
@@ -18,29 +18,32 @@ const g = {
18
18
  type: "text",
19
19
  placeholder: "Enter something here",
20
20
  field: null,
21
+ value: null,
21
22
  validation: !1,
22
23
  disabled: null,
23
24
  tabindex: -1
24
25
  },
25
26
  emits: ["update:field", "focus", "blur"],
26
- setup(e, { emit: m }) {
27
- const a = m, u = b(e.field);
28
- return (r, l) => (n(), d(f, null, [
27
+ setup(e, { emit: f }) {
28
+ const a = f, s = e;
29
+ s.value && a("update:field", s.value);
30
+ const r = b(s.field);
31
+ return (m, l) => (n(), d(v, null, [
29
32
  i("div", {
30
33
  class: c([[
31
- r.$attrs.class,
34
+ m.$attrs.class,
32
35
  {
33
36
  "bg-fourth-nano": e.validation
34
37
  }
35
38
  ], "flex-center flex-nowrap flex"])
36
39
  }, [
37
- e.label ? (n(), d("div", g, [
38
- i("span", null, s(e.label), 1)
39
- ])) : o("", !0),
40
- i("div", w, [
40
+ e.label ? (n(), d("div", w, [
41
+ i("span", null, o(e.label), 1)
42
+ ])) : u("", !0),
43
+ i("div", F, [
41
44
  e.type !== "textarea" ? (n(), d("input", {
42
45
  key: 0,
43
- onInput: l[0] || (l[0] = (t) => u.value = a("update:field", t.target.value)),
46
+ onInput: l[0] || (l[0] = (t) => r.value = a("update:field", t.target.value)),
44
47
  onFocus: l[1] || (l[1] = (t) => a("focus", t)),
45
48
  onBlur: l[2] || (l[2] = (t) => a("blur", t)),
46
49
  type: e.type,
@@ -49,9 +52,9 @@ const g = {
49
52
  placeholder: e.placeholder,
50
53
  tabindex: e.tabindex,
51
54
  disabled: e.disabled
52
- }, null, 40, F)) : (n(), d("textarea", {
55
+ }, null, 40, B)) : (n(), d("textarea", {
53
56
  key: 1,
54
- onInput: l[3] || (l[3] = (t) => u.value = a("update:field", t.target.value)),
57
+ onInput: l[3] || (l[3] = (t) => r.value = a("update:field", t.target.value)),
55
58
  onFocus: l[4] || (l[4] = (t) => a("focus", t)),
56
59
  onBlur: l[5] || (l[5] = (t) => a("blur", t)),
57
60
  class: "w-100",
@@ -61,20 +64,20 @@ const g = {
61
64
  disabled: e.disabled
62
65
  }, null, 40, p))
63
66
  ]),
64
- v(r.$slots, "default", {}, void 0, !0),
65
- e.symbol ? (n(), d("div", B, [
66
- i("span", null, s(e.symbol), 1)
67
- ])) : o("", !0)
67
+ x(m.$slots, "default", {}, void 0, !0),
68
+ e.symbol ? (n(), d("div", C, [
69
+ i("span", null, o(e.symbol), 1)
70
+ ])) : u("", !0)
68
71
  ], 2),
69
- x(y, { name: "fade" }, {
70
- default: h(() => [
71
- e.validation ? (n(), d("div", C, " * " + s(e.validation.message), 1)) : o("", !0)
72
+ y(h, { name: "fade" }, {
73
+ default: k(() => [
74
+ e.validation ? (n(), d("div", E, " * " + o(e.validation.message), 1)) : u("", !0)
72
75
  ]),
73
76
  _: 1
74
77
  })
75
78
  ], 64));
76
79
  }
77
- }, $ = /* @__PURE__ */ k(E, [["__scopeId", "data-v-3352d0f9"]]);
80
+ }, $ = /* @__PURE__ */ g(I, [["__scopeId", "data-v-38ec9074"]]);
78
81
  export {
79
82
  $ as default
80
83
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="";exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),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,4 +1,72 @@
1
- const e = "";
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
+ };
2
70
  export {
3
- e as default
71
+ I as default
4
72
  };
@@ -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.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
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="";exports.default=e;
@@ -1,72 +1,4 @@
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
- };
1
+ const e = "";
70
2
  export {
71
- I as default
3
+ e as default
72
4
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="";exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),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,4 +1,97 @@
1
- const e = "";
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"]]);
2
95
  export {
3
- e as default
96
+ Q as default
4
97
  };
@@ -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.vue.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";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="";exports.default=e;