@ozdao/prometheus-framework 0.1.36 → 0.1.38

Sign up to get free protection for your applications and to get access to all the features.
Files changed (342) hide show
  1. package/dist/BackofficeGallery-568b55bb.js +1 -0
  2. package/dist/BackofficeGallery-b4105137.mjs +306 -0
  3. package/dist/BlockTags-8cddaef7.js +1 -0
  4. package/dist/BlockTags-ee310572.mjs +853 -0
  5. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
  6. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
  7. package/dist/Button-7643c9aa.js +1 -0
  8. package/dist/Button-9e1a9284.mjs +226 -0
  9. package/dist/ButtonToggleMembership-15f149cb.js +1 -0
  10. package/dist/ButtonToggleMembership-3bb9139e.mjs +90 -0
  11. package/dist/CardBlogpost-38016b80.mjs +246 -0
  12. package/dist/CardBlogpost-cc208f93.js +1 -0
  13. package/dist/CardOrganization-d93c9bdb.js +1 -0
  14. package/dist/CardOrganization-e920be73.mjs +234 -0
  15. package/dist/CardProduct-92affca1.js +1 -0
  16. package/dist/CardProduct-fca53299.mjs +193 -0
  17. package/dist/Checkbox-5dbe7b23.mjs +62 -0
  18. package/dist/Checkbox-76f09248.js +1 -0
  19. package/dist/Chips-9d81b215.mjs +214 -0
  20. package/dist/Chips-d47704e6.js +1 -0
  21. package/dist/Community-87522a04.mjs +132 -0
  22. package/dist/Community-aef23aee.js +1 -0
  23. package/dist/Dashboard-91d73bc5.js +1 -0
  24. package/dist/Dashboard-ea9035bc.mjs +152 -0
  25. package/dist/Dropdown-31115457.js +1 -0
  26. package/dist/Dropdown-cab3605b.mjs +146 -0
  27. package/dist/EULA-aba6a807.js +1 -0
  28. package/dist/EditOrder-94bbebff.mjs +221 -0
  29. package/dist/EditOrder-c070d474.js +1 -0
  30. package/dist/EmptyState-d65bab5b.js +1 -0
  31. package/dist/EmptyState-e404b05d.mjs +36 -0
  32. package/dist/Events-cdfbca78.js +1 -0
  33. package/dist/Events-e9dd58f7.mjs +123 -0
  34. package/dist/Feed-22464fcd.js +1 -0
  35. package/dist/Feed-6e96d3dd.mjs +124 -0
  36. package/dist/Feed-793b3eef.mjs +146 -0
  37. package/dist/Feed-7b80704d.mjs +361 -0
  38. package/dist/Feed-98b47c6f.js +1 -0
  39. package/dist/Feed-b30ef609.js +1 -0
  40. package/dist/Feed-c5d4390a.js +1 -0
  41. package/dist/Feed-d114330c.mjs +112 -0
  42. package/dist/Field-e2a43424.js +1 -0
  43. package/dist/Field-e5ad88d3.mjs +75 -0
  44. package/dist/Field.vue_vue_type_style_index_0_scoped_f4a29b0d_lang-0ea8fbf8.js +1 -0
  45. package/dist/Field.vue_vue_type_style_index_0_scoped_f4a29b0d_lang-4ed993c7.mjs +1 -0
  46. package/dist/IconChevronRight-a55f838e.js +1 -0
  47. package/dist/IconChevronRight-fae9d012.mjs +28 -0
  48. package/dist/IconCommunity-468dc457.mjs +65 -0
  49. package/dist/IconCommunity-b339e806.js +1 -0
  50. package/dist/IconCross-5bf93179.js +1 -0
  51. package/dist/IconCross-84cb1292.mjs +28 -0
  52. package/dist/IconEdit-9edfd74d.mjs +21 -0
  53. package/dist/IconEdit-c0469b45.js +1 -0
  54. package/dist/Image-245c003d.mjs +480 -0
  55. package/dist/Image-35d31936.js +9 -0
  56. package/dist/LabelGooglePlay-24feb437.mjs +31 -0
  57. package/dist/LabelGooglePlay-f80e5ff0.js +1 -0
  58. package/dist/LeftoverAdd-08d9fb54.mjs +228 -0
  59. package/dist/LeftoverAdd-fc673884.js +1 -0
  60. package/dist/Leftovers-296c0042.js +1 -0
  61. package/dist/Leftovers-685d9f19.mjs +136 -0
  62. package/dist/Loader-21f016da.js +1 -0
  63. package/dist/Loader-cd422786.mjs +41 -0
  64. package/dist/Loader.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
  65. package/dist/Loader.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
  66. package/dist/Members-2cb2ff58.mjs +114 -0
  67. package/dist/Members-85534d1f.js +1 -0
  68. package/dist/Menu-b5d6a0c7.js +1 -0
  69. package/dist/Menu-dd7645c1.mjs +13 -0
  70. package/dist/MenuItem-56ae7f94.js +1 -0
  71. package/dist/MenuItem-6296d02f.mjs +63 -0
  72. package/dist/Orders-b64e8cb9.js +1 -0
  73. package/dist/Orders-ff30db05.mjs +75 -0
  74. package/dist/Organizations-0cb37d68.js +1 -0
  75. package/dist/Organizations-d6ef2113.mjs +73 -0
  76. package/dist/Payments-53e5fecf.js +1 -0
  77. package/dist/Payments-82e545e1.mjs +87 -0
  78. package/dist/PlaceholderUserpic-47f6f319.js +1 -0
  79. package/dist/Popup-0915427c.mjs +74 -0
  80. package/dist/Popup-795f5c88.js +1 -0
  81. package/dist/Popup.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
  82. package/dist/Popup.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
  83. package/dist/Product-5994a8c9.mjs +653 -0
  84. package/dist/Product-68fa1e9e.js +7 -0
  85. package/dist/ProductEdit-64207814.mjs +296 -0
  86. package/dist/ProductEdit-a434240f.js +1 -0
  87. package/dist/ProductsBackoffice-0c93f9b6.js +1 -0
  88. package/dist/ProductsBackoffice-3d987c60.mjs +86 -0
  89. package/dist/ProfileBlogposts-0b81d964.js +1 -0
  90. package/dist/ProfileBlogposts-b59992cf.mjs +79 -0
  91. package/dist/ProfileEvents-3f7ca2c1.js +1 -0
  92. package/dist/ProfileEvents-bbdd62e7.mjs +70 -0
  93. package/dist/ProfileOrganizations-4734c02e.mjs +73 -0
  94. package/dist/ProfileOrganizations-d55ee487.js +1 -0
  95. package/dist/Publics-0762210a.js +1 -0
  96. package/dist/Publics-660e851c.mjs +45 -0
  97. package/dist/SelectMulti-58704d69.mjs +1038 -0
  98. package/dist/SelectMulti-c25765cf.js +1 -0
  99. package/dist/SkeletonBlogpost-95db0fa9.js +1 -0
  100. package/dist/SkeletonBlogpost-e0621af7.mjs +16 -0
  101. package/dist/SkeletonEvent-8690422d.mjs +16 -0
  102. package/dist/SkeletonEvent-eb284de8.js +1 -0
  103. package/dist/SkeletonEventShort-6c9e3940.js +1 -0
  104. package/dist/SkeletonEventShort-f030e56f.mjs +16 -0
  105. package/dist/SkeletonOrganization-5c09cfc5.js +1 -0
  106. package/dist/SkeletonOrganization-8690422d.mjs +16 -0
  107. package/dist/Socials-31c06635.mjs +74 -0
  108. package/dist/Socials-cceaeaf2.js +1 -0
  109. package/dist/Tab-054b61f7.mjs +46 -0
  110. package/dist/Tab-2c1e4224.js +1 -0
  111. package/dist/Tab.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
  112. package/dist/Tab.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
  113. package/dist/addMembersQuantity-7147aa4a.js +89 -0
  114. package/dist/addMembersQuantity-eac999f0.mjs +90 -0
  115. package/dist/auth-06d35b82.js +7 -0
  116. package/dist/auth-ec618cb3.mjs +627 -0
  117. package/dist/auth.client.cjs +7 -7
  118. package/dist/auth.client.js +22 -19
  119. package/dist/auth.server.js +1 -1
  120. package/dist/auth.server.mjs +1 -1
  121. package/dist/auth.validation-0ce9e326.js +1 -0
  122. package/dist/auth.validation-ba3606bf.mjs +24 -0
  123. package/dist/backoffice.client.cjs +1 -1
  124. package/dist/backoffice.client.js +235 -59
  125. package/dist/categories-82b28618.js +1 -0
  126. package/dist/categories-df3240a7.mjs +122 -0
  127. package/dist/community.client.cjs +1 -1
  128. package/dist/community.client.js +233 -227
  129. package/dist/community.server.js +217 -189
  130. package/dist/community.server.mjs +217 -189
  131. package/dist/components/Field/Field.vue.d.ts +58 -2
  132. package/dist/components/Field/Field.vue.d.ts.map +1 -1
  133. package/dist/components/UploadImage/UploadImage.vue.d.ts +1 -1
  134. package/dist/dribbble-8e8e169b.js +1 -0
  135. package/dist/dribbble-ae37c2ac.mjs +127 -0
  136. package/dist/events.client.cjs +2 -2
  137. package/dist/events.client.js +1793 -1888
  138. package/dist/events.server.js +100 -210
  139. package/dist/events.server.mjs +100 -210
  140. package/dist/globals.server.js +1 -1
  141. package/dist/globals.server.mjs +1 -1
  142. package/dist/icons.client.cjs +1 -0
  143. package/dist/icons.client.js +84 -0
  144. package/dist/inputs.validation-d7cef32b.js +1 -0
  145. package/dist/inputs.validation-db65277a.mjs +83 -0
  146. package/dist/landing.client.cjs +1 -1
  147. package/dist/landing.client.js +40 -64
  148. package/dist/leftovers-66951de6.js +1 -0
  149. package/dist/leftovers-be37c7a5.mjs +67 -0
  150. package/dist/legal.client.cjs +1 -1
  151. package/dist/legal.client.js +7 -4
  152. package/dist/mailing-76895d59.mjs +50 -0
  153. package/dist/mailing-9659b3c4.js +49 -0
  154. package/dist/main.css +1 -1
  155. package/dist/memberships-12210953.mjs +68 -0
  156. package/dist/memberships-393765d8.js +1 -0
  157. package/dist/metadata.schema-147f9902.mjs +212 -0
  158. package/dist/metadata.schema-93397f9f.js +211 -0
  159. package/dist/metadata.schema-a539dd65.mjs +210 -0
  160. package/dist/metadata.schema-e4fe5c57.js +209 -0
  161. package/dist/modules/community/components/blocks/FooterBlogpost.vue.d.ts +1 -1
  162. package/dist/modules/community/components/sections/Feed.vue.d.ts +4 -3
  163. package/dist/modules/events/components/sections/Feed.vue.d.ts +4 -4
  164. package/dist/modules/events/components/sections/List.vue.d.ts +3 -3
  165. package/dist/modules/globals/components/blocks/CardFooter.vue.d.ts +8 -0
  166. package/dist/modules/globals/components/blocks/CardHeader.vue.d.ts +15 -0
  167. package/dist/modules/globals/components/sections/Feed.vue.d.ts +69 -0
  168. package/dist/modules/orders/components/pages/EditOrder.vue.d.ts +6 -0
  169. package/dist/modules/orders/components/pages/Favorites.vue.d.ts +6 -0
  170. package/dist/modules/orders/components/pages/History.vue.d.ts +6 -0
  171. package/dist/modules/orders/components/pages/Orders.vue.d.ts +2 -0
  172. package/dist/modules/orders/components/pages/ViewOrder.vue.d.ts +6 -0
  173. package/dist/modules/orders/components/sections/Form.vue.d.ts +1 -0
  174. package/dist/modules/organizations/components/blocks/CardDepartment.vue.d.ts +7 -0
  175. package/dist/modules/organizations/components/blocks/User.vue.d.ts +1 -1
  176. package/dist/modules/organizations/components/elements/ButtonToggleMembership.vue.d.ts +1 -1
  177. package/dist/modules/organizations/components/pages/Members.vue.d.ts +2 -0
  178. package/dist/modules/organizations/components/sections/Department2.vue.d.ts +7 -0
  179. package/dist/modules/organizations/components/sections/Feed.vue.d.ts +4 -4
  180. package/dist/modules/organizations/components/sections/FeedDepartments.vue.d.ts +8 -0
  181. package/dist/modules/payments/components/pages/Payments.vue.d.ts +2 -0
  182. package/dist/modules/products/components/blocks/CardLeftover.vue.d.ts +6 -0
  183. package/dist/modules/products/components/blocks/CardPosition.vue.d.ts +11 -0
  184. package/dist/modules/products/components/blocks/CardProduct.vue.d.ts +6 -0
  185. package/dist/modules/products/components/blocks/LeftoverPositions.vue.d.ts +0 -1
  186. package/dist/modules/products/components/pages/ProductsBackoffice.vue.d.ts +2 -0
  187. package/dist/modules/products/components/sections/FilterProducts.vue.d.ts +9 -0
  188. package/dist/modules/products/components/sections/SortProducts.vue.d.ts +10 -0
  189. package/dist/modules/reports/components/sections/FormReport.vue.d.ts +3 -3
  190. package/dist/modules/spots/components/blocks/CardSpot.vue.d.ts +7 -0
  191. package/dist/modules/spots/components/blocks/SpotMemberModify.vue.d.ts +11 -0
  192. package/dist/modules/spots/components/blocks/SpotSub.vue.d.ts +6 -0
  193. package/dist/modules/spots/components/pages/Spot.vue.d.ts +7 -0
  194. package/dist/modules/spots/components/pages/SpotEdit.vue.d.ts +2 -0
  195. package/dist/modules/spots/components/sections/Feed.vue.d.ts +8 -0
  196. package/dist/modules/spots/components/sections/PlaceModify.vue.d.ts +9 -0
  197. package/dist/modules/spots/components/sections/Places.vue.d.ts +9 -0
  198. package/dist/modules/wallet/components/pages/Wallet.vue.d.ts +2 -0
  199. package/dist/orders-13c10d49.mjs +85 -0
  200. package/dist/orders-37f041aa.js +1 -0
  201. package/dist/organizations-4d18a2e2.js +1 -0
  202. package/dist/organizations-6ed907e3.mjs +122 -0
  203. package/dist/organizations.client-01593e4d.js +3 -0
  204. package/dist/organizations.client-1b9fa66e.mjs +2997 -0
  205. package/dist/organizations.client.cjs +1 -1
  206. package/dist/organizations.client.js +75 -51
  207. package/dist/organizations.server.js +9 -20
  208. package/dist/organizations.server.mjs +9 -20
  209. package/dist/products-7960bbd4.js +1 -0
  210. package/dist/products-bf5783aa.mjs +108 -0
  211. package/dist/prometheus-framework.cjs.js +17 -17
  212. package/dist/prometheus-framework.es.js +771 -758
  213. package/dist/states.validation-03f7cd49.js +1 -0
  214. package/dist/states.validation-50e3a5a0.mjs +13 -0
  215. package/dist/style.css +1 -1
  216. package/dist/users.client.cjs +1 -1
  217. package/dist/users.client.js +212 -256
  218. package/dist/users.server.js +1 -1
  219. package/dist/users.server.mjs +1 -1
  220. package/package.json +5 -1
  221. package/src/components/Field/Field.vue +34 -9
  222. package/src/components/SelectMulti/SelectMulti.vue +18 -22
  223. package/src/modules/auth/store/auth.js +34 -15
  224. package/src/modules/backoffice/components/pages/Dashboard.vue +91 -0
  225. package/src/modules/backoffice/router/admin.js +0 -28
  226. package/src/modules/backoffice/router/backoffice.js +131 -4
  227. package/src/modules/community/components/blocks/CardBlogpost.vue +1 -1
  228. package/src/modules/community/components/pages/Blog.vue +1 -0
  229. package/src/modules/community/components/sections/Comments.vue +1 -1
  230. package/src/modules/community/components/sections/Feed.vue +6 -0
  231. package/src/modules/community/controllers/blog.controller.js +129 -285
  232. package/src/modules/community/controllers/reactions.controller.js +2 -0
  233. package/src/modules/community/controllers/utils/queryProcessor.js +56 -0
  234. package/src/modules/community/controllers/utils/queryProcessorReactions.js +63 -0
  235. package/src/modules/community/store/blogposts.js +5 -5
  236. package/src/modules/events/components/blocks/CardEvent.vue +2 -3
  237. package/src/modules/events/components/pages/Events.vue +4 -4
  238. package/src/modules/events/components/sections/Feed.vue +4 -4
  239. package/src/modules/events/components/sections/List.vue +2 -2
  240. package/src/modules/events/controllers/events.controller.js +8 -6
  241. package/src/modules/events/controllers/utils/queryProcessor.js +111 -1
  242. package/src/modules/events/models/event.model.js +0 -4
  243. package/src/modules/events/store/events.js +5 -7
  244. package/src/{components/CardHeader → modules/globals/components/blocks}/CardHeader.vue +31 -4
  245. package/src/modules/globals/components/sections/Feed.vue +136 -0
  246. package/src/modules/globals/controllers/utils/queryProcessor.js +19 -117
  247. package/src/modules/globals/models/engagement.schema.js +29 -25
  248. package/src/modules/globals/utils/mailing.js +1 -1
  249. package/src/modules/icons/icons.client.js +51 -0
  250. package/src/modules/marketplace/components/layouts/Marketplace.vue +1 -1
  251. package/src/modules/marketplace/components/pages/Catalog.vue +3 -4
  252. package/src/modules/marketplace/router/marketplace.js +0 -11
  253. package/src/modules/middlewares/client/auth.validation.js +1 -1
  254. package/src/modules/orders/components/blocks/CardOrderItem.vue +1 -2
  255. package/src/modules/orders/components/pages/EditOrder.vue +238 -0
  256. package/src/modules/{backoffice → orders}/components/pages/Favorites.vue +2 -2
  257. package/src/modules/orders/components/pages/Order.vue +28 -34
  258. package/src/modules/orders/components/pages/Orders.vue +90 -0
  259. package/src/modules/{backoffice/components/pages/History.vue → orders/components/pages/ViewOrder.vue} +0 -8
  260. package/src/modules/orders/components/sections/Form.vue +52 -34
  261. package/src/modules/orders/controllers/orders.controller.js +102 -72
  262. package/src/modules/orders/models/order.model.js +30 -22
  263. package/src/modules/orders/router/orders.router.js +30 -0
  264. package/src/modules/orders/routes/orders.routes.js +23 -13
  265. package/src/modules/orders/store/orders.js +67 -40
  266. package/src/modules/organizations/components/{sections/Department.vue → blocks/CardDepartment.vue} +1 -10
  267. package/src/modules/organizations/components/blocks/CardOrganization.vue +13 -9
  268. package/src/modules/organizations/components/pages/DepartmentEdit.vue +3 -3
  269. package/src/modules/organizations/components/{sections/MembersTab.vue → pages/Members.vue} +23 -8
  270. package/src/modules/organizations/components/pages/Organization.vue +80 -46
  271. package/src/modules/organizations/components/pages/Organizations.vue +45 -90
  272. package/src/modules/organizations/components/sections/{StructureTab.vue → FeedDepartments.vue} +5 -5
  273. package/src/modules/organizations/components/sections/Organizations.vue +1 -2
  274. package/src/modules/organizations/components/sections/Publics.vue +3 -2
  275. package/src/modules/organizations/controllers/organizations.controller.js +8 -21
  276. package/src/modules/organizations/controllers/organizations.new.controller.js +372 -0
  277. package/src/modules/organizations/controllers/utils/addUserStatusFields.js +53 -48
  278. package/src/modules/organizations/controllers/utils/queryProcessor.js +87 -0
  279. package/src/modules/organizations/controllers/utils/queryProcessorOrganizations.js +25 -0
  280. package/src/modules/organizations/organizations.client.js +42 -46
  281. package/src/modules/organizations/router/departments.router.js +29 -0
  282. package/src/modules/organizations/router/members.router.js +19 -0
  283. package/src/modules/organizations/router/organizations.js +12 -88
  284. package/src/modules/organizations/router/organizations.router.js +38 -0
  285. package/src/modules/organizations/router/products.router.js +24 -0
  286. package/src/modules/organizations/store/departments.js +108 -0
  287. package/src/modules/{backoffice/components/admin/Orders.vue → payments/components/pages/Payments.vue} +0 -15
  288. package/src/modules/products/components/blocks/{Leftover.vue → CardLeftover.vue} +21 -12
  289. package/src/modules/products/components/blocks/CardPosition.vue +84 -0
  290. package/src/modules/products/components/blocks/LeftoverPositions.vue +65 -136
  291. package/src/modules/products/components/pages/LeftoverAdd.vue +133 -88
  292. package/src/modules/products/components/pages/Leftovers.vue +91 -64
  293. package/src/modules/products/components/pages/Product.vue +3 -3
  294. package/src/modules/products/components/pages/Products.vue +42 -263
  295. package/src/modules/products/components/pages/ProductsBackoffice.vue +92 -0
  296. package/src/modules/products/components/sections/FilterProducts.vue +180 -0
  297. package/src/modules/products/components/sections/PopularProducts.vue +2 -2
  298. package/src/modules/products/components/sections/SectionProduct.vue +18 -3
  299. package/src/modules/products/components/sections/SortProducts.vue +76 -0
  300. package/src/modules/products/controllers/leftovers.controller.js +51 -45
  301. package/src/modules/products/controllers/modifications.controller.js +66 -0
  302. package/src/modules/products/controllers/products.controller.js +67 -111
  303. package/src/modules/products/models/leftover.model.js +12 -9
  304. package/src/modules/products/models/product.model.js +1 -0
  305. package/src/modules/products/router/products.router.js +46 -0
  306. package/src/modules/products/routes/products.routes.js +4 -9
  307. package/src/modules/products/store/leftovers.js +56 -59
  308. package/src/modules/products/store/products.js +21 -22
  309. package/src/modules/spots/components/blocks/CardSpot.vue +104 -0
  310. package/src/modules/spots/components/blocks/SpotMemberModify.vue +92 -0
  311. package/src/modules/spots/components/blocks/SpotSub.vue +24 -0
  312. package/src/modules/spots/components/pages/Map.vue +2 -2
  313. package/src/modules/spots/components/pages/Spot.vue +107 -0
  314. package/src/modules/spots/components/pages/SpotEdit.vue +319 -0
  315. package/src/modules/spots/components/sections/Feed.vue +64 -0
  316. package/src/modules/spots/controllers/spots.controller.js +83 -0
  317. package/src/modules/spots/models/spot.model.js +72 -0
  318. package/src/modules/spots/router/spots.js +34 -1
  319. package/src/modules/spots/routes/spots.routes.js +31 -0
  320. package/src/modules/spots/store/spots.js +15 -15
  321. package/src/modules/users/components/pages/Profile.vue +2 -3
  322. package/src/modules/users/components/pages/ProfileBlogposts.vue +1 -1
  323. package/src/styles/components/block.scss +2 -4
  324. package/src/modules/backoffice/components/admin/LeftoverAdd.vue +0 -157
  325. package/src/modules/backoffice/components/admin/Leftovers.vue +0 -119
  326. package/src/modules/backoffice/components/admin/Order.vue +0 -199
  327. package/src/modules/backoffice/components/admin/Product.vue +0 -28
  328. package/src/modules/backoffice/components/admin/Products.vue +0 -82
  329. package/src/modules/backoffice/components/pages/Organizations.vue +0 -104
  330. package/src/modules/community/controllers/blog.new.controller.js +0 -290
  331. package/src/modules/organizations/components/blocks/DepartmentSubDepartmentModify.vue +0 -92
  332. package/src/modules/organizations/components/elements/ButtonFollow.vue +0 -84
  333. package/src/modules/organizations/components/pages/OrganizationsAccount.vue +0 -110
  334. package/src/modules/organizations/controllers/utils/excludeBlockedMembers.js +0 -18
  335. /package/src/{components/CardFooter → modules/globals/components/blocks}/CardFooter.vue +0 -0
  336. /package/src/modules/{orders/controllers → payments/controller}/payments.controller.js +0 -0
  337. /package/src/modules/{orders → payments}/routes/payments.routes.js +0 -0
  338. /package/src/modules/{orders → payments}/store/payments.js +0 -0
  339. /package/src/modules/products/components/blocks/{ProductCard.vue → CardProduct.vue} +0 -0
  340. /package/src/modules/{organizations → spots}/components/sections/PlaceModify.vue +0 -0
  341. /package/src/modules/{organizations → spots}/components/sections/Places.vue +0 -0
  342. /package/src/modules/{backoffice → wallet}/components/pages/Wallet.vue +0 -0
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),U=require("./Field-e2a43424.js"),q=require("./Button-7643c9aa.js"),M=require("./Select-3ca5ab39.js"),B=require("./index-b41aac19.js"),G=require("./vue-draggable-next.esm-bundler-21a209c6.js"),j=require("./UploadImageMultiple-eddaac87.js"),D=require("./_plugin-vue_export-helper-f246444f.js");require("./Field.vue_vue_type_style_index_0_scoped_f4a29b0d_lang-0ea8fbf8.js");require("./Button.vue_vue_type_style_index_0_lang-0ea8fbf8.js");const L=process.env.API_URL,V=B.axios.create({baseURL:L,withCredentials:!0}),u=e.reactive({gallery:[]}),v={async fetchGallery(a,t){const c=[];a&&c.push(`page=${a}`),t&&c.push(`limit=${t}`);const o=`/api/gallery${c.length?`?${c.join("&")}`:""}`;try{const s=await V.get(o);if(console.log(s),s&&s.data)return u.gallery=[...u.gallery,...s.data],s.data}catch(s){throw console.error("Error fetching gallery:",s),s}},async createPhoto(a){try{const t=await V.post("/api/gallery/create",a);console.log(t.data),u.gallery=[...t.data,...u.gallery]}catch(t){console.error(t)}},async updatePhoto(a){try{const t={...a,categories:typeof a.categories=="string"?a.categories.split(",").map(s=>s.trim()):a.categories},c=await B.axios.post("/api/gallery/update",t),o=u.gallery.findIndex(s=>s._id===a._id);o!==-1&&(u.gallery[o]=c.data)}catch(t){console.error(t)}},async deletePhoto(a){try{const t=await V.post(`/api/gallery/delete/${a}`),c=u.gallery.findIndex(o=>o._id===a);c!==-1&&u.gallery.splice(c,1)}catch(t){console.error(t)}}};const F={class:"pos-relative"},R=["src"],T=["onClick"],A={__name:"EditImages",props:{images:Array},emits:["update"],setup(a,{emit:t}){const c=a,o=e.ref([...c.images]);e.watchEffect(()=>{o.value=[...c.images]});const s=()=>{t("update:images",o.value)},h=i=>{o.value=[...o.value,...i],s()},f=i=>{o.value.splice(i,1),s()};return(i,y)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(j._sfc_main,{"onUpdate:images":h,uploadPath:"photos",class:"mn-semi pd-small w-100 button bg-black t-white"}),e.createVNode(e.unref(G.VueDraggableNext),{class:"gap-small flex dragArea list-group w-full",modelValue:o.value,"onUpdate:modelValue":y[0]||(y[0]=m=>o.value=m),onChange:s},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(m,E)=>(e.openBlock(),e.createElementBlock("div",F,[e.createElementVNode("img",{class:"i-extra radius-small o-hidden mn-thin",src:(i.FILE_SERVER_URL||"")+m},null,8,R),e.createElementVNode("a",{onClick:p=>f(E),class:"pos-absolute t-center radius-extra i-medium bg-red pos-t-0 pos-r-0"},"X",8,T)]))),256))]),_:1},8,["modelValue"])]))}};const _=a=>(e.pushScopeId("data-v-d6a1c805"),a=a(),e.popScopeId(),a),O={class:"pos-relative w-100"},H={class:"mn-semi flex-v-center flex-nowrap flex"},X=_(()=>e.createElementVNode("h1",{class:"mn-r-small"},"Manage Gallery",-1)),J=["data-id"],K=["src","onClick"],Q={key:1,class:"radius-small bg-white"},W=["src","onClick"],Y={class:"t-black p-small mn-thin"},Z=_(()=>e.createElementVNode("span",{class:"uppercase t-transp"},"Size",-1)),ee=_(()=>e.createElementVNode("br",null,null,-1)),te={class:"pd-2px radius-big d-inline-block bg-grey"},le={class:"t-black p-small mn-small uppe"},ae=_(()=>e.createElementVNode("span",{class:"uppercase t-transp"},"Categories",-1)),oe=_(()=>e.createElementVNode("br",null,null,-1)),se={class:"pd-2px radius-big d-inline-block bg-grey t-semi"},ne={class:"flex-nowrap flex"},ce=["onClick"],re={class:"modal pd-thin"},ie={class:"modal-content radius-big"},de={class:""},ue=["src"],me={key:0,class:"flex-v-center flex m modal pd-big"},pe={class:"modal-content radius-small pd-medium bg-white"},ge=["src"],ve=["src"],_e={__name:"BackofficeGallery",setup(a){const t=e.ref(!0),c=e.ref(null);let o=1;const s=10;let h=e.ref(null),f=e.ref(!1);const i=e.ref([]),y=r=>{i.value=r},m=e.computed(()=>x.value==="all"?u.gallery:u.gallery.filter(r=>r.categories.includes(x.value))),E=async()=>{f.value=!0,await v.fetchGallery(o,s),f.value=!1},p=e.ref(null),l=e.ref({categories:"",size:"",image:!1}),k=e.ref(null),w=r=>{console.log(t.value),t.value?C(r):(p.value="modal",l.value.image=r,N())},C=r=>{p.value="edit-modal",l.value=r||{categories:"",size:"",image:null},N()},g=()=>{l.value={categories:"",size:"",image:!1},k.value=null,I()},N=()=>{document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"},I=()=>{document.body.style.overflow="",document.documentElement.style.overflow=""},S=[{name:"Small",value:""},{name:"Regular",value:"grid-item--width1 grid-item--height1"},{name:"Medium",value:"grid-item--width2 grid-item--height2"},{name:"Big",value:"grid-item--width3 grid-item--height3"}],$=async r=>{await v.deletePhoto(r)},P=async()=>{await v.updatePhoto(l.value),g()},z=async r=>{if(i.length<1||!l.value.categories||!l.value.size){console.error("All fields are required.");return}await v.createPhoto({images:i.value,size:l.value.size,categories:typeof l.value.categories=="string"?l.value.categories.split(",").map(d=>d.trim()):l.value.categories}),g()};let x=e.ref("all");return e.onMounted(async()=>{await v.fetchGallery(o,s),typeof window<"u"&&new IntersectionObserver(d=>{d.some(n=>n.isIntersecting)&&(o+=1,E())}).observe(h.value)}),(r,d)=>(e.openBlock(),e.createElementBlock("div",O,[e.createElementVNode("div",H,[X,t.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:d[0]||(d[0]=n=>w(null)),class:"t-white t-black bg-second i-big radius-extra"},"+")):e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"grid",ref:c,class:"cols-4 gap-thin"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(m),(n,fe)=>(e.openBlock(),e.createElementBlock("div",{key:n.id,"data-id":n.id},[e.createVNode(e.Transition,{name:"scaleIn",mode:"in-out"},{default:e.withCtx(()=>[!t.value&&c.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:"https://thecommunephuket.com/photos/"+n.cover,class:"w-100 h-100 o-hidden radius-medium object-fit-cover",onClick:b=>w(n.image)},null,8,K)):(e.openBlock(),e.createElementBlock("div",Q,[e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+n.cover,class:"w-100 radius-small mn-small h-10r object-fit-cover",onClick:b=>w(n)},null,8,W),e.createElementVNode("p",Y,[Z,ee,e.createElementVNode("span",te,e.toDisplayString(n.size.name),1)]),e.createElementVNode("p",le,[ae,oe,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.categories,b=>(e.openBlock(),e.createElementBlock("span",se,e.toDisplayString(b),1))),256))]),e.createElementVNode("div",ne,[e.createElementVNode("button",{class:"button-small w-100 button",onClick:b=>$(n._id)},"Delete",8,ce)])]))]),_:2},1024)],8,J))),128)),e.createElementVNode("div",{ref_key:"sentinel",ref:h,class:"sentinel"},null,512),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",re,[e.createElementVNode("div",ie,[e.createElementVNode("div",de,[e.createElementVNode("span",{class:"close",onClick:g},"×"),e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+l.value.image},null,8,ue)])])],512),[[e.vShow,l.value.image!==!1&&p.value==="modal"]])]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[l.value.image!==!1&&p.value==="edit-modal"?(e.openBlock(),e.createElementBlock("div",me,[e.createElementVNode("div",pe,[e.createElementVNode("span",{class:"close",onClick:g},"×"),typeof k.value=="string"?(e.openBlock(),e.createElementBlock("img",{key:0,src:k.value,class:"radius-small w-100 mn-small h-20r object-fit-cover"},null,8,ge)):e.createCommentVNode("",!0),typeof k.value=="object"&&l.value.image!==null?(e.openBlock(),e.createElementBlock("img",{key:1,class:"radius-small w-100 mn-small h-20r object-fit-cover",src:"/photos/"+l.value.cover},null,8,ve)):e.createCommentVNode("",!0),e.createVNode(M.Select,{options:S,label:"Size",select:l.value.size,"onUpdate:select":d[1]||(d[1]=n=>l.value.size=n),placeholder:"Select Size",class:"bg-grey pd-thin radius-small mn-thin t-black"},null,8,["select"]),e.createVNode(U.Field,{field:l.value.categories,"onUpdate:field":d[2]||(d[2]=n=>l.value.categories=n),type:"text",label:"Categories",placeholder:"Enter categories for image (comma separated)",class:"bg-grey pd-thin radius-small mn-medium t-black"},null,8,["field"]),e.createVNode(A,{images:i.value,"onUpdate:images":y,uploadPath:"photos",class:"mn-semi"},null,8,["images"]),e.createVNode(q._sfc_main,{submit:l.value._id?P:z,callback:g,class:"mn-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value._id?"Update":"Create"),1)]),_:1},8,["submit"])])])):e.createCommentVNode("",!0)]),_:1})],512)]))}},he=D._export_sfc(_e,[["__scopeId","data-v-d6a1c805"]]);exports.default=he;
@@ -0,0 +1,306 @@
1
+ import { reactive as q, ref as p, watchEffect as X, openBlock as r, createElementBlock as c, createVNode as _, unref as R, withCtx as b, Fragment as G, renderList as M, createElementVNode as e, computed as H, onMounted as J, createCommentVNode as S, Transition as z, toDisplayString as U, withDirectives as K, vShow as Q, createTextVNode as W, pushScopeId as Y, popScopeId as Z } from "vue";
2
+ import { F as ee } from "./Field-e5ad88d3.mjs";
3
+ import { _ as te } from "./Button-9e1a9284.mjs";
4
+ import { S as ae } from "./Select-11ddabf5.mjs";
5
+ import { a as L } from "./index-a661083c.mjs";
6
+ import { V as se } from "./vue-draggable-next.esm-bundler-ff6e3f52.mjs";
7
+ import { _ as le } from "./UploadImageMultiple-cb6c7188.mjs";
8
+ import { _ as oe } from "./_plugin-vue_export-helper-dad06003.mjs";
9
+ import "./Field.vue_vue_type_style_index_0_scoped_f4a29b0d_lang-4ed993c7.mjs";
10
+ import "./Button.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
11
+ const ie = process.env.API_URL, V = L.create({ baseURL: ie, withCredentials: !0 }), g = q({
12
+ gallery: []
13
+ }), y = {
14
+ async fetchGallery(s, t) {
15
+ const n = [];
16
+ s && n.push(`page=${s}`), t && n.push(`limit=${t}`);
17
+ const l = `/api/gallery${n.length ? `?${n.join("&")}` : ""}`;
18
+ try {
19
+ const o = await V.get(l);
20
+ if (console.log(o), o && o.data)
21
+ return g.gallery = [...g.gallery, ...o.data], o.data;
22
+ } catch (o) {
23
+ throw console.error("Error fetching gallery:", o), o;
24
+ }
25
+ },
26
+ async createPhoto(s) {
27
+ try {
28
+ const t = await V.post("/api/gallery/create", s);
29
+ console.log(t.data), g.gallery = [...t.data, ...g.gallery];
30
+ } catch (t) {
31
+ console.error(t);
32
+ }
33
+ },
34
+ async updatePhoto(s) {
35
+ try {
36
+ const t = {
37
+ ...s,
38
+ categories: typeof s.categories == "string" ? s.categories.split(",").map((o) => o.trim()) : s.categories
39
+ }, n = await L.post("/api/gallery/update", t), l = g.gallery.findIndex((o) => o._id === s._id);
40
+ l !== -1 && (g.gallery[l] = n.data);
41
+ } catch (t) {
42
+ console.error(t);
43
+ }
44
+ },
45
+ async deletePhoto(s) {
46
+ try {
47
+ const t = await V.post(`/api/gallery/delete/${s}`), n = g.gallery.findIndex((l) => l._id === s);
48
+ n !== -1 && g.gallery.splice(n, 1);
49
+ } catch (t) {
50
+ console.error(t);
51
+ }
52
+ }
53
+ };
54
+ const ne = { class: "pos-relative" }, re = ["src"], ce = ["onClick"], de = {
55
+ __name: "EditImages",
56
+ props: {
57
+ images: Array
58
+ },
59
+ emits: ["update"],
60
+ setup(s, { emit: t }) {
61
+ const n = s, l = p([...n.images]);
62
+ X(() => {
63
+ l.value = [...n.images];
64
+ });
65
+ const o = () => {
66
+ t("update:images", l.value);
67
+ }, k = (u) => {
68
+ l.value = [...l.value, ...u], o();
69
+ }, x = (u) => {
70
+ l.value.splice(u, 1), o();
71
+ };
72
+ return (u, C) => (r(), c("div", null, [
73
+ _(le, {
74
+ "onUpdate:images": k,
75
+ uploadPath: "photos",
76
+ class: "mn-semi pd-small w-100 button bg-black t-white"
77
+ }),
78
+ _(R(se), {
79
+ class: "gap-small flex dragArea list-group w-full",
80
+ modelValue: l.value,
81
+ "onUpdate:modelValue": C[0] || (C[0] = (v) => l.value = v),
82
+ onChange: o
83
+ }, {
84
+ default: b(() => [
85
+ (r(!0), c(G, null, M(l.value, (v, E) => (r(), c("div", ne, [
86
+ e("img", {
87
+ class: "i-extra radius-small o-hidden mn-thin",
88
+ src: (u.FILE_SERVER_URL || "") + v
89
+ }, null, 8, re),
90
+ e("a", {
91
+ onClick: (h) => x(E),
92
+ class: "pos-absolute t-center radius-extra i-medium bg-red pos-t-0 pos-r-0"
93
+ }, "X", 8, ce)
94
+ ]))), 256))
95
+ ]),
96
+ _: 1
97
+ }, 8, ["modelValue"])
98
+ ]));
99
+ }
100
+ };
101
+ const w = (s) => (Y("data-v-d6a1c805"), s = s(), Z(), s), ue = { class: "pos-relative w-100" }, me = { class: "mn-semi flex-v-center flex-nowrap flex" }, pe = /* @__PURE__ */ w(() => /* @__PURE__ */ e("h1", { class: "mn-r-small" }, "Manage Gallery", -1)), ge = ["data-id"], _e = ["src", "onClick"], ve = {
102
+ key: 1,
103
+ class: "radius-small bg-white"
104
+ }, he = ["src", "onClick"], fe = { class: "t-black p-small mn-thin" }, ye = /* @__PURE__ */ w(() => /* @__PURE__ */ e("span", { class: "uppercase t-transp" }, "Size", -1)), be = /* @__PURE__ */ w(() => /* @__PURE__ */ e("br", null, null, -1)), we = { class: "pd-2px radius-big d-inline-block bg-grey" }, ke = { class: "t-black p-small mn-small uppe" }, xe = /* @__PURE__ */ w(() => /* @__PURE__ */ e("span", { class: "uppercase t-transp" }, "Categories", -1)), Ce = /* @__PURE__ */ w(() => /* @__PURE__ */ e("br", null, null, -1)), Ie = { class: "pd-2px radius-big d-inline-block bg-grey t-semi" }, $e = { class: "flex-nowrap flex" }, Se = ["onClick"], Ee = { class: "modal pd-thin" }, Pe = { class: "modal-content radius-big" }, ze = { class: "" }, Ue = ["src"], Ve = {
105
+ key: 0,
106
+ class: "flex-v-center flex m modal pd-big"
107
+ }, Ge = { class: "modal-content radius-small pd-medium bg-white" }, Me = ["src"], je = ["src"], Be = {
108
+ __name: "BackofficeGallery",
109
+ setup(s) {
110
+ const t = p(!0), n = p(null);
111
+ let l = 1;
112
+ const o = 10;
113
+ let k = p(null), x = p(!1);
114
+ const u = p([]), C = (d) => {
115
+ u.value = d;
116
+ }, v = H(() => B.value === "all" ? g.gallery : g.gallery.filter((d) => d.categories.includes(B.value))), E = async () => {
117
+ x.value = !0, await y.fetchGallery(l, o), x.value = !1;
118
+ }, h = p(null), a = p({
119
+ categories: "",
120
+ size: "",
121
+ image: !1
122
+ }), I = p(null), P = (d) => {
123
+ console.log(t.value), t.value ? N(d) : (h.value = "modal", a.value.image = d, j());
124
+ }, N = (d) => {
125
+ h.value = "edit-modal", a.value = d || {
126
+ categories: "",
127
+ size: "",
128
+ image: null
129
+ }, j();
130
+ }, f = () => {
131
+ a.value = {
132
+ categories: "",
133
+ size: "",
134
+ image: !1
135
+ }, I.value = null, A();
136
+ }, j = () => {
137
+ document.body.style.overflow = "hidden", document.documentElement.style.overflow = "hidden";
138
+ }, A = () => {
139
+ document.body.style.overflow = "", document.documentElement.style.overflow = "";
140
+ }, D = [
141
+ { name: "Small", value: "" },
142
+ { name: "Regular", value: "grid-item--width1 grid-item--height1" },
143
+ { name: "Medium", value: "grid-item--width2 grid-item--height2" },
144
+ { name: "Big", value: "grid-item--width3 grid-item--height3" }
145
+ ], F = async (d) => {
146
+ await y.deletePhoto(d);
147
+ }, O = async () => {
148
+ await y.updatePhoto(a.value), f();
149
+ }, T = async (d) => {
150
+ if (u.length < 1 || !a.value.categories || !a.value.size) {
151
+ console.error("All fields are required.");
152
+ return;
153
+ }
154
+ await y.createPhoto({
155
+ images: u.value,
156
+ size: a.value.size,
157
+ categories: typeof a.value.categories == "string" ? a.value.categories.split(",").map((m) => m.trim()) : a.value.categories
158
+ }), f();
159
+ };
160
+ let B = p("all");
161
+ return J(async () => {
162
+ await y.fetchGallery(l, o), typeof window < "u" && new IntersectionObserver((m) => {
163
+ m.some((i) => i.isIntersecting) && (l += 1, E());
164
+ }).observe(k.value);
165
+ }), (d, m) => (r(), c("div", ue, [
166
+ e("div", me, [
167
+ pe,
168
+ t.value ? (r(), c("button", {
169
+ key: 0,
170
+ onClick: m[0] || (m[0] = (i) => P(null)),
171
+ class: "t-white t-black bg-second i-big radius-extra"
172
+ }, "+")) : S("", !0)
173
+ ]),
174
+ e("div", {
175
+ ref_key: "grid",
176
+ ref: n,
177
+ class: "cols-4 gap-thin"
178
+ }, [
179
+ (r(!0), c(G, null, M(R(v), (i, Re) => (r(), c("div", {
180
+ key: i.id,
181
+ "data-id": i.id
182
+ }, [
183
+ _(z, {
184
+ name: "scaleIn",
185
+ mode: "in-out"
186
+ }, {
187
+ default: b(() => [
188
+ !t.value && n.value ? (r(), c("img", {
189
+ key: 0,
190
+ src: "https://thecommunephuket.com/photos/" + i.cover,
191
+ class: "w-100 h-100 o-hidden radius-medium object-fit-cover",
192
+ onClick: ($) => P(i.image)
193
+ }, null, 8, _e)) : (r(), c("div", ve, [
194
+ e("img", {
195
+ src: "https://thecommunephuket.com/photos/" + i.cover,
196
+ class: "w-100 radius-small mn-small h-10r object-fit-cover",
197
+ onClick: ($) => P(i)
198
+ }, null, 8, he),
199
+ e("p", fe, [
200
+ ye,
201
+ be,
202
+ e("span", we, U(i.size.name), 1)
203
+ ]),
204
+ e("p", ke, [
205
+ xe,
206
+ Ce,
207
+ (r(!0), c(G, null, M(i.categories, ($) => (r(), c("span", Ie, U($), 1))), 256))
208
+ ]),
209
+ e("div", $e, [
210
+ e("button", {
211
+ class: "button-small w-100 button",
212
+ onClick: ($) => F(i._id)
213
+ }, "Delete", 8, Se)
214
+ ])
215
+ ]))
216
+ ]),
217
+ _: 2
218
+ }, 1024)
219
+ ], 8, ge))), 128)),
220
+ e("div", {
221
+ ref_key: "sentinel",
222
+ ref: k,
223
+ class: "sentinel"
224
+ }, null, 512),
225
+ _(z, { name: "modal" }, {
226
+ default: b(() => [
227
+ K(e("div", Ee, [
228
+ e("div", Pe, [
229
+ e("div", ze, [
230
+ e("span", {
231
+ class: "close",
232
+ onClick: f
233
+ }, "×"),
234
+ e("img", {
235
+ src: "https://thecommunephuket.com/photos/" + a.value.image
236
+ }, null, 8, Ue)
237
+ ])
238
+ ])
239
+ ], 512), [
240
+ [Q, a.value.image !== !1 && h.value === "modal"]
241
+ ])
242
+ ]),
243
+ _: 1
244
+ }),
245
+ _(z, { name: "modal" }, {
246
+ default: b(() => [
247
+ a.value.image !== !1 && h.value === "edit-modal" ? (r(), c("div", Ve, [
248
+ e("div", Ge, [
249
+ e("span", {
250
+ class: "close",
251
+ onClick: f
252
+ }, "×"),
253
+ typeof I.value == "string" ? (r(), c("img", {
254
+ key: 0,
255
+ src: I.value,
256
+ class: "radius-small w-100 mn-small h-20r object-fit-cover"
257
+ }, null, 8, Me)) : S("", !0),
258
+ typeof I.value == "object" && a.value.image !== null ? (r(), c("img", {
259
+ key: 1,
260
+ class: "radius-small w-100 mn-small h-20r object-fit-cover",
261
+ src: "/photos/" + a.value.cover
262
+ }, null, 8, je)) : S("", !0),
263
+ _(ae, {
264
+ options: D,
265
+ label: "Size",
266
+ select: a.value.size,
267
+ "onUpdate:select": m[1] || (m[1] = (i) => a.value.size = i),
268
+ placeholder: "Select Size",
269
+ class: "bg-grey pd-thin radius-small mn-thin t-black"
270
+ }, null, 8, ["select"]),
271
+ _(ee, {
272
+ field: a.value.categories,
273
+ "onUpdate:field": m[2] || (m[2] = (i) => a.value.categories = i),
274
+ type: "text",
275
+ label: "Categories",
276
+ placeholder: "Enter categories for image (comma separated)",
277
+ class: "bg-grey pd-thin radius-small mn-medium t-black"
278
+ }, null, 8, ["field"]),
279
+ _(de, {
280
+ images: u.value,
281
+ "onUpdate:images": C,
282
+ uploadPath: "photos",
283
+ class: "mn-semi"
284
+ }, null, 8, ["images"]),
285
+ _(te, {
286
+ submit: a.value._id ? O : T,
287
+ callback: f,
288
+ class: "mn-thin"
289
+ }, {
290
+ default: b(() => [
291
+ W(U(a.value._id ? "Update" : "Create"), 1)
292
+ ]),
293
+ _: 1
294
+ }, 8, ["submit"])
295
+ ])
296
+ ])) : S("", !0)
297
+ ]),
298
+ _: 1
299
+ })
300
+ ], 512)
301
+ ]));
302
+ }
303
+ }, Je = /* @__PURE__ */ oe(Be, [["__scopeId", "data-v-d6a1c805"]]);
304
+ export {
305
+ Je as default
306
+ };
@@ -0,0 +1 @@
1
+ "use strict";const s=require("vue"),E=require("./index-b41aac19.js"),T=require("./_plugin-vue_export-helper-f246444f.js");var C=function e(t,a){if(t===a)return!0;if(t&&a&&typeof t=="object"&&typeof a=="object"){if(t.constructor!==a.constructor)return!1;var i,n,l;if(Array.isArray(t)){if(i=t.length,i!=a.length)return!1;for(n=i;n--!==0;)if(!e(t[n],a[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===a.source&&t.flags===a.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===a.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===a.toString();if(l=Object.keys(t),i=l.length,i!==Object.keys(a).length)return!1;for(n=i;n--!==0;)if(!Object.prototype.hasOwnProperty.call(a,l[n]))return!1;for(n=i;n--!==0;){var d=l[n];if(!e(t[d],a[d]))return!1}return!0}return t!==t&&a!==a};const B=E.getDefaultExportFromCjs(C),S=(e,t)=>t.filter(a=>{const{text:i}=e;if(typeof a.rule=="string")return!new RegExp(a.rule).test(i);if(a.rule instanceof RegExp)return!a.rule.test(i);if({}.toString.call(a.rule)==="[object Function]")return a.rule(e)}).map(a=>a.classes),c=e=>JSON.parse(JSON.stringify(e)),w=(e,t)=>{let a=0;for(;a<e.length;){if(t(e[a],a,e))return a;a++}return-1},k=(e,t,a=[],i)=>{e.text===void 0&&(e={text:e});const n=S(e,a),l=w(t,u=>u===e),d=c(t),o=l!==-1?d.splice(l,1)[0]:c(e);return(i?i(d,o):d.map(u=>u.text).indexOf(o.text)!==-1)&&n.push("ti-duplicate"),n.length===0?n.push("ti-valid"):n.push("ti-invalid"),n},m=(e,...t)=>{e.text===void 0&&(e={text:e});const a=c(e);return a.tiClasses=k(e,...t),a},$=(e,...t)=>e.map(a=>m(a,e,...t));const D={name:"TagInput",props:{scope:{type:Object}}},O=["maxlength"];function I(e,t,a,i,n,l){return a.scope.edit?s.withDirectives((s.openBlock(),s.createElementBlock("input",{key:0,"onUpdate:modelValue":t[0]||(t[0]=d=>a.scope.tag.text=d),maxlength:a.scope.maxlength,type:"text",class:"ti-tag-input",size:"1",onInput:t[1]||(t[1]=d=>a.scope.validateTag(a.scope.index,d)),onBlur:t[2]||(t[2]=d=>a.scope.performCancelEdit(a.scope.index)),onKeydown:t[3]||(t[3]=d=>a.scope.performSaveEdit(a.scope.index,d))},null,40,O)),[[s.vModelText,a.scope.tag.text]]):s.createCommentVNode("",!0)}const A=T._export_sfc(D,[["render",I],["__scopeId","data-v-a1f1c345"]]),h=e=>!e.some(t=>{const a=!t.text;a&&console.warn('Missing property "text"',t);let i=!1;return t.classes&&(i=typeof t.classes!="string"),i&&console.warn('Property "classes" must be type of string',t),a||i}),y=e=>!e.some(t=>{if(typeof t=="number"){const a=isFinite(t)&&Math.floor(t)===t;return a||console.warn("Only numerics are allowed for this prop. Found:",t),!a}else if(typeof t=="string"){const a=/\W|[a-z]|!\d/i.test(t);return a||console.warn("Only alpha strings are allowed for this prop. Found:",t),!a}else return console.warn("Only numeric and string values are allowed. Found:",t),!1}),b={modelValue:{type:String,default:"",required:!0},tags:{type:Array,default:()=>[],validator:h},autocompleteItems:{type:Array,default:()=>[],validator:h},allowEditTags:{type:Boolean,default:!1},autocompleteFilterDuplicates:{default:!0,type:Boolean},addOnlyFromAutocomplete:{type:Boolean,default:!1},autocompleteMinLength:{type:Number,default:1},autocompleteAlwaysOpen:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:"Add Tag"},addOnKey:{type:Array,default:()=>[13],validator:y},saveOnKey:{type:Array,default:()=>[13],validator:y},maxTags:{type:Number},maxlength:{type:Number},validation:{type:Array,default:()=>[],validator(e){return!e.some(t=>{const a=!t.rule;a&&console.warn('Property "rule" is missing',t);const i=t.rule&&(typeof t.rule=="string"||t.rule instanceof RegExp||{}.toString.call(t.rule)==="[object Function]");i||console.warn("A rule must be type of string, RegExp or function. Found:",JSON.stringify(t.rule));const n=!t.classes;n&&console.warn('Property "classes" is missing',t);const l=t.type&&typeof t.type!="string";return l&&console.warn('Property "type" must be type of string. Found:',t),!i||a||n||l})}},separators:{type:Array,default:()=>[";"],validator(e){return!e.some(t=>{const a=typeof t!="string";return a&&console.warn("Separators must be type of string. Found:",t),a})}},avoidAddingDuplicates:{type:Boolean,default:!0},addOnBlur:{type:Boolean,default:!0},isDuplicate:{type:Function,default:null},addFromPaste:{type:Boolean,default:!0},deleteOnBackspace:{default:!0,type:Boolean},onBeforeAddingTag:Function,onBeforeDeletingTag:Function,onBeforeEditingTag:Function,onBeforeSavingTag:Function},F={name:"VueTagsInput",components:{TagInput:A},props:b,emits:["adding-duplicate","before-adding-tag","before-deleting-tag","before-editing-tag","before-saving-tag","max-tags-reached","saving-duplicate","tags-changed","tag-clicked","update:modelValue","update:tags"],inheritAttrs:!1,data(){return{tagCenter:[],newTag:null,tagsCopy:[],tagsEditStatus:null,deletionMark:null,deletionMarkTime:null,selectedItem:null,focused:null}},computed:{autocompleteOpen(){return this.autocompleteAlwaysOpen?!0:this.newTag!==null&&this.newTag.length>=this.autocompleteMinLength&&this.filteredAutocompleteItems.length>0&&this.focused},filteredAutocompleteItems(){const e=this.autocompleteItems.map(t=>m(t,this.tags,this.validation,this.isDuplicate));return this.autocompleteFilterDuplicates?e.filter(this.duplicateFilter):e}},methods:{createClasses:k,getSelectedIndex(e){const t=this.filteredAutocompleteItems,a=this.selectedItem,i=t.length-1;if(t.length!==0)return a===null?0:e==="before"&&a===0?i:e==="after"&&a===i?0:e==="after"?a+1:a-1},selectDefaultItem(){this.addOnlyFromAutocomplete&&this.filteredAutocompleteItems.length>0?this.selectedItem=0:this.selectedItem=null},selectItem(e,t){e.preventDefault(),this.selectedItem=this.getSelectedIndex(t)},isSelected(e){return this.selectedItem===e},isMarked(e){return this.deletionMark===e},setTagCenter(e){e&&this.tagCenter.push(e)},invokeDelete(){if(!this.deleteOnBackspace||this.newTag.length>0)return;const e=this.tagsCopy.length-1;this.deletionMark===null?(this.deletionMarkTime=setTimeout(()=>this.deletionMark=null,1e3),this.deletionMark=e):this.performDeleteTag(e)},addTagsFromPaste(){this.addFromPaste&&setTimeout(()=>this.performAddTags(this.newTag),10)},performEditTag(e){this.allowEditTags&&(this.onBeforeAddingTag||this.editTag(e),this.$emit("before-editing-tag",{index:e,tag:this.tagsCopy[e],editTag:()=>this.editTag(e)}))},editTag(e){this.allowEditTags&&(this.toggleEditMode(e),this.focus(e))},toggleEditMode(e){!this.allowEditTags||this.disabled||(this.tagsEditStatus[e]=!this.tagsEditStatus[e])},createChangedTag(e,t){const a=this.tagsCopy[e];a.text=t?t.target.value:this.tagsCopy[e].text,this.tagsCopy[e]=m(a,this.tagsCopy,this.validation,this.isDuplicate)},focus(e){this.$nextTick(()=>{const t=this.tagCenter[e].querySelector("input.ti-tag-input");t&&t.focus()})},quote(e){return e.replace(/([()[{*+.$^\\|?])/g,"\\$1")},cancelEdit(e){this.tags[e]&&(this.tagsCopy[e]=c(m(this.tags[e],this.tags,this.validation,this.isDuplicate)),this.tagsEditStatus[e]=!1)},hasForbiddingAddRule(e){return e.some(t=>{const a=this.validation.find(i=>t===i.classes);return a?a.disableAdd:!1})},createTagTexts(e){const t=new RegExp(this.separators.map(a=>this.quote(a)).join("|"));return e.split(t).map(a=>({text:a}))},performDeleteTag(e){this.onBeforeDeletingTag||this.deleteTag(e),this.$emit("before-deleting-tag",{index:e,tag:this.tagsCopy[e],deleteTag:()=>this.deleteTag(e)})},deleteTag(e){this.disabled||(this.deletionMark=null,clearTimeout(this.deletionMarkTime),this.tagsCopy.splice(e,1),this.$emit("update:tags",this.tagsCopy),this.$emit("tags-changed",this.tagsCopy))},noTriggerKey(e,t){const a=this[t].indexOf(e.keyCode)!==-1||this[t].indexOf(e.key)!==-1;return a&&e.preventDefault(),!a},performAddTags(e,t,a){if(this.disabled||t&&this.noTriggerKey(t,"addOnKey"))return;let i=[];typeof e=="object"&&(i=[e]),typeof e=="string"&&(i=this.createTagTexts(e)),i=i.filter(n=>n.text.trim().length>0),i.forEach(n=>{n=m(n,this.tags,this.validation,this.isDuplicate),this.onBeforeAddingTag||this.addTag(n,a),this.$emit("before-adding-tag",{tag:n,addTag:()=>this.addTag(n,a)})})},duplicateFilter(e){return this.isDuplicate?!this.isDuplicate(this.tagsCopy,e):!this.tagsCopy.find(t=>t.text===e.text)},addTag(e,t="new-tag-input"){const a=this.filteredAutocompleteItems.map(i=>i.text);this.addOnlyFromAutocomplete&&a.indexOf(e.text)===-1||this.$nextTick(()=>{if(this.maxTags&&this.maxTags<=this.tagsCopy.length)return this.$emit("max-tags-reached",e);if(this.avoidAddingDuplicates&&!this.duplicateFilter(e))return this.$emit("adding-duplicate",e);this.hasForbiddingAddRule(e.tiClasses)||(this.newTag="",this.tagsCopy.push(e),this.$emit("update:tags",this.tagsCopy),t==="autocomplete"&&this.$refs.newTagInput.focus(),this.$emit("tags-changed",this.tagsCopy))})},performSaveTag(e,t){const a=this.tagsCopy[e];this.disabled||t&&this.noTriggerKey(t,"addOnKey")||a.text.trim().length!==0&&(this["on-before-saving-tag"]||this.saveTag(e,a),this.$emit("before-saving-tag",{index:e,tag:a,saveTag:()=>this.saveTag(e,a)}))},saveTag(e,t){if(this.avoidAddingDuplicates){const a=c(this.tagsCopy),i=a.splice(e,1)[0];if(this.isDuplicate?this.isDuplicate(a,i):a.map(l=>l.text).indexOf(i.text)!==-1)return this.$emit("saving-duplicate",t)}this.hasForbiddingAddRule(t.tiClasses)||(this.tagsCopy[e]=t,this.toggleEditMode(e),this.$emit("update:tags",this.tagsCopy),this.$emit("tags-changed",this.tagsCopy))},tagsEqual(){return!this.tagsCopy.some((e,t)=>!B(e,this.tags[t]))},updateNewTag(e){const t=e.target.value;this.newTag=t,this.$emit("update:modelValue",t)},initTags(){this.tagsCopy=$(this.tags,this.validation,this.isDuplicate),this.tagsEditStatus=c(this.tags).map(()=>!1),this.tagsEqual()||this.$emit("update:tags",this.tagsCopy)},blurredOnClick(e){this.$el.contains(e.target)||this.$el.contains(document.activeElement)||this.performBlur(e)},performBlur(){this.addOnBlur&&this.focused&&this.performAddTags(this.newTag),this.focused=!1}},watch:{modelValue(e){this.addOnlyFromAutocomplete||(this.selectedItem=null),this.newTag=e},tags:{handler(){this.initTags()},deep:!0},autocompleteOpen:"selectDefaultItem"},created(){this.newTag=this.modelValue,this.initTags()},mounted(){this.selectDefaultItem(),document.addEventListener("click",this.blurredOnClick)},beforeUpdate(){this.tagCenter=[]},unmounted(){document.removeEventListener("click",this.blurredOnClick)}};const V={class:"ti-input"},N={key:0,class:"ti-tags"},M=["onClick"],K={class:"ti-content"},R={key:0,class:"ti-tag-left"},j=["onClick"],q={key:1,class:"ti-tag-right"},P={class:"ti-actions"},z=["onClick"],L=["onClick"],U={class:"ti-new-tag-input-wrapper"},J=["placeholder","value","maxlength","disabled"],H=["onMouseover"],W=["onClick"];function Y(e,t,a,i,n,l){const d=s.resolveComponent("tag-input");return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["vue-tags-input",[{"ti-disabled":e.disabled},{"ti-focus":e.focused},e.$attrs.class]]),style:s.normalizeStyle(e.$attrs.style)},[s.createElementVNode("div",V,[e.tagsCopy?(s.openBlock(),s.createElementBlock("ul",N,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.tagsCopy,(o,r)=>(s.openBlock(),s.createElementBlock("li",{key:r,style:s.normalizeStyle(o.style),class:s.normalizeClass([[{"ti-editing":e.tagsEditStatus[r]},o.tiClasses,o.classes,{"ti-deletion-mark":e.isMarked(r)}],"ti-tag"]),tabindex:"0",onClick:u=>e.$emit("tag-clicked",{tag:o,index:r})},[s.createElementVNode("div",K,[e.$slots["tag-left"]?(s.openBlock(),s.createElementBlock("div",R,[s.renderSlot(e.$slots,"tag-left",{tag:o,index:r,edit:e.tagsEditStatus[r],performSaveEdit:e.performSaveTag,performDelete:e.performDeleteTag,performCancelEdit:e.cancelEdit,performOpenEdit:e.performEditTag,deletionMark:e.isMarked(r)},void 0,!0)])):s.createCommentVNode("",!0),s.createElementVNode("div",{ref_for:!0,ref:e.setTagCenter,class:"ti-tag-center"},[e.$slots["tag-center"]?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("span",{key:0,class:s.normalizeClass({"ti-hidden":e.tagsEditStatus[r]}),onClick:u=>e.performEditTag(r)},s.toDisplayString(o.text),11,j)),e.$slots["tag-center"]?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(d,{key:1,scope:{edit:e.tagsEditStatus[r],maxlength:e.maxlength,tag:o,index:r,validateTag:e.createChangedTag,performCancelEdit:e.cancelEdit,performSaveEdit:e.performSaveTag}},null,8,["scope"])),s.renderSlot(e.$slots,"tag-center",{tag:o,index:r,maxlength:e.maxlength,edit:e.tagsEditStatus[r],performSaveEdit:e.performSaveTag,performDelete:e.performDeleteTag,performCancelEdit:e.cancelEdit,validateTag:e.createChangedTag,performOpenEdit:e.performEditTag,deletionMark:e.isMarked(r)},void 0,!0)],512),e.$slots["tag-right"]?(s.openBlock(),s.createElementBlock("div",q,[s.renderSlot(e.$slots,"tag-right",{tag:o,index:r,edit:e.tagsEditStatus[r],performSaveEdit:e.performSaveTag,performDelete:e.performDeleteTag,performCancelEdit:e.cancelEdit,performOpenEdit:e.performEditTag,deletionMark:e.isMarked(r)},void 0,!0)])):s.createCommentVNode("",!0)]),s.createElementVNode("div",P,[e.$slots["tag-actions"]?s.createCommentVNode("",!0):s.withDirectives((s.openBlock(),s.createElementBlock("i",{key:0,class:"ti-icon-undo",onClick:u=>e.cancelEdit(r)},null,8,z)),[[s.vShow,e.tagsEditStatus[r]]]),e.$slots["tag-actions"]?s.createCommentVNode("",!0):s.withDirectives((s.openBlock(),s.createElementBlock("i",{key:1,class:"ti-icon-close",onClick:u=>e.performDeleteTag(r)},null,8,L)),[[s.vShow,!e.tagsEditStatus[r]]]),e.$slots["tag-actions"]?s.renderSlot(e.$slots,"tag-actions",{key:2,tag:o,index:r,edit:e.tagsEditStatus[r],performSaveEdit:e.performSaveTag,performDelete:e.performDeleteTag,performCancelEdit:e.cancelEdit,performOpenEdit:e.performEditTag,deletionMark:e.isMarked(r)},void 0,!0):s.createCommentVNode("",!0)])],14,M))),128)),s.createElementVNode("li",U,[s.createElementVNode("input",s.mergeProps({ref:"newTagInput"},e.$attrs,{class:[[e.createClasses(e.newTag,e.tags,e.validation,e.isDuplicate)],"ti-new-tag-input"],placeholder:e.placeholder,value:e.newTag,maxlength:e.maxlength,disabled:e.disabled,type:"text",size:"1",onKeydown:[t[0]||(t[0]=o=>e.performAddTags(e.filteredAutocompleteItems[e.selectedItem]||e.newTag,o)),t[2]||(t[2]=s.withKeys((...o)=>e.invokeDelete&&e.invokeDelete(...o),["delete"])),t[3]||(t[3]=s.withKeys((...o)=>e.performBlur&&e.performBlur(...o),["tab"])),t[4]||(t[4]=s.withKeys(o=>e.selectItem(o,"before"),["up"])),t[5]||(t[5]=s.withKeys(o=>e.selectItem(o,"after"),["down"]))],onPaste:t[1]||(t[1]=(...o)=>e.addTagsFromPaste&&e.addTagsFromPaste(...o)),onInput:t[6]||(t[6]=(...o)=>e.updateNewTag&&e.updateNewTag(...o)),onFocus:t[7]||(t[7]=o=>e.focused=!0),onClick:t[8]||(t[8]=o=>e.addOnlyFromAutocomplete?!1:e.selectedItem=null)}),null,16,J)])])):s.createCommentVNode("",!0)]),s.renderSlot(e.$slots,"between-elements",{},void 0,!0),e.autocompleteOpen?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["ti-autocomplete",e.$attrs.class]),onMouseout:t[9]||(t[9]=o=>e.selectedItem=null)},[s.renderSlot(e.$slots,"autocomplete-header",{},void 0,!0),s.createElementVNode("ul",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.filteredAutocompleteItems,(o,r)=>(s.openBlock(),s.createElementBlock("li",{key:r,style:s.normalizeStyle(o.style),class:s.normalizeClass([[o.tiClasses,o.classes,{"ti-selected-item":e.isSelected(r)}],"ti-item"]),onMouseover:u=>e.disabled?!1:e.selectedItem=r},[e.$slots["autocomplete-item"]?s.renderSlot(e.$slots,"autocomplete-item",{key:1,item:o,index:r,performAdd:u=>e.performAddTags(u,void 0,"autocomplete"),selected:e.isSelected(r)},void 0,!0):(s.openBlock(),s.createElementBlock("div",{key:0,onClick:u=>e.performAddTags(o,void 0,"autocomplete")},s.toDisplayString(o.text),9,W))],46,H))),128))]),s.renderSlot(e.$slots,"autocomplete-footer",{},void 0,!0)],34)):s.createCommentVNode("",!0)],6)}const G=T._export_sfc(F,[["render",Y],["__scopeId","data-v-d14eec25"]]);const Q=s.createElementVNode("h5",{class:"mn-thin"},"Tags (maximum 20):",-1),X={class:"mn-medium"},Z=s.createElementVNode("p",{class:"p-small mn-thin"},"Suggested:",-1),_=["onClick"],x={key:1},ee={__name:"BlockTags",props:["tags"],emits:["tags-changed"],setup(e,{emit:t}){const a=e,i=s.ref(""),n=s.ref([]),l=s.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);a.tags&&(n.value=a.tags.map(p=>({text:p})));const d=s.computed(()=>l.value.filter(p=>p.text.toLowerCase().includes(i.value.toLowerCase()))),o=s.computed(()=>l.value.filter(p=>!n.value.some(g=>g.text===p.text)));function r(p){n.value.push(p),t("tags-changed",n.value.map(g=>g.text))}function u(p){n.value=p,t("tags-changed",n.value.map(g=>g.text))}return(p,g)=>(s.openBlock(),s.createElementBlock("div",null,[Q,s.createVNode(G,{modelValue:i.value,"onUpdate:modelValue":g[0]||(g[0]=f=>i.value=f),tags:n.value,"autocomplete-items":s.unref(d),"add-on-key":[13,":",";",","],"save-on-key":[13,":",";",","],separators:[";",","],"max-tags":20,maxlength:20,placeholder:"Please add tags","add-from-paste":!0,"allow-edit-tags":!0,onTagsChanged:u,class:"mn-thin bg-grey radius-medium pd-small"},null,8,["modelValue","tags","autocomplete-items"]),s.createElementVNode("p",X,[Z,s.unref(o).length>0?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:0},s.renderList(s.unref(o),(f,v)=>(s.openBlock(),s.createElementBlock("span",{onClick:te=>r(f),class:s.normalizeClass(["cursor-pointer ti-tag-toDefactor",{"mn-r-micro":v!==s.unref(o).length-1}])},s.toDisplayString(f.text),11,_))),256)):(s.openBlock(),s.createElementBlock("span",x,"You added all suggested tags"))])]))}};exports._sfc_main=ee;