@oneclick.dev/cms-core-modules 0.0.70 → 0.0.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (323) hide show
  1. package/dist/Acquisition-D_Qx7XRY.mjs +400 -0
  2. package/dist/Acquisition-_-cq972V.js +1 -0
  3. package/dist/AppointmentDetailsCard-CtK0Cj_O.js +1 -0
  4. package/dist/AppointmentDetailsCard-i4Ky8WnK.mjs +161 -0
  5. package/dist/AppointmentEditor-BeOtYV6u.mjs +196 -0
  6. package/dist/AppointmentEditor-CaTfbkIf.js +1 -0
  7. package/dist/AppointmentListTable-CQ3uXfa8.js +1 -0
  8. package/dist/AppointmentListTable-G5dIeCYj.mjs +159 -0
  9. package/dist/Audience-BdlrWkY-.mjs +489 -0
  10. package/dist/Audience-QnFQs93n.js +1 -0
  11. package/dist/Content-C-4Cdniz.js +1 -0
  12. package/dist/Content-DW6xvbUo.mjs +358 -0
  13. package/dist/ContentEditor-3JFlC9N1.js +313 -0
  14. package/dist/{ContentEditor-B7IYLH91.mjs → ContentEditor-7SDjf5Hk.mjs} +16535 -25527
  15. package/dist/CountryBreakdownCard-BUfJ-umQ.js +1 -0
  16. package/dist/CountryBreakdownCard-Dc_vZ9dJ.mjs +196 -0
  17. package/dist/{Create-D8NBEkJU.js → Create-CRn2sMHp.js} +1 -1
  18. package/dist/{Create-BDiyCtrp.mjs → Create-DtFzwxn_.mjs} +1 -1
  19. package/dist/DateFormatter-C9qfmQnP.js +1 -0
  20. package/dist/{DateFormatter-DAZP9a6L.mjs → DateFormatter-DfIwyrnF.mjs} +399 -258
  21. package/dist/{Detail-Cxd2VMOl.js → Detail-BcboL7NF.js} +1 -1
  22. package/dist/{Detail-CxUU6BpO.mjs → Detail-BwDnY42G.mjs} +1 -1
  23. package/dist/{Detail-DTHaYmyl.js → Detail-Bxi7lG9x.js} +1 -1
  24. package/dist/{Detail-BGD75ul4.mjs → Detail-CVgWHbMC.mjs} +22 -18
  25. package/dist/DeviceBreakdownCard-BJcQNo8a.mjs +159 -0
  26. package/dist/DeviceBreakdownCard-CsoK6JUO.js +1 -0
  27. package/dist/{Find-B4sAEx0B.mjs → Find-XPcJxeRH.mjs} +1 -1
  28. package/dist/{NewReservationDialog.vue_vue_type_script_setup_true_lang-B-ZhMrMu.js → NewReservationDialog.vue_vue_type_script_setup_true_lang-C5YczjNb.js} +1 -1
  29. package/dist/{NewReservationDialog.vue_vue_type_script_setup_true_lang-CJ7hh7ug.mjs → NewReservationDialog.vue_vue_type_script_setup_true_lang-Ds7z0qeH.mjs} +1 -1
  30. package/dist/{Overview-HvlDEgqi.mjs → Overview--XpvBbqz.mjs} +1 -1
  31. package/dist/Overview-B8OF-JJr.mjs +567 -0
  32. package/dist/Overview-DSU1Nh7B.js +1 -0
  33. package/dist/PeakHoursCard-BNl_U1r_.js +1 -0
  34. package/dist/PeakHoursCard-hV8PdGsf.mjs +182 -0
  35. package/dist/ProductDetailsCard-BwktdlIf.js +1 -0
  36. package/dist/ProductDetailsCard-CJBkZSER.mjs +121 -0
  37. package/dist/RealtimeCard-CRJHS64l.mjs +126 -0
  38. package/dist/RealtimeCard-CxtqQHee.js +1 -0
  39. package/dist/SearchTermsCard-DGRbo5ZP.js +1 -0
  40. package/dist/SearchTermsCard-Dwa-P7My.mjs +201 -0
  41. package/dist/SeoHealth-BqlYiSCj.js +1 -0
  42. package/dist/SeoHealth-DG004AsJ.mjs +523 -0
  43. package/dist/{TableView-C4NNrJpP.js → TableView-CU0a9ih2.js} +162 -199
  44. package/dist/{TableView-B5OyApnP.mjs → TableView-fYC7kB6j.mjs} +23309 -24320
  45. package/dist/TopPagesCard-Dv52to_J.mjs +159 -0
  46. package/dist/TopPagesCard-pZ-nAsaI.js +1 -0
  47. package/dist/TrafficSourcesCard-CBOPV1J1.js +1 -0
  48. package/dist/TrafficSourcesCard-CMhcj2k2.mjs +197 -0
  49. package/dist/VisitorStatsCard-BHn4oSnt.mjs +174 -0
  50. package/dist/VisitorStatsCard-tApB_7v8.js +1 -0
  51. package/dist/{agenda-CTG6N_Lt.mjs → agenda-XqvbrU72.mjs} +2 -2
  52. package/dist/{agenda-OSkAh0Oa.js → agenda-wNFDKn0G.js} +1 -1
  53. package/dist/array-CbATeQbk.js +1 -0
  54. package/dist/array-CvmZXzxF.mjs +108 -0
  55. package/dist/cms-core-modules.css +1 -1
  56. package/dist/{exceptions-CEXIFw47.mjs → exceptions-CLgeeUSy.mjs} +1 -1
  57. package/dist/{exceptions-BvMTqtof.js → exceptions-wEQEVzIs.js} +1 -1
  58. package/dist/floating-ui.dom-BO2Hr6mz.mjs +1292 -0
  59. package/dist/floating-ui.dom-CAr9LGoC.js +1 -0
  60. package/dist/{index-AmUV8LZQ.mjs → index-B-lVEpFX.mjs} +1 -1
  61. package/dist/index-BuzLn4Km.js +54 -0
  62. package/dist/index-C4YUVWzJ.js +75 -0
  63. package/dist/index-CMk3uhUt.mjs +3837 -0
  64. package/dist/{index-Uf7TwBuW.mjs → index-CrGjxSwa.mjs} +4 -4
  65. package/dist/index-D2DYuz8R.mjs +1090 -0
  66. package/dist/index-D3L8WAJI.js +58 -0
  67. package/dist/index-D7JBu6iT.mjs +34 -0
  68. package/dist/index-DQYBP8Js.js +158 -0
  69. package/dist/index-DjDCYQ_6.mjs +441 -0
  70. package/dist/index-DwHYfZl_.js +1 -0
  71. package/dist/{index-Biuv2zTx-DBCin9DT.mjs → index-N6w5-hDF-6k_ELHYC.mjs} +1234 -1234
  72. package/dist/index-N6w5-hDF-DCuxwPBX.js +88 -0
  73. package/dist/index-O_QNuTdG.js +35 -0
  74. package/dist/index-_2lRVt_k.mjs +2942 -0
  75. package/dist/index-p5Uqu8c2.mjs +1438 -0
  76. package/dist/index.cjs.js +1 -1
  77. package/dist/index.mjs +383 -86
  78. package/dist/{resources-DgPnEv76.mjs → resources-CFR_s89Z.mjs} +1 -1
  79. package/dist/src/appointments/chat-components/AppointmentDetailsCard.vue.d.ts +14 -0
  80. package/dist/src/appointments/chat-components/AppointmentEditor.vue.d.ts +14 -0
  81. package/dist/src/appointments/chat-components/AppointmentListTable.vue.d.ts +14 -0
  82. package/dist/src/appointments/index.d.ts +70 -0
  83. package/dist/src/appointments/server.d.ts +19 -0
  84. package/dist/src/appointments/tools.d.ts +56 -16
  85. package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Button.vue.d.ts +3 -1
  86. package/dist/src/contentManager/components/content-editor/tiptap-extensions/CustomClass.d.ts +14 -0
  87. package/dist/src/contentManager/components/content-editor/tiptap-extensions/NodeDragPointerEventsFix.d.ts +2 -0
  88. package/dist/src/contentManager/components/content-editor/tiptap-menus/BubbleMenuClassBuilder.vue.d.ts +19 -0
  89. package/dist/src/contentManager/components/content-editor/tiptap-menus/BubbleMenuLinkBuilder.vue.d.ts +19 -0
  90. package/dist/src/googleAnalytics/chat-components/CountryBreakdownCard.vue.d.ts +14 -0
  91. package/dist/src/googleAnalytics/chat-components/DeviceBreakdownCard.vue.d.ts +14 -0
  92. package/dist/src/googleAnalytics/chat-components/PeakHoursCard.vue.d.ts +14 -0
  93. package/dist/src/googleAnalytics/chat-components/RealtimeCard.vue.d.ts +14 -0
  94. package/dist/src/googleAnalytics/chat-components/SearchTermsCard.vue.d.ts +14 -0
  95. package/dist/src/googleAnalytics/chat-components/TopPagesCard.vue.d.ts +14 -0
  96. package/dist/src/googleAnalytics/chat-components/TrafficSourcesCard.vue.d.ts +14 -0
  97. package/dist/src/googleAnalytics/chat-components/VisitorStatsCard.vue.d.ts +14 -0
  98. package/dist/src/googleAnalytics/config.d.ts +39 -0
  99. package/dist/src/googleAnalytics/index.d.ts +116 -0
  100. package/dist/src/googleAnalytics/metadata.d.ts +2 -0
  101. package/dist/src/googleAnalytics/pages/Acquisition.vue.d.ts +2 -0
  102. package/dist/src/googleAnalytics/pages/Audience.vue.d.ts +2 -0
  103. package/dist/src/googleAnalytics/pages/Content.vue.d.ts +2 -0
  104. package/dist/src/googleAnalytics/pages/Overview.vue.d.ts +2 -0
  105. package/dist/src/googleAnalytics/pages/SeoHealth.vue.d.ts +2 -0
  106. package/dist/src/googleAnalytics/permissions.d.ts +1 -0
  107. package/dist/src/googleAnalytics/server.d.ts +35 -0
  108. package/dist/src/googleAnalytics/tools.d.ts +59 -0
  109. package/dist/src/index.d.ts +6 -5
  110. package/dist/src/mailTemplates/components/TemplateList.vue.d.ts +2 -0
  111. package/dist/src/mailTemplates/routes.d.ts +5 -0
  112. package/dist/src/mailTemplates/tools.d.ts +1 -0
  113. package/dist/src/productCollections/tools.d.ts +1 -0
  114. package/dist/src/products/chat-components/ProductDetailsCard.vue.d.ts +14 -0
  115. package/dist/src/products/index.d.ts +24 -2
  116. package/dist/src/products/server.d.ts +19 -0
  117. package/dist/src/products/tools.d.ts +21 -2
  118. package/dist/src/promoCodes/tools.d.ts +1 -0
  119. package/dist/src/server-handlers.d.ts +9 -0
  120. package/dist/src/table/tools.d.ts +1 -25
  121. package/package.json +23 -21
  122. package/src/appointments/server.ts +195 -0
  123. package/src/appointments/tools.ts +61 -21
  124. package/src/googleAnalytics/server.ts +1188 -0
  125. package/src/googleAnalytics/tools.ts +158 -0
  126. package/src/mailTemplates/tools.ts +1 -0
  127. package/src/productCollections/tools.ts +1 -0
  128. package/src/products/server.ts +146 -0
  129. package/src/products/tools.ts +19 -0
  130. package/src/promoCodes/tools.ts +1 -0
  131. package/src/table/tools.ts +1 -25
  132. package/dist/ContentEditor-LOn09n7N.js +0 -307
  133. package/dist/DateFormatter-Bw-SCfUS.js +0 -1
  134. package/dist/floating-ui.dom-CBBY0Ism.js +0 -1
  135. package/dist/floating-ui.dom-xfqXu4GA.mjs +0 -1138
  136. package/dist/index-Biuv2zTx-DHiVlXFj.js +0 -88
  137. package/dist/index-HLGxDG-0.mjs +0 -7746
  138. package/dist/index-n2p9TTRq.js +0 -245
  139. package/dist/src/content-manager/components/content-editor/tiptap-extensions/DragHandle.d.ts +0 -76
  140. package/dist/src/content-manager/components/content-editor/tiptap-extensions/NodeDragPointerEventsFix.d.ts +0 -7
  141. package/dist/src/content-manager/components/content-editor/tiptap-extensions/extension-drag-handle/drag-handle-plugin.d.ts +0 -25
  142. package/dist/src/content-manager/components/content-editor/tiptap-extensions/extension-drag-handle/drag-handle.d.ts +0 -50
  143. package/dist/src/content-manager/components/content-editor/tiptap-extensions/extension-drag-handle/helpers/cloneElement.d.ts +0 -1
  144. package/dist/src/content-manager/components/content-editor/tiptap-extensions/extension-drag-handle/helpers/dragHandler.d.ts +0 -2
  145. package/dist/src/content-manager/components/content-editor/tiptap-extensions/extension-drag-handle/helpers/findNextElementFromCursor.d.ts +0 -17
  146. package/dist/src/content-manager/components/content-editor/tiptap-extensions/extension-drag-handle/helpers/getComputedStyle.d.ts +0 -1
  147. package/dist/src/content-manager/components/content-editor/tiptap-extensions/extension-drag-handle/helpers/getInnerCoords.d.ts +0 -5
  148. package/dist/src/content-manager/components/content-editor/tiptap-extensions/extension-drag-handle/helpers/getOuterNode.d.ts +0 -3
  149. package/dist/src/content-manager/components/content-editor/tiptap-extensions/extension-drag-handle/helpers/minMax.d.ts +0 -1
  150. package/dist/src/content-manager/components/content-editor/tiptap-extensions/extension-drag-handle/helpers/removeNode.d.ts +0 -1
  151. package/dist/src/content-manager/components/content-editor/tiptap-extensions/extension-drag-handle/index.d.ts +0 -4
  152. package/dist/src/mail-templates/tools.d.ts +0 -25
  153. package/dist/src/product-collections/tools.d.ts +0 -25
  154. package/dist/src/promo-codes/tools.d.ts +0 -25
  155. package/src/mail-templates/tools.ts +0 -25
  156. package/src/product-collections/tools.ts +0 -25
  157. package/src/promo-codes/tools.ts +0 -25
  158. /package/dist/src/{content-manager → contentManager}/components/components/ComponentDialog.vue.d.ts +0 -0
  159. /package/dist/src/{content-manager → contentManager}/components/components/ComponentGridItem.vue.d.ts +0 -0
  160. /package/dist/src/{content-manager → contentManager}/components/content-editor/ApiDocs.vue.d.ts +0 -0
  161. /package/dist/src/{content-manager → contentManager}/components/content-editor/ContentLayout.vue.d.ts +0 -0
  162. /package/dist/src/{content-manager → contentManager}/components/content-editor/ContentSettings.vue.d.ts +0 -0
  163. /package/dist/src/{content-manager → contentManager}/components/content-editor/ContentStructuredContentSections.vue.d.ts +0 -0
  164. /package/dist/src/{content-manager → contentManager}/components/content-editor/Header.vue.d.ts +0 -0
  165. /package/dist/src/{content-manager → contentManager}/components/content-editor/LivePreviewWrapper.vue.d.ts +0 -0
  166. /package/dist/src/{content-manager → contentManager}/components/content-editor/Locales.vue.d.ts +0 -0
  167. /package/dist/src/{content-manager → contentManager}/components/content-editor/NewSectionDialog.vue.d.ts +0 -0
  168. /package/dist/src/{content-manager → contentManager}/components/content-editor/PageSettings.vue.d.ts +0 -0
  169. /package/dist/src/{content-manager → contentManager}/components/content-editor/SEO.vue.d.ts +0 -0
  170. /package/dist/src/{content-manager → contentManager}/components/content-editor/SidebarSectionWrapper.vue.d.ts +0 -0
  171. /package/dist/src/{content-manager → contentManager}/components/content-editor/Status.vue.d.ts +0 -0
  172. /package/dist/src/{content-manager → contentManager}/components/content-editor/Versions.vue.d.ts +0 -0
  173. /package/dist/src/{content-manager → contentManager}/components/content-editor/code-examples.d.ts +0 -0
  174. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Button.d.ts +0 -0
  175. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Card.d.ts +0 -0
  176. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Card.vue.d.ts +0 -0
  177. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Column.d.ts +0 -0
  178. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Column.vue.d.ts +0 -0
  179. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/ComponentEditorNode.d.ts +0 -0
  180. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Container.d.ts +0 -0
  181. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Container.vue.d.ts +0 -0
  182. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Divider.d.ts +0 -0
  183. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Divider.vue.d.ts +0 -0
  184. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/EmptySpace.d.ts +0 -0
  185. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/EmptySpace.vue.d.ts +0 -0
  186. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Heading.d.ts +0 -0
  187. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Heading.vue.d.ts +0 -0
  188. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Image.d.ts +0 -0
  189. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Image.vue.d.ts +0 -0
  190. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/LockBlocks.d.ts +0 -0
  191. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Map.d.ts +0 -0
  192. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Map.vue.d.ts +0 -0
  193. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/OnlyContainerDocument.d.ts +0 -0
  194. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Paragraph.d.ts +0 -0
  195. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Paragraph.vue.d.ts +0 -0
  196. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Row.d.ts +0 -0
  197. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Row.vue.d.ts +0 -0
  198. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/ScopedSelectAll.d.ts +0 -0
  199. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Stack.d.ts +0 -0
  200. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Stack.vue.d.ts +0 -0
  201. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/TrailingNodeInContainers.d.ts +0 -0
  202. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Video.d.ts +0 -0
  203. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Video.vue.d.ts +0 -0
  204. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/extension-details/DetailsNodeView.vue.d.ts +0 -0
  205. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/extension-details/content/details-content.d.ts +0 -0
  206. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/extension-details/content/index.d.ts +0 -0
  207. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/extension-details/details.d.ts +0 -0
  208. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/extension-details/helpers/findClosestVisibleNode.d.ts +0 -0
  209. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/extension-details/helpers/isNodeVisible.d.ts +0 -0
  210. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/extension-details/helpers/setGapCursor.d.ts +0 -0
  211. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/extension-details/index.d.ts +0 -0
  212. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/extension-details/summary/details-summary.d.ts +0 -0
  213. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/extension-details/summary/index.d.ts +0 -0
  214. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/helpers/NodeLabel.vue.d.ts +0 -0
  215. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/helpers/ResizeHandlers.vue.d.ts +0 -0
  216. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/helpers/TopMarginDragger.vue.d.ts +0 -0
  217. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/helpers/useContainerFocus.d.ts +0 -0
  218. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/helpers/useFocus.d.ts +0 -0
  219. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/BubbleMenuToggleButton.vue.d.ts +0 -0
  220. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/DefaultBubbleMenu.vue.d.ts +0 -0
  221. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/ElementEditorMenu.vue.d.ts +0 -0
  222. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/EmojiMenu.vue.d.ts +0 -0
  223. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/NewNodeView.vue.d.ts +0 -0
  224. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/SlashMenu.vue.d.ts +0 -0
  225. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/SlashMenuButton.vue.d.ts +0 -0
  226. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/element-editor-views/ButtonMenu.vue.d.ts +0 -0
  227. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/element-editor-views/CardMenu.vue.d.ts +0 -0
  228. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/element-editor-views/ColumnMenu.vue.d.ts +0 -0
  229. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/element-editor-views/DividerMenu.vue.d.ts +0 -0
  230. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/element-editor-views/EmptySpaceMenu.vue.d.ts +0 -0
  231. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/element-editor-views/HeadingMenu.vue.d.ts +0 -0
  232. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/element-editor-views/ImageMenu.vue.d.ts +0 -0
  233. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/element-editor-views/MapMenu.vue.d.ts +0 -0
  234. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/element-editor-views/RowMenu.vue.d.ts +0 -0
  235. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/element-editor-views/StackMenu.vue.d.ts +0 -0
  236. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/element-editor-views/TextMenu.vue.d.ts +0 -0
  237. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/element-editor-views/VideoMenu.vue.d.ts +0 -0
  238. /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/element-editor-views/index.d.ts +0 -0
  239. /package/dist/src/{content-manager → contentManager}/components/overview/CollectionDialog.vue.d.ts +0 -0
  240. /package/dist/src/{content-manager → contentManager}/components/overview/CollectionsGridView.vue.d.ts +0 -0
  241. /package/dist/src/{content-manager → contentManager}/components/overview/ContentEntryContextMenu.vue.d.ts +0 -0
  242. /package/dist/src/{content-manager → contentManager}/components/overview/FilterPopover.vue.d.ts +0 -0
  243. /package/dist/src/{content-manager → contentManager}/components/overview/ListView.vue.d.ts +0 -0
  244. /package/dist/src/{content-manager → contentManager}/components/styling/ButtonStyleDialog.vue.d.ts +0 -0
  245. /package/dist/src/{content-manager → contentManager}/components/styling/CardStyleDialog.vue.d.ts +0 -0
  246. /package/dist/src/{content-manager → contentManager}/components/styling/SectionStyleDialog.vue.d.ts +0 -0
  247. /package/dist/src/{content-manager → contentManager}/config.d.ts +0 -0
  248. /package/dist/src/{content-manager → contentManager}/index.d.ts +0 -0
  249. /package/dist/src/{content-manager → contentManager}/index.vue.d.ts +0 -0
  250. /package/dist/src/{content-manager → contentManager}/metadata.d.ts +0 -0
  251. /package/dist/src/{content-manager → contentManager}/pages/Components.vue.d.ts +0 -0
  252. /package/dist/src/{content-manager → contentManager}/pages/ContentEditor.vue.d.ts +0 -0
  253. /package/dist/src/{content-manager → contentManager}/pages/Entries.vue.d.ts +0 -0
  254. /package/dist/src/{content-manager → contentManager}/pages/GlobalStyling.vue.d.ts +0 -0
  255. /package/dist/src/{content-manager → contentManager}/pages/Overview.vue.d.ts +0 -0
  256. /package/dist/src/{content-manager → contentManager}/permissions.d.ts +0 -0
  257. /package/dist/src/{content-manager → contentManager}/routes.d.ts +0 -0
  258. /package/dist/src/{content-manager → contentManager}/stores/useTableStore.d.ts +0 -0
  259. /package/dist/src/{content-manager → contentManager}/tools.d.ts +0 -0
  260. /package/dist/src/{content-manager → contentManager}/types.d.ts +0 -0
  261. /package/dist/src/{mail-templates/components/TemplateList.vue.d.ts → googleAnalytics/index.vue.d.ts} +0 -0
  262. /package/dist/src/{mail-templates → googleAnalytics}/routes.d.ts +0 -0
  263. /package/dist/src/{mail-templates → mailTemplates}/config.d.ts +0 -0
  264. /package/dist/src/{mail-templates → mailTemplates}/index.d.ts +0 -0
  265. /package/dist/src/{mail-templates → mailTemplates}/index.vue.d.ts +0 -0
  266. /package/dist/src/{mail-templates → mailTemplates}/metadata.d.ts +0 -0
  267. /package/dist/src/{mail-templates → mailTemplates}/pages/Detail.vue.d.ts +0 -0
  268. /package/dist/src/{mail-templates → mailTemplates}/pages/Overview.vue.d.ts +0 -0
  269. /package/dist/src/{mail-templates → mailTemplates}/permissions.d.ts +0 -0
  270. /package/dist/src/{mail-templates → mailTemplates}/stores/useTableStore.d.ts +0 -0
  271. /package/dist/src/{mail-templates → mailTemplates}/types.d.ts +0 -0
  272. /package/dist/src/{product-collections → productCollections}/components/detail/Main.vue.d.ts +0 -0
  273. /package/dist/src/{product-collections → productCollections}/components/detail/SEO.vue.d.ts +0 -0
  274. /package/dist/src/{product-collections → productCollections}/components/detail/Status.vue.d.ts +0 -0
  275. /package/dist/src/{product-collections → productCollections}/components/overview/ListView.vue.d.ts +0 -0
  276. /package/dist/src/{product-collections → productCollections}/composables/useTable.d.ts +0 -0
  277. /package/dist/src/{product-collections → productCollections}/config.d.ts +0 -0
  278. /package/dist/src/{product-collections → productCollections}/index.d.ts +0 -0
  279. /package/dist/src/{product-collections → productCollections}/index.vue.d.ts +0 -0
  280. /package/dist/src/{product-collections → productCollections}/metadata.d.ts +0 -0
  281. /package/dist/src/{product-collections → productCollections}/pages/Detail.vue.d.ts +0 -0
  282. /package/dist/src/{product-collections → productCollections}/pages/Overview.vue.d.ts +0 -0
  283. /package/dist/src/{product-collections → productCollections}/permissions.d.ts +0 -0
  284. /package/dist/src/{product-collections → productCollections}/routes.d.ts +0 -0
  285. /package/dist/src/{product-collections → productCollections}/stores/useTableStore.d.ts +0 -0
  286. /package/dist/src/{product-collections → productCollections}/types.d.ts +0 -0
  287. /package/dist/src/{promo-codes → promoCodes}/components/create/DateRange.vue.d.ts +0 -0
  288. /package/dist/src/{promo-codes → promoCodes}/components/create/MultiCodes.vue.d.ts +0 -0
  289. /package/dist/src/{promo-codes → promoCodes}/components/create/Note.vue.d.ts +0 -0
  290. /package/dist/src/{promo-codes → promoCodes}/components/create/SingleCode.vue.d.ts +0 -0
  291. /package/dist/src/{promo-codes → promoCodes}/components/create/TypeAndValue/TypeDetailDialog.vue.d.ts +0 -0
  292. /package/dist/src/{promo-codes → promoCodes}/components/create/TypeAndValue/TypeManageDialog.vue.d.ts +0 -0
  293. /package/dist/src/{promo-codes → promoCodes}/components/create/TypeAndValue/index.vue.d.ts +0 -0
  294. /package/dist/src/{promo-codes → promoCodes}/config.d.ts +0 -0
  295. /package/dist/src/{promo-codes → promoCodes}/index.d.ts +0 -0
  296. /package/dist/src/{promo-codes → promoCodes}/index.vue.d.ts +0 -0
  297. /package/dist/src/{promo-codes → promoCodes}/metadata.d.ts +0 -0
  298. /package/dist/src/{promo-codes → promoCodes}/pages/Create.vue.d.ts +0 -0
  299. /package/dist/src/{promo-codes → promoCodes}/pages/Detail.vue.d.ts +0 -0
  300. /package/dist/src/{promo-codes → promoCodes}/pages/Find.vue.d.ts +0 -0
  301. /package/dist/src/{promo-codes → promoCodes}/permissions.d.ts +0 -0
  302. /package/dist/src/{promo-codes → promoCodes}/routes.d.ts +0 -0
  303. /package/dist/src/{promo-codes → promoCodes}/stores/useTableStore.d.ts +0 -0
  304. /package/dist/src/{promo-codes → promoCodes}/types.d.ts +0 -0
  305. /package/dist/src/{shipping-options → shippingOptions}/components/detail/Condition.vue.d.ts +0 -0
  306. /package/dist/src/{shipping-options → shippingOptions}/components/detail/Countries.vue.d.ts +0 -0
  307. /package/dist/src/{shipping-options → shippingOptions}/components/detail/Example.vue.d.ts +0 -0
  308. /package/dist/src/{shipping-options → shippingOptions}/components/detail/Main.vue.d.ts +0 -0
  309. /package/dist/src/{shipping-options → shippingOptions}/components/overview/ListView.vue.d.ts +0 -0
  310. /package/dist/src/{shipping-options → shippingOptions}/composables/useTable.d.ts +0 -0
  311. /package/dist/src/{shipping-options → shippingOptions}/config.d.ts +0 -0
  312. /package/dist/src/{shipping-options → shippingOptions}/index.d.ts +0 -0
  313. /package/dist/src/{shipping-options → shippingOptions}/index.vue.d.ts +0 -0
  314. /package/dist/src/{shipping-options → shippingOptions}/metadata.d.ts +0 -0
  315. /package/dist/src/{shipping-options → shippingOptions}/pages/Detail.vue.d.ts +0 -0
  316. /package/dist/src/{shipping-options → shippingOptions}/pages/Overview.vue.d.ts +0 -0
  317. /package/dist/src/{shipping-options → shippingOptions}/permissions.d.ts +0 -0
  318. /package/dist/src/{shipping-options → shippingOptions}/routes.d.ts +0 -0
  319. /package/dist/src/{shipping-options → shippingOptions}/stores/useTableStore.d.ts +0 -0
  320. /package/dist/src/{shipping-options → shippingOptions}/tools.d.ts +0 -0
  321. /package/dist/src/{shipping-options → shippingOptions}/types.d.ts +0 -0
  322. /package/src/{content-manager → contentManager}/tools.ts +0 -0
  323. /package/src/{shipping-options → shippingOptions}/tools.ts +0 -0
@@ -0,0 +1,1090 @@
1
+ import { defineComponent as ie, inject as je, computed as W, ref as N, onMounted as Ne, nextTick as Be, onUnmounted as Oe, watch as Y, openBlock as h, createElementBlock as T, resolveComponent as w, createElementVNode as n, Fragment as ne, createVNode as l, unref as e, normalizeStyle as me, toDisplayString as z, createCommentVNode as Z, createBlock as G, isRef as oe, withCtx as b, createTextVNode as X, renderList as ve, normalizeClass as ae, provide as Ee } from "vue";
2
+ import { useModuleRoute as ye, useModule as be, useFirebaseIntegration as _e, useModulePermissions as Le } from "@oneclick.dev/cms-kit";
3
+ import { Layers as ge, ChevronDown as Fe, ChevronLeft as We, ChevronRight as Ge, Users as ke, RefreshCw as He, Search as Ue, X as qe, Clock as Ye, Calendar as Xe } from "lucide-vue-next";
4
+ import { _ as Qe } from "./EditLayout.vue_vue_type_script_setup_true_lang-CcysXzmW.mjs";
5
+ import { h as fe, t as Je, s as Ke, M as re, a3 as he, a4 as Ze, J as Se, _ as De, y as le, P as Ce, a5 as et, a6 as tt, a7 as st, q as at, j as ot, R as nt, Q as rt, Z as lt } from "./index-CMk3uhUt.mjs";
6
+ import { g as we, h as $e } from "./index-N6w5-hDF-6k_ELHYC.mjs";
7
+ import { a as it } from "./index-B-lVEpFX.mjs";
8
+ import { X as ct, O as Ie, a as dt, b as ut, r as mt, D as de, S as Me, C as ue, z as Ve, A as Re } from "./index-_2lRVt_k.mjs";
9
+ import { F as pt, _ as vt } from "./ReservationDetailDialog.vue_vue_type_script_setup_true_lang-B7ks5mbf.mjs";
10
+ import { _ as ft } from "./NewReservationDialog.vue_vue_type_script_setup_true_lang-Ds7z0qeH.mjs";
11
+ function gt({ x: _, y: c, w: s, h: p, tl: g = !1, tr: u = !1, bl: x = !1, br: r = !1, r: o = 0 }) {
12
+ let v;
13
+ v = `M${_ + o},${c}h${s - 2 * o}`;
14
+ let t = u ? o : 0, i = u ? 0 : o;
15
+ return v += `a${t},${t} 0 0 1 ${t},${t}`, v += `h${i}v${i}`, v += `v${p - 2 * o}`, t = r ? o : 0, i = r ? 0 : o, v += `a${t},${t} 0 0 1 ${-t},${t}`, v += `v${i}h${-i}`, v += `h${2 * o - s}`, t = x ? o : 0, i = x ? 0 : o, v += `a${t},${t} 0 0 1 ${-t},${-t}`, v += `h${-i}v${-i}`, v += `v${2 * o - p}`, t = g ? o : 0, i = g ? 0 : o, v += `a${t},${t} 0 0 1 ${t},${-t}`, v += `v${-i}h${i}`, v += "z", v;
16
+ }
17
+ const ht = Object.assign(Object.assign({}, ct), { color: void 0, groupMaxWidth: void 0, groupWidth: void 0, dataStep: void 0, groupPadding: 0.05, barPadding: 0, roundedCorners: 2, barMinHeight: 2, cursor: null, orientation: Ie.Vertical }), Pe = fe`
18
+ label: grouped-bar-component;
19
+ `, xt = Je`
20
+ :root {
21
+ --vis-grouped-bar-cursor: default;
22
+ --vis-grouped-bar-fill-color: var(--vis-color-main);
23
+ --vis-grouped-bar-stroke-color: none;
24
+ --vis-grouped-bar-stroke-width: 0px;
25
+ --vis-grouped-bar-hover-stroke-width: 1px;
26
+ --vis-grouped-bar-hover-stroke-color: none;
27
+
28
+
29
+ /* Dark Theme */
30
+ --vis-dark-grouped-bar-stroke-color: none;
31
+ }
32
+
33
+ body.theme-dark ${`.${Pe}`} {
34
+ --vis-grouped-bar-stroke-color: var(--vis-dark-grouped-bar-stroke-color);
35
+ }
36
+ `, pe = fe`
37
+ label: bar;
38
+ fill: var(--vis-grouped-bar-fill-color);
39
+ stroke: var(--vis-grouped-bar-stroke-color);
40
+ stroke-width: var(--vis-grouped-bar-stroke-width);
41
+ cursor: var(--vis-grouped-bar-cursor);
42
+
43
+ &:hover {
44
+ stroke-width: var(--vis-grouped-bar-hover-stroke-width);
45
+ stroke: var(--vis-grouped-bar-hover-stroke-color);
46
+ }
47
+ `, xe = fe`
48
+ label: barGroup;
49
+ `, ze = fe`
50
+ label: barGroupExit;
51
+ `, yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
52
+ __proto__: null,
53
+ bar: pe,
54
+ barGroup: xe,
55
+ barGroupExit: ze,
56
+ globalStyles: xt,
57
+ root: Pe
58
+ }, Symbol.toStringTag, { value: "Module" }));
59
+ class Ae extends dt {
60
+ constructor(c) {
61
+ super(), this._defaultConfig = ht, this.config = this._defaultConfig, this.getAccessors = () => Ke(this.config.y) ? this.config.y : [this.config.y], this.events = {}, this._barData = [], c && this.setConfig(c);
62
+ }
63
+ get bleed() {
64
+ if (this._barData = this._getVisibleData(), this._barData.length === 0)
65
+ return { top: 0, bottom: 0, left: 0, right: 0 };
66
+ const c = !this.isVertical() && this.dataScale.range()[0] > this.dataScale.range()[1], s = this.dataScale.domain(), p = this._getGroupWidth() / 2, g = this._barData.map((D, E) => re(D, this.config.x, E)), u = he(g), x = Ze(g), r = this.dataScale(u), o = this.dataScale(x), v = this.dataScale.invert(r + (c ? p : -p)), t = this.dataScale.invert(o + (c ? -p : p)), i = v <= s[0] ? this.dataScale(s[0]) - this.dataScale(v) : 0, R = t > s[1] ? this.dataScale(t) - this.dataScale(s[1]) : 0;
67
+ return {
68
+ top: this.isVertical() ? 0 : c ? -R : i,
69
+ bottom: this.isVertical() ? 0 : c ? -i : R,
70
+ left: this.isVertical() ? i : 0,
71
+ right: this.isVertical() ? R : 0
72
+ };
73
+ }
74
+ get dataScale() {
75
+ return this.isVertical() ? this.xScale : this.yScale;
76
+ }
77
+ get valueScale() {
78
+ return this.isVertical() ? this.yScale : this.xScale;
79
+ }
80
+ isVertical() {
81
+ return this.config.orientation === Ie.Vertical;
82
+ }
83
+ _render(c) {
84
+ const { config: s } = this, p = Se(c) ? c : s.duration, g = this._getGroupWidth(), u = this.getAccessors(), x = [-g / 2, g / 2], r = ut().domain(mt(u.length)).range(x).paddingInner(s.barPadding).paddingOuter(s.barPadding), o = this.g.selectAll(`.${xe}`).data(this._barData, (S, P) => {
85
+ var d;
86
+ return `${(d = De(S, s.id, P)) !== null && d !== void 0 ? d : P}`;
87
+ }), v = (S, P) => {
88
+ const d = this.dataScale(re(S, s.x, P)), f = this.isVertical() ? d : 0, j = this.isVertical() ? 0 : d;
89
+ return `translate(${f},${j})`;
90
+ }, i = o.enter().append("g").attr("class", xe).attr("transform", v).style("opacity", 1).merge(o);
91
+ le(i, p).attr("transform", v).style("opacity", 1);
92
+ const R = o.exit().attr("class", ze);
93
+ le(R, p).style("opacity", 0).remove(), le(R.selectAll(`.${pe}`), p).attr("transform", (S, P, d) => this.isVertical() ? `translate(0,${this.yScale(0)}) scale(1,0)` : `translate(${this.xScale(0)},0) scale(0,1)`);
94
+ const D = r.bandwidth(), E = i.selectAll(`.${pe}`).data((S) => u.map(() => S)), A = this._getValueAxisDirection(), U = E.enter().append("path").attr("class", pe).attr("d", (S, P) => {
95
+ const d = r(P), f = this.valueScale(0), j = D;
96
+ return this._getBarPath(d, f, j, 0, !1, A);
97
+ }).style("fill", (S, P) => Ce(S, s.color, P)).merge(E);
98
+ le(U, p).attr("d", (S, P) => {
99
+ const d = r(P), f = D, j = re(S, u[P]), m = j < 0;
100
+ let O = m ? this.valueScale(0) : this.valueScale(j || 0), $ = Math.abs(this.valueScale(0) - this.valueScale(j)) || 0;
101
+ if ($ < s.barMinHeight) {
102
+ const Q = A === de.North ? -1 : 1;
103
+ O = this.valueScale(0) + Q * s.barMinHeight, $ = s.barMinHeight;
104
+ }
105
+ return this._getBarPath(d, O, f, $, m, A);
106
+ }).style("fill", (S, P) => Ce(S, s.color, P)).style("cursor", (S, P) => De(S, s.cursor, P)), le(E.exit(), p).remove();
107
+ }
108
+ _getValueAxisDirection() {
109
+ return this.valueScale.range()[0] > this.valueScale.range()[1] ? de.North : de.South;
110
+ }
111
+ _getVisibleData() {
112
+ const { config: c, datamodel: { data: s } } = this, p = this._getGroupWidth(), g = s.length < 2 ? 0 : p / 2, u = this.dataScale, x = Math.abs(u.invert(g) - u.invert(0));
113
+ return s?.filter((o, v) => {
114
+ const t = re(o, c.x, v), i = u.domain(), R = +i[0], D = +i[1];
115
+ return t >= R - x && t <= D + x;
116
+ });
117
+ }
118
+ _getBarPath(c, s, p, g, u, x) {
119
+ const { config: r } = this, o = r.roundedCorners ? Se(r.roundedCorners) ? +r.roundedCorners : p / 2 : 0, v = ot(o, 0, Math.min(g, p) / 2), t = x === de.North, i = this.isVertical() && u !== t, R = this.isVertical() && u === t, D = !this.isVertical() && u, E = !this.isVertical() && !u;
120
+ return gt({
121
+ x: this.isVertical() ? c : s + (t ? 0 : -g),
122
+ y: this.isVertical() ? s + (t ? 0 : -g) : c,
123
+ w: this.isVertical() ? p : g,
124
+ h: this.isVertical() ? g : p,
125
+ tl: i || D,
126
+ tr: i || E,
127
+ bl: R || D,
128
+ br: R || E,
129
+ r: v
130
+ });
131
+ }
132
+ _getGroupWidth() {
133
+ const { config: c, datamodel: { data: s } } = this;
134
+ if (et(s))
135
+ return 0;
136
+ if (c.groupWidth)
137
+ return he([c.groupWidth, c.groupMaxWidth]);
138
+ const p = this.dataScale.bandwidth, g = this.dataScale.domain ? this.dataScale.domain() : [];
139
+ let x = 1 + (p ? g.length : g[1] - g[0]) / c.dataStep || !p && s.filter((v, t) => {
140
+ const i = re(v, c.x, t);
141
+ return i >= g[0] && i <= g[1];
142
+ }).length || s.length;
143
+ !p && x >= 2 && (x += 1);
144
+ const o = (x < 2 ? 1 : 1 - c.groupPadding) * (this.isVertical() ? this._width : this._height) / x;
145
+ return he([o, c.groupMaxWidth]);
146
+ }
147
+ getValueScaleExtent(c) {
148
+ const { datamodel: s } = this, p = this.getAccessors(), g = c ? this._getVisibleData() : s.data, u = tt(g, ...p), x = st(g, ...p);
149
+ return [u > 0 ? 0 : u, x < 0 ? 0 : x];
150
+ }
151
+ getDataScaleExtent() {
152
+ const { config: c, datamodel: s } = this;
153
+ return at(s.data, c.x);
154
+ }
155
+ getYDataExtent(c) {
156
+ return this.isVertical() ? this.getValueScaleExtent(c) : this.getDataScaleExtent();
157
+ }
158
+ getXDataExtent() {
159
+ return this.isVertical() ? this.getDataScaleExtent() : this.getValueScaleExtent(!1);
160
+ }
161
+ }
162
+ Ae.selectors = yt;
163
+ const bt = { "data-vis-component": "" }, Te = /* @__PURE__ */ ie({
164
+ __name: "index",
165
+ props: {
166
+ color: { type: [Function, String, Array, null] },
167
+ groupWidth: {},
168
+ groupMaxWidth: {},
169
+ dataStep: {},
170
+ groupPadding: {},
171
+ barPadding: {},
172
+ roundedCorners: { type: [Number, Boolean] },
173
+ barMinHeight: {},
174
+ cursor: { type: [Function, String, null] },
175
+ orientation: {},
176
+ x: { type: [Function, Number, null] },
177
+ y: { type: [Function, Number, null, Array] },
178
+ id: { type: Function },
179
+ xScale: { type: [Object, Function] },
180
+ yScale: { type: [Object, Function] },
181
+ excludeFromDomainCalculation: { type: Boolean },
182
+ duration: {},
183
+ events: {},
184
+ attributes: {},
185
+ data: {}
186
+ },
187
+ setup(_, { expose: c }) {
188
+ const s = je(nt), p = _, g = W(() => s.data.value ?? p.data), u = rt(p), x = N();
189
+ return Ne(() => {
190
+ Be(() => {
191
+ var r;
192
+ x.value = new Ae(u.value), (r = x.value) == null || r.setData(g.value), s.update(x.value);
193
+ });
194
+ }), Oe(() => {
195
+ var r;
196
+ (r = x.value) == null || r.destroy(), s.destroy();
197
+ }), Y(u, (r, o) => {
198
+ var v;
199
+ lt(r, o) || (v = x.value) == null || v.setConfig(u.value);
200
+ }), Y(g, () => {
201
+ var r;
202
+ (r = x.value) == null || r.setData(g.value);
203
+ }), c({
204
+ component: x
205
+ }), (r, o) => (h(), T("div", bt));
206
+ }
207
+ }), _t = { class: "flex flex-col sm:flex-row" }, kt = ["data-active"], St = { class: "flex items-center gap-2" }, Dt = { class: "block text-muted-foreground text-xs mr-2 max-w-[120px] truncate" }, Ct = { class: "block text-lg leading-none font-bold sm:text-3xl" }, wt = { class: "mx-auto w-full max-w-sm mt-2 mb-8" }, $t = { class: "text-muted-foreground" }, Mt = { class: "text-muted-foreground" }, Vt = { class: "grid" }, Rt = { class: "flex gap-1 overflow-hidden max-w-80" }, Tt = { class: "truncate" }, Et = /* @__PURE__ */ ie({
208
+ __name: "ResourceSelector",
209
+ props: {
210
+ resources: {
211
+ type: Array,
212
+ required: !0
213
+ },
214
+ totals: {
215
+ type: Object,
216
+ required: !0
217
+ },
218
+ viewMode: {
219
+ type: String,
220
+ required: !0
221
+ },
222
+ activeChart: {
223
+ type: String,
224
+ required: !1
225
+ }
226
+ },
227
+ emits: ["update:viewMode", "update:activeChart"],
228
+ setup(_, { emit: c }) {
229
+ const s = _, p = c, g = W({
230
+ get: () => s.viewMode,
231
+ set: (v) => {
232
+ p("update:viewMode", v);
233
+ }
234
+ }), u = W({
235
+ get: () => s.activeChart,
236
+ set: (v) => {
237
+ p("update:activeChart", v);
238
+ }
239
+ }), { width: x } = it(), r = W(() => x.value < 640), o = N(!1);
240
+ return (v, t) => {
241
+ const i = w("DrawerTitle"), R = w("DrawerDescription"), D = w("DrawerHeader"), E = w("Button"), A = w("DrawerFooter"), L = w("DrawerContent"), U = w("Drawer"), S = w("DropdownMenuTrigger"), P = w("DropdownMenuLabel"), d = w("DropdownMenuItem"), f = w("DropdownMenuContent"), j = w("DropdownMenu");
242
+ return h(), T("div", _t, [
243
+ _.resources.length > 1 ? (h(), T("button", {
244
+ key: 0,
245
+ "data-active": _.viewMode === "stacked",
246
+ class: "hover:bg-muted/50 flex flex-1 flex-col justify-center gap-2 border-t px-4 py-3 text-left sm:border-t-0 sm:border-l sm:px-6 sm:py-6 cursor-pointer",
247
+ onClick: t[0] || (t[0] = (m) => o.value = !0)
248
+ }, [
249
+ n("div", St, [
250
+ _.viewMode === "stacked" ? (h(), T(ne, { key: 0 }, [
251
+ l(e(ge), { class: "size-3 text-muted-foreground" }),
252
+ t[5] || (t[5] = n("span", { class: "block text-muted-foreground text-xs mr-2 max-w-[120px] truncate" }, "All Resources", -1))
253
+ ], 64)) : (h(), T(ne, { key: 1 }, [
254
+ n("div", {
255
+ class: "size-3 rounded-full mr-2",
256
+ style: me({ backgroundColor: _.resources.find((m) => m.id === _.activeChart)?.color || "#6b7280" })
257
+ }, null, 4),
258
+ n("span", Dt, z(_.resources.find((m) => m.id === _.activeChart)?.name || "Select Resource"), 1)
259
+ ], 64)),
260
+ l(e(Fe), { class: "ml-auto size-4" })
261
+ ]),
262
+ n("span", Ct, z(_.viewMode === "stacked" ? Object.values(_.totals).reduce((m, O) => m + O, 0).toLocaleString() : (_.totals[_.activeChart] || 0).toLocaleString()), 1)
263
+ ], 8, kt)) : Z("", !0),
264
+ e(r) ? (h(), G(U, {
265
+ key: 1,
266
+ open: e(o),
267
+ "onUpdate:open": t[2] || (t[2] = (m) => oe(o) ? o.value = m : null)
268
+ }, {
269
+ default: b(() => [
270
+ l(L, null, {
271
+ default: b(() => [
272
+ n("div", wt, [
273
+ l(D, null, {
274
+ default: b(() => [
275
+ l(i, null, {
276
+ default: b(() => [...t[6] || (t[6] = [
277
+ X("Resources", -1)
278
+ ])]),
279
+ _: 1
280
+ }),
281
+ l(R, null, {
282
+ default: b(() => [...t[7] || (t[7] = [
283
+ X("Select the resources to display on the timeline.", -1)
284
+ ])]),
285
+ _: 1
286
+ })
287
+ ]),
288
+ _: 1
289
+ }),
290
+ l(A, null, {
291
+ default: b(() => [
292
+ l(E, {
293
+ onClick: t[1] || (t[1] = (m) => {
294
+ g.value = "stacked", u.value = "", o.value = !1;
295
+ }),
296
+ variant: _.viewMode === "stacked" ? "secondary" : "outline"
297
+ }, {
298
+ default: b(() => [
299
+ l(e(ge), { class: "size-3 text-muted-foreground" }),
300
+ n("span", $t, " All Resources (" + z(Object.values(_.totals).reduce((m, O) => m + O, 0).toLocaleString()) + ") ", 1)
301
+ ]),
302
+ _: 1
303
+ }, 8, ["variant"]),
304
+ (h(!0), T(ne, null, ve(_.resources, (m) => (h(), G(E, {
305
+ key: m.id,
306
+ onClick: (O) => {
307
+ g.value = "single", u.value = m.id, o.value = !1;
308
+ },
309
+ variant: _.viewMode === "single" && _.activeChart === m.id ? "secondary" : "outline"
310
+ }, {
311
+ default: b(() => [
312
+ n("div", {
313
+ class: "size-3 rounded-full",
314
+ style: me({ backgroundColor: m.color || "#6b7280" })
315
+ }, null, 4),
316
+ n("span", Mt, z(m.name) + " (" + z((_.totals[m.id] || 0).toLocaleString()) + ") ", 1)
317
+ ]),
318
+ _: 2
319
+ }, 1032, ["onClick", "variant"]))), 128))
320
+ ]),
321
+ _: 1
322
+ })
323
+ ])
324
+ ]),
325
+ _: 1
326
+ })
327
+ ]),
328
+ _: 1
329
+ }, 8, ["open"])) : (h(), G(j, {
330
+ key: 2,
331
+ open: e(o),
332
+ "onUpdate:open": t[4] || (t[4] = (m) => oe(o) ? o.value = m : null)
333
+ }, {
334
+ default: b(() => [
335
+ l(S, { "as-child": "" }, {
336
+ default: b(() => [...t[8] || (t[8] = [
337
+ n("button", {
338
+ tabindex: "-1",
339
+ class: "size-0 opacity-0 self-end"
340
+ }, null, -1)
341
+ ])]),
342
+ _: 1
343
+ }),
344
+ l(f, { align: "start" }, {
345
+ default: b(() => [
346
+ l(P, null, {
347
+ default: b(() => [...t[9] || (t[9] = [
348
+ X("Resources", -1)
349
+ ])]),
350
+ _: 1
351
+ }),
352
+ n("div", Vt, [
353
+ l(d, {
354
+ onClick: t[3] || (t[3] = (m) => {
355
+ g.value = "stacked", u.value = "", o.value = !1;
356
+ }),
357
+ class: ae(_.viewMode === "stacked" ? "bg-input" : "")
358
+ }, {
359
+ default: b(() => [
360
+ l(e(ge), { class: "size-3 text-muted-foreground" }),
361
+ n("span", null, " All Resources (" + z(Object.values(_.totals).reduce((m, O) => m + O, 0).toLocaleString()) + ") ", 1)
362
+ ]),
363
+ _: 1
364
+ }, 8, ["class"]),
365
+ (h(!0), T(ne, null, ve(_.resources, (m) => (h(), G(d, {
366
+ key: m.id,
367
+ onClick: (O) => {
368
+ g.value = "single", u.value = m.id, o.value = !1;
369
+ },
370
+ class: ae(_.viewMode === "single" && _.activeChart === m.id ? "bg-input" : "")
371
+ }, {
372
+ default: b(() => [
373
+ n("div", {
374
+ class: "size-3 rounded-full",
375
+ style: me({ backgroundColor: m.color || "#6b7280" })
376
+ }, null, 4),
377
+ n("span", Rt, [
378
+ n("span", Tt, z(m.name), 1),
379
+ n("span", null, "(" + z((_.totals[m.id] || 0).toLocaleString()) + ")", 1)
380
+ ])
381
+ ]),
382
+ _: 2
383
+ }, 1032, ["onClick", "class"]))), 128))
384
+ ])
385
+ ]),
386
+ _: 1
387
+ })
388
+ ]),
389
+ _: 1
390
+ }, 8, ["open"]))
391
+ ]);
392
+ };
393
+ }
394
+ }), It = { class: "flex flex-1 flex-col justify-center gap-1 px-6 py-5 sm:py-6" }, Pt = { class: "flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-3" }, zt = { class: "flex items-center gap-1" }, At = {
395
+ key: 1,
396
+ class: "flex items-center justify-center px-6 py-4 text-muted-foreground text-sm"
397
+ }, jt = {
398
+ key: 0,
399
+ class: "flex items-center justify-center h-[250px]"
400
+ }, Nt = {
401
+ key: 1,
402
+ class: "flex items-center justify-center h-[250px]"
403
+ }, Bt = /* @__PURE__ */ ie({
404
+ __name: "Timeline",
405
+ props: {
406
+ modelValue: {},
407
+ selectedResource: {},
408
+ viewMode: {},
409
+ agendaData: {},
410
+ resources: {}
411
+ },
412
+ emits: ["update:modelValue", "update:selectedResource", "update:viewMode"],
413
+ setup(_, { emit: c }) {
414
+ const s = _, p = c, { params: g } = ye(), { config: u } = be(), x = _e(u.project), r = N([]), o = N([]), v = N(!0), t = N(s.viewMode || "stacked"), i = N(s.selectedResource || "");
415
+ Y(t, (a) => {
416
+ p("update:viewMode", a);
417
+ }, { immediate: !0 }), Y(i, (a) => {
418
+ p("update:selectedResource", t.value === "single" ? a : null);
419
+ }), Y(t, (a) => {
420
+ p("update:selectedResource", a === "single" ? i.value : null);
421
+ });
422
+ const R = /* @__PURE__ */ new Date(), D = N(s.modelValue || /* @__PURE__ */ new Date());
423
+ Y(() => s.modelValue, (a) => {
424
+ a && a.getTime() !== D.value.getTime() && (D.value = a);
425
+ }), Y(D, (a) => {
426
+ p("update:modelValue", a);
427
+ }, { immediate: !0 });
428
+ const E = W(() => {
429
+ const a = new Date(R);
430
+ a.setDate(R.getDate() - 1);
431
+ const y = new Date(R);
432
+ return y.setDate(R.getDate() + 1), D.value.toDateString() === R.toDateString() ? "Today" : D.value.toDateString() === a.toDateString() ? "Yesterday" : D.value.toDateString() === y.toDateString() ? "Tomorrow" : D.value.toLocaleDateString("en-US", {
433
+ weekday: "long",
434
+ month: "long",
435
+ day: "numeric",
436
+ year: "numeric"
437
+ });
438
+ }), A = () => {
439
+ const a = new Date(D.value);
440
+ a.setDate(a.getDate() - 1), D.value = a;
441
+ }, L = () => {
442
+ const a = new Date(D.value);
443
+ a.setDate(a.getDate() + 1), D.value = a;
444
+ }, U = () => {
445
+ D.value = /* @__PURE__ */ new Date();
446
+ }, S = W(() => s.resources?.length === 0 ? 10 : Math.max(...(s.resources || []).map((a) => a.capacity || 10))), P = W(() => (s.resources?.length || 0) === 0 ? 60 : Math.min(...(s.resources || []).map((a) => a.interval || 60))), d = W(() => {
447
+ const a = {
448
+ total: {
449
+ label: "Total Reservations",
450
+ color: void 0
451
+ }
452
+ };
453
+ return (s.resources || []).forEach((y, V) => {
454
+ a[y.id] = {
455
+ label: y.name,
456
+ color: y.color || `var(--chart-${V % 5 + 1})`
457
+ };
458
+ }), a;
459
+ });
460
+ Y(() => s.resources, (a) => {
461
+ (a?.length || 0) > 0 && !i.value && (i.value = a[0].id);
462
+ }, { immediate: !0 });
463
+ const f = W(() => [...s.resources || []].sort((a, y) => {
464
+ const V = m.value[a.id] || 0;
465
+ return (m.value[y.id] || 0) - V;
466
+ })), j = W(() => {
467
+ const a = [];
468
+ return P.value, r.value.forEach((y, V) => {
469
+ y.time.endsWith(":00") && a.push(V);
470
+ }), a;
471
+ }), m = W(() => {
472
+ const a = {};
473
+ return s.resources?.forEach((y) => {
474
+ a[y.id] = o.value.filter((V) => V.resourceId === y.id).reduce((V, I) => V + (I.reserved || 0), 0);
475
+ }), a;
476
+ }), O = (a) => {
477
+ const y = a.getFullYear(), V = String(a.getMonth() + 1).padStart(2, "0"), I = String(a.getDate()).padStart(2, "0");
478
+ return `${y}-${V}-${I}`;
479
+ }, $ = (a) => {
480
+ const [y, V] = a.split(":").map(Number);
481
+ return y * 60 + V;
482
+ }, Q = (a, y) => (s.agendaData?.exceptions || []).find((I) => y >= I.startDate && y <= I.endDate ? I.resourceIds === null ? !0 : I.resourceIds?.includes(a) : !1) || null, B = W(() => {
483
+ const a = O(D.value), y = D.value.getDay();
484
+ let V = 1440, I = 0;
485
+ if ((s.resources || []).forEach((K) => {
486
+ const F = Q(K.id, a);
487
+ if (F) {
488
+ if (F.isClosed)
489
+ return;
490
+ F.timeslots.forEach((q) => {
491
+ const k = $(q.startTime), C = $(q.endTime);
492
+ V = Math.min(V, k), I = Math.max(I, C);
493
+ });
494
+ } else
495
+ (K.openingHours?.[y] || []).forEach((k) => {
496
+ const C = $(k.start), J = $(k.end);
497
+ V = Math.min(V, C), I = Math.max(I, J);
498
+ });
499
+ }), V >= I)
500
+ return { startMinutes: 540, endMinutes: 1020 };
501
+ const H = Math.floor(V / 60) * 60, ee = Math.ceil(I / 60) * 60;
502
+ return { startMinutes: H, endMinutes: ee };
503
+ }), te = () => {
504
+ const a = [], y = P.value, { startMinutes: V, endMinutes: I } = B.value;
505
+ for (let H = V; H < I; H += y) {
506
+ const ee = Math.floor(H / 60), K = H % 60, F = `${String(ee).padStart(2, "0")}:${String(K).padStart(2, "0")}`, q = {
507
+ time: F,
508
+ label: F
509
+ };
510
+ s.resources?.forEach((k) => {
511
+ q[k.id] = 0;
512
+ }), a.push(q);
513
+ }
514
+ return a;
515
+ }, se = async () => {
516
+ v.value = !0;
517
+ try {
518
+ const a = g.value.id, y = O(D.value), V = `${a}_${y}`, I = await x.get(u.reservedSpotsCollection, V);
519
+ o.value = [];
520
+ for (const F of s.resources || []) {
521
+ const q = I?.[F.id] || {};
522
+ Object.entries(q).forEach(([k, C]) => {
523
+ const [J, ce] = k.split("-");
524
+ o.value.push({
525
+ resourceId: F.id,
526
+ startTime: J,
527
+ endTime: ce,
528
+ reserved: C
529
+ });
530
+ });
531
+ }
532
+ const H = te(), ee = P.value, { startMinutes: K } = B.value;
533
+ o.value.forEach((F) => {
534
+ const q = $(F.startTime), k = $(F.endTime);
535
+ for (let C = q; C < k; C += ee) {
536
+ const J = Math.floor((C - K) / ee);
537
+ if (J >= 0 && J < H.length) {
538
+ const ce = H[J][F.resourceId];
539
+ typeof ce == "number" && (H[J][F.resourceId] = ce + (F.reserved || 0));
540
+ }
541
+ }
542
+ }), r.value = H;
543
+ } catch (a) {
544
+ console.error("Error loading reservation data:", a), r.value = te(), o.value = [];
545
+ } finally {
546
+ v.value = !1;
547
+ }
548
+ };
549
+ return (async () => await se())(), Y(D, () => {
550
+ se();
551
+ }), Y(() => s.resources, () => {
552
+ (s.resources?.length || 0) > 0 && se();
553
+ }), (a, y) => {
554
+ const V = w("CardTitle"), I = w("Button"), H = w("CardDescription"), ee = w("CardHeader"), K = w("ChartContainer"), F = w("CardContent"), q = w("Card");
555
+ return h(), G(q, { class: "py-4 sm:py-0" }, {
556
+ default: b(() => [
557
+ l(ee, { class: "flex flex-col items-stretch border-b !p-0 sm:flex-row" }, {
558
+ default: b(() => [
559
+ n("div", It, [
560
+ n("div", Pt, [
561
+ l(V, null, {
562
+ default: b(() => [...y[2] || (y[2] = [
563
+ X("Reservations", -1)
564
+ ])]),
565
+ _: 1
566
+ }),
567
+ n("div", zt, [
568
+ l(I, {
569
+ variant: "ghost",
570
+ size: "icon",
571
+ class: "size-8",
572
+ onClick: A
573
+ }, {
574
+ default: b(() => [
575
+ l(e(We), { size: 16 })
576
+ ]),
577
+ _: 1
578
+ }),
579
+ l(I, {
580
+ variant: "ghost",
581
+ size: "sm",
582
+ class: "h-8 px-3 text-xs",
583
+ onClick: U
584
+ }, {
585
+ default: b(() => [...y[3] || (y[3] = [
586
+ X(" Today ", -1)
587
+ ])]),
588
+ _: 1
589
+ }),
590
+ l(I, {
591
+ variant: "ghost",
592
+ size: "icon",
593
+ class: "size-8",
594
+ onClick: L
595
+ }, {
596
+ default: b(() => [
597
+ l(e(Ge), { size: 16 })
598
+ ]),
599
+ _: 1
600
+ })
601
+ ])
602
+ ]),
603
+ l(H, null, {
604
+ default: b(() => [
605
+ X(z(e(E)), 1)
606
+ ]),
607
+ _: 1
608
+ })
609
+ ]),
610
+ _.resources.length > 0 ? (h(), G(Et, {
611
+ key: 0,
612
+ resources: _.resources,
613
+ totals: e(m),
614
+ viewMode: e(t),
615
+ "onUpdate:viewMode": y[0] || (y[0] = (k) => oe(t) ? t.value = k : null),
616
+ activeChart: e(i),
617
+ "onUpdate:activeChart": y[1] || (y[1] = (k) => oe(i) ? i.value = k : null)
618
+ }, null, 8, ["resources", "totals", "viewMode", "activeChart"])) : (h(), T("div", At, " No resources configured "))
619
+ ]),
620
+ _: 1
621
+ }),
622
+ l(F, { class: "px-2 sm:p-6" }, {
623
+ default: b(() => [
624
+ e(v) ? (h(), T("div", jt, [...y[4] || (y[4] = [
625
+ n("div", { class: "text-muted-foreground" }, "Loading...", -1)
626
+ ])])) : _.resources.length === 0 ? (h(), T("div", Nt, [...y[5] || (y[5] = [
627
+ n("div", { class: "text-muted-foreground" }, "No resources to display", -1)
628
+ ])])) : e(t) === "stacked" ? (h(), G(K, {
629
+ key: 2,
630
+ config: e(d),
631
+ class: "aspect-auto h-[250px] w-full",
632
+ cursor: ""
633
+ }, {
634
+ default: b(() => [
635
+ l(e(Me), {
636
+ data: e(r),
637
+ margin: { left: -24 },
638
+ "y-domain": [0, e(S)]
639
+ }, {
640
+ default: b(() => [
641
+ (h(!0), T(ne, null, ve(e(f), (k) => (h(), G(e(Te), {
642
+ key: k.id,
643
+ x: (C, J) => J,
644
+ y: (C) => C[k.id] || 0,
645
+ color: (C) => C[k.id] > 0 ? e(d)[k.id]?.color : "#61616180",
646
+ "bar-padding": 0.1,
647
+ "rounded-corners": 2
648
+ }, null, 8, ["x", "y", "color"]))), 128)),
649
+ l(e(ue), {
650
+ type: "x",
651
+ x: (k, C) => C,
652
+ "tick-line": !1,
653
+ "domain-line": !1,
654
+ "grid-line": !1,
655
+ "tick-values": e(j),
656
+ "tick-format": (k) => e(r)[k]?.time || ""
657
+ }, null, 8, ["x", "tick-values", "tick-format"]),
658
+ l(e(ue), {
659
+ type: "y",
660
+ "num-ticks": 3,
661
+ "tick-line": !1,
662
+ "domain-line": !1
663
+ }),
664
+ l(e(Ve)),
665
+ l(e(Re), {
666
+ template: e(we)(e(d), e($e), {
667
+ labelFormatter(k) {
668
+ const C = Math.round(k);
669
+ return C >= 0 && C < e(r).length && e(r)[C]?.time || "";
670
+ }
671
+ }),
672
+ color: "#0000"
673
+ }, null, 8, ["template"])
674
+ ]),
675
+ _: 1
676
+ }, 8, ["data", "y-domain"])
677
+ ]),
678
+ _: 1
679
+ }, 8, ["config"])) : (h(), G(K, {
680
+ key: 3,
681
+ config: e(d),
682
+ class: "aspect-auto h-[250px] w-full",
683
+ cursor: ""
684
+ }, {
685
+ default: b(() => [
686
+ l(e(Me), {
687
+ data: e(r),
688
+ margin: { left: -24 },
689
+ "y-domain": [0, e(S)]
690
+ }, {
691
+ default: b(() => [
692
+ l(e(Te), {
693
+ x: (k, C) => C,
694
+ y: (k) => k[e(i)] || 0,
695
+ color: (k) => k[e(i)] > 0 ? e(d)[e(i)]?.color : "hsl(var(--muted))",
696
+ "bar-padding": 0.1,
697
+ "rounded-corners": !1
698
+ }, null, 8, ["x", "y", "color"]),
699
+ l(e(ue), {
700
+ type: "x",
701
+ x: (k, C) => C,
702
+ "tick-line": !1,
703
+ "domain-line": !1,
704
+ "grid-line": !1,
705
+ "tick-values": e(j),
706
+ "tick-format": (k) => e(r)[k]?.time || ""
707
+ }, null, 8, ["x", "tick-values", "tick-format"]),
708
+ l(e(ue), {
709
+ type: "y",
710
+ "num-ticks": 3,
711
+ "tick-line": !1,
712
+ "domain-line": !1
713
+ }),
714
+ l(e(Ve)),
715
+ l(e(Re), {
716
+ template: e(we)(e(d), e($e), {
717
+ labelFormatter(k) {
718
+ const C = Math.round(k);
719
+ return C >= 0 && C < e(r).length && e(r)[C]?.time || "";
720
+ }
721
+ }),
722
+ color: "#0000"
723
+ }, null, 8, ["template"])
724
+ ]),
725
+ _: 1
726
+ }, 8, ["data", "y-domain"])
727
+ ]),
728
+ _: 1
729
+ }, 8, ["config"]))
730
+ ]),
731
+ _: 1
732
+ })
733
+ ]),
734
+ _: 1
735
+ });
736
+ };
737
+ }
738
+ }), Ot = { class: "flex flex-row items-center justify-between gap-2" }, Lt = { class: "relative mb-4" }, Ft = { class: "flex gap-1 mb-4 flex-wrap" }, Wt = {
739
+ key: 0,
740
+ class: "mb-3 text-sm text-muted-foreground"
741
+ }, Gt = {
742
+ key: 1,
743
+ class: "flex items-center justify-center py-8"
744
+ }, Ht = {
745
+ key: 2,
746
+ class: "flex flex-col items-center gap-2 text-center py-8 text-muted-foreground"
747
+ }, Ut = {
748
+ key: 3,
749
+ class: "text-center py-8 text-muted-foreground"
750
+ }, qt = {
751
+ key: 4,
752
+ class: "space-y-2"
753
+ }, Yt = ["onClick"], Xt = { class: "flex items-start justify-between" }, Qt = { class: "flex-1" }, Jt = { class: "font-medium" }, Kt = { class: "text-sm text-muted-foreground" }, Zt = { class: "text-sm text-muted-foreground" }, es = { class: "flex items-center gap-4 flex-wrap" }, ts = { class: "flex items-center gap-2 mt-1 text-xs text-muted-foreground" }, ss = { class: "flex items-center gap-2 mt-1 text-xs text-muted-foreground" }, as = {
754
+ key: 0,
755
+ class: "flex items-center gap-1 mt-1 text-xs text-muted-foreground"
756
+ }, os = { class: "text-right" }, ns = {
757
+ key: 0,
758
+ class: "inline-block px-2 py-1 text-xs rounded-full bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400"
759
+ }, rs = {
760
+ key: 1,
761
+ class: "inline-block px-2 py-1 text-xs rounded-full bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400"
762
+ }, ls = {
763
+ key: 2,
764
+ class: "inline-block px-2 py-1 text-xs rounded-full bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400"
765
+ }, is = {
766
+ key: 3,
767
+ class: "inline-block px-2 py-1 text-xs rounded-full bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400"
768
+ }, cs = {
769
+ key: 4,
770
+ class: "inline-block px-2 py-1 text-xs rounded-full bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400"
771
+ }, ds = {
772
+ key: 5,
773
+ class: "text-sm font-medium mt-1"
774
+ }, us = /* @__PURE__ */ ie({
775
+ __name: "BookingsList",
776
+ props: {
777
+ activeDate: {},
778
+ selectedResource: {},
779
+ resources: {}
780
+ },
781
+ setup(_) {
782
+ const c = _, { params: s } = ye(), { config: p } = be(), g = _e(p.project), u = N([]), x = N(!0), r = N(""), o = N(null), v = W(() => ({
783
+ date: t(c.activeDate),
784
+ resource: null
785
+ }));
786
+ Ee("event", v);
787
+ const t = (d) => {
788
+ const f = d.getFullYear(), j = String(d.getMonth() + 1).padStart(2, "0"), m = String(d.getDate()).padStart(2, "0");
789
+ return `${f}-${j}-${m}`;
790
+ }, i = W(() => {
791
+ let d = u.value;
792
+ return c.selectedResource && (d = d.filter((f) => f.resourceId === c.selectedResource)), r.value.trim() && (d = new pt(d, {
793
+ keys: [
794
+ "customerInfo.firstName",
795
+ "customerInfo.lastName",
796
+ "customerInfo.email",
797
+ "customerInfo.phone",
798
+ "resourceName"
799
+ ],
800
+ threshold: 0.3,
801
+ ignoreLocation: !0
802
+ }).search(r.value).map((j) => j.item)), d;
803
+ }), R = W(() => i.value.filter((d) => L.value.includes(d.reservationStatus))), D = W(() => u.value.some((d) => d.reservationStatus === "approved" || d.reservationStatus === "needs_approval")), E = W(() => ({
804
+ spots: u.value.reduce((d, f) => d + (f.spots || 0), 0),
805
+ bookings: u.value.length
806
+ })), A = () => {
807
+ r.value = "";
808
+ }, L = N(["needs_approval", "approved"]), U = (d) => {
809
+ L.value.includes(d) ? L.value = L.value.filter((f) => f !== d) : L.value.push(d);
810
+ }, S = async () => {
811
+ x.value = !0, u.value = [];
812
+ try {
813
+ const d = s.value.id, f = t(c.activeDate), j = /* @__PURE__ */ new Set();
814
+ c.resources?.forEach(($) => {
815
+ const Q = `${$.id}_${f}`;
816
+ j.add(Q);
817
+ });
818
+ const m = await g.find(p.reservationsCollection, {
819
+ filters: [
820
+ { field: "agendaId", operator: "==", value: d },
821
+ { field: "status", operator: "==", value: "confirmed" },
822
+ { field: "flattenedReservationDates", operator: "array-contains-any", value: Array.from(j) }
823
+ ]
824
+ });
825
+ let O = [];
826
+ m.forEach(($) => {
827
+ ($.reservations?.filter((B) => B.date === f) || []).forEach((B) => {
828
+ const te = c.resources.find((se) => se.id === B.resourceId);
829
+ O.push({
830
+ customerInfo: $.customerInfo,
831
+ amountDue: $.amountDue,
832
+ amountPaid: $.amountPaid,
833
+ status: $.status,
834
+ reservationStatus: B.status,
835
+ subtotal: $.subtotal,
836
+ total: $.total,
837
+ discount: $.discount,
838
+ id: $.id,
839
+ res_id: B.id,
840
+ resourceId: B.resourceId,
841
+ spots: B.spots,
842
+ date: f,
843
+ startTime: B.timeslot?.startTime,
844
+ endTime: B.timeslot?.endTime,
845
+ reservationPrice: B.totalPrice,
846
+ reservationBasePrice: B.basePrice,
847
+ reservationAddOnsPrice: B.addOnsPrice,
848
+ pricingOptionId: B.pricingOptionId,
849
+ pricingOption: B.pricingOption,
850
+ resourceName: te?.name || "Unknown",
851
+ resourceColor: te?.color
852
+ });
853
+ });
854
+ }), u.value = O.sort(($, Q) => $.startTime?.localeCompare(Q.startTime || "") || 0);
855
+ } catch (d) {
856
+ console.error("Error loading orders:", d), u.value = [];
857
+ } finally {
858
+ x.value = !1;
859
+ }
860
+ };
861
+ return (async () => await S())(), Y(() => c.activeDate, () => {
862
+ S();
863
+ }), (d, f) => {
864
+ const j = w("Badge"), m = w("CardTitle"), O = w("CardDescription"), $ = w("Button"), Q = w("CardHeader"), B = w("Input"), te = w("CardContent"), se = w("Card");
865
+ return h(), G(se, null, {
866
+ default: b(() => [
867
+ l(Q, null, {
868
+ default: b(() => [
869
+ n("div", Ot, [
870
+ n("div", null, [
871
+ l(m, { class: "flex items-center gap-2" }, {
872
+ default: b(() => [
873
+ f[6] || (f[6] = X(" Bookings ", -1)),
874
+ e(E).bookings > 0 ? (h(), G(j, {
875
+ key: 0,
876
+ variant: "secondary"
877
+ }, {
878
+ default: b(() => [
879
+ X(z(e(E).bookings), 1)
880
+ ]),
881
+ _: 1
882
+ })) : Z("", !0)
883
+ ]),
884
+ _: 1
885
+ }),
886
+ l(O, { class: "flex items-center gap-2 mt-1" }, {
887
+ default: b(() => [
888
+ l(e(ke), { size: 14 }),
889
+ n("span", null, z(e(E).spots) + " total spots", 1)
890
+ ]),
891
+ _: 1
892
+ })
893
+ ]),
894
+ l($, {
895
+ variant: "ghost",
896
+ size: "icon",
897
+ onClick: S,
898
+ disabled: e(x)
899
+ }, {
900
+ default: b(() => [
901
+ l(e(He), {
902
+ size: 16,
903
+ class: ae({ "animate-spin": e(x) })
904
+ }, null, 8, ["class"])
905
+ ]),
906
+ _: 1
907
+ }, 8, ["disabled"])
908
+ ])
909
+ ]),
910
+ _: 1
911
+ }),
912
+ l(te, null, {
913
+ default: b(() => [
914
+ n("div", Lt, [
915
+ l(e(Ue), {
916
+ size: 16,
917
+ class: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"
918
+ }),
919
+ l(B, {
920
+ modelValue: e(r),
921
+ "onUpdate:modelValue": f[0] || (f[0] = (M) => oe(r) ? r.value = M : null),
922
+ placeholder: "Search by name, email, or phone...",
923
+ class: "pl-9 pr-9"
924
+ }, null, 8, ["modelValue"]),
925
+ e(r) ? (h(), G($, {
926
+ key: 0,
927
+ variant: "ghost",
928
+ size: "icon",
929
+ class: "absolute right-1 top-1/2 -translate-y-1/2 h-7 w-7",
930
+ onClick: A
931
+ }, {
932
+ default: b(() => [
933
+ l(e(qe), { size: 14 })
934
+ ]),
935
+ _: 1
936
+ })) : Z("", !0)
937
+ ]),
938
+ n("div", Ft, [
939
+ n("button", {
940
+ onClick: f[1] || (f[1] = (M) => U("needs_approval")),
941
+ class: ae(["px-3 py-1.5 rounded-full text-sm bg-muted", { "opacity-50 hover:opacity-75": !e(L).includes("needs_approval") }])
942
+ }, " Needs Approval ", 2),
943
+ n("button", {
944
+ onClick: f[2] || (f[2] = (M) => U("approved")),
945
+ class: ae(["px-3 py-1.5 rounded-full text-sm bg-muted", { "opacity-50 hover:opacity-75": !e(L).includes("approved") }])
946
+ }, " Approved ", 2),
947
+ n("button", {
948
+ onClick: f[3] || (f[3] = (M) => U("rejected")),
949
+ class: ae(["px-3 py-1.5 rounded-full text-sm bg-muted", { "opacity-50 hover:opacity-75": !e(L).includes("rejected") }])
950
+ }, " Rejected ", 2),
951
+ n("button", {
952
+ onClick: f[4] || (f[4] = (M) => U("cancelled")),
953
+ class: ae(["px-3 py-1.5 rounded-full text-sm bg-muted", { "opacity-50 hover:opacity-75": !e(L).includes("cancelled") }])
954
+ }, " Cancelled ", 2)
955
+ ]),
956
+ e(r) ? (h(), T("div", Wt, " Showing " + z(e(i).length) + " of " + z(e(u).length) + " bookings ", 1)) : Z("", !0),
957
+ e(x) ? (h(), T("div", Gt, [...f[7] || (f[7] = [
958
+ n("div", { class: "animate-spin rounded-full h-8 w-8 border-b-2 border-primary" }, null, -1)
959
+ ])])) : e(R).length === 0 ? (h(), T("div", Ht, [
960
+ f[9] || (f[9] = X(" No bookings for this day ", -1)),
961
+ e(D) ? (h(), G($, {
962
+ key: 0,
963
+ onClick: f[5] || (f[5] = (M) => L.value = ["needs_approval", "approved"])
964
+ }, {
965
+ default: b(() => [...f[8] || (f[8] = [
966
+ X("Reset filters", -1)
967
+ ])]),
968
+ _: 1
969
+ })) : Z("", !0)
970
+ ])) : e(i).length === 0 ? (h(), T("div", Ut, " No bookings match your search ")) : (h(), T("div", qt, [
971
+ (h(!0), T(ne, null, ve(e(i), (M) => (h(), T("div", {
972
+ key: M.res_id || M.id,
973
+ class: "p-3 border rounded-lg hover:bg-muted/50 transition-colors cursor-pointer",
974
+ onClick: (a) => e(o)?.openDialog(M)
975
+ }, [
976
+ n("div", Xt, [
977
+ n("div", Qt, [
978
+ n("div", Jt, z(M.customerInfo?.firstName) + " " + z(M.customerInfo?.lastName || "Unknown Customer"), 1),
979
+ n("div", Kt, z(M.customerInfo?.email), 1),
980
+ n("div", Zt, z(M.customerInfo?.phone), 1),
981
+ n("div", es, [
982
+ n("div", ts, [
983
+ l(e(Ye), { size: 12 }),
984
+ n("span", null, z(M.startTime) + " - " + z(M.endTime), 1)
985
+ ]),
986
+ n("div", ss, [
987
+ l(e(ke), { size: 12 }),
988
+ n("span", null, z(M.spots) + " spots", 1)
989
+ ]),
990
+ M.resourceName ? (h(), T("div", as, [
991
+ n("div", {
992
+ class: "w-3 h-3 rounded-full",
993
+ style: me({ backgroundColor: M.resourceColor || "#6b7280" })
994
+ }, null, 4),
995
+ n("span", null, z(M.resourceName), 1)
996
+ ])) : Z("", !0)
997
+ ])
998
+ ]),
999
+ n("div", os, [
1000
+ M.reservationStatus === "needs_approval" ? (h(), T("span", ns, "Needs Approval")) : M.reservationStatus === "approved" ? (h(), T("span", rs, "Approved")) : M.reservationStatus === "rejected" ? (h(), T("span", ls, "Rejected")) : M.reservationStatus === "cancelled" ? (h(), T("span", is, "Cancelled")) : (h(), T("span", cs, "Pending")),
1001
+ M.reservationPrice || M.reservationPrice === 0 ? (h(), T("div", ds, " €" + z(M.reservationPrice.toFixed(2)), 1)) : Z("", !0)
1002
+ ])
1003
+ ])
1004
+ ], 8, Yt))), 128))
1005
+ ]))
1006
+ ]),
1007
+ _: 1
1008
+ }),
1009
+ l(vt, {
1010
+ ref_key: "reservationDetailDialog",
1011
+ ref: o,
1012
+ onCancelled: S,
1013
+ onConfirmed: S,
1014
+ onRejected: S
1015
+ }, null, 512)
1016
+ ]),
1017
+ _: 1
1018
+ });
1019
+ };
1020
+ }
1021
+ }), ms = { class: "space-y-6" }, ps = { class: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4" }, vs = { class: "text-2xl font-semibold tracking-tight" }, fs = { class: "flex flex-col md:flex-row gap-2" }, gs = { class: "grid gap-6 md:grid-cols-2 lg:grid-cols-3" }, hs = { class: "md:col-span-2 lg:col-span-3" }, Ms = /* @__PURE__ */ ie({
1022
+ __name: "index",
1023
+ setup(_) {
1024
+ const { hasPermission: c } = Le(), { params: s, resolvePath: p } = ye(), { config: g } = be(), u = _e(g.project), x = N(""), r = N(!0), o = N(/* @__PURE__ */ new Date()), v = N(null), t = N("stacked"), i = N(null), R = N([]);
1025
+ return (async () => {
1026
+ try {
1027
+ const E = await u.get(g.agendaCollection, s.value.id);
1028
+ x.value = E?.serviceName || "", i.value = E, R.value = E?.resources?.filter((A) => A.isActive) || [];
1029
+ } catch (E) {
1030
+ console.error("Error loading data:", E);
1031
+ } finally {
1032
+ r.value = !1;
1033
+ }
1034
+ })(), Ee("agendaData", i), (E, A) => {
1035
+ const L = w("Button"), U = w("NuxtLink");
1036
+ return h(), G(Qe, null, {
1037
+ default: b(() => [
1038
+ n("div", ms, [
1039
+ n("div", ps, [
1040
+ n("div", null, [
1041
+ n("h1", vs, z(e(x) || "Dashboard"), 1),
1042
+ A[3] || (A[3] = n("p", { class: "text-muted-foreground text-sm mt-1" }, " Overview and analytics for your booking service ", -1))
1043
+ ]),
1044
+ n("div", fs, [
1045
+ e(c)("manage-reservations") ? (h(), G(ft, { key: 0 })) : Z("", !0),
1046
+ l(U, {
1047
+ to: e(p)(`/edit/${e(s).id}/agenda`)
1048
+ }, {
1049
+ default: b(() => [
1050
+ l(L, { class: "w-full" }, {
1051
+ default: b(() => [
1052
+ l(e(Xe), { class: "size-4" }),
1053
+ A[4] || (A[4] = X(" View Agenda ", -1))
1054
+ ]),
1055
+ _: 1
1056
+ })
1057
+ ]),
1058
+ _: 1
1059
+ }, 8, ["to"])
1060
+ ])
1061
+ ]),
1062
+ l(Bt, {
1063
+ modelValue: e(o),
1064
+ "onUpdate:modelValue": A[0] || (A[0] = (S) => oe(o) ? o.value = S : null),
1065
+ "view-mode": e(t),
1066
+ "onUpdate:viewMode": A[1] || (A[1] = (S) => oe(t) ? t.value = S : null),
1067
+ "onUpdate:selectedResource": A[2] || (A[2] = (S) => v.value = S),
1068
+ "agenda-data": e(i),
1069
+ resources: e(R)
1070
+ }, null, 8, ["modelValue", "view-mode", "agenda-data", "resources"]),
1071
+ n("div", gs, [
1072
+ n("div", hs, [
1073
+ e(R).length > 0 ? (h(), G(us, {
1074
+ key: 0,
1075
+ "active-date": e(o),
1076
+ "selected-resource": e(v),
1077
+ resources: e(R)
1078
+ }, null, 8, ["active-date", "selected-resource", "resources"])) : Z("", !0)
1079
+ ])
1080
+ ])
1081
+ ])
1082
+ ]),
1083
+ _: 1
1084
+ });
1085
+ };
1086
+ }
1087
+ });
1088
+ export {
1089
+ Ms as default
1090
+ };