@vc-shell/framework 2.0.0-alpha.25 → 2.0.0-alpha.26

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 (287) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/ai-agent/index.js +11 -9
  3. package/dist/chunks/{VcAiAgentPanel.vue_vue_type_style_index_0_lang-DHLKAqm0.js → VcAiAgentPanel.vue_vue_type_style_index_0_lang-DkhNTrts.js} +631 -621
  4. package/dist/chunks/{VcTableAdapter.vue_vue_type_style_index_0_lang-TnE_L5Rp.js → VcTableAdapter.vue_vue_type_style_index_0_lang-Xss_fCsh.js} +2266 -2265
  5. package/dist/chunks/{index-Des1Cxbn.js → index-BhuEUzqS.js} +1 -1
  6. package/dist/chunks/{index-BJbOVN0O.js → index-DqkSBxqx.js} +2 -2
  7. package/dist/chunks/{vc-toast.vue_vue_type_style_index_0_lang-D-kMIagL.js → vc-toast.vue_vue_type_style_index_0_lang-B2yfKgJ0.js} +1 -1
  8. package/dist/core/composables/index.d.ts +1 -0
  9. package/dist/core/composables/index.d.ts.map +1 -1
  10. package/dist/core/composables/usePopup/index.d.ts +14 -0
  11. package/dist/core/composables/usePopup/index.d.ts.map +1 -0
  12. package/dist/core/plugins/ai-agent/public.d.ts +2 -0
  13. package/dist/core/plugins/ai-agent/public.d.ts.map +1 -1
  14. package/dist/framework.js +83 -81
  15. package/dist/index.css +1 -1
  16. package/dist/index.d.ts +1 -1
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/shell/_internal/popup/composables/index.d.ts +1 -1
  19. package/dist/shell/_internal/popup/composables/index.d.ts.map +1 -1
  20. package/dist/shell/_internal/popup/composables/usePopup/index.d.ts +1 -13
  21. package/dist/shell/_internal/popup/composables/usePopup/index.d.ts.map +1 -1
  22. package/dist/tsconfig.tsbuildinfo +1 -1
  23. package/dist/ui/components/organisms/index.d.ts +1 -1
  24. package/dist/ui/components/organisms/index.d.ts.map +1 -1
  25. package/dist/ui/components/organisms/{vc-table → vc-data-table}/VcDataTable.vue.d.ts +2 -2
  26. package/dist/ui/components/organisms/vc-data-table/VcDataTable.vue.d.ts.map +1 -0
  27. package/dist/ui/components/organisms/{vc-table → vc-data-table}/VcTableAdapter.vue.d.ts +1 -1
  28. package/dist/ui/components/organisms/vc-data-table/VcTableAdapter.vue.d.ts.map +1 -0
  29. package/dist/ui/components/organisms/vc-data-table/_internal/vc-table-base-header/vc-table-base-header.vue.d.ts.map +1 -0
  30. package/dist/ui/components/organisms/{vc-table → vc-data-table}/_internal/vc-table-cell/vc-table-cell.vue.d.ts +1 -1
  31. package/dist/ui/components/organisms/vc-data-table/_internal/vc-table-cell/vc-table-cell.vue.d.ts.map +1 -0
  32. package/dist/ui/components/organisms/{vc-table → vc-data-table}/_internal/vc-table-column-switcher/vc-table-column-switcher.vue.d.ts +1 -1
  33. package/dist/ui/components/organisms/vc-data-table/_internal/vc-table-column-switcher/vc-table-column-switcher.vue.d.ts.map +1 -0
  34. package/dist/ui/components/organisms/vc-data-table/_internal/vc-table-counter/vc-table-counter.vue.d.ts.map +1 -0
  35. package/dist/ui/components/organisms/{vc-table → vc-data-table}/_internal/vc-table-empty/vc-table-empty.vue.d.ts +1 -1
  36. package/dist/ui/components/organisms/vc-data-table/_internal/vc-table-empty/vc-table-empty.vue.d.ts.map +1 -0
  37. package/dist/ui/components/organisms/vc-data-table/_internal/vc-table-filter/vc-table-filter.vue.d.ts.map +1 -0
  38. package/dist/ui/components/organisms/{vc-table → vc-data-table}/base/BaseVcDataTable.d.ts +1 -1
  39. package/dist/ui/components/organisms/vc-data-table/base/BaseVcDataTable.d.ts.map +1 -0
  40. package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/ColumnFilter.vue.d.ts +1 -1
  41. package/dist/ui/components/organisms/vc-data-table/components/ColumnFilter.vue.d.ts.map +1 -0
  42. package/dist/ui/components/organisms/vc-data-table/components/ColumnSwitcherButton.vue.d.ts.map +1 -0
  43. package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/DataTableBody.vue.d.ts +3 -3
  44. package/dist/ui/components/organisms/vc-data-table/components/DataTableBody.vue.d.ts.map +1 -0
  45. package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/DataTableCellRenderer.vue.d.ts +1 -1
  46. package/dist/ui/components/organisms/vc-data-table/components/DataTableCellRenderer.vue.d.ts.map +1 -0
  47. package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/DataTableHeader.vue.d.ts +2 -2
  48. package/dist/ui/components/organisms/vc-data-table/components/DataTableHeader.vue.d.ts.map +1 -0
  49. package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/DataTableRow.vue.d.ts +2 -2
  50. package/dist/ui/components/organisms/vc-data-table/components/DataTableRow.vue.d.ts.map +1 -0
  51. package/dist/ui/components/organisms/vc-data-table/components/GlobalFiltersButton.vue.d.ts.map +1 -0
  52. package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/GlobalFiltersPanel.vue.d.ts +1 -1
  53. package/dist/ui/components/organisms/vc-data-table/components/GlobalFiltersPanel.vue.d.ts.map +1 -0
  54. package/dist/ui/components/organisms/vc-data-table/components/Table.vue.d.ts.map +1 -0
  55. package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/TableActions.vue.d.ts +1 -1
  56. package/dist/ui/components/organisms/vc-data-table/components/TableActions.vue.d.ts.map +1 -0
  57. package/dist/ui/components/organisms/vc-data-table/components/TableAddRowButton.vue.d.ts.map +1 -0
  58. package/dist/ui/components/organisms/vc-data-table/components/TableBody.vue.d.ts.map +1 -0
  59. package/dist/ui/components/organisms/vc-data-table/components/TableCell.vue.d.ts.map +1 -0
  60. package/dist/ui/components/organisms/vc-data-table/components/TableCheckbox.vue.d.ts.map +1 -0
  61. package/dist/ui/components/organisms/vc-data-table/components/TableColumnSwitcher.vue.d.ts.map +1 -0
  62. package/dist/ui/components/organisms/vc-data-table/components/TableEmpty.vue.d.ts.map +1 -0
  63. package/dist/ui/components/organisms/vc-data-table/components/TableFooter.vue.d.ts.map +1 -0
  64. package/dist/ui/components/organisms/vc-data-table/components/TableGroupRow.vue.d.ts.map +1 -0
  65. package/dist/ui/components/organisms/vc-data-table/components/TableHead.vue.d.ts.map +1 -0
  66. package/dist/ui/components/organisms/vc-data-table/components/TableHeader.vue.d.ts.map +1 -0
  67. package/dist/ui/components/organisms/vc-data-table/components/TableResizeHandle.vue.d.ts.map +1 -0
  68. package/dist/ui/components/organisms/vc-data-table/components/TableRow.vue.d.ts.map +1 -0
  69. package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/TableRowActions.vue.d.ts +1 -1
  70. package/dist/ui/components/organisms/vc-data-table/components/TableRowActions.vue.d.ts.map +1 -0
  71. package/dist/ui/components/organisms/vc-data-table/components/TableSearchHeader.vue.d.ts.map +1 -0
  72. package/dist/ui/components/organisms/vc-data-table/components/TableSelectAllBar.vue.d.ts.map +1 -0
  73. package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/VcColumn.vue.d.ts +1 -1
  74. package/dist/ui/components/organisms/vc-data-table/components/VcColumn.vue.d.ts.map +1 -0
  75. package/dist/ui/components/organisms/vc-data-table/components/_internal/SlotProxy.d.ts.map +1 -0
  76. package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/_internal/TableSkeletonRows.vue.d.ts +2 -2
  77. package/dist/ui/components/organisms/vc-data-table/components/_internal/TableSkeletonRows.vue.d.ts.map +1 -0
  78. package/dist/ui/components/organisms/vc-data-table/components/cells/CellDate.vue.d.ts.map +1 -0
  79. package/dist/ui/components/organisms/vc-data-table/components/cells/CellDateAgo.vue.d.ts.map +1 -0
  80. package/dist/ui/components/organisms/vc-data-table/components/cells/CellDefault.vue.d.ts.map +1 -0
  81. package/dist/ui/components/organisms/vc-data-table/components/cells/CellEditableWrapper.vue.d.ts.map +1 -0
  82. package/dist/ui/components/organisms/vc-data-table/components/cells/CellHtml.vue.d.ts.map +1 -0
  83. package/dist/ui/components/organisms/vc-data-table/components/cells/CellImage.vue.d.ts.map +1 -0
  84. package/dist/ui/components/organisms/vc-data-table/components/cells/CellLink.vue.d.ts.map +1 -0
  85. package/dist/ui/components/organisms/vc-data-table/components/cells/CellMoney.vue.d.ts.map +1 -0
  86. package/dist/ui/components/organisms/vc-data-table/components/cells/CellNumber.vue.d.ts.map +1 -0
  87. package/dist/ui/components/organisms/vc-data-table/components/cells/CellStatus.vue.d.ts.map +1 -0
  88. package/dist/ui/components/organisms/vc-data-table/components/cells/CellStatusIcon.vue.d.ts.map +1 -0
  89. package/dist/ui/components/organisms/vc-data-table/components/cells/DynamicCellRenderer.vue.d.ts.map +1 -0
  90. package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/cells/index.d.ts +11 -11
  91. package/dist/ui/components/organisms/vc-data-table/components/cells/index.d.ts.map +1 -0
  92. package/dist/ui/components/organisms/vc-data-table/components/index.d.ts +27 -0
  93. package/dist/ui/components/organisms/vc-data-table/components/index.d.ts.map +1 -0
  94. package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/mobile/DataTableMobileCard.vue.d.ts +1 -1
  95. package/dist/ui/components/organisms/vc-data-table/components/mobile/DataTableMobileCard.vue.d.ts.map +1 -0
  96. package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/mobile/DataTableMobileView.vue.d.ts +1 -1
  97. package/dist/ui/components/organisms/vc-data-table/components/mobile/DataTableMobileView.vue.d.ts.map +1 -0
  98. package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/mobile/MobileActionSheet.vue.d.ts +1 -1
  99. package/dist/ui/components/organisms/vc-data-table/components/mobile/MobileActionSheet.vue.d.ts.map +1 -0
  100. package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/mobile/MobileCellRenderer.vue.d.ts +1 -1
  101. package/dist/ui/components/organisms/vc-data-table/components/mobile/MobileCellRenderer.vue.d.ts.map +1 -0
  102. package/dist/ui/components/organisms/vc-data-table/components/mobile/PullToRefresh.vue.d.ts.map +1 -0
  103. package/dist/ui/components/organisms/vc-data-table/components/mobile/index.d.ts +6 -0
  104. package/dist/ui/components/organisms/vc-data-table/components/mobile/index.d.ts.map +1 -0
  105. package/dist/ui/components/organisms/{vc-table → vc-data-table}/composables/index.d.ts +30 -30
  106. package/dist/ui/components/organisms/vc-data-table/composables/index.d.ts.map +1 -0
  107. package/dist/ui/components/organisms/vc-data-table/composables/useCellBase.d.ts.map +1 -0
  108. package/dist/ui/components/organisms/vc-data-table/composables/useCellRegistry.d.ts.map +1 -0
  109. package/dist/ui/components/organisms/{vc-table → vc-data-table}/composables/useColumnFilter.d.ts +1 -1
  110. package/dist/ui/components/organisms/vc-data-table/composables/useColumnFilter.d.ts.map +1 -0
  111. package/dist/ui/components/organisms/{vc-table → vc-data-table}/composables/useDataProcessing.d.ts +1 -1
  112. package/dist/ui/components/organisms/vc-data-table/composables/useDataProcessing.d.ts.map +1 -0
  113. package/dist/ui/components/organisms/{vc-table → vc-data-table}/composables/useDataTableOrchestrator.d.ts +4 -4
  114. package/dist/ui/components/organisms/vc-data-table/composables/useDataTableOrchestrator.d.ts.map +1 -0
  115. package/dist/ui/components/organisms/vc-data-table/composables/useDataTableState.d.ts.map +1 -0
  116. package/dist/ui/components/organisms/{vc-table → vc-data-table}/composables/useMobileCardLayout.d.ts +2 -2
  117. package/dist/ui/components/organisms/vc-data-table/composables/useMobileCardLayout.d.ts.map +1 -0
  118. package/dist/ui/components/organisms/{vc-table → vc-data-table}/composables/useTableColumns.d.ts +2 -2
  119. package/dist/ui/components/organisms/vc-data-table/composables/useTableColumns.d.ts.map +1 -0
  120. package/dist/ui/components/organisms/vc-data-table/composables/useTableColumnsReorder.d.ts.map +1 -0
  121. package/dist/ui/components/organisms/vc-data-table/composables/useTableColumnsResize.d.ts.map +1 -0
  122. package/dist/ui/components/organisms/{vc-table → vc-data-table}/composables/useTableContext.d.ts +1 -1
  123. package/dist/ui/components/organisms/vc-data-table/composables/useTableContext.d.ts.map +1 -0
  124. package/dist/ui/components/organisms/vc-data-table/composables/useTableEditing.d.ts.map +1 -0
  125. package/dist/ui/components/organisms/vc-data-table/composables/useTableExpansion.d.ts.map +1 -0
  126. package/dist/ui/components/organisms/{vc-table → vc-data-table}/composables/useTableFilter.d.ts +1 -1
  127. package/dist/ui/components/organisms/vc-data-table/composables/useTableFilter.d.ts.map +1 -0
  128. package/dist/ui/components/organisms/vc-data-table/composables/useTableInlineEdit.d.ts.map +1 -0
  129. package/dist/ui/components/organisms/vc-data-table/composables/useTableRowGrouping.d.ts.map +1 -0
  130. package/dist/ui/components/organisms/{vc-table → vc-data-table}/composables/useTableRowReorder.d.ts +1 -1
  131. package/dist/ui/components/organisms/vc-data-table/composables/useTableRowReorder.d.ts.map +1 -0
  132. package/dist/ui/components/organisms/vc-data-table/composables/useTableSelectionV2.d.ts.map +1 -0
  133. package/dist/ui/components/organisms/{vc-table → vc-data-table}/composables/useTableSort.d.ts +1 -1
  134. package/dist/ui/components/organisms/vc-data-table/composables/useTableSort.d.ts.map +1 -0
  135. package/dist/ui/components/organisms/vc-data-table/composables/useTableSwipe.d.ts.map +1 -0
  136. package/dist/ui/components/organisms/vc-data-table/composables/useVirtualScroll.d.ts.map +1 -0
  137. package/dist/ui/components/organisms/{vc-table → vc-data-table}/index.d.ts +9 -9
  138. package/dist/ui/components/organisms/vc-data-table/index.d.ts.map +1 -0
  139. package/dist/ui/components/organisms/{vc-table → vc-data-table}/keys.d.ts +2 -2
  140. package/dist/ui/components/organisms/vc-data-table/keys.d.ts.map +1 -0
  141. package/dist/ui/components/organisms/{vc-table → vc-data-table}/types.d.ts +1 -1
  142. package/dist/ui/components/organisms/vc-data-table/types.d.ts.map +1 -0
  143. package/dist/ui/components/organisms/{vc-table → vc-data-table}/utils/ColumnCollector.d.ts +1 -1
  144. package/dist/ui/components/organisms/vc-data-table/utils/ColumnCollector.d.ts.map +1 -0
  145. package/dist/ui/components/organisms/vc-data-table/utils/deepClone.d.ts.map +1 -0
  146. package/dist/ui/components/organisms/{vc-table → vc-data-table}/utils/index.d.ts +3 -3
  147. package/dist/ui/components/organisms/vc-data-table/utils/index.d.ts.map +1 -0
  148. package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts +1 -1
  149. package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts.map +1 -1
  150. package/dist/ui/components/organisms/vc-sidebar/vc-sidebar.vue.d.ts +1 -1
  151. package/dist/ui/components/organisms/vc-sidebar/vc-sidebar.vue.d.ts.map +1 -1
  152. package/dist/ui/index.js +3 -3
  153. package/package.json +4 -4
  154. package/dist/ui/components/organisms/vc-table/VcDataTable.vue.d.ts.map +0 -1
  155. package/dist/ui/components/organisms/vc-table/VcTableAdapter.vue.d.ts.map +0 -1
  156. package/dist/ui/components/organisms/vc-table/_internal/vc-table-base-header/vc-table-base-header.vue.d.ts.map +0 -1
  157. package/dist/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue.d.ts.map +0 -1
  158. package/dist/ui/components/organisms/vc-table/_internal/vc-table-column-switcher/vc-table-column-switcher.vue.d.ts.map +0 -1
  159. package/dist/ui/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue.d.ts.map +0 -1
  160. package/dist/ui/components/organisms/vc-table/_internal/vc-table-empty/vc-table-empty.vue.d.ts.map +0 -1
  161. package/dist/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue.d.ts.map +0 -1
  162. package/dist/ui/components/organisms/vc-table/base/BaseVcDataTable.d.ts.map +0 -1
  163. package/dist/ui/components/organisms/vc-table/components/ColumnFilter.vue.d.ts.map +0 -1
  164. package/dist/ui/components/organisms/vc-table/components/ColumnSwitcherButton.vue.d.ts.map +0 -1
  165. package/dist/ui/components/organisms/vc-table/components/DataTableBody.vue.d.ts.map +0 -1
  166. package/dist/ui/components/organisms/vc-table/components/DataTableCellRenderer.vue.d.ts.map +0 -1
  167. package/dist/ui/components/organisms/vc-table/components/DataTableHeader.vue.d.ts.map +0 -1
  168. package/dist/ui/components/organisms/vc-table/components/DataTableRow.vue.d.ts.map +0 -1
  169. package/dist/ui/components/organisms/vc-table/components/GlobalFiltersButton.vue.d.ts.map +0 -1
  170. package/dist/ui/components/organisms/vc-table/components/GlobalFiltersPanel.vue.d.ts.map +0 -1
  171. package/dist/ui/components/organisms/vc-table/components/Table.vue.d.ts.map +0 -1
  172. package/dist/ui/components/organisms/vc-table/components/TableActions.vue.d.ts.map +0 -1
  173. package/dist/ui/components/organisms/vc-table/components/TableAddRowButton.vue.d.ts.map +0 -1
  174. package/dist/ui/components/organisms/vc-table/components/TableBody.vue.d.ts.map +0 -1
  175. package/dist/ui/components/organisms/vc-table/components/TableCell.vue.d.ts.map +0 -1
  176. package/dist/ui/components/organisms/vc-table/components/TableCheckbox.vue.d.ts.map +0 -1
  177. package/dist/ui/components/organisms/vc-table/components/TableColumnSwitcher.vue.d.ts.map +0 -1
  178. package/dist/ui/components/organisms/vc-table/components/TableEmpty.vue.d.ts.map +0 -1
  179. package/dist/ui/components/organisms/vc-table/components/TableFooter.vue.d.ts.map +0 -1
  180. package/dist/ui/components/organisms/vc-table/components/TableGroupRow.vue.d.ts.map +0 -1
  181. package/dist/ui/components/organisms/vc-table/components/TableHead.vue.d.ts.map +0 -1
  182. package/dist/ui/components/organisms/vc-table/components/TableHeader.vue.d.ts.map +0 -1
  183. package/dist/ui/components/organisms/vc-table/components/TableResizeHandle.vue.d.ts.map +0 -1
  184. package/dist/ui/components/organisms/vc-table/components/TableRow.vue.d.ts.map +0 -1
  185. package/dist/ui/components/organisms/vc-table/components/TableRowActions.vue.d.ts.map +0 -1
  186. package/dist/ui/components/organisms/vc-table/components/TableSearchHeader.vue.d.ts.map +0 -1
  187. package/dist/ui/components/organisms/vc-table/components/TableSelectAllBar.vue.d.ts.map +0 -1
  188. package/dist/ui/components/organisms/vc-table/components/VcColumn.vue.d.ts.map +0 -1
  189. package/dist/ui/components/organisms/vc-table/components/_internal/SlotProxy.d.ts.map +0 -1
  190. package/dist/ui/components/organisms/vc-table/components/_internal/TableSkeletonRows.vue.d.ts.map +0 -1
  191. package/dist/ui/components/organisms/vc-table/components/cells/CellDate.vue.d.ts.map +0 -1
  192. package/dist/ui/components/organisms/vc-table/components/cells/CellDateAgo.vue.d.ts.map +0 -1
  193. package/dist/ui/components/organisms/vc-table/components/cells/CellDefault.vue.d.ts.map +0 -1
  194. package/dist/ui/components/organisms/vc-table/components/cells/CellEditableWrapper.vue.d.ts.map +0 -1
  195. package/dist/ui/components/organisms/vc-table/components/cells/CellHtml.vue.d.ts.map +0 -1
  196. package/dist/ui/components/organisms/vc-table/components/cells/CellImage.vue.d.ts.map +0 -1
  197. package/dist/ui/components/organisms/vc-table/components/cells/CellLink.vue.d.ts.map +0 -1
  198. package/dist/ui/components/organisms/vc-table/components/cells/CellMoney.vue.d.ts.map +0 -1
  199. package/dist/ui/components/organisms/vc-table/components/cells/CellNumber.vue.d.ts.map +0 -1
  200. package/dist/ui/components/organisms/vc-table/components/cells/CellStatus.vue.d.ts.map +0 -1
  201. package/dist/ui/components/organisms/vc-table/components/cells/CellStatusIcon.vue.d.ts.map +0 -1
  202. package/dist/ui/components/organisms/vc-table/components/cells/DynamicCellRenderer.vue.d.ts.map +0 -1
  203. package/dist/ui/components/organisms/vc-table/components/cells/index.d.ts.map +0 -1
  204. package/dist/ui/components/organisms/vc-table/components/index.d.ts +0 -27
  205. package/dist/ui/components/organisms/vc-table/components/index.d.ts.map +0 -1
  206. package/dist/ui/components/organisms/vc-table/components/mobile/DataTableMobileCard.vue.d.ts.map +0 -1
  207. package/dist/ui/components/organisms/vc-table/components/mobile/DataTableMobileView.vue.d.ts.map +0 -1
  208. package/dist/ui/components/organisms/vc-table/components/mobile/MobileActionSheet.vue.d.ts.map +0 -1
  209. package/dist/ui/components/organisms/vc-table/components/mobile/MobileCellRenderer.vue.d.ts.map +0 -1
  210. package/dist/ui/components/organisms/vc-table/components/mobile/PullToRefresh.vue.d.ts.map +0 -1
  211. package/dist/ui/components/organisms/vc-table/components/mobile/index.d.ts +0 -6
  212. package/dist/ui/components/organisms/vc-table/components/mobile/index.d.ts.map +0 -1
  213. package/dist/ui/components/organisms/vc-table/composables/index.d.ts.map +0 -1
  214. package/dist/ui/components/organisms/vc-table/composables/useCellBase.d.ts.map +0 -1
  215. package/dist/ui/components/organisms/vc-table/composables/useCellRegistry.d.ts.map +0 -1
  216. package/dist/ui/components/organisms/vc-table/composables/useColumnFilter.d.ts.map +0 -1
  217. package/dist/ui/components/organisms/vc-table/composables/useDataProcessing.d.ts.map +0 -1
  218. package/dist/ui/components/organisms/vc-table/composables/useDataTableOrchestrator.d.ts.map +0 -1
  219. package/dist/ui/components/organisms/vc-table/composables/useDataTableState.d.ts.map +0 -1
  220. package/dist/ui/components/organisms/vc-table/composables/useMobileCardLayout.d.ts.map +0 -1
  221. package/dist/ui/components/organisms/vc-table/composables/useTableColumns.d.ts.map +0 -1
  222. package/dist/ui/components/organisms/vc-table/composables/useTableColumnsReorder.d.ts.map +0 -1
  223. package/dist/ui/components/organisms/vc-table/composables/useTableColumnsResize.d.ts.map +0 -1
  224. package/dist/ui/components/organisms/vc-table/composables/useTableContext.d.ts.map +0 -1
  225. package/dist/ui/components/organisms/vc-table/composables/useTableEditing.d.ts.map +0 -1
  226. package/dist/ui/components/organisms/vc-table/composables/useTableExpansion.d.ts.map +0 -1
  227. package/dist/ui/components/organisms/vc-table/composables/useTableFilter.d.ts.map +0 -1
  228. package/dist/ui/components/organisms/vc-table/composables/useTableInlineEdit.d.ts.map +0 -1
  229. package/dist/ui/components/organisms/vc-table/composables/useTableRowGrouping.d.ts.map +0 -1
  230. package/dist/ui/components/organisms/vc-table/composables/useTableRowReorder.d.ts.map +0 -1
  231. package/dist/ui/components/organisms/vc-table/composables/useTableSelectionV2.d.ts.map +0 -1
  232. package/dist/ui/components/organisms/vc-table/composables/useTableSort.d.ts.map +0 -1
  233. package/dist/ui/components/organisms/vc-table/composables/useTableSwipe.d.ts.map +0 -1
  234. package/dist/ui/components/organisms/vc-table/composables/useVirtualScroll.d.ts.map +0 -1
  235. package/dist/ui/components/organisms/vc-table/index.d.ts.map +0 -1
  236. package/dist/ui/components/organisms/vc-table/keys.d.ts.map +0 -1
  237. package/dist/ui/components/organisms/vc-table/types.d.ts.map +0 -1
  238. package/dist/ui/components/organisms/vc-table/utils/ColumnCollector.d.ts.map +0 -1
  239. package/dist/ui/components/organisms/vc-table/utils/deepClone.d.ts.map +0 -1
  240. package/dist/ui/components/organisms/vc-table/utils/index.d.ts.map +0 -1
  241. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/_internal/vc-table-base-header/vc-table-base-header.vue.d.ts +0 -0
  242. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/_internal/vc-table-counter/vc-table-counter.vue.d.ts +0 -0
  243. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/_internal/vc-table-filter/vc-table-filter.vue.d.ts +0 -0
  244. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/ColumnSwitcherButton.vue.d.ts +0 -0
  245. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/GlobalFiltersButton.vue.d.ts +0 -0
  246. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/Table.vue.d.ts +0 -0
  247. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/TableAddRowButton.vue.d.ts +0 -0
  248. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/TableBody.vue.d.ts +0 -0
  249. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/TableCell.vue.d.ts +0 -0
  250. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/TableCheckbox.vue.d.ts +0 -0
  251. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/TableColumnSwitcher.vue.d.ts +0 -0
  252. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/TableEmpty.vue.d.ts +0 -0
  253. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/TableFooter.vue.d.ts +0 -0
  254. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/TableGroupRow.vue.d.ts +0 -0
  255. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/TableHead.vue.d.ts +0 -0
  256. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/TableHeader.vue.d.ts +0 -0
  257. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/TableResizeHandle.vue.d.ts +0 -0
  258. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/TableRow.vue.d.ts +0 -0
  259. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/TableSearchHeader.vue.d.ts +0 -0
  260. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/TableSelectAllBar.vue.d.ts +0 -0
  261. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/_internal/SlotProxy.d.ts +0 -0
  262. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/cells/CellDate.vue.d.ts +0 -0
  263. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/cells/CellDateAgo.vue.d.ts +0 -0
  264. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/cells/CellDefault.vue.d.ts +0 -0
  265. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/cells/CellEditableWrapper.vue.d.ts +0 -0
  266. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/cells/CellHtml.vue.d.ts +0 -0
  267. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/cells/CellImage.vue.d.ts +0 -0
  268. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/cells/CellLink.vue.d.ts +0 -0
  269. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/cells/CellMoney.vue.d.ts +0 -0
  270. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/cells/CellNumber.vue.d.ts +0 -0
  271. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/cells/CellStatus.vue.d.ts +0 -0
  272. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/cells/CellStatusIcon.vue.d.ts +0 -0
  273. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/cells/DynamicCellRenderer.vue.d.ts +0 -0
  274. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/components/mobile/PullToRefresh.vue.d.ts +0 -0
  275. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/composables/useCellBase.d.ts +0 -0
  276. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/composables/useCellRegistry.d.ts +0 -0
  277. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/composables/useDataTableState.d.ts +0 -0
  278. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/composables/useTableColumnsReorder.d.ts +0 -0
  279. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/composables/useTableColumnsResize.d.ts +0 -0
  280. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/composables/useTableEditing.d.ts +0 -0
  281. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/composables/useTableExpansion.d.ts +0 -0
  282. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/composables/useTableInlineEdit.d.ts +0 -0
  283. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/composables/useTableRowGrouping.d.ts +0 -0
  284. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/composables/useTableSelectionV2.d.ts +0 -0
  285. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/composables/useTableSwipe.d.ts +0 -0
  286. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/composables/useVirtualScroll.d.ts +0 -0
  287. /package/dist/ui/components/organisms/{vc-table → vc-data-table}/utils/deepClone.d.ts +0 -0
@@ -1,5 +1,5 @@
1
- import { defineComponent as U, computed as S, openBlock as o, createElementBlock as p, withKeys as ge, withModifiers as le, normalizeClass as q, toDisplayString as D, createCommentVNode as R, createElementVNode as y, renderSlot as V, normalizeStyle as he, provide as Me, toRef as Ie, useId as wt, ref as O, watch as ne, createBlock as B, unref as n, mergeProps as Se, resolveDynamicComponent as We, withCtx as A, createVNode as x, inject as de, onBeforeUnmount as Ue, Teleport as ot, Transition as _e, createSlots as we, createTextVNode as ie, resolveComponent as Ne, Fragment as ee, renderList as me, useSlots as ct, resolveDirective as Rl, withDirectives as He, onMounted as lt, onUnmounted as Lt, vModelText as Vn, nextTick as Ee, vModelDynamic as li, watchEffect as Kt, normalizeProps as Qe, guardReactiveProps as Je, vShow as Bt, vModelCheckbox as ai, toValue as Te, onScopeDispose as mt, reactive as xt, getCurrentInstance as pt, getCurrentScope as kt, hasInjectionContext as Dn, shallowReactive as kl, markRaw as Yt, isRef as dt, shallowRef as ni, toHandlers as Sl, useAttrs as oi, TransitionGroup as _a, toRaw as Nn } from "vue";
2
- import { l as Ye, B as ii, d as J, f as St, e as Qt, E as nt, aV as Pn, Z as ma, I as Ct, $ as si, bq as ri, r as rt, P as pa, br as Jt, al as ga, t as Zt, Y as ba, a0 as Cl, X as ha, k as el, C as Il, F as tl, ak as Ea, av as ll, a as Oe, m as Tl, n as ui, a9 as ya, bj as Aa, aA as cn, c as Ra, q as Ia, aB as di, ap as Fn, bs as ci, z as Ta, bt as vi, ab as fi, ai as mi, ah as pi, aa as zn, U as gi, aI as bi, g as hi, u as Un, b as Hn, W as Gn, v as xa, w as yi, ae as wi } from "./VcAiAgentPanel.vue_vue_type_style_index_0_lang-DHLKAqm0.js";
1
+ import { defineComponent as U, computed as S, openBlock as o, createElementBlock as p, withKeys as ge, withModifiers as le, normalizeClass as q, toDisplayString as D, createCommentVNode as R, createElementVNode as y, renderSlot as V, normalizeStyle as he, provide as Me, toRef as Ie, useId as wt, ref as O, watch as ne, createBlock as B, unref as n, mergeProps as Se, resolveDynamicComponent as We, withCtx as A, createVNode as x, inject as de, onBeforeUnmount as Ue, Teleport as ot, Transition as _e, createSlots as we, createTextVNode as ie, resolveComponent as Ne, Fragment as ee, renderList as me, useSlots as ct, resolveDirective as Rl, withDirectives as He, onMounted as lt, onUnmounted as Lt, vModelText as Vn, nextTick as Ee, vModelDynamic as li, watchEffect as Kt, normalizeProps as Qe, guardReactiveProps as Je, vShow as Bt, vModelCheckbox as ai, toValue as Te, onScopeDispose as mt, reactive as xt, getCurrentInstance as pt, getCurrentScope as kt, hasInjectionContext as Dn, shallowReactive as kl, markRaw as Yt, shallowRef as ni, isRef as dt, toHandlers as Sl, useAttrs as oi, TransitionGroup as _a, toRaw as Nn } from "vue";
2
+ import { l as Ye, B as ii, d as J, f as St, e as Qt, F as nt, aX as Pn, a0 as ma, I as Ct, a1 as si, bs as ri, r as rt, R as pa, bt as Jt, an as ga, t as Zt, $ as ba, a2 as Cl, Z as ha, k as el, C as Il, G as tl, am as Ea, ax as ll, a as Oe, m as Tl, n as ui, ab as ya, bl as Aa, aC as cn, c as Ra, q as Ia, aD as di, ar as Fn, bu as ci, z as Ta, bv as vi, ad as fi, ak as mi, aj as pi, ac as zn, X as gi, aK as bi, g as hi, u as Un, b as Hn, W as Gn, v as xa, w as yi, ag as wi } from "./VcAiAgentPanel.vue_vue_type_style_index_0_lang-DkhNTrts.js";
3
3
  import { d as Ma, e as ki, a as Oa, f as Si, g as Ci, u as $i } from "./vendor-vueuse-core-CPOkeLul.js";
4
4
  import { u as _i, E as vn } from "./vendor-tiptap-vue-3-CdIBiRMV.js";
5
5
  import { S as Ei } from "./vendor-tiptap-starter-kit-BEsLVJ4Q.js";
@@ -89,7 +89,7 @@ import { k as dr } from "./vendor-tiptap-core-BWgKs47g.js";
89
89
  import { q as cr } from "./vendor-vuepic-vue-datepicker-CaZ_qpJp.js";
90
90
  import { C as vr, u as fr } from "./vendor-vue-currency-input-CckB4kjx.js";
91
91
  import { a as mr, u as pr } from "./vendor-floating-ui-vue-sCrhit51.js";
92
- import "./vc-toast.vue_vue_type_style_index_0_lang-D-kMIagL.js";
92
+ import "./vc-toast.vue_vue_type_style_index_0_lang-B2yfKgJ0.js";
93
93
  import { t as gr } from "./vendor-truncate-html-DDVwXwPl.js";
94
94
  import { S as yt, h as br, T as hr } from "./vendor-date-fns-BKO3x1R1.js";
95
95
  const yr = ["role", "tabindex", "aria-disabled", "aria-label", "onKeydown"], wr = {
@@ -7500,2426 +7500,2427 @@ function _m(e = {}) {
7500
7500
  registeredToolbarItems: l.registeredToolbarItems
7501
7501
  };
7502
7502
  }
7503
- function fo(e) {
7504
- const a = Object.values(e.params)?.[0], t = typeof a == "string" ? a : "";
7505
- return t && e.path.startsWith(`/${t}/`) ? e.path.slice(t.length + 1) : t && e.path === `/${t}` ? "/" : e.path;
7506
- }
7507
- function sC(e) {
7508
- const a = Dt();
7509
- return { isActive: S(() => {
7510
- const l = Te(e);
7511
- if (!l) return !1;
7512
- const r = fo(a);
7513
- return r === l || r.startsWith(l + "/");
7514
- }) };
7515
- }
7516
- const Ca = /* @__PURE__ */ U({
7517
- __name: "VcAppMenu",
7518
- props: {
7519
- expanded: { type: Boolean, default: !0 },
7520
- searchQuery: {}
7521
- },
7522
- emits: ["item:click"],
7523
- setup(e, { emit: a }) {
7524
- const t = e, l = a, r = Dt(), { t: s } = Ve(), { menuItems: i, menuBadges: u } = io(), { hasAccess: c } = Zt(), d = ($) => c($.permissions), v = ($) => ($.children ?? []).filter((E) => d(E)), g = S(() => i.value.filter(($) => d($) ? $.children?.length ? v($).length > 0 : !0 : !1)), f = S(() => {
7525
- const $ = t.searchQuery?.toLowerCase().trim();
7526
- return $ ? g.value.map((E) => {
7527
- const _ = v(E);
7528
- if (!_.length)
7529
- return s(E.title).toLowerCase().includes($) ? E : null;
7530
- if (s(E.title).toLowerCase().includes($)) return E;
7531
- const M = _.filter((C) => s(C.title).toLowerCase().includes($));
7532
- return M.length ? { ...E, children: M } : null;
7533
- }).filter(Boolean) : g.value;
7534
- }), b = ($) => $.groupId ?? String($.id ?? $.routeId ?? $.title), h = ($) => {
7535
- l("item:click", $);
7536
- }, m = ($) => {
7537
- if (!$) return !1;
7538
- const E = fo(r);
7539
- return E === $ || E.startsWith($ + "/");
7503
+ const Wa = Symbol("PopupPlugin");
7504
+ let fo;
7505
+ const sC = {
7506
+ install(e) {
7507
+ const t = {
7508
+ popups: kl([])
7540
7509
  };
7541
- function w($) {
7542
- let E;
7543
- typeof $ == "object" && !dt($) && "content" in $ ? E = $ : E = { content: $ };
7544
- let _;
7545
- typeof E.content == "function" ? _ = E.content() : dt(E.content) ? _ = n(E.content) : _ = E.content;
7546
- let M = _;
7547
- if (typeof _ == "number" && _ > 99)
7548
- M = "99+";
7549
- else if (typeof _ == "string") {
7550
- const T = parseInt(_, 10);
7551
- !isNaN(T) && T > 99 && (M = "99+");
7552
- }
7553
- const C = E.isDot ?? !1;
7554
- if (C || M != null && M !== "" && M !== 0)
7555
- return {
7556
- content: M,
7557
- variant: E.variant ?? "primary",
7558
- isDot: C
7559
- };
7560
- }
7561
- const k = S(() => {
7562
- const $ = /* @__PURE__ */ new Map(), E = (_) => {
7563
- const M = _.routeId ?? _.groupId;
7564
- if (!M) return;
7565
- let C = _.badge;
7566
- if (!C && _.routeId && (C = u.value.get(_.routeId)), !C && _.groupId && (C = u.value.get(_.groupId)), !C) return;
7567
- const L = w(C);
7568
- L && $.set(M, L);
7569
- };
7570
- for (const _ of i.value)
7571
- if (E(_), _.children)
7572
- for (const M of _.children)
7573
- E(M);
7574
- return $;
7575
- });
7576
- return ($, E) => f.value.length ? (o(), B(n(Ff), {
7577
- key: 0,
7578
- expanded: e.expanded,
7579
- class: q(["vc-app-menu", { "vc-app-menu--collapsed": !e.expanded }])
7580
- }, {
7581
- default: A(() => [
7582
- (o(!0), p(ee, null, me(f.value, (_) => (o(), p(ee, {
7583
- key: _.id ?? _.routeId ?? _.url ?? _.title
7584
- }, [
7585
- v(_).length ? (o(), B(n(zf), {
7586
- key: 0,
7587
- "data-test-id": _.routeId,
7588
- "group-id": b(_),
7589
- icon: _.groupIcon || _.icon,
7590
- title: $.$t(_.title),
7591
- badge: k.value.get(_.routeId ?? _.groupId ?? "")
7592
- }, {
7593
- default: A(() => [
7594
- (o(!0), p(ee, null, me(v(_), (M) => (o(), B(n(yn), {
7595
- key: M.routeId || M.url || M.id || M.title,
7596
- "data-test-id": M.routeId,
7597
- icon: M.icon,
7598
- title: $.$t(M.title),
7599
- badge: k.value.get(M.routeId ?? M.groupId ?? ""),
7600
- active: m(M.url),
7601
- nested: "",
7602
- onClick: (C) => h(M)
7603
- }, null, 8, ["data-test-id", "icon", "title", "badge", "active", "onClick"]))), 128))
7604
- ]),
7605
- _: 2
7606
- }, 1032, ["data-test-id", "group-id", "icon", "title", "badge"])) : (o(), B(n(yn), {
7607
- key: 1,
7608
- "data-test-id": _.routeId,
7609
- icon: _.groupIcon || _.icon,
7610
- title: $.$t(_.title),
7611
- badge: k.value.get(_.routeId ?? _.groupId ?? ""),
7612
- active: m(_.url),
7613
- onClick: (M) => h(_)
7614
- }, null, 8, ["data-test-id", "icon", "title", "badge", "active", "onClick"]))
7615
- ], 64))), 128))
7616
- ]),
7617
- _: 1
7618
- }, 8, ["expanded", "class"])) : R("", !0);
7619
- }
7620
- }), Em = { class: "vc-user-info" }, Am = {
7621
- key: 1,
7622
- class: "vc-user-info__avatar-fallback"
7623
- }, Rm = { class: "vc-user-info__info" }, Im = { class: "vc-user-info__name" }, Tm = { class: "vc-user-info__role" }, xm = /* @__PURE__ */ U({
7624
- __name: "user-info",
7625
- props: {
7626
- avatarUrl: {},
7627
- name: {},
7628
- role: {},
7629
- isExpanded: { type: Boolean }
7630
- },
7631
- setup(e) {
7632
- const a = e, { user: t } = Il(), l = S(() => {
7633
- if (a.avatarUrl)
7634
- return `background-image: url(${CSS.escape(a.avatarUrl)})`;
7635
- });
7636
- return (r, s) => (o(), p("div", Em, [
7637
- e.avatarUrl ? (o(), p("div", {
7638
- key: 0,
7639
- class: "vc-user-info__avatar",
7640
- style: he(l.value)
7641
- }, null, 4)) : (o(), p("div", Am, [
7642
- x(n(J), {
7643
- icon: "lucide-circle-user",
7644
- size: "l"
7645
- })
7646
- ])),
7647
- y("div", Rm, [
7648
- y("div", Im, D(e.name || n(t) && "fullName" in n(t) && n(t).fullName || n(t)?.userName), 1),
7649
- y("div", Tm, D(e.role ? r.$te(`SHELL.USER.ROLE.${e.role}`) ? r.$t(`SHELL.USER.ROLE.${e.role}`) : e.role : n(t)?.isAdministrator ? r.$t("SHELL.USER.ROLE.ADMINISTRATOR") : ""), 1)
7650
- ])
7651
- ]));
7652
- }
7653
- }), Mm = { class: "vc-settings-menu" }, Om = {
7654
- key: 0,
7655
- class: "vc-settings-menu__separator"
7656
- }, Lm = { class: "vc-settings-menu__group" }, mo = /* @__PURE__ */ U({
7657
- __name: "settings-menu",
7658
- setup(e) {
7659
- const { items: a } = $m(), t = S(() => {
7660
- const l = /* @__PURE__ */ new Map();
7661
- for (const r of a.value) {
7662
- const s = r.group ?? "general";
7663
- l.has(s) || l.set(s, []), l.get(s).push(r);
7664
- }
7665
- return Array.from(l.entries()).map(([r, s]) => ({
7666
- name: r,
7667
- items: s
7668
- }));
7669
- });
7670
- return (l, r) => (o(), p("div", Mm, [
7671
- (o(!0), p(ee, null, me(t.value, (s, i) => (o(), p(ee, {
7672
- key: s.name
7673
- }, [
7674
- i > 0 ? (o(), p("div", Om)) : R("", !0),
7675
- y("div", Lm, [
7676
- (o(!0), p(ee, null, me(s.items, (u) => (o(), B(We(u.component), Se({
7677
- key: u.id
7678
- }, { ref_for: !0 }, u.props || {}), null, 16))), 128))
7679
- ])
7680
- ], 64))), 128))
7681
- ]));
7510
+ e.config.globalProperties.$popupPlugin = t, e.provide(Wa, t), fo = t;
7682
7511
  }
7683
- }), Bm = ["aria-hidden"], Vm = ["aria-modal", "aria-label", "aria-labelledby"], Dm = {
7512
+ }, Em = { class: "vc-popup__center" }, Am = ["aria-label"], Rm = { class: "vc-popup__content" }, Im = {
7684
7513
  key: 0,
7685
- class: "vc-sidebar__handle"
7686
- }, Nm = { class: "vc-sidebar__header" }, Pm = { class: "vc-sidebar__title-wrap" }, Fm = {
7687
- key: 1,
7688
- class: "vc-sidebar__subtitle"
7689
- }, zm = { class: "vc-sidebar__header-actions" }, Um = ["aria-label"], Hm = { class: "vc-sidebar__content" }, Gm = {
7690
- key: 2,
7691
- class: "vc-sidebar__footer"
7692
- }, Wm = 'a[href], area[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable="true"]', Nt = /* @__PURE__ */ U({
7693
- __name: "vc-sidebar",
7514
+ class: "vc-popup__footer"
7515
+ }, qa = /* @__PURE__ */ U({
7516
+ __name: "vc-popup",
7694
7517
  props: {
7695
- modelValue: { type: Boolean },
7696
- position: { default: "right" },
7697
- size: { default: "sm" },
7518
+ modelValue: { type: Boolean, default: void 0 },
7519
+ title: {},
7520
+ closable: { type: Boolean, default: !0 },
7698
7521
  variant: { default: "default" },
7699
- width: { default: void 0 },
7700
- height: { default: void 0 },
7701
- showOverlay: { type: Boolean, default: !0 },
7702
- closeOnOverlay: { type: Boolean, default: !0 },
7703
- closeOnEscape: { type: Boolean, default: !0 },
7704
- trapFocus: { type: Boolean, default: !0 },
7705
- lockScroll: { type: Boolean, default: !0 },
7706
- returnFocus: { type: Boolean, default: !0 },
7707
- autoFocus: { type: Boolean, default: !0 },
7708
- teleport: { type: Boolean, default: !0 },
7709
- teleportTo: {},
7710
- title: { default: "" },
7711
- subtitle: { default: "" },
7712
- ariaLabel: { default: "" },
7713
- closeAriaLabel: { default: "Close sidebar" },
7714
- closeButton: { type: Boolean, default: !0 },
7715
- inset: { type: Boolean, default: !0 },
7716
- zIndex: { default: 1e4 },
7717
- draggable: { type: Boolean, default: !1 },
7718
- dragHandle: { type: Boolean, default: !1 },
7719
- closeThreshold: { default: 0.3 }
7522
+ isMobileFullscreen: { type: Boolean },
7523
+ isFullscreen: { type: Boolean },
7524
+ modalWidth: { default: "tw-max-w-md" },
7525
+ closeOnOverlay: { type: Boolean, default: void 0 },
7526
+ closeOnEscape: { type: Boolean, default: void 0 }
7720
7527
  },
7721
- emits: ["update:modelValue", "close"],
7722
- setup(e, { expose: a, emit: t }) {
7723
- const l = Symbol.for("vc-sidebar-scroll-lock");
7724
- function r() {
7725
- if (typeof window > "u")
7726
- return null;
7727
- const se = window;
7728
- return se[l] || (se[l] = { counter: 0, cachedOverflow: "", cachedPaddingRight: "" }), se[l];
7528
+ emits: ["close", "update:modelValue"],
7529
+ setup(e, { emit: a }) {
7530
+ const t = e, l = a, s = `vc-popup-title-${pt()?.uid ?? 0}`, i = de(nt, O(!1)), u = O(null), c = {
7531
+ warning: { icon: "lucide-triangle-alert", className: "vc-popup__icon--warning" },
7532
+ error: { icon: "lucide-circle-alert", className: "vc-popup__icon--error" },
7533
+ success: { icon: "lucide-circle-check", className: "vc-popup__icon--success" },
7534
+ info: { icon: "lucide-info", className: "vc-popup__icon--info" }
7535
+ }, d = S(() => t.modelValue ?? !0), v = S(() => t.closeOnOverlay ?? t.closable), g = S(() => t.closeOnEscape ?? t.closable), f = S(() => t.variant === "default" ? "" : c[t.variant].icon), b = S(() => t.variant === "default" ? "" : c[t.variant].className), h = S(() => i.value && t.isMobileFullscreen);
7536
+ function m(E) {
7537
+ l("update:modelValue", !1), l("close", E);
7729
7538
  }
7730
- function s() {
7731
- const se = r();
7732
- if (!(!se || typeof document > "u")) {
7733
- if (se.counter === 0) {
7734
- const { body: Ce, documentElement: De } = document;
7735
- se.cachedOverflow = Ce.style.overflow, se.cachedPaddingRight = Ce.style.paddingRight;
7736
- const qe = window.innerWidth - De.clientWidth;
7737
- Ce.style.overflow = "hidden", qe > 0 && (Ce.style.paddingRight = `${qe}px`);
7738
- }
7739
- se.counter += 1;
7740
- }
7539
+ function w() {
7540
+ t.closable && m("action");
7741
7541
  }
7742
- function i() {
7743
- const se = r();
7744
- if (!(!se || typeof document > "u" || se.counter === 0) && (se.counter -= 1, se.counter === 0)) {
7745
- const { body: Ce } = document;
7746
- Ce.style.overflow = se.cachedOverflow, Ce.style.paddingRight = se.cachedPaddingRight;
7747
- }
7542
+ function k() {
7543
+ u.value = "escape";
7748
7544
  }
7749
- const u = e, c = t, d = ct(), v = O(null), g = O(!1), f = O(null), { teleportTarget: b } = St({
7750
- to: S(() => u.teleportTo)
7751
- }), m = `vc-sidebar-title-${Math.round(Math.random() * 1e5)}`, w = {
7752
- sm: "300px",
7753
- md: "380px",
7754
- lg: "520px",
7755
- full: "100vw"
7756
- }, k = {
7757
- sm: "40dvh",
7758
- md: "56dvh",
7759
- lg: "72dvh",
7760
- full: "100dvh"
7761
- }, $ = S(() => typeof u.width == "number" ? `${u.width}px` : u.width), E = S(() => typeof u.height == "number" ? `${u.height}px` : u.height), _ = S(() => !!u.title || u.closeButton || !!d.header), M = S(() => !!d.footer), C = S(() => u.position === "bottom"), L = S(() => u.size === "full"), T = S(() => u.position === "left" ? "vc-sidebar-panel-left" : u.position === "bottom" ? "vc-sidebar-panel-bottom" : "vc-sidebar-panel-right"), I = S(() => C.value ? {
7762
- height: E.value ?? k[u.size]
7763
- } : {
7764
- width: $.value ?? w[u.size]
7765
- }), G = S(() => ({
7766
- zIndex: u.zIndex
7767
- })), N = S(() => [
7768
- `vc-sidebar__panel--${u.position}`,
7769
- `vc-sidebar__panel--${u.variant}`,
7770
- `vc-sidebar__panel--size-${u.size}`,
7771
- {
7772
- "vc-sidebar__panel--with-header": _.value,
7773
- "vc-sidebar__panel--with-footer": M.value,
7774
- "vc-sidebar__panel--inset": u.inset && !L.value,
7775
- "vc-sidebar__panel--draggable": u.draggable && C.value
7776
- }
7777
- ]), P = S(() => u.ariaLabel || void 0), W = S(() => u.ariaLabel || !u.title ? void 0 : m);
7778
- function F(se) {
7779
- c("update:modelValue", !1), c("close", se);
7780
- }
7781
- function K() {
7782
- F("action");
7783
- }
7784
- function z() {
7785
- c("update:modelValue", !0);
7786
- }
7787
- function te() {
7788
- u.closeOnOverlay && F("overlay");
7789
- }
7790
- const ve = O(0), X = O(!1);
7791
- function Y(se) {
7792
- !u.draggable || !C.value || (ve.value = se.touches[0].clientY, X.value = !0);
7793
- }
7794
- function ue(se) {
7795
- if (!X.value || !v.value) return;
7796
- const Ce = se.touches[0].clientY - ve.value;
7797
- Ce > 0 && (v.value.style.transform = `translateY(${Ce}px)`, v.value.style.transition = "none");
7798
- }
7799
- function Q(se) {
7800
- if (!X.value || !v.value) return;
7801
- X.value = !1;
7802
- const Ce = se.changedTouches[0].clientY - ve.value, De = v.value.offsetHeight, qe = De * u.closeThreshold;
7803
- Ce > qe ? (v.value.style.transition = "transform 0.2s ease", v.value.style.transform = `translateY(${De}px)`, setTimeout(() => {
7804
- F("action");
7805
- }, 200)) : (v.value.style.transition = "transform 0.2s ease", v.value.style.transform = "", setTimeout(() => {
7806
- v.value && (v.value.style.transition = "");
7807
- }, 200));
7808
- }
7809
- function j() {
7810
- return v.value ? Array.from(v.value.querySelectorAll(Wm)).filter((se) => {
7811
- if (se.hasAttribute("disabled") || se.getAttribute("aria-hidden") === "true")
7812
- return !1;
7813
- const Ce = window.getComputedStyle(se);
7814
- return Ce.display !== "none" && Ce.visibility !== "hidden";
7815
- }) : [];
7816
- }
7817
- let ke = !1;
7818
- function be() {
7819
- if (ke) return;
7820
- ke = !0;
7821
- const se = j()[0];
7822
- se ? se.focus() : v.value?.focus(), ke = !1;
7823
- }
7824
- function Z(se) {
7825
- ke || !u.modelValue || !u.trapFocus || !v.value || se.target instanceof Node && !v.value.contains(se.target) && be();
7826
- }
7827
- function fe(se) {
7828
- if (!u.modelValue)
7829
- return;
7830
- if (se.key === "Escape") {
7831
- u.closeOnEscape && F("escape");
7832
- return;
7833
- }
7834
- if (!u.trapFocus || se.key !== "Tab" || !v.value)
7835
- return;
7836
- const Ce = j();
7837
- if (!Ce.length) {
7838
- se.preventDefault(), v.value.focus();
7839
- return;
7840
- }
7841
- const De = Ce[0], qe = Ce[Ce.length - 1], Ze = document.activeElement;
7842
- if (se.shiftKey) {
7843
- (Ze === De || !Ze || !v.value.contains(Ze)) && (se.preventDefault(), qe.focus());
7844
- return;
7845
- }
7846
- Ze === qe && (se.preventDefault(), De.focus());
7847
- }
7848
- function Re() {
7849
- if (!u.returnFocus || !f.value) {
7850
- f.value = null;
7851
- return;
7852
- }
7853
- const se = f.value;
7854
- f.value = null, Ee(() => {
7855
- try {
7856
- se.focus({ preventScroll: !0 });
7857
- } catch {
7858
- se.focus();
7859
- }
7860
- });
7861
- }
7862
- function Fe() {
7863
- g.value || typeof document > "u" || (g.value = !0, f.value = document.activeElement instanceof HTMLElement ? document.activeElement : null, document.addEventListener("keydown", fe), document.addEventListener("focusin", Z), u.lockScroll && s(), u.autoFocus && Ee(() => {
7864
- be();
7865
- }));
7866
- }
7867
- function ye() {
7868
- !g.value || typeof document > "u" || (g.value = !1, document.removeEventListener("keydown", fe), document.removeEventListener("focusin", Z), u.lockScroll && i(), Re());
7545
+ function $() {
7546
+ const E = u.value ?? "overlay";
7547
+ u.value = null, !(E === "overlay" && !v.value) && (E === "escape" && !g.value || m(E));
7869
7548
  }
7870
- return ne(
7871
- () => u.modelValue,
7872
- (se) => {
7873
- if (se) {
7874
- Ee(() => {
7875
- v.value && (v.value.style.transform = "", v.value.style.transition = "");
7876
- }), Fe();
7877
- return;
7878
- }
7879
- ye();
7880
- },
7881
- { immediate: !0 }
7882
- ), Ue(() => {
7883
- ye();
7884
- }), a({
7885
- close: K,
7886
- open: z
7887
- }), (se, Ce) => (o(), B(ot, {
7888
- to: n(b),
7889
- defer: "",
7890
- disabled: !e.teleport
7891
- }, [
7892
- y("div", {
7893
- class: "vc-sidebar",
7894
- style: he(G.value),
7895
- "aria-hidden": !e.modelValue
7896
- }, [
7897
- x(_e, { name: "vc-sidebar-overlay" }, {
7898
- default: A(() => [
7899
- e.modelValue && e.showOverlay ? (o(), p("div", {
7900
- key: 0,
7901
- class: "vc-sidebar__overlay",
7902
- onClick: te
7903
- })) : R("", !0)
7904
- ]),
7905
- _: 1
7906
- }),
7907
- x(_e, { name: T.value }, {
7908
- default: A(() => [
7909
- e.modelValue ? (o(), p("aside", {
7910
- key: 0,
7911
- ref_key: "panelEl",
7912
- ref: v,
7913
- class: q(["vc-sidebar__panel", N.value]),
7914
- style: he(I.value),
7915
- role: "dialog",
7916
- "aria-modal": e.showOverlay,
7917
- "aria-label": P.value,
7918
- "aria-labelledby": W.value,
7919
- tabindex: "-1",
7920
- onTouchstart: Y,
7921
- onTouchmove: ue,
7922
- onTouchend: Q
7923
- }, [
7924
- e.dragHandle && C.value ? (o(), p("div", Dm, [...Ce[1] || (Ce[1] = [
7925
- y("div", { class: "vc-sidebar__handle-bar" }, null, -1)
7926
- ])])) : R("", !0),
7927
- _.value ? V(se.$slots, "header", {
7928
- key: 1,
7929
- close: K
7930
- }, () => [
7931
- y("div", Nm, [
7932
- y("div", Pm, [
7933
- e.title ? (o(), p("h3", {
7934
- key: 0,
7935
- id: m,
7936
- class: "vc-sidebar__title"
7937
- }, D(e.title), 1)) : R("", !0),
7938
- e.subtitle ? (o(), p("p", Fm, D(e.subtitle), 1)) : R("", !0)
7939
- ]),
7940
- y("div", zm, [
7941
- V(se.$slots, "actions", { close: K }),
7942
- e.closeButton ? (o(), p("button", {
7943
- key: 0,
7944
- type: "button",
7945
- class: "vc-sidebar__close",
7946
- "aria-label": e.closeAriaLabel,
7947
- onClick: Ce[0] || (Ce[0] = (De) => F("action"))
7948
- }, [
7949
- x(n(J), {
7950
- icon: "lucide-x",
7951
- size: "m"
7952
- })
7953
- ], 8, Um)) : R("", !0)
7954
- ])
7549
+ return (E, _) => {
7550
+ const M = Ne("VcIcon"), C = Ne("VcButton");
7551
+ return o(), B(n(ir), {
7552
+ appear: "",
7553
+ show: d.value,
7554
+ as: "template"
7555
+ }, {
7556
+ default: A(() => [
7557
+ x(n(sr), {
7558
+ as: "div",
7559
+ class: "vc-popup",
7560
+ "aria-labelledby": s,
7561
+ onClose: $,
7562
+ onKeydown: ge(k, ["esc"])
7563
+ }, {
7564
+ default: A(() => [
7565
+ x(n(fn), {
7566
+ as: "template",
7567
+ enter: "vc-popup__transition-enter",
7568
+ "enter-from": "vc-popup__transition-enter-from",
7569
+ "enter-to": "vc-popup__transition-enter-to",
7570
+ leave: "vc-popup__transition-leave",
7571
+ "leave-from": "vc-popup__transition-leave-from",
7572
+ "leave-to": "vc-popup__transition-leave-to"
7573
+ }, {
7574
+ default: A(() => [..._[0] || (_[0] = [
7575
+ y("div", { class: "vc-popup__overlay" }, null, -1)
7576
+ ])]),
7577
+ _: 1
7578
+ }),
7579
+ y("div", {
7580
+ class: q(["vc-popup__container", {
7581
+ "vc-popup__container--desktop": !h.value,
7582
+ "vc-popup__container--mobile": h.value,
7583
+ "vc-popup__container--fullscreen": e.isFullscreen
7584
+ }])
7585
+ }, [
7586
+ y("div", Em, [
7587
+ x(n(fn), {
7588
+ as: "template",
7589
+ enter: "vc-popup__dialog-enter",
7590
+ "enter-from": "vc-popup__dialog-enter-from",
7591
+ "enter-to": "vc-popup__dialog-enter-to",
7592
+ leave: "vc-popup__dialog-leave",
7593
+ "leave-from": "vc-popup__dialog-leave-from",
7594
+ "leave-to": "vc-popup__dialog-leave-to"
7595
+ }, {
7596
+ default: A(() => [
7597
+ x(n(rr), {
7598
+ class: q(["vc-popup__panel", [
7599
+ {
7600
+ "vc-popup__panel--desktop": !h.value,
7601
+ "vc-popup__panel--mobile": h.value,
7602
+ "vc-popup__panel--fullscreen": e.isFullscreen
7603
+ },
7604
+ e.modalWidth
7605
+ ]])
7606
+ }, {
7607
+ default: A(() => [
7608
+ x(n(ur), {
7609
+ id: s,
7610
+ as: "h3",
7611
+ class: "vc-popup__title"
7612
+ }, {
7613
+ default: A(() => [
7614
+ V(E.$slots, "header", {}, () => [
7615
+ ie(D(e.title), 1)
7616
+ ]),
7617
+ e.closable ? (o(), p("button", {
7618
+ key: 0,
7619
+ type: "button",
7620
+ class: "vc-popup__close-btn",
7621
+ "aria-label": E.$t("COMPONENTS.ORGANISMS.VC_POPUP.CLOSE"),
7622
+ onClick: w
7623
+ }, [..._[1] || (_[1] = [
7624
+ y("svg", {
7625
+ width: "12",
7626
+ height: "12",
7627
+ viewBox: "0 0 12 12",
7628
+ fill: "none",
7629
+ xmlns: "http://www.w3.org/2000/svg"
7630
+ }, [
7631
+ y("path", {
7632
+ d: "M7.27173 5.99939L11.1499 2.12967C11.3198 1.95981 11.4152 1.72943 11.4152 1.48922C11.4152 1.24901 11.3198 1.01863 11.1499 0.848777C10.9801 0.67892 10.7497 0.583496 10.5096 0.583496C10.2694 0.583496 10.0391 0.67892 9.86922 0.848777L6.00004 4.72752L2.13086 0.848777C1.96103 0.67892 1.73069 0.583496 1.49051 0.583496C1.25033 0.583496 1.01999 0.67892 0.850156 0.848777C0.680324 1.01863 0.584913 1.24901 0.584913 1.48922C0.584913 1.72943 0.680324 1.95981 0.850156 2.12967L4.72835 5.99939L0.850156 9.86912C0.765622 9.95298 0.698526 10.0527 0.652737 10.1627C0.606948 10.2726 0.583374 10.3905 0.583374 10.5096C0.583374 10.6286 0.606948 10.7465 0.652737 10.8565C0.698526 10.9664 0.765622 11.0662 0.850156 11.15C0.934 11.2346 1.03375 11.3017 1.14366 11.3475C1.25356 11.3933 1.37145 11.4168 1.49051 11.4168C1.60957 11.4168 1.72746 11.3933 1.83736 11.3475C1.94727 11.3017 2.04702 11.2346 2.13086 11.15L6.00004 7.27126L9.86922 11.15C9.95306 11.2346 10.0528 11.3017 10.1627 11.3475C10.2726 11.3933 10.3905 11.4168 10.5096 11.4168C10.6286 11.4168 10.7465 11.3933 10.8564 11.3475C10.9663 11.3017 11.0661 11.2346 11.1499 11.15C11.2345 11.0662 11.3016 10.9664 11.3473 10.8565C11.3931 10.7465 11.4167 10.6286 11.4167 10.5096C11.4167 10.3905 11.3931 10.2726 11.3473 10.1627C11.3016 10.0527 11.2345 9.95298 11.1499 9.86912L7.27173 5.99939Z",
7633
+ fill: "currentColor"
7634
+ })
7635
+ ], -1)
7636
+ ])], 8, Am)) : R("", !0)
7637
+ ]),
7638
+ _: 3
7639
+ }),
7640
+ y("div", Rm, [
7641
+ e.variant !== "default" ? (o(), B(M, {
7642
+ key: 0,
7643
+ class: q(["vc-popup__icon", b.value]),
7644
+ icon: f.value
7645
+ }, null, 8, ["class", "icon"])) : R("", !0),
7646
+ y("div", {
7647
+ class: q(["vc-popup__content-inner", {
7648
+ "vc-popup__content-inner--grow": h.value
7649
+ }])
7650
+ }, [
7651
+ y("div", {
7652
+ class: q(["vc-popup__content-wrapper", { "vc-popup__content-wrapper--full": e.isFullscreen }])
7653
+ }, [
7654
+ V(E.$slots, "content")
7655
+ ], 2)
7656
+ ], 2)
7657
+ ]),
7658
+ E.$slots.footer ? (o(), p("div", Im, [
7659
+ V(E.$slots, "footer", { close: w }, () => [
7660
+ x(C, {
7661
+ class: "vc-popup__close-button",
7662
+ onClick: w
7663
+ }, {
7664
+ default: A(() => [
7665
+ ie(D(E.$t("COMPONENTS.ORGANISMS.VC_POPUP.CLOSE")), 1)
7666
+ ]),
7667
+ _: 1
7668
+ })
7669
+ ])
7670
+ ])) : R("", !0)
7671
+ ]),
7672
+ _: 3
7673
+ }, 8, ["class"])
7674
+ ]),
7675
+ _: 3
7676
+ })
7955
7677
  ])
7956
- ]) : R("", !0),
7957
- y("div", Hm, [
7958
- V(se.$slots, "default")
7959
- ]),
7960
- se.$slots.footer ? (o(), p("div", Gm, [
7961
- V(se.$slots, "footer")
7962
- ])) : R("", !0)
7963
- ], 46, Vm)) : R("", !0)
7964
- ]),
7965
- _: 3
7966
- }, 8, ["name"])
7967
- ], 12, Bm)
7968
- ], 8, ["to", "disabled"]));
7678
+ ], 2)
7679
+ ]),
7680
+ _: 3
7681
+ })
7682
+ ]),
7683
+ _: 3
7684
+ }, 8, ["show"]);
7685
+ };
7969
7686
  }
7970
- }), qm = /* @__PURE__ */ U({
7971
- __name: "user-sidebar",
7687
+ }), Ka = /* @__PURE__ */ U({
7688
+ __name: "vc-popup-base",
7972
7689
  props: {
7973
- isOpened: { type: Boolean }
7690
+ title: {},
7691
+ variant: { default: "default" },
7692
+ mode: { default: "acknowledge" },
7693
+ actionLabel: { default: "" },
7694
+ confirmLabel: { default: "" },
7695
+ cancelLabel: { default: "" },
7696
+ confirmAsText: { type: Boolean, default: !1 },
7697
+ closable: { type: Boolean, default: !0 },
7698
+ isMobileFullscreen: { type: Boolean, default: !0 },
7699
+ closeOnConfirm: { type: Boolean, default: !1 }
7974
7700
  },
7975
- emits: ["update:isOpened", "item:click"],
7976
- setup(e) {
7977
- const a = de(tl, O(!1));
7978
- return (t, l) => (o(), B(n(Nt), {
7979
- "model-value": e.isOpened,
7980
- position: "left",
7981
- teleport: !n(a),
7982
- title: t.$t("SHELL.ACCOUNT.SETTINGS"),
7983
- "onUpdate:modelValue": l[1] || (l[1] = (r) => t.$emit("update:isOpened", r))
7984
- }, {
7985
- default: A(() => [
7986
- e.isOpened ? (o(), p("div", {
7987
- key: 0,
7988
- class: "vc-user-sidebar__menu",
7989
- onClick: l[0] || (l[0] = le((r) => t.$emit("update:isOpened", !1), ["stop"]))
7990
- }, [
7991
- x(n(mo))
7992
- ])) : R("", !0)
7993
- ]),
7994
- _: 1
7995
- }, 8, ["model-value", "teleport", "title"]));
7701
+ emits: ["close", "confirm"],
7702
+ setup(e, { emit: a }) {
7703
+ const t = e, l = a;
7704
+ function r(s) {
7705
+ l("confirm"), t.closeOnConfirm && s();
7706
+ }
7707
+ return (s, i) => {
7708
+ const u = Ne("VcButton");
7709
+ return o(), B(qa, {
7710
+ variant: e.variant,
7711
+ "is-mobile-fullscreen": e.isMobileFullscreen,
7712
+ title: e.title,
7713
+ closable: e.closable,
7714
+ onClose: i[0] || (i[0] = (c) => s.$emit("close"))
7715
+ }, we({
7716
+ content: A(() => [
7717
+ V(s.$slots, "default")
7718
+ ]),
7719
+ footer: A(({ close: c }) => [
7720
+ V(s.$slots, "footer", {
7721
+ close: c,
7722
+ confirm: () => r(c)
7723
+ }, () => [
7724
+ y("div", {
7725
+ class: q(["vc-popup-base__actions", {
7726
+ "vc-popup-base__actions--confirm": e.mode === "confirm",
7727
+ "vc-popup-base__actions--single": e.mode === "acknowledge"
7728
+ }])
7729
+ }, [
7730
+ e.mode === "confirm" ? (o(), p(ee, { key: 0 }, [
7731
+ x(u, {
7732
+ text: e.confirmAsText,
7733
+ class: "vc-popup-base__confirm",
7734
+ onClick: (d) => r(c)
7735
+ }, {
7736
+ default: A(() => [
7737
+ ie(D(e.confirmLabel), 1)
7738
+ ]),
7739
+ _: 1
7740
+ }, 8, ["text", "onClick"]),
7741
+ x(u, { onClick: c }, {
7742
+ default: A(() => [
7743
+ ie(D(e.cancelLabel), 1)
7744
+ ]),
7745
+ _: 1
7746
+ }, 8, ["onClick"])
7747
+ ], 64)) : (o(), B(u, {
7748
+ key: 1,
7749
+ class: "vc-popup-base__single",
7750
+ onClick: c
7751
+ }, {
7752
+ default: A(() => [
7753
+ ie(D(e.actionLabel), 1)
7754
+ ]),
7755
+ _: 1
7756
+ }, 8, ["onClick"]))
7757
+ ], 2)
7758
+ ])
7759
+ ]),
7760
+ _: 2
7761
+ }, [
7762
+ s.$slots.header ? {
7763
+ name: "header",
7764
+ fn: A(() => [
7765
+ V(s.$slots, "header")
7766
+ ]),
7767
+ key: "0"
7768
+ } : void 0
7769
+ ]), 1032, ["variant", "is-mobile-fullscreen", "title", "closable"]);
7770
+ };
7996
7771
  }
7997
- }), Km = { class: "vc-user-dropdown-button-container" }, Ym = /* @__PURE__ */ U({
7998
- __name: "user-dropdown-button",
7772
+ }), Tm = /* @__PURE__ */ U({
7773
+ __name: "vc-popup-warning",
7999
7774
  props: {
8000
- avatarUrl: {},
8001
- name: {},
8002
- role: {},
8003
- disabled: { type: Boolean }
7775
+ title: {}
8004
7776
  },
7777
+ emits: ["close", "confirm"],
8005
7778
  setup(e) {
8006
- const a = O(!1), t = O(null), { isPinned: l, isExpanded: r } = Fa();
8007
- function s() {
8008
- a.value = !1;
8009
- }
8010
- Me(Ea, s);
8011
- function i() {
8012
- a.value = !a.value;
8013
- }
8014
- return (u, c) => (o(), p("div", Km, [
8015
- y("button", {
8016
- ref_key: "buttonRef",
8017
- ref: t,
8018
- type: "button",
8019
- class: q(["vc-user-dropdown-button", {
8020
- "vc-user-dropdown-button--active": a.value,
8021
- "vc-user-dropdown-button--auto-width": e.disabled,
8022
- "vc-user-dropdown-button--mobile": u.$isMobile.value,
8023
- "vc-user-dropdown-button--collapsed": !n(l) && u.$isDesktop.value
8024
- }]),
8025
- onClick: i
8026
- }, [
8027
- y("div", {
8028
- class: q(["vc-user-dropdown-button__wrap", {
8029
- "vc-user-dropdown-button__wrap--active": a.value
8030
- }])
8031
- }, [
8032
- x(xm, {
8033
- "avatar-url": e.avatarUrl,
8034
- name: e.name,
8035
- role: e.role,
8036
- "is-expanded": n(r)
8037
- }, null, 8, ["avatar-url", "name", "role", "is-expanded"]),
8038
- c[2] || (c[2] = y("div", { class: "vc-user-dropdown-button__actions" }, [
8039
- y("div", { class: "vc-user-dropdown-button__trigger" })
8040
- ], -1))
8041
- ], 2)
8042
- ], 2),
8043
- u.$isDesktop.value ? (o(), B(n($t), {
8044
- key: 0,
8045
- show: a.value,
8046
- "onUpdate:show": c[0] || (c[0] = (d) => a.value = d),
8047
- "anchor-ref": t.value,
8048
- placement: "right",
8049
- width: "260px",
8050
- "max-width": "300px"
8051
- }, {
8052
- default: A(() => [
8053
- x(n(mo))
7779
+ return (a, t) => (o(), B(Ka, {
7780
+ variant: "warning",
7781
+ mode: "confirm",
7782
+ "confirm-label": a.$t("COMPONENTS.ORGANISMS.VC_POPUP.CONFIRM"),
7783
+ "cancel-label": a.$t("COMPONENTS.ORGANISMS.VC_POPUP.CANCEL"),
7784
+ "confirm-as-text": "",
7785
+ title: e.title,
7786
+ onClose: t[0] || (t[0] = (l) => a.$emit("close")),
7787
+ onConfirm: t[1] || (t[1] = (l) => a.$emit("confirm"))
7788
+ }, we({
7789
+ default: A(() => [
7790
+ V(a.$slots, "default")
7791
+ ]),
7792
+ _: 2
7793
+ }, [
7794
+ a.$slots.header ? {
7795
+ name: "header",
7796
+ fn: A(() => [
7797
+ V(a.$slots, "header")
8054
7798
  ]),
8055
- _: 1
8056
- }, 8, ["show", "anchor-ref"])) : (o(), B(qm, {
8057
- key: 1,
8058
- "is-opened": a.value,
8059
- "onUpdate:isOpened": c[1] || (c[1] = (d) => a.value = d)
8060
- }, null, 8, ["is-opened"]))
8061
- ]));
7799
+ key: "0"
7800
+ } : void 0
7801
+ ]), 1032, ["confirm-label", "cancel-label", "title"]));
8062
7802
  }
8063
- }), po = Ym, jm = {
8064
- key: 0,
8065
- class: "sidebar-content__search"
8066
- }, Xm = { class: "sidebar-content__footer" }, Qm = /* @__PURE__ */ U({
8067
- __name: "SidebarContent",
7803
+ }), xm = /* @__PURE__ */ U({
7804
+ __name: "vc-popup-error",
8068
7805
  props: {
8069
- expanded: { type: Boolean, default: !0 },
8070
- avatar: {},
8071
- userName: {},
8072
- userRole: {},
8073
- disableMenu: { type: Boolean, default: !1 },
8074
- headerVisible: { type: Boolean, default: !0 },
8075
- showSearch: { type: Boolean, default: !1 },
8076
- searchPlaceholder: {}
7806
+ title: {}
8077
7807
  },
8078
- emits: ["item:click"],
8079
- setup(e, { emit: a }) {
8080
- const t = e, l = a, r = de(ll, !1), s = O(null), i = O("");
8081
- lt(() => {
8082
- Ee(() => s.value?.updateScrollState());
8083
- }), ne(
8084
- () => t.expanded,
8085
- (c) => {
8086
- c || (i.value = "");
8087
- }
8088
- );
8089
- const u = (c) => {
8090
- i.value = "", l("item:click", c);
8091
- };
8092
- return (c, d) => (o(), p("div", {
8093
- class: q(["sidebar-content", { "sidebar-content--no-header": !e.headerVisible }])
7808
+ emits: ["close"],
7809
+ setup(e) {
7810
+ return (a, t) => (o(), B(Ka, {
7811
+ variant: "error",
7812
+ mode: "acknowledge",
7813
+ "action-label": a.$t("COMPONENTS.ORGANISMS.VC_POPUP.OK"),
7814
+ title: e.title,
7815
+ onClose: t[0] || (t[0] = (l) => a.$emit("close"))
7816
+ }, we({
7817
+ default: A(() => [
7818
+ V(a.$slots, "default")
7819
+ ]),
7820
+ _: 2
8094
7821
  }, [
8095
- e.showSearch && e.expanded ? (o(), p("div", jm, [
8096
- x(n(Be), {
8097
- modelValue: i.value,
8098
- "onUpdate:modelValue": d[0] || (d[0] = (v) => i.value = v),
8099
- placeholder: e.searchPlaceholder || c.$t("SHELL.SIDEBAR.SEARCH_PLACEHOLDER", "Search keyword"),
8100
- size: "small",
8101
- clearable: "",
8102
- debounce: 300
8103
- }, null, 8, ["modelValue", "placeholder"])
8104
- ])) : R("", !0),
8105
- e.disableMenu ? R("", !0) : (o(), B(n(ft), {
8106
- key: 1,
8107
- ref_key: "scrollContainer",
8108
- ref: s,
8109
- class: "sidebar-content__menu"
8110
- }, {
8111
- default: A(() => [
8112
- V(c.$slots, "menu", {
8113
- expanded: e.expanded,
8114
- onItemClick: u,
8115
- searchQuery: i.value
8116
- }, () => [
8117
- x(Ca, {
8118
- expanded: e.expanded,
8119
- "search-query": i.value,
8120
- "onItem:click": u
8121
- }, null, 8, ["expanded", "search-query"])
8122
- ])
7822
+ a.$slots.header ? {
7823
+ name: "header",
7824
+ fn: A(() => [
7825
+ V(a.$slots, "header")
8123
7826
  ]),
8124
- _: 3
8125
- }, 512)),
8126
- y("div", Xm, [
8127
- V(c.$slots, e.userName, {
8128
- avatar: e.avatar,
8129
- role: e.userRole
8130
- }, () => [
8131
- n(r) ? R("", !0) : (o(), B(n(po), {
8132
- key: 0,
8133
- "avatar-url": e.avatar,
8134
- name: e.userName,
8135
- role: e.userRole
8136
- }, null, 8, ["avatar-url", "name", "role"]))
8137
- ])
8138
- ])
8139
- ], 2));
7827
+ key: "0"
7828
+ } : void 0
7829
+ ]), 1032, ["action-label", "title"]));
8140
7830
  }
8141
- }), Jm = { class: "sidebar-collapse-button__wrap" }, Zm = /* @__PURE__ */ U({
8142
- __name: "SidebarCollapseButton",
7831
+ }), Mm = /* @__PURE__ */ U({
7832
+ __name: "vc-popup-info",
8143
7833
  props: {
8144
- collapsed: { type: Boolean }
7834
+ title: {}
8145
7835
  },
8146
- emits: ["click"],
7836
+ emits: ["close"],
8147
7837
  setup(e) {
8148
- return (a, t) => (o(), p("div", {
8149
- class: "sidebar-collapse-button",
8150
- onClick: t[0] || (t[0] = (l) => a.$emit("click"))
7838
+ return (a, t) => (o(), B(Ka, {
7839
+ variant: "info",
7840
+ mode: "acknowledge",
7841
+ "action-label": a.$t("COMPONENTS.ORGANISMS.VC_POPUP.OK"),
7842
+ title: e.title,
7843
+ onClose: t[0] || (t[0] = (l) => a.$emit("close"))
7844
+ }, we({
7845
+ default: A(() => [
7846
+ V(a.$slots, "default")
7847
+ ]),
7848
+ _: 2
8151
7849
  }, [
8152
- y("div", Jm, [
8153
- x(n(J), {
8154
- class: "sidebar-collapse-button__icon",
8155
- icon: e.collapsed ? "lucide-chevron-right" : "lucide-chevron-left"
8156
- }, null, 8, ["icon"])
8157
- ])
8158
- ]));
7850
+ a.$slots.header ? {
7851
+ name: "header",
7852
+ fn: A(() => [
7853
+ V(a.$slots, "header")
7854
+ ]),
7855
+ key: "0"
7856
+ } : void 0
7857
+ ]), 1032, ["action-label", "title"]));
8159
7858
  }
8160
7859
  });
8161
- function go(e, a) {
8162
- const t = S(() => {
8163
- const c = Te(e);
8164
- return !a.value || !Array.isArray(c) ? null : c.find((d) => d.id === a.value) || null;
8165
- }), l = S(() => a.value !== null);
8166
- return {
8167
- showItem: (c) => {
8168
- a.value = c;
8169
- },
8170
- hideAllItems: () => {
8171
- a.value = null;
8172
- },
8173
- toggleItem: (c) => {
8174
- a.value === c ? a.value = null : a.value = c;
8175
- },
8176
- currentItem: t,
8177
- isAnyItemVisible: l,
8178
- closeItem: () => {
8179
- a.value = null;
8180
- }
8181
- };
8182
- }
8183
- const bo = Symbol("VcAppBarState"), ep = {
8184
- activeWidgetId: O(null),
8185
- activeMobileActionId: O(null)
8186
- };
8187
- function tp() {
8188
- const e = {
8189
- activeWidgetId: O(null),
8190
- activeMobileActionId: O(null)
8191
- };
8192
- return Me(bo, e), e;
7860
+ function kn() {
7861
+ return pt() && de(Wa, void 0) || fo;
8193
7862
  }
8194
- function ho() {
8195
- return de(bo, ep);
8196
- }
8197
- function Vl() {
8198
- const { items: e } = Bl(), { activeWidgetId: a } = ho(), {
8199
- showItem: t,
8200
- hideAllItems: l,
8201
- toggleItem: r,
8202
- currentItem: s,
8203
- isAnyItemVisible: i
8204
- } = go(e, a);
7863
+ function mo(e) {
7864
+ const { t: a } = Ve({ useScope: "global" }), t = kn();
7865
+ let l;
7866
+ e && (l = b(n(e))), ne(
7867
+ () => e ? n(e) : void 0,
7868
+ (h) => {
7869
+ h && (l = b(h));
7870
+ },
7871
+ { deep: !0 }
7872
+ );
7873
+ function r(h) {
7874
+ if (!h)
7875
+ return;
7876
+ const m = kn(), w = m?.popups?.findIndex(
7877
+ (k) => or(k, h, ($) => $.component)
7878
+ );
7879
+ typeof w == "number" && w !== -1 && m?.popups?.splice(w, 1);
7880
+ }
7881
+ function s(h) {
7882
+ return l ?? h;
7883
+ }
7884
+ function i(h) {
7885
+ h && (r(h), t?.popups?.push(h));
7886
+ }
7887
+ async function u(h) {
7888
+ await Ee(), i(s(h));
7889
+ }
7890
+ function c(h) {
7891
+ const m = s(h);
7892
+ if (!m)
7893
+ return;
7894
+ const w = t?.popups.indexOf(m);
7895
+ typeof w == "number" && w !== -1 && t?.popups?.splice(w, 1);
7896
+ }
7897
+ function d(h, m, w) {
7898
+ const k = b({
7899
+ component: h,
7900
+ props: {
7901
+ title: m
7902
+ },
7903
+ emits: {
7904
+ onClose() {
7905
+ c(k);
7906
+ }
7907
+ },
7908
+ slots: {
7909
+ default: w
7910
+ }
7911
+ });
7912
+ return i(k), k;
7913
+ }
7914
+ function v(h) {
7915
+ return new Promise((m) => {
7916
+ const w = b({
7917
+ component: Tm,
7918
+ props: {
7919
+ title: a("COMPONENTS.ORGANISMS.VC_POPUP.TITLE.CONFIRMATION")
7920
+ },
7921
+ emits: {
7922
+ onClose() {
7923
+ m(!1), c(w);
7924
+ },
7925
+ onConfirm() {
7926
+ m(!0), c(w);
7927
+ }
7928
+ },
7929
+ slots: {
7930
+ default: h
7931
+ }
7932
+ });
7933
+ i(w);
7934
+ });
7935
+ }
7936
+ function g(h) {
7937
+ d(xm, a("COMPONENTS.ORGANISMS.VC_POPUP.TITLE.ERROR"), h);
7938
+ }
7939
+ function f(h) {
7940
+ d(Mm, a("COMPONENTS.ORGANISMS.VC_POPUP.TITLE.INFO"), h);
7941
+ }
7942
+ function b(h) {
7943
+ const m = xt({
7944
+ ...Om(h),
7945
+ id: Symbol("vc-popup-instance"),
7946
+ close: () => {
7947
+ },
7948
+ open: () => {
7949
+ }
7950
+ });
7951
+ return m.close = () => c(m), m.open = () => u(m), m;
7952
+ }
8205
7953
  return {
8206
- showWidget: t,
8207
- hideAllWidgets: l,
8208
- toggleWidget: r,
8209
- currentWidget: s,
8210
- isAnyWidgetVisible: i
7954
+ open: u,
7955
+ close: c,
7956
+ showConfirmation: v,
7957
+ showError: g,
7958
+ showInfo: f
8211
7959
  };
8212
7960
  }
8213
- function lp(e) {
8214
- const { hasAccess: a } = Zt(), t = O(""), l = S(() => (t.value ?? "").trim().toLowerCase()), r = S(() => l.value.length > 0), s = S(() => e.appsList.value.filter((d) => a(d.permission))), i = S(() => e.showApplications.value ? r.value ? s.value.filter((d) => [d.title, d.description, d.id, d.relativeUrl].filter(Boolean).join(" ").toLowerCase().includes(l.value)) : s.value : []), u = S(() => r.value ? e.widgets.value.filter((d) => [c(d), d.id, ...d.searchTerms ?? []].join(" ").toLowerCase().includes(l.value)) : e.widgets.value);
8215
- function c(d) {
8216
- return d.title || ap(d.id);
8217
- }
7961
+ function Om(e) {
7962
+ const a = typeof e.slots > "u" ? {} : Object.fromEntries(
7963
+ Object.entries(e.slots).map(([t, l]) => typeof l == "string" ? [t, l] : [t, Yt(l)])
7964
+ );
8218
7965
  return {
8219
- searchQuery: t,
8220
- filteredApps: i,
8221
- filteredWidgets: u,
8222
- getWidgetTitle: c
7966
+ ...e,
7967
+ slots: a,
7968
+ component: Yt(ni(e.component))
8223
7969
  };
8224
7970
  }
8225
- function ap(e) {
8226
- return e ? e.replace(/[\-_]+/g, " ").replace(/\s+/g, " ").trim().replace(/\b\w/g, (a) => a.toUpperCase()) : "";
7971
+ function po(e) {
7972
+ const a = Object.values(e.params)?.[0], t = typeof a == "string" ? a : "";
7973
+ return t && e.path.startsWith(`/${t}/`) ? e.path.slice(t.length + 1) : t && e.path === `/${t}` ? "/" : e.path;
8227
7974
  }
8228
- const kn = /* @__PURE__ */ U({
8229
- __name: "AppBarWidgetContent",
7975
+ function rC(e) {
7976
+ const a = Dt();
7977
+ return { isActive: S(() => {
7978
+ const l = Te(e);
7979
+ if (!l) return !1;
7980
+ const r = po(a);
7981
+ return r === l || r.startsWith(l + "/");
7982
+ }) };
7983
+ }
7984
+ const Ca = /* @__PURE__ */ U({
7985
+ __name: "VcAppMenu",
8230
7986
  props: {
8231
- mobile: { type: Boolean, default: !1 }
7987
+ expanded: { type: Boolean, default: !0 },
7988
+ searchQuery: {}
8232
7989
  },
8233
- setup(e) {
8234
- const { currentWidget: a, hideAllWidgets: t, isAnyWidgetVisible: l } = Vl(), r = S(() => ({
8235
- ...a.value?.props ?? {},
8236
- onClose: t
8237
- }));
8238
- return (s, i) => n(l) && n(a)?.component ? (o(), p("div", {
7990
+ emits: ["item:click"],
7991
+ setup(e, { emit: a }) {
7992
+ const t = e, l = a, r = Dt(), { t: s } = Ve(), { menuItems: i, menuBadges: u } = io(), { hasAccess: c } = Zt(), d = ($) => c($.permissions), v = ($) => ($.children ?? []).filter((E) => d(E)), g = S(() => i.value.filter(($) => d($) ? $.children?.length ? v($).length > 0 : !0 : !1)), f = S(() => {
7993
+ const $ = t.searchQuery?.toLowerCase().trim();
7994
+ return $ ? g.value.map((E) => {
7995
+ const _ = v(E);
7996
+ if (!_.length)
7997
+ return s(E.title).toLowerCase().includes($) ? E : null;
7998
+ if (s(E.title).toLowerCase().includes($)) return E;
7999
+ const M = _.filter((C) => s(C.title).toLowerCase().includes($));
8000
+ return M.length ? { ...E, children: M } : null;
8001
+ }).filter(Boolean) : g.value;
8002
+ }), b = ($) => $.groupId ?? String($.id ?? $.routeId ?? $.title), h = ($) => {
8003
+ l("item:click", $);
8004
+ }, m = ($) => {
8005
+ if (!$) return !1;
8006
+ const E = po(r);
8007
+ return E === $ || E.startsWith($ + "/");
8008
+ };
8009
+ function w($) {
8010
+ let E;
8011
+ typeof $ == "object" && !dt($) && "content" in $ ? E = $ : E = { content: $ };
8012
+ let _;
8013
+ typeof E.content == "function" ? _ = E.content() : dt(E.content) ? _ = n(E.content) : _ = E.content;
8014
+ let M = _;
8015
+ if (typeof _ == "number" && _ > 99)
8016
+ M = "99+";
8017
+ else if (typeof _ == "string") {
8018
+ const T = parseInt(_, 10);
8019
+ !isNaN(T) && T > 99 && (M = "99+");
8020
+ }
8021
+ const C = E.isDot ?? !1;
8022
+ if (C || M != null && M !== "" && M !== 0)
8023
+ return {
8024
+ content: M,
8025
+ variant: E.variant ?? "primary",
8026
+ isDot: C
8027
+ };
8028
+ }
8029
+ const k = S(() => {
8030
+ const $ = /* @__PURE__ */ new Map(), E = (_) => {
8031
+ const M = _.routeId ?? _.groupId;
8032
+ if (!M) return;
8033
+ let C = _.badge;
8034
+ if (!C && _.routeId && (C = u.value.get(_.routeId)), !C && _.groupId && (C = u.value.get(_.groupId)), !C) return;
8035
+ const L = w(C);
8036
+ L && $.set(M, L);
8037
+ };
8038
+ for (const _ of i.value)
8039
+ if (E(_), _.children)
8040
+ for (const M of _.children)
8041
+ E(M);
8042
+ return $;
8043
+ });
8044
+ return ($, E) => f.value.length ? (o(), B(n(Ff), {
8239
8045
  key: 0,
8240
- class: q(["app-bar-widget-content", { "app-bar-widget-content--mobile": e.mobile }])
8241
- }, [
8242
- (o(), B(We(n(a)?.component), Se(r.value, { onClose: n(t) }), null, 16, ["onClose"]))
8243
- ], 2)) : R("", !0);
8046
+ expanded: e.expanded,
8047
+ class: q(["vc-app-menu", { "vc-app-menu--collapsed": !e.expanded }])
8048
+ }, {
8049
+ default: A(() => [
8050
+ (o(!0), p(ee, null, me(f.value, (_) => (o(), p(ee, {
8051
+ key: _.id ?? _.routeId ?? _.url ?? _.title
8052
+ }, [
8053
+ v(_).length ? (o(), B(n(zf), {
8054
+ key: 0,
8055
+ "data-test-id": _.routeId,
8056
+ "group-id": b(_),
8057
+ icon: _.groupIcon || _.icon,
8058
+ title: $.$t(_.title),
8059
+ badge: k.value.get(_.routeId ?? _.groupId ?? "")
8060
+ }, {
8061
+ default: A(() => [
8062
+ (o(!0), p(ee, null, me(v(_), (M) => (o(), B(n(yn), {
8063
+ key: M.routeId || M.url || M.id || M.title,
8064
+ "data-test-id": M.routeId,
8065
+ icon: M.icon,
8066
+ title: $.$t(M.title),
8067
+ badge: k.value.get(M.routeId ?? M.groupId ?? ""),
8068
+ active: m(M.url),
8069
+ nested: "",
8070
+ onClick: (C) => h(M)
8071
+ }, null, 8, ["data-test-id", "icon", "title", "badge", "active", "onClick"]))), 128))
8072
+ ]),
8073
+ _: 2
8074
+ }, 1032, ["data-test-id", "group-id", "icon", "title", "badge"])) : (o(), B(n(yn), {
8075
+ key: 1,
8076
+ "data-test-id": _.routeId,
8077
+ icon: _.groupIcon || _.icon,
8078
+ title: $.$t(_.title),
8079
+ badge: k.value.get(_.routeId ?? _.groupId ?? ""),
8080
+ active: m(_.url),
8081
+ onClick: (M) => h(_)
8082
+ }, null, 8, ["data-test-id", "icon", "title", "badge", "active", "onClick"]))
8083
+ ], 64))), 128))
8084
+ ]),
8085
+ _: 1
8086
+ }, 8, ["expanded", "class"])) : R("", !0);
8244
8087
  }
8245
- }), np = { class: "app-hub-content__search" }, op = {
8246
- key: 0,
8247
- class: "app-hub-content__section app-hub-content__section--apps"
8248
- }, ip = { class: "app-hub-content__section-header" }, sp = { class: "app-hub-content__section-title" }, rp = {
8249
- key: 0,
8250
- class: "app-hub-content__apps-list app-hub-content__apps-list--tiles"
8251
- }, up = ["data-test-id", "onClick"], dp = ["src", "alt"], cp = { class: "app-hub-content__item-content app-hub-content__item-content--center" }, vp = { class: "app-hub-content__item-title app-hub-content__item-title--app app-hub-content__item-title--center" }, fp = {
8088
+ }), Lm = { class: "vc-user-info" }, Bm = {
8252
8089
  key: 1,
8253
- class: "app-hub-content__empty"
8254
- }, mp = { class: "app-hub-content__section app-hub-content__section--widgets" }, pp = { class: "app-hub-content__widgets-inner" }, gp = { class: "app-hub-content__section-header app-hub-content__section-header--back" }, bp = { class: "app-hub-content__back-title" }, hp = { class: "app-hub-content__section-header" }, yp = { class: "app-hub-content__section-title" }, wp = {
8090
+ class: "vc-user-info__avatar-fallback"
8091
+ }, Vm = { class: "vc-user-info__info" }, Dm = { class: "vc-user-info__name" }, Nm = { class: "vc-user-info__role" }, Pm = /* @__PURE__ */ U({
8092
+ __name: "user-info",
8093
+ props: {
8094
+ avatarUrl: {},
8095
+ name: {},
8096
+ role: {},
8097
+ isExpanded: { type: Boolean }
8098
+ },
8099
+ setup(e) {
8100
+ const a = e, { user: t } = Il(), l = S(() => {
8101
+ if (a.avatarUrl)
8102
+ return `background-image: url(${CSS.escape(a.avatarUrl)})`;
8103
+ });
8104
+ return (r, s) => (o(), p("div", Lm, [
8105
+ e.avatarUrl ? (o(), p("div", {
8106
+ key: 0,
8107
+ class: "vc-user-info__avatar",
8108
+ style: he(l.value)
8109
+ }, null, 4)) : (o(), p("div", Bm, [
8110
+ x(n(J), {
8111
+ icon: "lucide-circle-user",
8112
+ size: "l"
8113
+ })
8114
+ ])),
8115
+ y("div", Vm, [
8116
+ y("div", Dm, D(e.name || n(t) && "fullName" in n(t) && n(t).fullName || n(t)?.userName), 1),
8117
+ y("div", Nm, D(e.role ? r.$te(`SHELL.USER.ROLE.${e.role}`) ? r.$t(`SHELL.USER.ROLE.${e.role}`) : e.role : n(t)?.isAdministrator ? r.$t("SHELL.USER.ROLE.ADMINISTRATOR") : ""), 1)
8118
+ ])
8119
+ ]));
8120
+ }
8121
+ }), Fm = { class: "vc-settings-menu" }, zm = {
8255
8122
  key: 0,
8256
- class: "app-hub-content__list"
8257
- }, kp = ["data-widget-id", "onClick"], Sp = { class: "app-hub-content__widget-icon-wrap" }, Cp = {
8123
+ class: "vc-settings-menu__separator"
8124
+ }, Um = { class: "vc-settings-menu__group" }, go = /* @__PURE__ */ U({
8125
+ __name: "settings-menu",
8126
+ setup(e) {
8127
+ const { items: a } = $m(), t = S(() => {
8128
+ const l = /* @__PURE__ */ new Map();
8129
+ for (const r of a.value) {
8130
+ const s = r.group ?? "general";
8131
+ l.has(s) || l.set(s, []), l.get(s).push(r);
8132
+ }
8133
+ return Array.from(l.entries()).map(([r, s]) => ({
8134
+ name: r,
8135
+ items: s
8136
+ }));
8137
+ });
8138
+ return (l, r) => (o(), p("div", Fm, [
8139
+ (o(!0), p(ee, null, me(t.value, (s, i) => (o(), p(ee, {
8140
+ key: s.name
8141
+ }, [
8142
+ i > 0 ? (o(), p("div", zm)) : R("", !0),
8143
+ y("div", Um, [
8144
+ (o(!0), p(ee, null, me(s.items, (u) => (o(), B(We(u.component), Se({
8145
+ key: u.id
8146
+ }, { ref_for: !0 }, u.props || {}), null, 16))), 128))
8147
+ ])
8148
+ ], 64))), 128))
8149
+ ]));
8150
+ }
8151
+ }), Hm = ["aria-hidden"], Gm = ["aria-modal", "aria-label", "aria-labelledby"], Wm = {
8258
8152
  key: 0,
8259
- class: "app-hub-content__widget-badge"
8260
- }, $p = { class: "app-hub-content__item-content" }, _p = { class: "app-hub-content__item-title" }, Ep = {
8153
+ class: "vc-sidebar__handle"
8154
+ }, qm = { class: "vc-sidebar__header" }, Km = { class: "vc-sidebar__title-wrap" }, Ym = {
8261
8155
  key: 1,
8262
- class: "app-hub-content__empty"
8263
- }, Ap = {
8264
- key: 0,
8265
- class: "app-hub-content__flyout app-hub-content__flyout--mobile"
8266
- }, Rp = { class: "app-hub-content__flyout-header" }, Ip = { class: "app-hub-content__flyout-title" }, Tp = { class: "app-hub-content__flyout-body" }, Sn = 120, bl = 120, xp = 80, Mp = 120, $a = /* @__PURE__ */ U({
8267
- __name: "AppHubContent",
8156
+ class: "vc-sidebar__subtitle"
8157
+ }, jm = { class: "vc-sidebar__header-actions" }, Xm = ["aria-label"], Qm = { class: "vc-sidebar__content" }, Jm = {
8158
+ key: 2,
8159
+ class: "vc-sidebar__footer"
8160
+ }, Zm = 'a[href], area[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable="true"]', Nt = /* @__PURE__ */ U({
8161
+ __name: "vc-sidebar",
8268
8162
  props: {
8269
- appsList: {},
8270
- showApplications: { type: Boolean, default: !0 },
8271
- mobile: { type: Boolean, default: !1 }
8272
- },
8273
- emits: ["switch-app"],
8274
- setup(e, { emit: a }) {
8275
- const t = e, l = a, r = ct(), s = S(() => typeof r.applications == "function"), i = O(null), u = O(null), { items: c } = Bl(), { currentWidget: d, hideAllWidgets: v, isAnyWidgetVisible: g, toggleWidget: f } = Vl(), { searchQuery: b, filteredApps: h, filteredWidgets: m, getWidgetTitle: w } = lp({
8276
- appsList: Ie(t, "appsList"),
8277
- widgets: c,
8278
- showApplications: Ie(t, "showApplications"),
8279
- mobile: Ie(t, "mobile")
8280
- }), k = O(bl), $ = O(bl), E = S(() => !s.value && h.value.length > Sn), _ = S(() => m.value.length > Sn), M = S(() => E.value ? h.value.slice(0, k.value) : h.value), C = S(() => _.value ? m.value.slice(0, $.value) : m.value);
8281
- ne(
8282
- () => c.value.map((Y) => Y.id),
8283
- () => {
8284
- g.value && !d.value && v();
8163
+ modelValue: { type: Boolean },
8164
+ position: { default: "right" },
8165
+ size: { default: "sm" },
8166
+ variant: { default: "default" },
8167
+ width: { default: void 0 },
8168
+ height: { default: void 0 },
8169
+ showOverlay: { type: Boolean, default: !0 },
8170
+ closeOnOverlay: { type: Boolean, default: !0 },
8171
+ closeOnEscape: { type: Boolean, default: !0 },
8172
+ trapFocus: { type: Boolean, default: !0 },
8173
+ lockScroll: { type: Boolean, default: !0 },
8174
+ returnFocus: { type: Boolean, default: !0 },
8175
+ autoFocus: { type: Boolean, default: !0 },
8176
+ teleport: { type: Boolean, default: !0 },
8177
+ teleportTo: {},
8178
+ title: { default: "" },
8179
+ subtitle: { default: "" },
8180
+ ariaLabel: { default: "" },
8181
+ closeAriaLabel: { default: "Close sidebar" },
8182
+ closeButton: { type: Boolean, default: !0 },
8183
+ inset: { type: Boolean, default: !0 },
8184
+ zIndex: { default: 1e4 },
8185
+ draggable: { type: Boolean, default: !1 },
8186
+ dragHandle: { type: Boolean, default: !1 },
8187
+ closeThreshold: { default: 0.3 }
8188
+ },
8189
+ emits: ["update:modelValue", "close"],
8190
+ setup(e, { expose: a, emit: t }) {
8191
+ const l = Symbol.for("vc-sidebar-scroll-lock");
8192
+ function r() {
8193
+ if (typeof window > "u")
8194
+ return null;
8195
+ const se = window;
8196
+ return se[l] || (se[l] = { counter: 0, cachedOverflow: "", cachedPaddingRight: "" }), se[l];
8197
+ }
8198
+ function s() {
8199
+ const se = r();
8200
+ if (!(!se || typeof document > "u")) {
8201
+ if (se.counter === 0) {
8202
+ const { body: Ce, documentElement: De } = document;
8203
+ se.cachedOverflow = Ce.style.overflow, se.cachedPaddingRight = Ce.style.paddingRight;
8204
+ const qe = window.innerWidth - De.clientWidth;
8205
+ Ce.style.overflow = "hidden", qe > 0 && (Ce.style.paddingRight = `${qe}px`);
8206
+ }
8207
+ se.counter += 1;
8285
8208
  }
8286
- ), ne(
8287
- [() => h.value.length, E],
8288
- ([Y, ue]) => {
8289
- k.value = ue ? Math.min(Y, bl) : Y, Ee(() => te(i.value));
8290
- },
8291
- { immediate: !0 }
8292
- ), ne(
8293
- [() => m.value.length, _],
8294
- ([Y, ue]) => {
8295
- $.value = ue ? Math.min(Y, bl) : Y, Ee(() => te(u.value));
8296
- },
8297
- { immediate: !0 }
8298
- ), ne(
8299
- () => z(i.value),
8300
- (Y, ue) => {
8301
- ue?.removeEventListener("scroll", P), Y?.addEventListener("scroll", P, { passive: !0 });
8302
- },
8303
- { immediate: !0 }
8304
- ), ne(
8305
- () => z(u.value),
8306
- (Y, ue) => {
8307
- ue?.removeEventListener("scroll", W), Y?.addEventListener("scroll", W, { passive: !0 });
8308
- },
8309
- { immediate: !0 }
8310
- ), Ue(() => {
8311
- z(i.value)?.removeEventListener("scroll", P), z(u.value)?.removeEventListener("scroll", W);
8312
- });
8313
- function L(Y) {
8314
- return !Y || Y.startsWith("/") || Y.startsWith("http://") || Y.startsWith("https://") || Y.startsWith("data:") ? Y : `/${Y}`;
8315
8209
  }
8316
- function T(Y) {
8317
- if (typeof window > "u")
8318
- return !1;
8319
- const ue = I(window.location.pathname), Q = I(Y.relativeUrl ?? "");
8320
- return Q ? Q === "/" ? ue === "/" : ue.startsWith(Q) : !1;
8210
+ function i() {
8211
+ const se = r();
8212
+ if (!(!se || typeof document > "u" || se.counter === 0) && (se.counter -= 1, se.counter === 0)) {
8213
+ const { body: Ce } = document;
8214
+ Ce.style.overflow = se.cachedOverflow, Ce.style.paddingRight = se.cachedPaddingRight;
8215
+ }
8321
8216
  }
8322
- function I(Y) {
8323
- return Y ? Y.replace(/\/+$/, "") || "/" : "";
8217
+ const u = e, c = t, d = ct(), v = O(null), g = O(!1), f = O(null), { teleportTarget: b } = St({
8218
+ to: S(() => u.teleportTo)
8219
+ }), m = `vc-sidebar-title-${Math.round(Math.random() * 1e5)}`, w = {
8220
+ sm: "300px",
8221
+ md: "380px",
8222
+ lg: "520px",
8223
+ full: "100vw"
8224
+ }, k = {
8225
+ sm: "40dvh",
8226
+ md: "56dvh",
8227
+ lg: "72dvh",
8228
+ full: "100dvh"
8229
+ }, $ = S(() => typeof u.width == "number" ? `${u.width}px` : u.width), E = S(() => typeof u.height == "number" ? `${u.height}px` : u.height), _ = S(() => !!u.title || u.closeButton || !!d.header), M = S(() => !!d.footer), C = S(() => u.position === "bottom"), L = S(() => u.size === "full"), T = S(() => u.position === "left" ? "vc-sidebar-panel-left" : u.position === "bottom" ? "vc-sidebar-panel-bottom" : "vc-sidebar-panel-right"), I = S(() => C.value ? {
8230
+ height: E.value ?? k[u.size]
8231
+ } : {
8232
+ width: $.value ?? w[u.size]
8233
+ }), G = S(() => ({
8234
+ zIndex: u.zIndex
8235
+ })), N = S(() => [
8236
+ `vc-sidebar__panel--${u.position}`,
8237
+ `vc-sidebar__panel--${u.variant}`,
8238
+ `vc-sidebar__panel--size-${u.size}`,
8239
+ {
8240
+ "vc-sidebar__panel--with-header": _.value,
8241
+ "vc-sidebar__panel--with-footer": M.value,
8242
+ "vc-sidebar__panel--inset": u.inset && !L.value,
8243
+ "vc-sidebar__panel--draggable": u.draggable && C.value
8244
+ }
8245
+ ]), P = S(() => u.ariaLabel || void 0), W = S(() => u.ariaLabel || !u.title ? void 0 : m);
8246
+ function F(se) {
8247
+ c("update:modelValue", !1), c("close", se);
8324
8248
  }
8325
- function G(Y) {
8326
- v(), l("switch-app", Y);
8249
+ function K() {
8250
+ F("action");
8327
8251
  }
8328
- function N(Y) {
8329
- return `app-hub-app-${(Y.id || Y.title || "unknown").toString().trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "") || "unknown"}`;
8252
+ function z() {
8253
+ c("update:modelValue", !0);
8330
8254
  }
8331
- function P() {
8332
- E.value && K({
8333
- container: i.value,
8334
- totalItems: h.value.length,
8335
- renderLimit: k
8336
- });
8255
+ function te() {
8256
+ u.closeOnOverlay && F("overlay");
8337
8257
  }
8338
- function W() {
8339
- _.value && K({
8340
- container: u.value,
8341
- totalItems: m.value.length,
8342
- renderLimit: $
8343
- });
8258
+ const ve = O(0), X = O(!1);
8259
+ function Y(se) {
8260
+ !u.draggable || !C.value || (ve.value = se.touches[0].clientY, X.value = !0);
8344
8261
  }
8345
- function F(Y) {
8346
- Y.component && f(Y.id), Y.onClick?.();
8262
+ function ue(se) {
8263
+ if (!X.value || !v.value) return;
8264
+ const Ce = se.touches[0].clientY - ve.value;
8265
+ Ce > 0 && (v.value.style.transform = `translateY(${Ce}px)`, v.value.style.transition = "none");
8347
8266
  }
8348
- function K(Y) {
8349
- const ue = z(Y.container);
8350
- !ue || Y.renderLimit.value >= Y.totalItems || ue.scrollHeight - ue.scrollTop - ue.clientHeight > Mp || (Y.renderLimit.value = Math.min(Y.renderLimit.value + xp, Y.totalItems), Ee(() => te(Y.container)));
8267
+ function Q(se) {
8268
+ if (!X.value || !v.value) return;
8269
+ X.value = !1;
8270
+ const Ce = se.changedTouches[0].clientY - ve.value, De = v.value.offsetHeight, qe = De * u.closeThreshold;
8271
+ Ce > qe ? (v.value.style.transition = "transform 0.2s ease", v.value.style.transform = `translateY(${De}px)`, setTimeout(() => {
8272
+ F("action");
8273
+ }, 200)) : (v.value.style.transition = "transform 0.2s ease", v.value.style.transform = "", setTimeout(() => {
8274
+ v.value && (v.value.style.transition = "");
8275
+ }, 200));
8351
8276
  }
8352
- function z(Y) {
8353
- return Y ? Y.viewportRef?.value ?? null : null;
8277
+ function j() {
8278
+ return v.value ? Array.from(v.value.querySelectorAll(Zm)).filter((se) => {
8279
+ if (se.hasAttribute("disabled") || se.getAttribute("aria-hidden") === "true")
8280
+ return !1;
8281
+ const Ce = window.getComputedStyle(se);
8282
+ return Ce.display !== "none" && Ce.visibility !== "hidden";
8283
+ }) : [];
8354
8284
  }
8355
- function te(Y) {
8356
- if (!Y)
8285
+ let ke = !1;
8286
+ function be() {
8287
+ if (ke) return;
8288
+ ke = !0;
8289
+ const se = j()[0];
8290
+ se ? se.focus() : v.value?.focus(), ke = !1;
8291
+ }
8292
+ function Z(se) {
8293
+ ke || !u.modelValue || !u.trapFocus || !v.value || se.target instanceof Node && !v.value.contains(se.target) && be();
8294
+ }
8295
+ function fe(se) {
8296
+ if (!u.modelValue)
8357
8297
  return;
8358
- Y.updateScrollState?.();
8298
+ if (se.key === "Escape") {
8299
+ u.closeOnEscape && F("escape");
8300
+ return;
8301
+ }
8302
+ if (!u.trapFocus || se.key !== "Tab" || !v.value)
8303
+ return;
8304
+ const Ce = j();
8305
+ if (!Ce.length) {
8306
+ se.preventDefault(), v.value.focus();
8307
+ return;
8308
+ }
8309
+ const De = Ce[0], qe = Ce[Ce.length - 1], Ze = document.activeElement;
8310
+ if (se.shiftKey) {
8311
+ (Ze === De || !Ze || !v.value.contains(Ze)) && (se.preventDefault(), qe.focus());
8312
+ return;
8313
+ }
8314
+ Ze === qe && (se.preventDefault(), De.focus());
8359
8315
  }
8360
- function ve(Y) {
8361
- return d.value?.id === Y;
8316
+ function Re() {
8317
+ if (!u.returnFocus || !f.value) {
8318
+ f.value = null;
8319
+ return;
8320
+ }
8321
+ const se = f.value;
8322
+ f.value = null, Ee(() => {
8323
+ try {
8324
+ se.focus({ preventScroll: !0 });
8325
+ } catch {
8326
+ se.focus();
8327
+ }
8328
+ });
8362
8329
  }
8363
- function X(Y) {
8364
- return Y.badge === void 0 ? !1 : typeof Y.badge == "function" ? Y.badge() : !!Y.badge;
8330
+ function Fe() {
8331
+ g.value || typeof document > "u" || (g.value = !0, f.value = document.activeElement instanceof HTMLElement ? document.activeElement : null, document.addEventListener("keydown", fe), document.addEventListener("focusin", Z), u.lockScroll && s(), u.autoFocus && Ee(() => {
8332
+ be();
8333
+ }));
8365
8334
  }
8366
- return (Y, ue) => (o(), p("div", {
8367
- class: q(["app-hub-content", { "app-hub-content--mobile": e.mobile }])
8335
+ function ye() {
8336
+ !g.value || typeof document > "u" || (g.value = !1, document.removeEventListener("keydown", fe), document.removeEventListener("focusin", Z), u.lockScroll && i(), Re());
8337
+ }
8338
+ return ne(
8339
+ () => u.modelValue,
8340
+ (se) => {
8341
+ if (se) {
8342
+ Ee(() => {
8343
+ v.value && (v.value.style.transform = "", v.value.style.transition = "");
8344
+ }), Fe();
8345
+ return;
8346
+ }
8347
+ ye();
8348
+ },
8349
+ { immediate: !0 }
8350
+ ), Ue(() => {
8351
+ ye();
8352
+ }), a({
8353
+ close: K,
8354
+ open: z
8355
+ }), (se, Ce) => (o(), B(ot, {
8356
+ to: n(b),
8357
+ defer: "",
8358
+ disabled: !e.teleport
8368
8359
  }, [
8369
- y("div", np, [
8370
- x(n(Be), {
8371
- modelValue: n(b),
8372
- "onUpdate:modelValue": ue[0] || (ue[0] = (Q) => dt(b) ? b.value = Q : null),
8373
- clearable: "",
8374
- size: "small",
8375
- placeholder: Y.$t("COMPONENTS.ORGANISMS.VC_APP.INTERNAL.APP_HUB.SEARCH_PLACEHOLDER")
8376
- }, {
8377
- "prepend-inner": A(() => [
8378
- x(n(J), {
8379
- icon: "lucide-search",
8380
- size: "s"
8381
- })
8382
- ]),
8383
- _: 1
8384
- }, 8, ["modelValue", "placeholder"])
8385
- ]),
8386
8360
  y("div", {
8387
- class: q(["app-hub-content__sections", { "app-hub-content__sections--single": !e.showApplications, "app-hub-content__sections--mobile": e.mobile }])
8361
+ class: "vc-sidebar",
8362
+ style: he(G.value),
8363
+ "aria-hidden": !e.modelValue
8388
8364
  }, [
8389
- e.showApplications ? (o(), p("section", op, [
8390
- y("header", ip, [
8391
- y("span", sp, D(Y.$t("COMPONENTS.ORGANISMS.VC_APP.INTERNAL.APP_HUB.APPLICATIONS")), 1)
8392
- ]),
8393
- x(n(ft), {
8394
- ref_key: "appsScrollContainerRef",
8395
- ref: i,
8396
- class: "app-hub-content__scroll"
8397
- }, {
8398
- default: A(() => [
8399
- V(Y.$slots, "applications", {
8400
- appsList: n(h),
8401
- switchApp: G
8365
+ x(_e, { name: "vc-sidebar-overlay" }, {
8366
+ default: A(() => [
8367
+ e.modelValue && e.showOverlay ? (o(), p("div", {
8368
+ key: 0,
8369
+ class: "vc-sidebar__overlay",
8370
+ onClick: te
8371
+ })) : R("", !0)
8372
+ ]),
8373
+ _: 1
8374
+ }),
8375
+ x(_e, { name: T.value }, {
8376
+ default: A(() => [
8377
+ e.modelValue ? (o(), p("aside", {
8378
+ key: 0,
8379
+ ref_key: "panelEl",
8380
+ ref: v,
8381
+ class: q(["vc-sidebar__panel", N.value]),
8382
+ style: he(I.value),
8383
+ role: "dialog",
8384
+ "aria-modal": e.showOverlay,
8385
+ "aria-label": P.value,
8386
+ "aria-labelledby": W.value,
8387
+ tabindex: "-1",
8388
+ onTouchstart: Y,
8389
+ onTouchmove: ue,
8390
+ onTouchend: Q
8391
+ }, [
8392
+ e.dragHandle && C.value ? (o(), p("div", Wm, [...Ce[1] || (Ce[1] = [
8393
+ y("div", { class: "vc-sidebar__handle-bar" }, null, -1)
8394
+ ])])) : R("", !0),
8395
+ _.value ? V(se.$slots, "header", {
8396
+ key: 1,
8397
+ close: K
8402
8398
  }, () => [
8403
- n(h).length ? (o(), p("div", rp, [
8404
- (o(!0), p(ee, null, me(M.value, (Q) => (o(), p("button", {
8405
- key: Q.id || Q.title,
8406
- type: "button",
8407
- "data-test-id": N(Q),
8408
- class: q(["app-hub-content__item app-hub-content__item--app app-hub-content__item--app-tile", { "app-hub-content__item--active": T(Q) }]),
8409
- onClick: (j) => G(Q)
8410
- }, [
8411
- Q.iconUrl ? (o(), p("img", {
8399
+ y("div", qm, [
8400
+ y("div", Km, [
8401
+ e.title ? (o(), p("h3", {
8402
+ key: 0,
8403
+ id: m,
8404
+ class: "vc-sidebar__title"
8405
+ }, D(e.title), 1)) : R("", !0),
8406
+ e.subtitle ? (o(), p("p", Ym, D(e.subtitle), 1)) : R("", !0)
8407
+ ]),
8408
+ y("div", jm, [
8409
+ V(se.$slots, "actions", { close: K }),
8410
+ e.closeButton ? (o(), p("button", {
8412
8411
  key: 0,
8413
- src: L(Q.iconUrl),
8414
- alt: Q.title || Q.id || "app icon",
8415
- class: "app-hub-content__item-icon app-hub-content__item-icon--tile"
8416
- }, null, 8, dp)) : (o(), B(n(J), {
8417
- key: 1,
8418
- icon: "lucide-grid-2x2",
8419
- size: "m",
8420
- class: "app-hub-content__item-icon app-hub-content__item-icon--fallback app-hub-content__item-icon--tile"
8421
- })),
8422
- y("div", cp, [
8423
- y("div", vp, D(Q.title || Q.id), 1)
8424
- ])
8425
- ], 10, up))), 128))
8426
- ])) : (o(), p("div", fp, D(Y.$t("COMPONENTS.ORGANISMS.VC_APP.INTERNAL.APP_HUB.NO_APPLICATIONS")), 1))
8427
- ])
8428
- ]),
8429
- _: 3
8430
- }, 512)
8431
- ])) : R("", !0),
8432
- y("section", mp, [
8433
- y("div", pp, [
8434
- !e.mobile && n(g) && n(d)?.component ? (o(), p(ee, { key: 0 }, [
8435
- y("header", gp, [
8436
- y("button", {
8437
- class: "app-hub-content__back-button",
8438
- onClick: ue[1] || (ue[1] = //@ts-ignore
8439
- (...Q) => n(v) && n(v)(...Q))
8440
- }, [
8441
- x(n(J), {
8442
- icon: "lucide-arrow-left",
8443
- size: "xs"
8444
- }),
8445
- y("span", bp, D(n(w)(n(d))), 1)
8446
- ])
8447
- ]),
8448
- x(n(ft), { class: "app-hub-content__widget-inline-body" }, {
8449
- default: A(() => [
8450
- x(kn)
8451
- ]),
8452
- _: 1
8453
- })
8454
- ], 64)) : (o(), p(ee, { key: 1 }, [
8455
- y("header", hp, [
8456
- y("span", yp, D(Y.$t("COMPONENTS.ORGANISMS.VC_APP.INTERNAL.APP_HUB.WIDGETS")), 1)
8457
- ]),
8458
- x(n(ft), {
8459
- ref_key: "widgetsScrollContainerRef",
8460
- ref: u,
8461
- class: "app-hub-content__scroll"
8462
- }, {
8463
- default: A(() => [
8464
- n(m).length ? (o(), p("div", wp, [
8465
- (o(!0), p(ee, null, me(C.value, (Q) => (o(), p("button", {
8466
- key: Q.id,
8467
8412
  type: "button",
8468
- "data-widget-id": Q.id,
8469
- class: q(["app-hub-content__item app-hub-content__item--widget", { "app-hub-content__item--active": ve(Q.id) }]),
8470
- onClick: (j) => F(Q)
8413
+ class: "vc-sidebar__close",
8414
+ "aria-label": e.closeAriaLabel,
8415
+ onClick: Ce[0] || (Ce[0] = (De) => F("action"))
8471
8416
  }, [
8472
- y("div", Sp, [
8473
- x(n(J), {
8474
- icon: Q.icon || "lucide-layout-grid",
8475
- size: "s",
8476
- class: "app-hub-content__item-icon app-hub-content__item-icon--fallback"
8477
- }, null, 8, ["icon"]),
8478
- X(Q) ? (o(), p("span", Cp)) : R("", !0)
8479
- ]),
8480
- y("div", $p, [
8481
- y("div", _p, D(n(w)(Q)), 1)
8482
- ])
8483
- ], 10, kp))), 128))
8484
- ])) : (o(), p("div", Ep, D(Y.$t("COMPONENTS.ORGANISMS.VC_APP.INTERNAL.APP_HUB.NO_WIDGETS")), 1))
8485
- ]),
8486
- _: 1
8487
- }, 512)
8488
- ], 64))
8489
- ])
8490
- ])
8491
- ], 2),
8492
- x(_e, { name: "app-hub-content-flyout" }, {
8493
- default: A(() => [
8494
- e.mobile && n(g) && n(d)?.component ? (o(), p("div", Ap, [
8495
- y("div", Rp, [
8496
- y("span", Ip, D(n(w)(n(d))), 1),
8497
- x(n(Oe), {
8498
- icon: "lucide-x",
8499
- text: "",
8500
- onClick: n(v)
8501
- }, null, 8, ["onClick"])
8502
- ]),
8503
- y("div", Tp, [
8504
- x(kn, { mobile: "" })
8505
- ])
8506
- ])) : R("", !0)
8507
- ]),
8508
- _: 1
8509
- })
8510
- ], 2));
8417
+ x(n(J), {
8418
+ icon: "lucide-x",
8419
+ size: "m"
8420
+ })
8421
+ ], 8, Xm)) : R("", !0)
8422
+ ])
8423
+ ])
8424
+ ]) : R("", !0),
8425
+ y("div", Qm, [
8426
+ V(se.$slots, "default")
8427
+ ]),
8428
+ se.$slots.footer ? (o(), p("div", Jm, [
8429
+ V(se.$slots, "footer")
8430
+ ])) : R("", !0)
8431
+ ], 46, Gm)) : R("", !0)
8432
+ ]),
8433
+ _: 3
8434
+ }, 8, ["name"])
8435
+ ], 12, Hm)
8436
+ ], 8, ["to", "disabled"]));
8511
8437
  }
8512
- }), Op = /* @__PURE__ */ U({
8513
- __name: "AppHubPopover",
8438
+ }), ep = /* @__PURE__ */ U({
8439
+ __name: "user-sidebar",
8514
8440
  props: {
8515
- show: { type: Boolean },
8516
- anchorRef: { default: null },
8517
- appsList: {},
8518
- showApplications: { type: Boolean, default: !0 }
8441
+ isOpened: { type: Boolean }
8519
8442
  },
8520
- emits: ["update:show", "switch-app"],
8521
- setup(e, { emit: a }) {
8522
- const t = e, l = a, { hideAllWidgets: r } = Vl(), s = S({
8523
- get: () => t.show,
8524
- set: (u) => {
8525
- l("update:show", u);
8526
- }
8527
- });
8528
- ne(
8529
- () => t.show,
8530
- (u) => {
8531
- u || r();
8532
- }
8533
- );
8534
- function i(u) {
8535
- l("switch-app", u), l("update:show", !1);
8536
- }
8537
- return (u, c) => (o(), B(n($t), {
8538
- show: s.value,
8539
- "onUpdate:show": c[0] || (c[0] = (d) => s.value = d),
8540
- "anchor-ref": e.anchorRef,
8541
- placement: "right-start",
8542
- width: "560px",
8543
- "max-width": "calc(100vw - 24px)",
8544
- "max-height": 9999,
8545
- "content-scrollable": !1
8443
+ emits: ["update:isOpened", "item:click"],
8444
+ setup(e) {
8445
+ const a = de(tl, O(!1));
8446
+ return (t, l) => (o(), B(n(Nt), {
8447
+ "model-value": e.isOpened,
8448
+ position: "left",
8449
+ teleport: !n(a),
8450
+ title: t.$t("SHELL.ACCOUNT.SETTINGS"),
8451
+ "onUpdate:modelValue": l[1] || (l[1] = (r) => t.$emit("update:isOpened", r))
8546
8452
  }, {
8547
8453
  default: A(() => [
8548
- x($a, {
8549
- "apps-list": e.appsList,
8550
- "show-applications": e.showApplications,
8551
- onSwitchApp: i
8552
- }, we({ _: 2 }, [
8553
- u.$slots.applications ? {
8554
- name: "applications",
8555
- fn: A((d) => [
8556
- V(u.$slots, "applications", Qe(Je(d)))
8557
- ]),
8558
- key: "0"
8559
- } : void 0
8560
- ]), 1032, ["apps-list", "show-applications"])
8561
- ]),
8562
- _: 3
8563
- }, 8, ["show", "anchor-ref"]));
8564
- }
8565
- }), Lp = { class: "vc-notification-template__content" }, Bp = { class: "vc-notification-template__time" }, Vp = {
8566
- key: 0,
8567
- class: "vc-notification-template__content-body"
8568
- }, Cn = 60, $n = 3600, Dp = 86400, Np = /* @__PURE__ */ U({
8569
- __name: "notification-template",
8570
- props: {
8571
- title: {},
8572
- notification: {},
8573
- icon: {},
8574
- color: {},
8575
- severity: {}
8576
- },
8577
- emits: ["click"],
8578
- setup(e, { emit: a }) {
8579
- const t = e, l = window.navigator.language, r = S(() => {
8580
- const s = t.notification.created;
8581
- if (!s) return "";
8582
- const i = s instanceof Date ? s : new Date(s);
8583
- if (Number.isNaN(i.getTime())) return "";
8584
- const u = Date.now(), c = Math.round((u - i.getTime()) / 1e3), d = Math.abs(c), v = new Intl.RelativeTimeFormat(l, { numeric: "auto" });
8585
- return d < Cn ? v.format(-c, "second") : d < $n ? v.format(-Math.round(c / Cn), "minute") : d < Dp ? v.format(-Math.round(c / $n), "hour") : new Intl.DateTimeFormat(l, {
8586
- dateStyle: "short",
8587
- timeStyle: "short"
8588
- }).format(i);
8589
- });
8590
- return (s, i) => (o(), p("div", {
8591
- class: "vc-notification-template",
8592
- onClick: i[0] || (i[0] = (u) => s.$emit("click"))
8593
- }, [
8594
- y("div", {
8595
- class: q(["vc-notification-template__container", {
8596
- "vc-notification-template__container--mobile": s.$isMobile.value
8597
- }])
8598
- }, [
8599
- y("div", {
8600
- class: "vc-notification-template__icon-container",
8601
- style: he({ backgroundColor: e.color ?? "var(--primary-500)" })
8454
+ e.isOpened ? (o(), p("div", {
8455
+ key: 0,
8456
+ class: "vc-user-sidebar__menu",
8457
+ onClick: l[0] || (l[0] = le((r) => t.$emit("update:isOpened", !1), ["stop"]))
8602
8458
  }, [
8603
- x(n(J), {
8604
- icon: e.icon ?? "lucide-bell",
8605
- size: "s"
8606
- }, null, 8, ["icon"])
8607
- ], 4),
8608
- y("div", Lp, [
8609
- y("p", {
8610
- class: q(["vc-notification-template__title", { "vc-notification-template__title--desktop": s.$isDesktop.value }])
8611
- }, D(e.title), 3),
8612
- y("p", Bp, D(r.value), 1),
8613
- s.$slots.default ? (o(), p("div", Vp, [
8614
- V(s.$slots, "default")
8615
- ])) : R("", !0)
8616
- ])
8617
- ], 2)
8618
- ]));
8459
+ x(n(go))
8460
+ ])) : R("", !0)
8461
+ ]),
8462
+ _: 1
8463
+ }, 8, ["model-value", "teleport", "title"]));
8619
8464
  }
8620
- }), Pp = Np, Fp = { class: "vc-notification-item__content" }, zp = /* @__PURE__ */ U({
8621
- __name: "notification",
8465
+ }), tp = { class: "vc-user-dropdown-button-container" }, lp = /* @__PURE__ */ U({
8466
+ __name: "user-dropdown-button",
8622
8467
  props: {
8623
- notification: {}
8468
+ avatarUrl: {},
8469
+ name: {},
8470
+ role: {},
8471
+ disabled: { type: Boolean }
8624
8472
  },
8625
- emits: ["onClick"],
8626
- setup(e, { emit: a }) {
8627
- const t = e, l = a, r = Tl(), s = S(() => {
8628
- const u = t.notification.notifyType;
8629
- if (u)
8630
- return r.registry.get(u)?.template;
8631
- });
8632
- Me(
8633
- ui,
8634
- S(() => t.notification)
8635
- );
8636
- const i = () => {
8637
- l("onClick", t.notification);
8638
- };
8639
- return (u, c) => {
8640
- const d = Ne("VcHint");
8641
- return o(), p("div", {
8642
- class: "vc-notification-item",
8473
+ setup(e) {
8474
+ const a = O(!1), t = O(null), { isPinned: l, isExpanded: r } = Fa();
8475
+ function s() {
8476
+ a.value = !1;
8477
+ }
8478
+ Me(Ea, s);
8479
+ function i() {
8480
+ a.value = !a.value;
8481
+ }
8482
+ return (u, c) => (o(), p("div", tp, [
8483
+ y("button", {
8484
+ ref_key: "buttonRef",
8485
+ ref: t,
8486
+ type: "button",
8487
+ class: q(["vc-user-dropdown-button", {
8488
+ "vc-user-dropdown-button--active": a.value,
8489
+ "vc-user-dropdown-button--auto-width": e.disabled,
8490
+ "vc-user-dropdown-button--mobile": u.$isMobile.value,
8491
+ "vc-user-dropdown-button--collapsed": !n(l) && u.$isDesktop.value
8492
+ }]),
8643
8493
  onClick: i
8644
8494
  }, [
8645
8495
  y("div", {
8646
- class: "vc-notification-item__unread-dot",
8647
- style: he({ visibility: e.notification.isNew ? "visible" : "hidden" })
8648
- }, null, 4),
8649
- y("div", Fp, [
8650
- s.value ? (o(), B(We(s.value), { key: 0 })) : (o(), B(n(Pp), {
8651
- key: 1,
8652
- title: e.notification.title ?? "",
8653
- notification: e.notification
8654
- }, {
8655
- default: A(() => [
8656
- e.notification.description ? (o(), B(d, {
8657
- key: 0,
8658
- class: "tw-mb-1"
8659
- }, {
8660
- default: A(() => [
8661
- ie(D(e.notification.description), 1)
8662
- ]),
8663
- _: 1
8664
- })) : R("", !0)
8665
- ]),
8666
- _: 1
8667
- }, 8, ["title", "notification"]))
8668
- ])
8669
- ]);
8670
- };
8671
- }
8672
- }), Up = { class: "notification-dropdown" }, Hp = {
8673
- key: 1,
8674
- class: "tw-flex tw-justify-center tw-items-center tw-p-4 tw-text-sm tw-text-[color:var(--neutrals-400)]"
8675
- }, Gp = /* @__PURE__ */ U({
8676
- __name: "notification-dropdown",
8677
- setup(e) {
8678
- const a = Tl(), { t } = Ve({ useScope: "global" }), l = S(
8679
- () => [...a.history.value].sort(
8680
- (r, s) => new Date(s.created).getTime() - new Date(r.created).getTime()
8681
- )
8682
- );
8683
- return Ue(() => {
8684
- a.hasUnread.value && a.markAllAsRead();
8685
- }), (r, s) => (o(), p("div", Up, [
8686
- l.value.length ? (o(), B(n(ft), {
8496
+ class: q(["vc-user-dropdown-button__wrap", {
8497
+ "vc-user-dropdown-button__wrap--active": a.value
8498
+ }])
8499
+ }, [
8500
+ x(Pm, {
8501
+ "avatar-url": e.avatarUrl,
8502
+ name: e.name,
8503
+ role: e.role,
8504
+ "is-expanded": n(r)
8505
+ }, null, 8, ["avatar-url", "name", "role", "is-expanded"]),
8506
+ c[2] || (c[2] = y("div", { class: "vc-user-dropdown-button__actions" }, [
8507
+ y("div", { class: "vc-user-dropdown-button__trigger" })
8508
+ ], -1))
8509
+ ], 2)
8510
+ ], 2),
8511
+ u.$isDesktop.value ? (o(), B(n($t), {
8687
8512
  key: 0,
8688
- class: "notification-dropdown__scroll"
8513
+ show: a.value,
8514
+ "onUpdate:show": c[0] || (c[0] = (d) => a.value = d),
8515
+ "anchor-ref": t.value,
8516
+ placement: "right",
8517
+ width: "260px",
8518
+ "max-width": "300px"
8689
8519
  }, {
8690
8520
  default: A(() => [
8691
- (o(!0), p(ee, null, me(l.value, (i) => (o(), p("div", {
8692
- key: i.id
8693
- }, [
8694
- x(zp, { notification: i }, null, 8, ["notification"])
8695
- ]))), 128))
8521
+ x(n(go))
8696
8522
  ]),
8697
8523
  _: 1
8698
- })) : (o(), p("div", Hp, D(n(t)("COMPONENTS.NOTIFICATION_DROPDOWN.EMPTY")), 1))
8524
+ }, 8, ["show", "anchor-ref"])) : (o(), B(ep, {
8525
+ key: 1,
8526
+ "is-opened": a.value,
8527
+ "onUpdate:isOpened": c[1] || (c[1] = (d) => a.value = d)
8528
+ }, null, 8, ["is-opened"]))
8699
8529
  ]));
8700
8530
  }
8701
- }), yo = Gp, Wp = /* @__PURE__ */ U({
8702
- __name: "DesktopLayout",
8531
+ }), bo = lp, ap = {
8532
+ key: 0,
8533
+ class: "sidebar-content__search"
8534
+ }, np = { class: "sidebar-content__footer" }, op = /* @__PURE__ */ U({
8535
+ __name: "SidebarContent",
8703
8536
  props: {
8704
- logo: {},
8705
- title: {},
8537
+ expanded: { type: Boolean, default: !0 },
8706
8538
  avatar: {},
8707
8539
  userName: {},
8708
8540
  userRole: {},
8709
8541
  disableMenu: { type: Boolean, default: !1 },
8710
- disableAppSwitcher: { type: Boolean, default: !1 },
8711
- appsList: { default: () => [] },
8542
+ headerVisible: { type: Boolean, default: !0 },
8712
8543
  showSearch: { type: Boolean, default: !1 },
8713
8544
  searchPlaceholder: {}
8714
8545
  },
8715
- emits: ["logo:click", "item:click", "switch-app"],
8546
+ emits: ["item:click"],
8716
8547
  setup(e, { emit: a }) {
8717
- const t = a, l = Fa(), r = de(ll, !1), s = Dt(), i = O(null), u = O(!1), c = O(null), d = S(() => !r);
8718
- ne(
8719
- () => s.fullPath,
8720
- () => {
8721
- l.isMenuOpen.value && l.closeMenu(), u.value = !1;
8548
+ const t = e, l = a, r = de(ll, !1), s = O(null), i = O("");
8549
+ lt(() => {
8550
+ Ee(() => s.value?.updateScrollState());
8551
+ }), ne(
8552
+ () => t.expanded,
8553
+ (c) => {
8554
+ c || (i.value = "");
8722
8555
  }
8723
8556
  );
8724
- const v = (h) => {
8725
- if (h.currentTarget instanceof HTMLElement && (i.value = h.currentTarget), l.isMenuOpen.value) {
8726
- l.closeMenu();
8727
- return;
8728
- }
8729
- u.value = !1, l.openMenu();
8730
- }, g = (h) => {
8731
- h.currentTarget instanceof HTMLElement && (c.value = h.currentTarget), u.value = !u.value, u.value && l.isMenuOpen.value && l.closeMenu();
8732
- }, f = (h) => {
8733
- if (!h) {
8734
- l.closeMenu();
8735
- return;
8736
- }
8737
- !i.value && typeof document < "u" && (i.value = document.querySelector(".sidebar-header__menu-button")), l.openMenu();
8738
- }, b = (h) => {
8739
- l.closeMenu(), t("switch-app", h);
8557
+ const u = (c) => {
8558
+ i.value = "", l("item:click", c);
8740
8559
  };
8741
- return (h, m) => (o(), p(ee, null, [
8742
- y("div", {
8743
- class: q(["desktop-layout__spacer", {
8744
- "desktop-layout__spacer--expanded": n(l).isPinned.value
8745
- }])
8746
- }, null, 2),
8747
- y("div", {
8748
- class: q(["desktop-layout", {
8749
- "desktop-layout--collapsed": !n(l).isPinned.value
8750
- }])
8751
- }, [
8752
- y("div", {
8753
- class: q(["desktop-layout__wrap", {
8754
- "desktop-layout__wrap--collapsed": !n(l).isPinned.value,
8755
- "desktop-layout__wrap--expanded": n(l).isPinned.value
8756
- }])
8757
- }, [
8758
- He(x(Zm, {
8759
- collapsed: !n(l).isPinned.value,
8760
- onClick: n(l).togglePin
8761
- }, null, 8, ["collapsed", "onClick"]), [
8762
- [Bt, !n(l).isMenuOpen.value]
8763
- ]),
8764
- V(h.$slots, "sidebar-header", {
8765
- logo: e.logo,
8766
- expanded: n(l).isExpanded.value,
8767
- isMobile: !1
8768
- }, () => [
8769
- d.value ? (o(), B(ao, {
8770
- key: 0,
8771
- logo: e.logo,
8772
- expanded: n(l).isExpanded.value,
8773
- "show-burger": n(l).isExpanded.value,
8774
- "is-menu-open": n(l).isMenuOpen.value,
8775
- "is-notifications-open": u.value,
8776
- class: "desktop-layout__header",
8777
- "onLogo:click": m[0] || (m[0] = (w) => h.$emit("logo:click")),
8778
- onToggleMenu: v,
8779
- onToggleNotifications: g
8780
- }, null, 8, ["logo", "expanded", "show-burger", "is-menu-open", "is-notifications-open"])) : R("", !0)
8781
- ]),
8782
- x(Qm, {
8783
- expanded: n(l).isExpanded.value,
8784
- avatar: e.avatar,
8785
- "user-name": e.userName,
8786
- "user-role": e.userRole,
8787
- "disable-menu": e.disableMenu,
8788
- "header-visible": d.value,
8789
- "show-search": e.showSearch,
8790
- "search-placeholder": e.searchPlaceholder,
8791
- "onItem:click": m[1] || (m[1] = (w) => h.$emit("item:click", w))
8792
- }, we({ _: 2 }, [
8793
- h.$slots.menu ? {
8794
- name: "menu",
8795
- fn: A((w) => [
8796
- V(h.$slots, "menu", Qe(Je(w)))
8797
- ]),
8798
- key: "0"
8799
- } : void 0,
8800
- h.$slots["sidebar-footer"] ? {
8801
- name: "sidebar-footer",
8802
- fn: A((w) => [
8803
- V(h.$slots, "sidebar-footer", Qe(Je(w)))
8804
- ]),
8805
- key: "1"
8806
- } : void 0
8807
- ]), 1032, ["expanded", "avatar", "user-name", "user-role", "disable-menu", "header-visible", "show-search", "search-placeholder"])
8808
- ], 2)
8809
- ], 2),
8810
- x(Op, {
8811
- show: n(l).isMenuOpen.value,
8812
- "anchor-ref": i.value,
8813
- "apps-list": e.appsList,
8814
- "show-applications": !e.disableAppSwitcher,
8815
- "onUpdate:show": f,
8816
- onSwitchApp: b
8817
- }, we({ _: 2 }, [
8818
- h.$slots["app-switcher"] && !e.disableAppSwitcher ? {
8819
- name: "applications",
8820
- fn: A(({ appsList: w, switchApp: k }) => [
8821
- V(h.$slots, "app-switcher", {
8822
- appsList: w,
8823
- switchApp: k
8824
- })
8825
- ]),
8826
- key: "0"
8827
- } : void 0
8828
- ]), 1032, ["show", "anchor-ref", "apps-list", "show-applications"]),
8829
- x(n($t), {
8830
- show: u.value,
8831
- "onUpdate:show": m[2] || (m[2] = (w) => u.value = w),
8832
- "anchor-ref": c.value,
8833
- placement: "right-start",
8834
- width: "320px",
8835
- "content-scrollable": !1
8560
+ return (c, d) => (o(), p("div", {
8561
+ class: q(["sidebar-content", { "sidebar-content--no-header": !e.headerVisible }])
8562
+ }, [
8563
+ e.showSearch && e.expanded ? (o(), p("div", ap, [
8564
+ x(n(Be), {
8565
+ modelValue: i.value,
8566
+ "onUpdate:modelValue": d[0] || (d[0] = (v) => i.value = v),
8567
+ placeholder: e.searchPlaceholder || c.$t("SHELL.SIDEBAR.SEARCH_PLACEHOLDER", "Search keyword"),
8568
+ size: "small",
8569
+ clearable: "",
8570
+ debounce: 300
8571
+ }, null, 8, ["modelValue", "placeholder"])
8572
+ ])) : R("", !0),
8573
+ e.disableMenu ? R("", !0) : (o(), B(n(ft), {
8574
+ key: 1,
8575
+ ref_key: "scrollContainer",
8576
+ ref: s,
8577
+ class: "sidebar-content__menu"
8836
8578
  }, {
8837
8579
  default: A(() => [
8838
- x(n(yo))
8580
+ V(c.$slots, "menu", {
8581
+ expanded: e.expanded,
8582
+ onItemClick: u,
8583
+ searchQuery: i.value
8584
+ }, () => [
8585
+ x(Ca, {
8586
+ expanded: e.expanded,
8587
+ "search-query": i.value,
8588
+ "onItem:click": u
8589
+ }, null, 8, ["expanded", "search-query"])
8590
+ ])
8839
8591
  ]),
8840
- _: 1
8841
- }, 8, ["show", "anchor-ref"])
8842
- ], 64));
8592
+ _: 3
8593
+ }, 512)),
8594
+ y("div", np, [
8595
+ V(c.$slots, e.userName, {
8596
+ avatar: e.avatar,
8597
+ role: e.userRole
8598
+ }, () => [
8599
+ n(r) ? R("", !0) : (o(), B(n(bo), {
8600
+ key: 0,
8601
+ "avatar-url": e.avatar,
8602
+ name: e.userName,
8603
+ role: e.userRole
8604
+ }, null, 8, ["avatar-url", "name", "role"]))
8605
+ ])
8606
+ ])
8607
+ ], 2));
8608
+ }
8609
+ }), ip = { class: "sidebar-collapse-button__wrap" }, sp = /* @__PURE__ */ U({
8610
+ __name: "SidebarCollapseButton",
8611
+ props: {
8612
+ collapsed: { type: Boolean }
8613
+ },
8614
+ emits: ["click"],
8615
+ setup(e) {
8616
+ return (a, t) => (o(), p("div", {
8617
+ class: "sidebar-collapse-button",
8618
+ onClick: t[0] || (t[0] = (l) => a.$emit("click"))
8619
+ }, [
8620
+ y("div", ip, [
8621
+ x(n(J), {
8622
+ class: "sidebar-collapse-button__icon",
8623
+ icon: e.collapsed ? "lucide-chevron-right" : "lucide-chevron-left"
8624
+ }, null, 8, ["icon"])
8625
+ ])
8626
+ ]));
8843
8627
  }
8844
8628
  });
8845
- function qp() {
8846
- const e = O([]), a = S(() => e.value), t = (i) => {
8847
- const u = e.value.findIndex((c) => c.id === i.id);
8848
- u >= 0 ? e.value[u] = i : e.value.push(i);
8849
- }, l = (i) => {
8850
- e.value = e.value.filter((u) => u.id !== i);
8851
- }, r = (i) => e.value.find((u) => u.id === i), s = S(
8852
- () => [...e.value].filter((i) => Te(i.isVisible) !== !1).sort((i, u) => (i.order || 0) - (u.order || 0))
8853
- );
8629
+ function ho(e, a) {
8630
+ const t = S(() => {
8631
+ const c = Te(e);
8632
+ return !a.value || !Array.isArray(c) ? null : c.find((d) => d.id === a.value) || null;
8633
+ }), l = S(() => a.value !== null);
8854
8634
  return {
8855
- registeredButtons: a,
8856
- register: t,
8857
- unregister: l,
8858
- getButton: r,
8859
- getButtons: s
8635
+ showItem: (c) => {
8636
+ a.value = c;
8637
+ },
8638
+ hideAllItems: () => {
8639
+ a.value = null;
8640
+ },
8641
+ toggleItem: (c) => {
8642
+ a.value === c ? a.value = null : a.value = c;
8643
+ },
8644
+ currentItem: t,
8645
+ isAnyItemVisible: l,
8646
+ closeItem: () => {
8647
+ a.value = null;
8648
+ }
8860
8649
  };
8861
8650
  }
8862
- const Kp = Ye("use-app-bar-mobile-buttons");
8863
- function Yp() {
8864
- const e = de(ya, null);
8865
- if (e)
8866
- return e;
8867
- const a = qp();
8868
- return Me(ya, a), kt() && mt(() => {
8869
- }), a;
8651
+ const yo = Symbol("VcAppBarState"), rp = {
8652
+ activeWidgetId: O(null),
8653
+ activeMobileActionId: O(null)
8654
+ };
8655
+ function up() {
8656
+ const e = {
8657
+ activeWidgetId: O(null),
8658
+ activeMobileActionId: O(null)
8659
+ };
8660
+ return Me(yo, e), e;
8870
8661
  }
8871
8662
  function wo() {
8872
- const e = de(ya);
8873
- if (!e)
8874
- throw Kp.error("AppBarMobileButtonsService not found"), new Ct("AppBarMobileButtonsService");
8875
- return e;
8663
+ return de(yo, rp);
8876
8664
  }
8877
- function jp() {
8878
- const { getButtons: e } = wo(), { activeMobileActionId: a } = ho(), {
8665
+ function Vl() {
8666
+ const { items: e } = Bl(), { activeWidgetId: a } = wo(), {
8879
8667
  showItem: t,
8880
8668
  hideAllItems: l,
8881
8669
  toggleItem: r,
8882
8670
  currentItem: s,
8883
- isAnyItemVisible: i,
8884
- closeItem: u
8885
- } = go(e, a);
8886
- return ne(
8887
- () => e.value,
8888
- (c) => {
8889
- if (a.value && !c.some((v) => v.id === a.value)) {
8890
- const v = s.value;
8891
- v?.onClose && v.onClose(), l();
8892
- }
8893
- },
8894
- { deep: !0 }
8895
- ), {
8896
- showAction: t,
8897
- hideAllActions: l,
8898
- toggleAction: r,
8899
- currentAction: s,
8900
- isAnyActionVisible: i,
8901
- closeAction: u
8671
+ isAnyItemVisible: i
8672
+ } = ho(e, a);
8673
+ return {
8674
+ showWidget: t,
8675
+ hideAllWidgets: l,
8676
+ toggleWidget: r,
8677
+ currentWidget: s,
8678
+ isAnyWidgetVisible: i
8902
8679
  };
8903
8680
  }
8904
- const Xp = {
8905
- key: 0,
8906
- class: "app-bar-mobile-actions"
8907
- }, Qp = {
8908
- key: 1,
8909
- class: "app-bar-mobile-actions__badge"
8910
- }, Jp = /* @__PURE__ */ U({
8911
- __name: "AppBarMobileActions",
8912
- props: {
8913
- isSidebarMode: { type: Boolean },
8914
- expanded: {}
8915
- },
8916
- setup(e) {
8917
- const a = e, { getButtons: t } = wo(), { currentAction: l, toggleAction: r, hideAllActions: s, isAnyActionVisible: i } = jp(), u = Dt(), c = (g) => {
8918
- if (l.value?.id === g.id) {
8919
- g.onClose?.(), s();
8920
- return;
8921
- }
8922
- l.value && l.value.onClose?.(), r(g.id), !g.component && g.onClick && g.onClick();
8923
- }, d = (g) => {
8924
- l.value?.onClose?.(), s();
8925
- };
8926
- function v(g) {
8927
- return g.badge === void 0 ? !1 : !!Te(g.badge);
8928
- }
8929
- return ne([() => u.fullPath, () => a.isSidebarMode], () => {
8930
- s();
8931
- }), (g, f) => g.$isMobile.value ? (o(), p("div", Xp, [
8932
- (o(!0), p(ee, null, me(n(t), (b) => (o(), p("div", {
8933
- key: b.id,
8934
- class: "app-bar-mobile-actions__button-wrap"
8935
- }, [
8936
- b.isVisible === void 0 || b.isVisible ? (o(), B(n(Oe), {
8937
- key: 0,
8938
- text: "",
8939
- class: q(["app-bar-mobile-actions__button", { "app-bar-mobile-actions__button--active": b.id === n(l)?.id }]),
8940
- icon: b.icon,
8941
- "icon-size": "l",
8942
- onClick: (h) => c(b)
8943
- }, null, 8, ["class", "icon", "onClick"])) : R("", !0),
8944
- v(b) ? (o(), p("span", Qp)) : R("", !0)
8945
- ]))), 128)),
8946
- x(n(Nt), {
8947
- "model-value": n(i) && !!n(l)?.component,
8948
- position: "bottom",
8949
- size: "sm",
8950
- draggable: "",
8951
- "drag-handle": "",
8952
- "close-button": !1,
8953
- inset: !1,
8954
- "onUpdate:modelValue": f[1] || (f[1] = (b) => !b && d())
8955
- }, {
8956
- default: A(() => [
8957
- n(l)?.component ? (o(), B(We(n(l)?.component), Se({ key: 0 }, n(l)?.props || {}, {
8958
- onClose: f[0] || (f[0] = (b) => d())
8959
- }), null, 16)) : R("", !0)
8960
- ]),
8961
- _: 1
8962
- }, 8, ["model-value"])
8963
- ])) : R("", !0);
8681
+ function dp(e) {
8682
+ const { hasAccess: a } = Zt(), t = O(""), l = S(() => (t.value ?? "").trim().toLowerCase()), r = S(() => l.value.length > 0), s = S(() => e.appsList.value.filter((d) => a(d.permission))), i = S(() => e.showApplications.value ? r.value ? s.value.filter((d) => [d.title, d.description, d.id, d.relativeUrl].filter(Boolean).join(" ").toLowerCase().includes(l.value)) : s.value : []), u = S(() => r.value ? e.widgets.value.filter((d) => [c(d), d.id, ...d.searchTerms ?? []].join(" ").toLowerCase().includes(l.value)) : e.widgets.value);
8683
+ function c(d) {
8684
+ return d.title || cp(d.id);
8964
8685
  }
8965
- }), Zp = { class: "menu-sidebar__widgets" }, eg = {
8966
- key: 0,
8967
- class: "menu-sidebar__close-button"
8968
- }, tg = {
8969
- key: 0,
8970
- class: "menu-sidebar__content-main"
8971
- }, lg = { class: "menu-sidebar__navmenu-container" }, ag = { class: "menu-sidebar__user" }, ng = {
8972
- key: 2,
8973
- class: "menu-sidebar__app-switcher-wrapper"
8974
- }, og = /* @__PURE__ */ U({
8975
- __name: "MenuSidebar",
8686
+ return {
8687
+ searchQuery: t,
8688
+ filteredApps: i,
8689
+ filteredWidgets: u,
8690
+ getWidgetTitle: c
8691
+ };
8692
+ }
8693
+ function cp(e) {
8694
+ return e ? e.replace(/[\-_]+/g, " ").replace(/\s+/g, " ").trim().replace(/\b\w/g, (a) => a.toUpperCase()) : "";
8695
+ }
8696
+ const Sn = /* @__PURE__ */ U({
8697
+ __name: "AppBarWidgetContent",
8976
8698
  props: {
8977
- isOpened: { type: Boolean },
8978
- expanded: {}
8699
+ mobile: { type: Boolean, default: !1 }
8979
8700
  },
8980
- emits: ["update:is-opened"],
8981
- setup(e, { emit: a }) {
8982
- const t = e, l = a, r = de(ll, !1), s = de(nt, O(!1)), i = de(tl, O(!1)), u = ct(), c = S(() => !r && (i.value || !!u.widgets)), d = S(() => s.value ? Nt : "div"), v = S(() => s.value ? {
8983
- modelValue: t.isOpened,
8984
- position: "left",
8985
- closeButton: !1,
8986
- "onUpdate:modelValue": (g) => {
8987
- g || l("update:is-opened", !1);
8988
- }
8989
- } : {});
8990
- return (g, f) => (o(), B(We(d.value), Qe(Je(v.value)), {
8991
- default: A(() => [
8992
- y("div", {
8993
- class: q(["menu-sidebar__wrapper", {
8994
- "menu-sidebar__wrapper--desktop": n(i),
8995
- "menu-sidebar__wrapper--expanded": n(i) && e.expanded
8996
- }])
8997
- }, [
8998
- c.value ? (o(), p("div", {
8999
- key: 0,
9000
- class: q(["menu-sidebar__header", {
9001
- "menu-sidebar__header--mobile": n(s)
9002
- }])
9003
- }, [
9004
- y("div", Zp, [
9005
- V(g.$slots, "widgets")
9006
- ]),
9007
- f[1] || (f[1] = y("div", { class: "menu-sidebar__spacer" }, null, -1)),
9008
- n(i) ? (o(), p("div", eg, [
9009
- x(n(Oe), {
9010
- "icon-class": "menu-sidebar__close-button-icon",
9011
- icon: "lucide-x",
9012
- text: "",
9013
- onClick: f[0] || (f[0] = le((b) => g.$emit("update:is-opened", !1), ["stop"]))
9014
- })
9015
- ])) : R("", !0)
9016
- ], 2)) : R("", !0),
9017
- y("div", {
9018
- class: q(["menu-sidebar__content", { "menu-sidebar__content--without-header": !c.value }])
9019
- }, [
9020
- g.$slots["widgets-active-content"] ? (o(), p("div", tg, [
9021
- V(g.$slots, "widgets-active-content")
9022
- ])) : R("", !0),
9023
- n(s) ? (o(), p(ee, { key: 1 }, [
9024
- y("div", lg, [
9025
- V(g.$slots, "navmenu")
9026
- ]),
9027
- y("div", ag, [
9028
- V(g.$slots, "user-dropdown")
9029
- ])
9030
- ], 64)) : (o(), p("div", ng, [
9031
- V(g.$slots, "app-switcher")
9032
- ]))
9033
- ], 2)
9034
- ], 2)
9035
- ]),
9036
- _: 3
9037
- }, 16));
8701
+ setup(e) {
8702
+ const { currentWidget: a, hideAllWidgets: t, isAnyWidgetVisible: l } = Vl(), r = S(() => ({
8703
+ ...a.value?.props ?? {},
8704
+ onClose: t
8705
+ }));
8706
+ return (s, i) => n(l) && n(a)?.component ? (o(), p("div", {
8707
+ key: 0,
8708
+ class: q(["app-bar-widget-content", { "app-bar-widget-content--mobile": e.mobile }])
8709
+ }, [
8710
+ (o(), B(We(n(a)?.component), Se(r.value, { onClose: n(t) }), null, 16, ["onClose"]))
8711
+ ], 2)) : R("", !0);
9038
8712
  }
9039
- }), ig = {
8713
+ }), vp = { class: "app-hub-content__search" }, fp = {
9040
8714
  key: 0,
9041
- class: "mobile-layout"
9042
- }, sg = {
9043
- class: "mobile-layout__tabs",
9044
- role: "tablist"
9045
- }, rg = ["aria-selected"], ug = { class: "mobile-layout__tab-label" }, dg = ["aria-selected"], cg = { class: "mobile-layout__tab-label" }, vg = {
8715
+ class: "app-hub-content__section app-hub-content__section--apps"
8716
+ }, mp = { class: "app-hub-content__section-header" }, pp = { class: "app-hub-content__section-title" }, gp = {
9046
8717
  key: 0,
9047
- class: "mobile-layout__tab-badge"
9048
- }, fg = {
9049
- id: "mobile-layout-panel-menu",
9050
- role: "tabpanel",
9051
- class: "mobile-layout__panel mobile-layout__panel--menu"
9052
- }, mg = {
8718
+ class: "app-hub-content__apps-list app-hub-content__apps-list--tiles"
8719
+ }, bp = ["data-test-id", "onClick"], hp = ["src", "alt"], yp = { class: "app-hub-content__item-content app-hub-content__item-content--center" }, wp = { class: "app-hub-content__item-title app-hub-content__item-title--app app-hub-content__item-title--center" }, kp = {
8720
+ key: 1,
8721
+ class: "app-hub-content__empty"
8722
+ }, Sp = { class: "app-hub-content__section app-hub-content__section--widgets" }, Cp = { class: "app-hub-content__widgets-inner" }, $p = { class: "app-hub-content__section-header app-hub-content__section-header--back" }, _p = { class: "app-hub-content__back-title" }, Ep = { class: "app-hub-content__section-header" }, Ap = { class: "app-hub-content__section-title" }, Rp = {
9053
8723
  key: 0,
9054
- class: "mobile-layout__search"
9055
- }, pg = {
9056
- id: "mobile-layout-panel-hub",
9057
- role: "tabpanel",
9058
- class: "mobile-layout__panel mobile-layout__panel--hub"
9059
- }, gg = {
8724
+ class: "app-hub-content__list"
8725
+ }, Ip = ["data-widget-id", "onClick"], Tp = { class: "app-hub-content__widget-icon-wrap" }, xp = {
8726
+ key: 0,
8727
+ class: "app-hub-content__widget-badge"
8728
+ }, Mp = { class: "app-hub-content__item-content" }, Op = { class: "app-hub-content__item-title" }, Lp = {
9060
8729
  key: 1,
9061
- class: "mobile-layout__panel mobile-layout__panel--single mobile-layout__panel--hub"
9062
- }, bg = {
9063
- key: 2,
9064
- class: "mobile-layout__panel mobile-layout__panel--single mobile-layout__panel--menu"
9065
- }, hg = {
8730
+ class: "app-hub-content__empty"
8731
+ }, Bp = {
9066
8732
  key: 0,
9067
- class: "mobile-layout__search"
9068
- }, st = 0, Ht = 1, _n = 8, yg = 0.3, wg = 0.3, kg = 1, Sg = 0.2, En = "transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94)", Cg = /* @__PURE__ */ U({
9069
- __name: "MobileLayout",
8733
+ class: "app-hub-content__flyout app-hub-content__flyout--mobile"
8734
+ }, Vp = { class: "app-hub-content__flyout-header" }, Dp = { class: "app-hub-content__flyout-title" }, Np = { class: "app-hub-content__flyout-body" }, Cn = 120, bl = 120, Pp = 80, Fp = 120, $a = /* @__PURE__ */ U({
8735
+ __name: "AppHubContent",
9070
8736
  props: {
9071
- logo: {},
9072
- title: {},
9073
- avatar: {},
9074
- userName: {},
9075
- userRole: {},
9076
- disableMenu: { type: Boolean, default: !1 },
9077
- disableAppSwitcher: { type: Boolean, default: !1 },
9078
- appsList: { default: () => [] },
9079
- showSearch: { type: Boolean, default: !1 },
9080
- searchPlaceholder: {}
8737
+ appsList: {},
8738
+ showApplications: { type: Boolean, default: !0 },
8739
+ mobile: { type: Boolean, default: !1 }
9081
8740
  },
9082
- emits: ["item:click", "switch-app"],
8741
+ emits: ["switch-app"],
9083
8742
  setup(e, { emit: a }) {
9084
- const t = e, l = a, r = O(""), s = Fa(), i = de(ll, !1), { blades: u, activeBlade: c } = Aa(), { items: d } = Bl(), v = S(
9085
- () => d.value.some((X) => X.badge === void 0 ? !1 : typeof X.badge == "function" ? X.badge() : !!X.badge)
9086
- ), g = S(
9087
- () => d.value.length > 0 || !t.disableAppSwitcher && t.appsList.length > 0
9088
- ), f = S(() => g.value && !t.disableMenu), b = O(st), h = O(!1), m = O(0), w = O(null), k = O("idle");
9089
- let $ = 0, E = 0, _ = 0, M = 0;
9090
- const C = S(() => {
9091
- const X = b.value * -50, Y = w.value?.clientWidth ?? 0;
9092
- if (h.value && Y > 0) {
9093
- const ue = m.value / Y * 50;
9094
- return {
9095
- transform: `translateX(${X + ue}%)`,
9096
- transition: "none"
9097
- };
8743
+ const t = e, l = a, r = ct(), s = S(() => typeof r.applications == "function"), i = O(null), u = O(null), { items: c } = Bl(), { currentWidget: d, hideAllWidgets: v, isAnyWidgetVisible: g, toggleWidget: f } = Vl(), { searchQuery: b, filteredApps: h, filteredWidgets: m, getWidgetTitle: w } = dp({
8744
+ appsList: Ie(t, "appsList"),
8745
+ widgets: c,
8746
+ showApplications: Ie(t, "showApplications"),
8747
+ mobile: Ie(t, "mobile")
8748
+ }), k = O(bl), $ = O(bl), E = S(() => !s.value && h.value.length > Cn), _ = S(() => m.value.length > Cn), M = S(() => E.value ? h.value.slice(0, k.value) : h.value), C = S(() => _.value ? m.value.slice(0, $.value) : m.value);
8749
+ ne(
8750
+ () => c.value.map((Y) => Y.id),
8751
+ () => {
8752
+ g.value && !d.value && v();
9098
8753
  }
9099
- return {
9100
- transform: `translateX(${X}%)`,
9101
- transition: En
9102
- };
9103
- }), L = S(() => {
9104
- const X = w.value?.clientWidth ?? 0, Y = h.value && X > 0 ? -m.value / X : 0;
9105
- return {
9106
- transform: `translateX(${Math.max(0, Math.min(1, b.value + Y)) * 100}%)`,
9107
- transition: h.value ? "none" : En
9108
- };
8754
+ ), ne(
8755
+ [() => h.value.length, E],
8756
+ ([Y, ue]) => {
8757
+ k.value = ue ? Math.min(Y, bl) : Y, Ee(() => te(i.value));
8758
+ },
8759
+ { immediate: !0 }
8760
+ ), ne(
8761
+ [() => m.value.length, _],
8762
+ ([Y, ue]) => {
8763
+ $.value = ue ? Math.min(Y, bl) : Y, Ee(() => te(u.value));
8764
+ },
8765
+ { immediate: !0 }
8766
+ ), ne(
8767
+ () => z(i.value),
8768
+ (Y, ue) => {
8769
+ ue?.removeEventListener("scroll", P), Y?.addEventListener("scroll", P, { passive: !0 });
8770
+ },
8771
+ { immediate: !0 }
8772
+ ), ne(
8773
+ () => z(u.value),
8774
+ (Y, ue) => {
8775
+ ue?.removeEventListener("scroll", W), Y?.addEventListener("scroll", W, { passive: !0 });
8776
+ },
8777
+ { immediate: !0 }
8778
+ ), Ue(() => {
8779
+ z(i.value)?.removeEventListener("scroll", P), z(u.value)?.removeEventListener("scroll", W);
9109
8780
  });
9110
- function T(X) {
9111
- b.value = Math.max(st, Math.min(Ht, X)), I();
8781
+ function L(Y) {
8782
+ return !Y || Y.startsWith("/") || Y.startsWith("http://") || Y.startsWith("https://") || Y.startsWith("data:") ? Y : `/${Y}`;
9112
8783
  }
9113
- function I() {
9114
- m.value = 0, h.value = !1, k.value = "idle";
8784
+ function T(Y) {
8785
+ if (typeof window > "u")
8786
+ return !1;
8787
+ const ue = I(window.location.pathname), Q = I(Y.relativeUrl ?? "");
8788
+ return Q ? Q === "/" ? ue === "/" : ue.startsWith(Q) : !1;
9115
8789
  }
9116
- function G(X, Y) {
9117
- const ue = Math.abs(X);
9118
- if (!ue || !Y)
9119
- return 0;
9120
- const Q = ue * Y / (ue + Y);
9121
- return Math.sign(X) * Q;
8790
+ function I(Y) {
8791
+ return Y ? Y.replace(/\/+$/, "") || "/" : "";
9122
8792
  }
9123
- function N(X) {
9124
- const Y = w.value?.clientWidth ?? 0;
9125
- if (!Y)
9126
- return X;
9127
- const ue = b.value === st && X > 0, Q = b.value === Ht && X < 0;
9128
- if (ue || Q)
9129
- return G(X, Y * Sg);
9130
- const j = Y * kg;
9131
- return Math.max(-j, Math.min(j, X));
8793
+ function G(Y) {
8794
+ v(), l("switch-app", Y);
9132
8795
  }
9133
- function P(X) {
9134
- if (!f.value || X.touches.length === 0)
9135
- return;
9136
- const Y = X.touches[0];
9137
- $ = Y.clientX, E = Y.clientY, _ = Y.clientX, M = Date.now(), m.value = 0, h.value = !1, k.value = "pending";
8796
+ function N(Y) {
8797
+ return `app-hub-app-${(Y.id || Y.title || "unknown").toString().trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "") || "unknown"}`;
9138
8798
  }
9139
- function W(X) {
9140
- if (!f.value || X.touches.length === 0 || k.value === "idle")
9141
- return;
9142
- const Y = X.touches[0], ue = Y.clientX - $, Q = Y.clientY - E, j = Math.abs(ue), ke = Math.abs(Q);
9143
- if (k.value === "pending") {
9144
- if (j < _n && ke < _n)
9145
- return;
9146
- if (ke > j) {
9147
- k.value = "vertical";
9148
- return;
9149
- }
9150
- k.value = "horizontal", h.value = !0;
9151
- }
9152
- k.value === "horizontal" && (X.cancelable && X.preventDefault(), _ = Y.clientX, m.value = N(ue));
8799
+ function P() {
8800
+ E.value && K({
8801
+ container: i.value,
8802
+ totalItems: h.value.length,
8803
+ renderLimit: k
8804
+ });
9153
8805
  }
9154
- function F(X) {
9155
- if (!f.value) {
9156
- I();
9157
- return;
9158
- }
9159
- const Y = X.changedTouches[0];
9160
- if (k.value !== "horizontal") {
9161
- I();
8806
+ function W() {
8807
+ _.value && K({
8808
+ container: u.value,
8809
+ totalItems: m.value.length,
8810
+ renderLimit: $
8811
+ });
8812
+ }
8813
+ function F(Y) {
8814
+ Y.component && f(Y.id), Y.onClick?.();
8815
+ }
8816
+ function K(Y) {
8817
+ const ue = z(Y.container);
8818
+ !ue || Y.renderLimit.value >= Y.totalItems || ue.scrollHeight - ue.scrollTop - ue.clientHeight > Fp || (Y.renderLimit.value = Math.min(Y.renderLimit.value + Pp, Y.totalItems), Ee(() => te(Y.container)));
8819
+ }
8820
+ function z(Y) {
8821
+ return Y ? Y.viewportRef?.value ?? null : null;
8822
+ }
8823
+ function te(Y) {
8824
+ if (!Y)
9162
8825
  return;
9163
- }
9164
- const Q = (Y?.clientX ?? _) - $, j = Math.max(Date.now() - M, 1), ke = Math.abs(Q) / j, Z = (w.value?.clientWidth ?? 0) * yg;
9165
- if (ke > wg || Math.abs(Q) > Z) {
9166
- if (Q < 0) {
9167
- T(b.value + 1);
9168
- return;
9169
- }
9170
- if (Q > 0) {
9171
- T(b.value - 1);
9172
- return;
9173
- }
9174
- }
9175
- I();
8826
+ Y.updateScrollState?.();
9176
8827
  }
9177
- ne(
9178
- () => s.isMenuOpen.value,
9179
- (X) => {
9180
- X || (T(st), r.value = "");
9181
- }
9182
- ), ne(g, (X) => {
9183
- X || T(st);
9184
- }), ne(f, (X) => {
9185
- X || T(st);
9186
- });
9187
- const K = S(() => u.value.length <= 1), z = S(() => {
9188
- const X = c.value?.title, Y = u.value[u.value.length - 1]?.title;
9189
- return X ?? Y ?? "";
9190
- });
9191
- ne(K, (X) => {
9192
- !X && s.isMenuOpen.value && s.closeMenu();
9193
- });
9194
- const te = (X) => {
9195
- r.value = "", s.closeMenu(), l("item:click", X);
9196
- }, ve = (X) => {
9197
- s.closeMenu(), l("switch-app", X);
9198
- };
9199
- return (X, Y) => (o(), p(ee, null, [
9200
- K.value ? (o(), p("div", ig, [
9201
- V(X.$slots, "sidebar-header", {
9202
- logo: e.logo,
9203
- expanded: !1,
9204
- isMobile: !0
9205
- }, () => [
9206
- x(ao, {
9207
- logo: e.logo,
9208
- expanded: !1,
9209
- "is-mobile": !0,
9210
- "mobile-title": z.value,
9211
- "show-mobile-title": n(u).length === 1,
9212
- class: "mobile-layout__header",
9213
- "onLogo:click": n(s).openMenu
8828
+ function ve(Y) {
8829
+ return d.value?.id === Y;
8830
+ }
8831
+ function X(Y) {
8832
+ return Y.badge === void 0 ? !1 : typeof Y.badge == "function" ? Y.badge() : !!Y.badge;
8833
+ }
8834
+ return (Y, ue) => (o(), p("div", {
8835
+ class: q(["app-hub-content", { "app-hub-content--mobile": e.mobile }])
8836
+ }, [
8837
+ y("div", vp, [
8838
+ x(n(Be), {
8839
+ modelValue: n(b),
8840
+ "onUpdate:modelValue": ue[0] || (ue[0] = (Q) => dt(b) ? b.value = Q : null),
8841
+ clearable: "",
8842
+ size: "small",
8843
+ placeholder: Y.$t("COMPONENTS.ORGANISMS.VC_APP.INTERNAL.APP_HUB.SEARCH_PLACEHOLDER")
8844
+ }, {
8845
+ "prepend-inner": A(() => [
8846
+ x(n(J), {
8847
+ icon: "lucide-search",
8848
+ size: "s"
8849
+ })
8850
+ ]),
8851
+ _: 1
8852
+ }, 8, ["modelValue", "placeholder"])
8853
+ ]),
8854
+ y("div", {
8855
+ class: q(["app-hub-content__sections", { "app-hub-content__sections--single": !e.showApplications, "app-hub-content__sections--mobile": e.mobile }])
8856
+ }, [
8857
+ e.showApplications ? (o(), p("section", fp, [
8858
+ y("header", mp, [
8859
+ y("span", pp, D(Y.$t("COMPONENTS.ORGANISMS.VC_APP.INTERNAL.APP_HUB.APPLICATIONS")), 1)
8860
+ ]),
8861
+ x(n(ft), {
8862
+ ref_key: "appsScrollContainerRef",
8863
+ ref: i,
8864
+ class: "app-hub-content__scroll"
9214
8865
  }, {
9215
- actions: A(() => [
9216
- x(Jp, {
9217
- "is-sidebar-mode": n(s).isMenuOpen.value,
9218
- expanded: !1
9219
- }, null, 8, ["is-sidebar-mode"])
8866
+ default: A(() => [
8867
+ V(Y.$slots, "applications", {
8868
+ appsList: n(h),
8869
+ switchApp: G
8870
+ }, () => [
8871
+ n(h).length ? (o(), p("div", gp, [
8872
+ (o(!0), p(ee, null, me(M.value, (Q) => (o(), p("button", {
8873
+ key: Q.id || Q.title,
8874
+ type: "button",
8875
+ "data-test-id": N(Q),
8876
+ class: q(["app-hub-content__item app-hub-content__item--app app-hub-content__item--app-tile", { "app-hub-content__item--active": T(Q) }]),
8877
+ onClick: (j) => G(Q)
8878
+ }, [
8879
+ Q.iconUrl ? (o(), p("img", {
8880
+ key: 0,
8881
+ src: L(Q.iconUrl),
8882
+ alt: Q.title || Q.id || "app icon",
8883
+ class: "app-hub-content__item-icon app-hub-content__item-icon--tile"
8884
+ }, null, 8, hp)) : (o(), B(n(J), {
8885
+ key: 1,
8886
+ icon: "lucide-grid-2x2",
8887
+ size: "m",
8888
+ class: "app-hub-content__item-icon app-hub-content__item-icon--fallback app-hub-content__item-icon--tile"
8889
+ })),
8890
+ y("div", yp, [
8891
+ y("div", wp, D(Q.title || Q.id), 1)
8892
+ ])
8893
+ ], 10, bp))), 128))
8894
+ ])) : (o(), p("div", kp, D(Y.$t("COMPONENTS.ORGANISMS.VC_APP.INTERNAL.APP_HUB.NO_APPLICATIONS")), 1))
8895
+ ])
9220
8896
  ]),
9221
- _: 1
9222
- }, 8, ["logo", "mobile-title", "show-mobile-title", "onLogo:click"])
9223
- ])
9224
- ])) : R("", !0),
9225
- x(og, {
9226
- "is-opened": n(s).isMenuOpen.value,
9227
- expanded: !0,
9228
- "onUpdate:isOpened": Y[4] || (Y[4] = (ue) => !ue && n(s).closeMenu())
9229
- }, {
9230
- navmenu: A(() => [
9231
- y("div", {
9232
- class: q(["mobile-layout__navmenu", { "mobile-layout__navmenu--tabs": f.value }])
9233
- }, [
9234
- f.value ? (o(), p(ee, { key: 0 }, [
9235
- y("div", sg, [
9236
- y("button", {
9237
- type: "button",
9238
- class: q(["mobile-layout__tab", { "mobile-layout__tab--active": b.value === st }]),
9239
- role: "tab",
9240
- "aria-selected": b.value === st,
9241
- "aria-controls": "mobile-layout-panel-menu",
9242
- onClick: Y[0] || (Y[0] = (ue) => T(st))
9243
- }, [
9244
- y("span", ug, D(X.$t("COMPONENTS.ORGANISMS.VC_APP.INTERNAL.MOBILE_LAYOUT.TAB_MENU")), 1)
9245
- ], 10, rg),
8897
+ _: 3
8898
+ }, 512)
8899
+ ])) : R("", !0),
8900
+ y("section", Sp, [
8901
+ y("div", Cp, [
8902
+ !e.mobile && n(g) && n(d)?.component ? (o(), p(ee, { key: 0 }, [
8903
+ y("header", $p, [
9246
8904
  y("button", {
9247
- type: "button",
9248
- class: q(["mobile-layout__tab", { "mobile-layout__tab--active": b.value === Ht }]),
9249
- role: "tab",
9250
- "aria-selected": b.value === Ht,
9251
- "aria-controls": "mobile-layout-panel-hub",
9252
- onClick: Y[1] || (Y[1] = (ue) => T(Ht))
8905
+ class: "app-hub-content__back-button",
8906
+ onClick: ue[1] || (ue[1] = //@ts-ignore
8907
+ (...Q) => n(v) && n(v)(...Q))
9253
8908
  }, [
9254
- y("span", cg, [
9255
- ie(D(X.$t("COMPONENTS.ORGANISMS.VC_APP.INTERNAL.MOBILE_LAYOUT.TAB_HUB")) + " ", 1),
9256
- v.value ? (o(), p("span", vg)) : R("", !0)
9257
- ])
9258
- ], 10, dg),
9259
- y("span", {
9260
- class: "mobile-layout__tab-indicator",
9261
- style: he(L.value)
9262
- }, null, 4)
8909
+ x(n(J), {
8910
+ icon: "lucide-arrow-left",
8911
+ size: "xs"
8912
+ }),
8913
+ y("span", _p, D(n(w)(n(d))), 1)
8914
+ ])
9263
8915
  ]),
9264
- y("div", {
9265
- ref_key: "sliderViewportRef",
9266
- ref: w,
9267
- class: "mobile-layout__slider-viewport",
9268
- onTouchstartPassive: P,
9269
- onTouchmove: W,
9270
- onTouchendPassive: F,
9271
- onTouchcancelPassive: F
9272
- }, [
9273
- y("div", {
9274
- class: "mobile-layout__slider",
9275
- style: he(C.value)
9276
- }, [
9277
- y("div", fg, [
9278
- e.showSearch ? (o(), p("div", mg, [
9279
- x(n(Be), {
9280
- modelValue: r.value,
9281
- "onUpdate:modelValue": Y[2] || (Y[2] = (ue) => r.value = ue),
9282
- placeholder: t.searchPlaceholder || X.$t("SHELL.SIDEBAR.SEARCH_PLACEHOLDER", "Search keyword"),
9283
- size: "small",
9284
- clearable: "",
9285
- debounce: 300
9286
- }, null, 8, ["modelValue", "placeholder"])
9287
- ])) : R("", !0),
9288
- x(n(ft), { class: "mobile-layout__menu-scroll" }, {
9289
- default: A(() => [
9290
- V(X.$slots, "menu", {
9291
- expanded: !0,
9292
- onItemClick: te,
9293
- searchQuery: r.value
9294
- }, () => [
9295
- x(Ca, {
9296
- expanded: !0,
9297
- "search-query": r.value,
9298
- "onItem:click": te
9299
- }, null, 8, ["search-query"])
9300
- ])
9301
- ]),
9302
- _: 3
9303
- })
9304
- ]),
9305
- y("div", pg, [
9306
- x($a, {
9307
- "apps-list": t.appsList,
9308
- "show-applications": !t.disableAppSwitcher,
9309
- mobile: "",
9310
- onSwitchApp: ve
9311
- }, we({ _: 2 }, [
9312
- X.$slots["app-switcher"] && !t.disableAppSwitcher ? {
9313
- name: "applications",
9314
- fn: A(({ appsList: ue, switchApp: Q }) => [
9315
- V(X.$slots, "app-switcher", {
9316
- appsList: ue,
9317
- switchApp: Q
9318
- })
9319
- ]),
9320
- key: "0"
9321
- } : void 0
9322
- ]), 1032, ["apps-list", "show-applications"])
9323
- ])
9324
- ], 4)
9325
- ], 544)
9326
- ], 64)) : t.disableMenu ? (o(), p("div", gg, [
9327
- x($a, {
9328
- "apps-list": t.appsList,
9329
- "show-applications": !t.disableAppSwitcher,
9330
- mobile: "",
9331
- onSwitchApp: ve
9332
- }, we({ _: 2 }, [
9333
- X.$slots["app-switcher"] && !t.disableAppSwitcher ? {
9334
- name: "applications",
9335
- fn: A(({ appsList: ue, switchApp: Q }) => [
9336
- V(X.$slots, "app-switcher", {
9337
- appsList: ue,
9338
- switchApp: Q
9339
- })
9340
- ]),
9341
- key: "0"
9342
- } : void 0
9343
- ]), 1032, ["apps-list", "show-applications"])
9344
- ])) : (o(), p("div", bg, [
9345
- e.showSearch ? (o(), p("div", hg, [
9346
- x(n(Be), {
9347
- modelValue: r.value,
9348
- "onUpdate:modelValue": Y[3] || (Y[3] = (ue) => r.value = ue),
9349
- placeholder: t.searchPlaceholder || X.$t("SHELL.SIDEBAR.SEARCH_PLACEHOLDER", "Search keyword"),
9350
- size: "small",
9351
- clearable: "",
9352
- debounce: 300
9353
- }, null, 8, ["modelValue", "placeholder"])
9354
- ])) : R("", !0),
9355
- x(n(ft), { class: "mobile-layout__menu-scroll" }, {
8916
+ x(n(ft), { class: "app-hub-content__widget-inline-body" }, {
9356
8917
  default: A(() => [
9357
- V(X.$slots, "menu", {
9358
- expanded: !0,
9359
- onItemClick: te,
9360
- searchQuery: r.value
9361
- }, () => [
9362
- x(Ca, {
9363
- expanded: !0,
9364
- "search-query": r.value,
9365
- "onItem:click": te
9366
- }, null, 8, ["search-query"])
9367
- ])
8918
+ x(Sn)
9368
8919
  ]),
9369
- _: 3
9370
- })
9371
- ]))
9372
- ], 2)
9373
- ]),
9374
- "user-dropdown": A(() => [
9375
- V(X.$slots, e.userName, {
9376
- avatar: e.avatar,
9377
- role: e.userRole
9378
- }, () => [
9379
- n(i) ? R("", !0) : (o(), B(n(po), {
9380
- key: 0,
9381
- "avatar-url": e.avatar,
9382
- name: e.userName,
9383
- role: e.userRole
9384
- }, null, 8, ["avatar-url", "name", "role"]))
9385
- ])
9386
- ]),
9387
- _: 3
9388
- }, 8, ["is-opened"])
9389
- ], 64));
9390
- }
9391
- }), Wa = Symbol("PopupPlugin");
9392
- let ko;
9393
- const rC = {
9394
- install(e) {
9395
- const t = {
9396
- popups: kl([])
9397
- };
9398
- e.config.globalProperties.$popupPlugin = t, e.provide(Wa, t), ko = t;
9399
- }
9400
- };
9401
- function $g() {
9402
- if (pt())
9403
- return de(Wa, void 0);
9404
- }
9405
- const _g = ["innerHTML"], Eg = /* @__PURE__ */ U({
9406
- __name: "vc-popup-container",
9407
- setup(e) {
9408
- const a = $g();
9409
- function t(l) {
9410
- return xl.sanitize(l, {
9411
- ALLOWED_TAGS: [
9412
- "p",
9413
- "br",
9414
- "strong",
9415
- "em",
9416
- "u",
9417
- "s",
9418
- "h1",
9419
- "h2",
9420
- "h3",
9421
- "h4",
9422
- "h5",
9423
- "h6",
9424
- "ul",
9425
- "ol",
9426
- "li",
9427
- "blockquote",
9428
- "pre",
9429
- "code",
9430
- "a",
9431
- "img",
9432
- "table",
9433
- "thead",
9434
- "tbody",
9435
- "tr",
9436
- "th",
9437
- "td",
9438
- "hr",
9439
- "div",
9440
- "span"
9441
- ],
9442
- ALLOWED_ATTR: ["href", "src", "alt", "title", "class", "id", "colspan", "rowspan", "align", "valign"],
9443
- FORBID_TAGS: ["script", "object", "embed", "form", "input"],
9444
- FORBID_ATTR: ["onerror", "onload", "onclick", "onmouseover", "onfocus", "onblur", "style"]
9445
- });
9446
- }
9447
- return (l, r) => (o(!0), p(ee, null, me(n(a)?.popups, (s, i) => (o(), B(We(s.component), Se({
9448
- key: s.id ?? i
9449
- }, { ref_for: !0 }, { ...s.props, ...s.emits }, {
9450
- onClose: () => s.close?.()
9451
- }), we({ _: 2 }, [
9452
- me(s.slots, (u, c) => ({
9453
- name: c,
9454
- fn: A(() => [
9455
- typeof u == "string" ? (o(), p("div", {
9456
- key: 0,
9457
- class: "tw-h-full tw-w-full",
9458
- innerHTML: t(u)
9459
- }, null, 8, _g)) : (o(), B(We(u), { key: 1 }))
8920
+ _: 1
8921
+ })
8922
+ ], 64)) : (o(), p(ee, { key: 1 }, [
8923
+ y("header", Ep, [
8924
+ y("span", Ap, D(Y.$t("COMPONENTS.ORGANISMS.VC_APP.INTERNAL.APP_HUB.WIDGETS")), 1)
8925
+ ]),
8926
+ x(n(ft), {
8927
+ ref_key: "widgetsScrollContainerRef",
8928
+ ref: u,
8929
+ class: "app-hub-content__scroll"
8930
+ }, {
8931
+ default: A(() => [
8932
+ n(m).length ? (o(), p("div", Rp, [
8933
+ (o(!0), p(ee, null, me(C.value, (Q) => (o(), p("button", {
8934
+ key: Q.id,
8935
+ type: "button",
8936
+ "data-widget-id": Q.id,
8937
+ class: q(["app-hub-content__item app-hub-content__item--widget", { "app-hub-content__item--active": ve(Q.id) }]),
8938
+ onClick: (j) => F(Q)
8939
+ }, [
8940
+ y("div", Tp, [
8941
+ x(n(J), {
8942
+ icon: Q.icon || "lucide-layout-grid",
8943
+ size: "s",
8944
+ class: "app-hub-content__item-icon app-hub-content__item-icon--fallback"
8945
+ }, null, 8, ["icon"]),
8946
+ X(Q) ? (o(), p("span", xp)) : R("", !0)
8947
+ ]),
8948
+ y("div", Mp, [
8949
+ y("div", Op, D(n(w)(Q)), 1)
8950
+ ])
8951
+ ], 10, Ip))), 128))
8952
+ ])) : (o(), p("div", Lp, D(Y.$t("COMPONENTS.ORGANISMS.VC_APP.INTERNAL.APP_HUB.NO_WIDGETS")), 1))
8953
+ ]),
8954
+ _: 1
8955
+ }, 512)
8956
+ ], 64))
8957
+ ])
9460
8958
  ])
9461
- }))
9462
- ]), 1040, ["onClose"]))), 128));
8959
+ ], 2),
8960
+ x(_e, { name: "app-hub-content-flyout" }, {
8961
+ default: A(() => [
8962
+ e.mobile && n(g) && n(d)?.component ? (o(), p("div", Bp, [
8963
+ y("div", Vp, [
8964
+ y("span", Dp, D(n(w)(n(d))), 1),
8965
+ x(n(Oe), {
8966
+ icon: "lucide-x",
8967
+ text: "",
8968
+ onClick: n(v)
8969
+ }, null, 8, ["onClick"])
8970
+ ]),
8971
+ y("div", Np, [
8972
+ x(Sn, { mobile: "" })
8973
+ ])
8974
+ ])) : R("", !0)
8975
+ ]),
8976
+ _: 1
8977
+ })
8978
+ ], 2));
9463
8979
  }
9464
- }), Ag = Eg, Rg = { class: "vc-popup__center" }, Ig = ["aria-label"], Tg = { class: "vc-popup__content" }, xg = {
9465
- key: 0,
9466
- class: "vc-popup__footer"
9467
- }, qa = /* @__PURE__ */ U({
9468
- __name: "vc-popup",
8980
+ }), zp = /* @__PURE__ */ U({
8981
+ __name: "AppHubPopover",
9469
8982
  props: {
9470
- modelValue: { type: Boolean, default: void 0 },
9471
- title: {},
9472
- closable: { type: Boolean, default: !0 },
9473
- variant: { default: "default" },
9474
- isMobileFullscreen: { type: Boolean },
9475
- isFullscreen: { type: Boolean },
9476
- modalWidth: { default: "tw-max-w-md" },
9477
- closeOnOverlay: { type: Boolean, default: void 0 },
9478
- closeOnEscape: { type: Boolean, default: void 0 }
8983
+ show: { type: Boolean },
8984
+ anchorRef: { default: null },
8985
+ appsList: {},
8986
+ showApplications: { type: Boolean, default: !0 }
9479
8987
  },
9480
- emits: ["close", "update:modelValue"],
8988
+ emits: ["update:show", "switch-app"],
9481
8989
  setup(e, { emit: a }) {
9482
- const t = e, l = a, s = `vc-popup-title-${pt()?.uid ?? 0}`, i = de(nt, O(!1)), u = O(null), c = {
9483
- warning: { icon: "lucide-triangle-alert", className: "vc-popup__icon--warning" },
9484
- error: { icon: "lucide-circle-alert", className: "vc-popup__icon--error" },
9485
- success: { icon: "lucide-circle-check", className: "vc-popup__icon--success" },
9486
- info: { icon: "lucide-info", className: "vc-popup__icon--info" }
9487
- }, d = S(() => t.modelValue ?? !0), v = S(() => t.closeOnOverlay ?? t.closable), g = S(() => t.closeOnEscape ?? t.closable), f = S(() => t.variant === "default" ? "" : c[t.variant].icon), b = S(() => t.variant === "default" ? "" : c[t.variant].className), h = S(() => i.value && t.isMobileFullscreen);
9488
- function m(E) {
9489
- l("update:modelValue", !1), l("close", E);
9490
- }
9491
- function w() {
9492
- t.closable && m("action");
9493
- }
9494
- function k() {
9495
- u.value = "escape";
9496
- }
9497
- function $() {
9498
- const E = u.value ?? "overlay";
9499
- u.value = null, !(E === "overlay" && !v.value) && (E === "escape" && !g.value || m(E));
8990
+ const t = e, l = a, { hideAllWidgets: r } = Vl(), s = S({
8991
+ get: () => t.show,
8992
+ set: (u) => {
8993
+ l("update:show", u);
8994
+ }
8995
+ });
8996
+ ne(
8997
+ () => t.show,
8998
+ (u) => {
8999
+ u || r();
9000
+ }
9001
+ );
9002
+ function i(u) {
9003
+ l("switch-app", u), l("update:show", !1);
9500
9004
  }
9501
- return (E, _) => {
9502
- const M = Ne("VcIcon"), C = Ne("VcButton");
9503
- return o(), B(n(ir), {
9504
- appear: "",
9505
- show: d.value,
9506
- as: "template"
9507
- }, {
9508
- default: A(() => [
9509
- x(n(sr), {
9510
- as: "div",
9511
- class: "vc-popup",
9512
- "aria-labelledby": s,
9513
- onClose: $,
9514
- onKeydown: ge(k, ["esc"])
9515
- }, {
9516
- default: A(() => [
9517
- x(n(fn), {
9518
- as: "template",
9519
- enter: "vc-popup__transition-enter",
9520
- "enter-from": "vc-popup__transition-enter-from",
9521
- "enter-to": "vc-popup__transition-enter-to",
9522
- leave: "vc-popup__transition-leave",
9523
- "leave-from": "vc-popup__transition-leave-from",
9524
- "leave-to": "vc-popup__transition-leave-to"
9525
- }, {
9526
- default: A(() => [..._[0] || (_[0] = [
9527
- y("div", { class: "vc-popup__overlay" }, null, -1)
9528
- ])]),
9529
- _: 1
9530
- }),
9531
- y("div", {
9532
- class: q(["vc-popup__container", {
9533
- "vc-popup__container--desktop": !h.value,
9534
- "vc-popup__container--mobile": h.value,
9535
- "vc-popup__container--fullscreen": e.isFullscreen
9536
- }])
9537
- }, [
9538
- y("div", Rg, [
9539
- x(n(fn), {
9540
- as: "template",
9541
- enter: "vc-popup__dialog-enter",
9542
- "enter-from": "vc-popup__dialog-enter-from",
9543
- "enter-to": "vc-popup__dialog-enter-to",
9544
- leave: "vc-popup__dialog-leave",
9545
- "leave-from": "vc-popup__dialog-leave-from",
9546
- "leave-to": "vc-popup__dialog-leave-to"
9547
- }, {
9548
- default: A(() => [
9549
- x(n(rr), {
9550
- class: q(["vc-popup__panel", [
9551
- {
9552
- "vc-popup__panel--desktop": !h.value,
9553
- "vc-popup__panel--mobile": h.value,
9554
- "vc-popup__panel--fullscreen": e.isFullscreen
9555
- },
9556
- e.modalWidth
9557
- ]])
9558
- }, {
9559
- default: A(() => [
9560
- x(n(ur), {
9561
- id: s,
9562
- as: "h3",
9563
- class: "vc-popup__title"
9564
- }, {
9565
- default: A(() => [
9566
- V(E.$slots, "header", {}, () => [
9567
- ie(D(e.title), 1)
9568
- ]),
9569
- e.closable ? (o(), p("button", {
9570
- key: 0,
9571
- type: "button",
9572
- class: "vc-popup__close-btn",
9573
- "aria-label": E.$t("COMPONENTS.ORGANISMS.VC_POPUP.CLOSE"),
9574
- onClick: w
9575
- }, [..._[1] || (_[1] = [
9576
- y("svg", {
9577
- width: "12",
9578
- height: "12",
9579
- viewBox: "0 0 12 12",
9580
- fill: "none",
9581
- xmlns: "http://www.w3.org/2000/svg"
9582
- }, [
9583
- y("path", {
9584
- d: "M7.27173 5.99939L11.1499 2.12967C11.3198 1.95981 11.4152 1.72943 11.4152 1.48922C11.4152 1.24901 11.3198 1.01863 11.1499 0.848777C10.9801 0.67892 10.7497 0.583496 10.5096 0.583496C10.2694 0.583496 10.0391 0.67892 9.86922 0.848777L6.00004 4.72752L2.13086 0.848777C1.96103 0.67892 1.73069 0.583496 1.49051 0.583496C1.25033 0.583496 1.01999 0.67892 0.850156 0.848777C0.680324 1.01863 0.584913 1.24901 0.584913 1.48922C0.584913 1.72943 0.680324 1.95981 0.850156 2.12967L4.72835 5.99939L0.850156 9.86912C0.765622 9.95298 0.698526 10.0527 0.652737 10.1627C0.606948 10.2726 0.583374 10.3905 0.583374 10.5096C0.583374 10.6286 0.606948 10.7465 0.652737 10.8565C0.698526 10.9664 0.765622 11.0662 0.850156 11.15C0.934 11.2346 1.03375 11.3017 1.14366 11.3475C1.25356 11.3933 1.37145 11.4168 1.49051 11.4168C1.60957 11.4168 1.72746 11.3933 1.83736 11.3475C1.94727 11.3017 2.04702 11.2346 2.13086 11.15L6.00004 7.27126L9.86922 11.15C9.95306 11.2346 10.0528 11.3017 10.1627 11.3475C10.2726 11.3933 10.3905 11.4168 10.5096 11.4168C10.6286 11.4168 10.7465 11.3933 10.8564 11.3475C10.9663 11.3017 11.0661 11.2346 11.1499 11.15C11.2345 11.0662 11.3016 10.9664 11.3473 10.8565C11.3931 10.7465 11.4167 10.6286 11.4167 10.5096C11.4167 10.3905 11.3931 10.2726 11.3473 10.1627C11.3016 10.0527 11.2345 9.95298 11.1499 9.86912L7.27173 5.99939Z",
9585
- fill: "currentColor"
9586
- })
9587
- ], -1)
9588
- ])], 8, Ig)) : R("", !0)
9589
- ]),
9590
- _: 3
9591
- }),
9592
- y("div", Tg, [
9593
- e.variant !== "default" ? (o(), B(M, {
9594
- key: 0,
9595
- class: q(["vc-popup__icon", b.value]),
9596
- icon: f.value
9597
- }, null, 8, ["class", "icon"])) : R("", !0),
9598
- y("div", {
9599
- class: q(["vc-popup__content-inner", {
9600
- "vc-popup__content-inner--grow": h.value
9601
- }])
9602
- }, [
9603
- y("div", {
9604
- class: q(["vc-popup__content-wrapper", { "vc-popup__content-wrapper--full": e.isFullscreen }])
9605
- }, [
9606
- V(E.$slots, "content")
9607
- ], 2)
9608
- ], 2)
9609
- ]),
9610
- E.$slots.footer ? (o(), p("div", xg, [
9611
- V(E.$slots, "footer", { close: w }, () => [
9612
- x(C, {
9613
- class: "vc-popup__close-button",
9614
- onClick: w
9615
- }, {
9616
- default: A(() => [
9617
- ie(D(E.$t("COMPONENTS.ORGANISMS.VC_POPUP.CLOSE")), 1)
9618
- ]),
9619
- _: 1
9620
- })
9621
- ])
9622
- ])) : R("", !0)
9623
- ]),
9624
- _: 3
9625
- }, 8, ["class"])
9626
- ]),
9627
- _: 3
9628
- })
9629
- ])
9630
- ], 2)
9005
+ return (u, c) => (o(), B(n($t), {
9006
+ show: s.value,
9007
+ "onUpdate:show": c[0] || (c[0] = (d) => s.value = d),
9008
+ "anchor-ref": e.anchorRef,
9009
+ placement: "right-start",
9010
+ width: "560px",
9011
+ "max-width": "calc(100vw - 24px)",
9012
+ "max-height": 9999,
9013
+ "content-scrollable": !1
9014
+ }, {
9015
+ default: A(() => [
9016
+ x($a, {
9017
+ "apps-list": e.appsList,
9018
+ "show-applications": e.showApplications,
9019
+ onSwitchApp: i
9020
+ }, we({ _: 2 }, [
9021
+ u.$slots.applications ? {
9022
+ name: "applications",
9023
+ fn: A((d) => [
9024
+ V(u.$slots, "applications", Qe(Je(d)))
9631
9025
  ]),
9632
- _: 3
9633
- })
9634
- ]),
9635
- _: 3
9636
- }, 8, ["show"]);
9637
- };
9026
+ key: "0"
9027
+ } : void 0
9028
+ ]), 1032, ["apps-list", "show-applications"])
9029
+ ]),
9030
+ _: 3
9031
+ }, 8, ["show", "anchor-ref"]));
9638
9032
  }
9639
- }), Ka = /* @__PURE__ */ U({
9640
- __name: "vc-popup-base",
9033
+ }), Up = { class: "vc-notification-template__content" }, Hp = { class: "vc-notification-template__time" }, Gp = {
9034
+ key: 0,
9035
+ class: "vc-notification-template__content-body"
9036
+ }, $n = 60, _n = 3600, Wp = 86400, qp = /* @__PURE__ */ U({
9037
+ __name: "notification-template",
9641
9038
  props: {
9642
9039
  title: {},
9643
- variant: { default: "default" },
9644
- mode: { default: "acknowledge" },
9645
- actionLabel: { default: "" },
9646
- confirmLabel: { default: "" },
9647
- cancelLabel: { default: "" },
9648
- confirmAsText: { type: Boolean, default: !1 },
9649
- closable: { type: Boolean, default: !0 },
9650
- isMobileFullscreen: { type: Boolean, default: !0 },
9651
- closeOnConfirm: { type: Boolean, default: !1 }
9040
+ notification: {},
9041
+ icon: {},
9042
+ color: {},
9043
+ severity: {}
9652
9044
  },
9653
- emits: ["close", "confirm"],
9045
+ emits: ["click"],
9654
9046
  setup(e, { emit: a }) {
9655
- const t = e, l = a;
9656
- function r(s) {
9657
- l("confirm"), t.closeOnConfirm && s();
9658
- }
9659
- return (s, i) => {
9660
- const u = Ne("VcButton");
9661
- return o(), B(qa, {
9662
- variant: e.variant,
9663
- "is-mobile-fullscreen": e.isMobileFullscreen,
9664
- title: e.title,
9665
- closable: e.closable,
9666
- onClose: i[0] || (i[0] = (c) => s.$emit("close"))
9667
- }, we({
9668
- content: A(() => [
9669
- V(s.$slots, "default")
9670
- ]),
9671
- footer: A(({ close: c }) => [
9672
- V(s.$slots, "footer", {
9673
- close: c,
9674
- confirm: () => r(c)
9675
- }, () => [
9676
- y("div", {
9677
- class: q(["vc-popup-base__actions", {
9678
- "vc-popup-base__actions--confirm": e.mode === "confirm",
9679
- "vc-popup-base__actions--single": e.mode === "acknowledge"
9680
- }])
9681
- }, [
9682
- e.mode === "confirm" ? (o(), p(ee, { key: 0 }, [
9683
- x(u, {
9684
- text: e.confirmAsText,
9685
- class: "vc-popup-base__confirm",
9686
- onClick: (d) => r(c)
9687
- }, {
9688
- default: A(() => [
9689
- ie(D(e.confirmLabel), 1)
9690
- ]),
9691
- _: 1
9692
- }, 8, ["text", "onClick"]),
9693
- x(u, { onClick: c }, {
9694
- default: A(() => [
9695
- ie(D(e.cancelLabel), 1)
9696
- ]),
9697
- _: 1
9698
- }, 8, ["onClick"])
9699
- ], 64)) : (o(), B(u, {
9700
- key: 1,
9701
- class: "vc-popup-base__single",
9702
- onClick: c
9047
+ const t = e, l = window.navigator.language, r = S(() => {
9048
+ const s = t.notification.created;
9049
+ if (!s) return "";
9050
+ const i = s instanceof Date ? s : new Date(s);
9051
+ if (Number.isNaN(i.getTime())) return "";
9052
+ const u = Date.now(), c = Math.round((u - i.getTime()) / 1e3), d = Math.abs(c), v = new Intl.RelativeTimeFormat(l, { numeric: "auto" });
9053
+ return d < $n ? v.format(-c, "second") : d < _n ? v.format(-Math.round(c / $n), "minute") : d < Wp ? v.format(-Math.round(c / _n), "hour") : new Intl.DateTimeFormat(l, {
9054
+ dateStyle: "short",
9055
+ timeStyle: "short"
9056
+ }).format(i);
9057
+ });
9058
+ return (s, i) => (o(), p("div", {
9059
+ class: "vc-notification-template",
9060
+ onClick: i[0] || (i[0] = (u) => s.$emit("click"))
9061
+ }, [
9062
+ y("div", {
9063
+ class: q(["vc-notification-template__container", {
9064
+ "vc-notification-template__container--mobile": s.$isMobile.value
9065
+ }])
9066
+ }, [
9067
+ y("div", {
9068
+ class: "vc-notification-template__icon-container",
9069
+ style: he({ backgroundColor: e.color ?? "var(--primary-500)" })
9070
+ }, [
9071
+ x(n(J), {
9072
+ icon: e.icon ?? "lucide-bell",
9073
+ size: "s"
9074
+ }, null, 8, ["icon"])
9075
+ ], 4),
9076
+ y("div", Up, [
9077
+ y("p", {
9078
+ class: q(["vc-notification-template__title", { "vc-notification-template__title--desktop": s.$isDesktop.value }])
9079
+ }, D(e.title), 3),
9080
+ y("p", Hp, D(r.value), 1),
9081
+ s.$slots.default ? (o(), p("div", Gp, [
9082
+ V(s.$slots, "default")
9083
+ ])) : R("", !0)
9084
+ ])
9085
+ ], 2)
9086
+ ]));
9087
+ }
9088
+ }), Kp = qp, Yp = { class: "vc-notification-item__content" }, jp = /* @__PURE__ */ U({
9089
+ __name: "notification",
9090
+ props: {
9091
+ notification: {}
9092
+ },
9093
+ emits: ["onClick"],
9094
+ setup(e, { emit: a }) {
9095
+ const t = e, l = a, r = Tl(), s = S(() => {
9096
+ const u = t.notification.notifyType;
9097
+ if (u)
9098
+ return r.registry.get(u)?.template;
9099
+ });
9100
+ Me(
9101
+ ui,
9102
+ S(() => t.notification)
9103
+ );
9104
+ const i = () => {
9105
+ l("onClick", t.notification);
9106
+ };
9107
+ return (u, c) => {
9108
+ const d = Ne("VcHint");
9109
+ return o(), p("div", {
9110
+ class: "vc-notification-item",
9111
+ onClick: i
9112
+ }, [
9113
+ y("div", {
9114
+ class: "vc-notification-item__unread-dot",
9115
+ style: he({ visibility: e.notification.isNew ? "visible" : "hidden" })
9116
+ }, null, 4),
9117
+ y("div", Yp, [
9118
+ s.value ? (o(), B(We(s.value), { key: 0 })) : (o(), B(n(Kp), {
9119
+ key: 1,
9120
+ title: e.notification.title ?? "",
9121
+ notification: e.notification
9122
+ }, {
9123
+ default: A(() => [
9124
+ e.notification.description ? (o(), B(d, {
9125
+ key: 0,
9126
+ class: "tw-mb-1"
9703
9127
  }, {
9704
9128
  default: A(() => [
9705
- ie(D(e.actionLabel), 1)
9129
+ ie(D(e.notification.description), 1)
9706
9130
  ]),
9707
9131
  _: 1
9708
- }, 8, ["onClick"]))
9709
- ], 2)
9710
- ])
9132
+ })) : R("", !0)
9133
+ ]),
9134
+ _: 1
9135
+ }, 8, ["title", "notification"]))
9136
+ ])
9137
+ ]);
9138
+ };
9139
+ }
9140
+ }), Xp = { class: "notification-dropdown" }, Qp = {
9141
+ key: 1,
9142
+ class: "tw-flex tw-justify-center tw-items-center tw-p-4 tw-text-sm tw-text-[color:var(--neutrals-400)]"
9143
+ }, Jp = /* @__PURE__ */ U({
9144
+ __name: "notification-dropdown",
9145
+ setup(e) {
9146
+ const a = Tl(), { t } = Ve({ useScope: "global" }), l = S(
9147
+ () => [...a.history.value].sort(
9148
+ (r, s) => new Date(s.created).getTime() - new Date(r.created).getTime()
9149
+ )
9150
+ );
9151
+ return Ue(() => {
9152
+ a.hasUnread.value && a.markAllAsRead();
9153
+ }), (r, s) => (o(), p("div", Xp, [
9154
+ l.value.length ? (o(), B(n(ft), {
9155
+ key: 0,
9156
+ class: "notification-dropdown__scroll"
9157
+ }, {
9158
+ default: A(() => [
9159
+ (o(!0), p(ee, null, me(l.value, (i) => (o(), p("div", {
9160
+ key: i.id
9161
+ }, [
9162
+ x(jp, { notification: i }, null, 8, ["notification"])
9163
+ ]))), 128))
9711
9164
  ]),
9712
- _: 2
9165
+ _: 1
9166
+ })) : (o(), p("div", Qp, D(n(t)("COMPONENTS.NOTIFICATION_DROPDOWN.EMPTY")), 1))
9167
+ ]));
9168
+ }
9169
+ }), ko = Jp, Zp = /* @__PURE__ */ U({
9170
+ __name: "DesktopLayout",
9171
+ props: {
9172
+ logo: {},
9173
+ title: {},
9174
+ avatar: {},
9175
+ userName: {},
9176
+ userRole: {},
9177
+ disableMenu: { type: Boolean, default: !1 },
9178
+ disableAppSwitcher: { type: Boolean, default: !1 },
9179
+ appsList: { default: () => [] },
9180
+ showSearch: { type: Boolean, default: !1 },
9181
+ searchPlaceholder: {}
9182
+ },
9183
+ emits: ["logo:click", "item:click", "switch-app"],
9184
+ setup(e, { emit: a }) {
9185
+ const t = a, l = Fa(), r = de(ll, !1), s = Dt(), i = O(null), u = O(!1), c = O(null), d = S(() => !r);
9186
+ ne(
9187
+ () => s.fullPath,
9188
+ () => {
9189
+ l.isMenuOpen.value && l.closeMenu(), u.value = !1;
9190
+ }
9191
+ );
9192
+ const v = (h) => {
9193
+ if (h.currentTarget instanceof HTMLElement && (i.value = h.currentTarget), l.isMenuOpen.value) {
9194
+ l.closeMenu();
9195
+ return;
9196
+ }
9197
+ u.value = !1, l.openMenu();
9198
+ }, g = (h) => {
9199
+ h.currentTarget instanceof HTMLElement && (c.value = h.currentTarget), u.value = !u.value, u.value && l.isMenuOpen.value && l.closeMenu();
9200
+ }, f = (h) => {
9201
+ if (!h) {
9202
+ l.closeMenu();
9203
+ return;
9204
+ }
9205
+ !i.value && typeof document < "u" && (i.value = document.querySelector(".sidebar-header__menu-button")), l.openMenu();
9206
+ }, b = (h) => {
9207
+ l.closeMenu(), t("switch-app", h);
9208
+ };
9209
+ return (h, m) => (o(), p(ee, null, [
9210
+ y("div", {
9211
+ class: q(["desktop-layout__spacer", {
9212
+ "desktop-layout__spacer--expanded": n(l).isPinned.value
9213
+ }])
9214
+ }, null, 2),
9215
+ y("div", {
9216
+ class: q(["desktop-layout", {
9217
+ "desktop-layout--collapsed": !n(l).isPinned.value
9218
+ }])
9713
9219
  }, [
9714
- s.$slots.header ? {
9715
- name: "header",
9716
- fn: A(() => [
9717
- V(s.$slots, "header")
9220
+ y("div", {
9221
+ class: q(["desktop-layout__wrap", {
9222
+ "desktop-layout__wrap--collapsed": !n(l).isPinned.value,
9223
+ "desktop-layout__wrap--expanded": n(l).isPinned.value
9224
+ }])
9225
+ }, [
9226
+ He(x(sp, {
9227
+ collapsed: !n(l).isPinned.value,
9228
+ onClick: n(l).togglePin
9229
+ }, null, 8, ["collapsed", "onClick"]), [
9230
+ [Bt, !n(l).isMenuOpen.value]
9231
+ ]),
9232
+ V(h.$slots, "sidebar-header", {
9233
+ logo: e.logo,
9234
+ expanded: n(l).isExpanded.value,
9235
+ isMobile: !1
9236
+ }, () => [
9237
+ d.value ? (o(), B(ao, {
9238
+ key: 0,
9239
+ logo: e.logo,
9240
+ expanded: n(l).isExpanded.value,
9241
+ "show-burger": n(l).isExpanded.value,
9242
+ "is-menu-open": n(l).isMenuOpen.value,
9243
+ "is-notifications-open": u.value,
9244
+ class: "desktop-layout__header",
9245
+ "onLogo:click": m[0] || (m[0] = (w) => h.$emit("logo:click")),
9246
+ onToggleMenu: v,
9247
+ onToggleNotifications: g
9248
+ }, null, 8, ["logo", "expanded", "show-burger", "is-menu-open", "is-notifications-open"])) : R("", !0)
9249
+ ]),
9250
+ x(op, {
9251
+ expanded: n(l).isExpanded.value,
9252
+ avatar: e.avatar,
9253
+ "user-name": e.userName,
9254
+ "user-role": e.userRole,
9255
+ "disable-menu": e.disableMenu,
9256
+ "header-visible": d.value,
9257
+ "show-search": e.showSearch,
9258
+ "search-placeholder": e.searchPlaceholder,
9259
+ "onItem:click": m[1] || (m[1] = (w) => h.$emit("item:click", w))
9260
+ }, we({ _: 2 }, [
9261
+ h.$slots.menu ? {
9262
+ name: "menu",
9263
+ fn: A((w) => [
9264
+ V(h.$slots, "menu", Qe(Je(w)))
9265
+ ]),
9266
+ key: "0"
9267
+ } : void 0,
9268
+ h.$slots["sidebar-footer"] ? {
9269
+ name: "sidebar-footer",
9270
+ fn: A((w) => [
9271
+ V(h.$slots, "sidebar-footer", Qe(Je(w)))
9272
+ ]),
9273
+ key: "1"
9274
+ } : void 0
9275
+ ]), 1032, ["expanded", "avatar", "user-name", "user-role", "disable-menu", "header-visible", "show-search", "search-placeholder"])
9276
+ ], 2)
9277
+ ], 2),
9278
+ x(zp, {
9279
+ show: n(l).isMenuOpen.value,
9280
+ "anchor-ref": i.value,
9281
+ "apps-list": e.appsList,
9282
+ "show-applications": !e.disableAppSwitcher,
9283
+ "onUpdate:show": f,
9284
+ onSwitchApp: b
9285
+ }, we({ _: 2 }, [
9286
+ h.$slots["app-switcher"] && !e.disableAppSwitcher ? {
9287
+ name: "applications",
9288
+ fn: A(({ appsList: w, switchApp: k }) => [
9289
+ V(h.$slots, "app-switcher", {
9290
+ appsList: w,
9291
+ switchApp: k
9292
+ })
9718
9293
  ]),
9719
9294
  key: "0"
9720
9295
  } : void 0
9721
- ]), 1032, ["variant", "is-mobile-fullscreen", "title", "closable"]);
9722
- };
9296
+ ]), 1032, ["show", "anchor-ref", "apps-list", "show-applications"]),
9297
+ x(n($t), {
9298
+ show: u.value,
9299
+ "onUpdate:show": m[2] || (m[2] = (w) => u.value = w),
9300
+ "anchor-ref": c.value,
9301
+ placement: "right-start",
9302
+ width: "320px",
9303
+ "content-scrollable": !1
9304
+ }, {
9305
+ default: A(() => [
9306
+ x(n(ko))
9307
+ ]),
9308
+ _: 1
9309
+ }, 8, ["show", "anchor-ref"])
9310
+ ], 64));
9723
9311
  }
9724
- }), Mg = /* @__PURE__ */ U({
9725
- __name: "vc-popup-warning",
9312
+ });
9313
+ function eg() {
9314
+ const e = O([]), a = S(() => e.value), t = (i) => {
9315
+ const u = e.value.findIndex((c) => c.id === i.id);
9316
+ u >= 0 ? e.value[u] = i : e.value.push(i);
9317
+ }, l = (i) => {
9318
+ e.value = e.value.filter((u) => u.id !== i);
9319
+ }, r = (i) => e.value.find((u) => u.id === i), s = S(
9320
+ () => [...e.value].filter((i) => Te(i.isVisible) !== !1).sort((i, u) => (i.order || 0) - (u.order || 0))
9321
+ );
9322
+ return {
9323
+ registeredButtons: a,
9324
+ register: t,
9325
+ unregister: l,
9326
+ getButton: r,
9327
+ getButtons: s
9328
+ };
9329
+ }
9330
+ const tg = Ye("use-app-bar-mobile-buttons");
9331
+ function lg() {
9332
+ const e = de(ya, null);
9333
+ if (e)
9334
+ return e;
9335
+ const a = eg();
9336
+ return Me(ya, a), kt() && mt(() => {
9337
+ }), a;
9338
+ }
9339
+ function So() {
9340
+ const e = de(ya);
9341
+ if (!e)
9342
+ throw tg.error("AppBarMobileButtonsService not found"), new Ct("AppBarMobileButtonsService");
9343
+ return e;
9344
+ }
9345
+ function ag() {
9346
+ const { getButtons: e } = So(), { activeMobileActionId: a } = wo(), {
9347
+ showItem: t,
9348
+ hideAllItems: l,
9349
+ toggleItem: r,
9350
+ currentItem: s,
9351
+ isAnyItemVisible: i,
9352
+ closeItem: u
9353
+ } = ho(e, a);
9354
+ return ne(
9355
+ () => e.value,
9356
+ (c) => {
9357
+ if (a.value && !c.some((v) => v.id === a.value)) {
9358
+ const v = s.value;
9359
+ v?.onClose && v.onClose(), l();
9360
+ }
9361
+ },
9362
+ { deep: !0 }
9363
+ ), {
9364
+ showAction: t,
9365
+ hideAllActions: l,
9366
+ toggleAction: r,
9367
+ currentAction: s,
9368
+ isAnyActionVisible: i,
9369
+ closeAction: u
9370
+ };
9371
+ }
9372
+ const ng = {
9373
+ key: 0,
9374
+ class: "app-bar-mobile-actions"
9375
+ }, og = {
9376
+ key: 1,
9377
+ class: "app-bar-mobile-actions__badge"
9378
+ }, ig = /* @__PURE__ */ U({
9379
+ __name: "AppBarMobileActions",
9726
9380
  props: {
9727
- title: {}
9381
+ isSidebarMode: { type: Boolean },
9382
+ expanded: {}
9728
9383
  },
9729
- emits: ["close", "confirm"],
9730
9384
  setup(e) {
9731
- return (a, t) => (o(), B(Ka, {
9732
- variant: "warning",
9733
- mode: "confirm",
9734
- "confirm-label": a.$t("COMPONENTS.ORGANISMS.VC_POPUP.CONFIRM"),
9735
- "cancel-label": a.$t("COMPONENTS.ORGANISMS.VC_POPUP.CANCEL"),
9736
- "confirm-as-text": "",
9737
- title: e.title,
9738
- onClose: t[0] || (t[0] = (l) => a.$emit("close")),
9739
- onConfirm: t[1] || (t[1] = (l) => a.$emit("confirm"))
9740
- }, we({
9385
+ const a = e, { getButtons: t } = So(), { currentAction: l, toggleAction: r, hideAllActions: s, isAnyActionVisible: i } = ag(), u = Dt(), c = (g) => {
9386
+ if (l.value?.id === g.id) {
9387
+ g.onClose?.(), s();
9388
+ return;
9389
+ }
9390
+ l.value && l.value.onClose?.(), r(g.id), !g.component && g.onClick && g.onClick();
9391
+ }, d = (g) => {
9392
+ l.value?.onClose?.(), s();
9393
+ };
9394
+ function v(g) {
9395
+ return g.badge === void 0 ? !1 : !!Te(g.badge);
9396
+ }
9397
+ return ne([() => u.fullPath, () => a.isSidebarMode], () => {
9398
+ s();
9399
+ }), (g, f) => g.$isMobile.value ? (o(), p("div", ng, [
9400
+ (o(!0), p(ee, null, me(n(t), (b) => (o(), p("div", {
9401
+ key: b.id,
9402
+ class: "app-bar-mobile-actions__button-wrap"
9403
+ }, [
9404
+ b.isVisible === void 0 || b.isVisible ? (o(), B(n(Oe), {
9405
+ key: 0,
9406
+ text: "",
9407
+ class: q(["app-bar-mobile-actions__button", { "app-bar-mobile-actions__button--active": b.id === n(l)?.id }]),
9408
+ icon: b.icon,
9409
+ "icon-size": "l",
9410
+ onClick: (h) => c(b)
9411
+ }, null, 8, ["class", "icon", "onClick"])) : R("", !0),
9412
+ v(b) ? (o(), p("span", og)) : R("", !0)
9413
+ ]))), 128)),
9414
+ x(n(Nt), {
9415
+ "model-value": n(i) && !!n(l)?.component,
9416
+ position: "bottom",
9417
+ size: "sm",
9418
+ draggable: "",
9419
+ "drag-handle": "",
9420
+ "close-button": !1,
9421
+ inset: !1,
9422
+ "onUpdate:modelValue": f[1] || (f[1] = (b) => !b && d())
9423
+ }, {
9424
+ default: A(() => [
9425
+ n(l)?.component ? (o(), B(We(n(l)?.component), Se({ key: 0 }, n(l)?.props || {}, {
9426
+ onClose: f[0] || (f[0] = (b) => d())
9427
+ }), null, 16)) : R("", !0)
9428
+ ]),
9429
+ _: 1
9430
+ }, 8, ["model-value"])
9431
+ ])) : R("", !0);
9432
+ }
9433
+ }), sg = { class: "menu-sidebar__widgets" }, rg = {
9434
+ key: 0,
9435
+ class: "menu-sidebar__close-button"
9436
+ }, ug = {
9437
+ key: 0,
9438
+ class: "menu-sidebar__content-main"
9439
+ }, dg = { class: "menu-sidebar__navmenu-container" }, cg = { class: "menu-sidebar__user" }, vg = {
9440
+ key: 2,
9441
+ class: "menu-sidebar__app-switcher-wrapper"
9442
+ }, fg = /* @__PURE__ */ U({
9443
+ __name: "MenuSidebar",
9444
+ props: {
9445
+ isOpened: { type: Boolean },
9446
+ expanded: {}
9447
+ },
9448
+ emits: ["update:is-opened"],
9449
+ setup(e, { emit: a }) {
9450
+ const t = e, l = a, r = de(ll, !1), s = de(nt, O(!1)), i = de(tl, O(!1)), u = ct(), c = S(() => !r && (i.value || !!u.widgets)), d = S(() => s.value ? Nt : "div"), v = S(() => s.value ? {
9451
+ modelValue: t.isOpened,
9452
+ position: "left",
9453
+ closeButton: !1,
9454
+ "onUpdate:modelValue": (g) => {
9455
+ g || l("update:is-opened", !1);
9456
+ }
9457
+ } : {});
9458
+ return (g, f) => (o(), B(We(d.value), Qe(Je(v.value)), {
9741
9459
  default: A(() => [
9742
- V(a.$slots, "default")
9460
+ y("div", {
9461
+ class: q(["menu-sidebar__wrapper", {
9462
+ "menu-sidebar__wrapper--desktop": n(i),
9463
+ "menu-sidebar__wrapper--expanded": n(i) && e.expanded
9464
+ }])
9465
+ }, [
9466
+ c.value ? (o(), p("div", {
9467
+ key: 0,
9468
+ class: q(["menu-sidebar__header", {
9469
+ "menu-sidebar__header--mobile": n(s)
9470
+ }])
9471
+ }, [
9472
+ y("div", sg, [
9473
+ V(g.$slots, "widgets")
9474
+ ]),
9475
+ f[1] || (f[1] = y("div", { class: "menu-sidebar__spacer" }, null, -1)),
9476
+ n(i) ? (o(), p("div", rg, [
9477
+ x(n(Oe), {
9478
+ "icon-class": "menu-sidebar__close-button-icon",
9479
+ icon: "lucide-x",
9480
+ text: "",
9481
+ onClick: f[0] || (f[0] = le((b) => g.$emit("update:is-opened", !1), ["stop"]))
9482
+ })
9483
+ ])) : R("", !0)
9484
+ ], 2)) : R("", !0),
9485
+ y("div", {
9486
+ class: q(["menu-sidebar__content", { "menu-sidebar__content--without-header": !c.value }])
9487
+ }, [
9488
+ g.$slots["widgets-active-content"] ? (o(), p("div", ug, [
9489
+ V(g.$slots, "widgets-active-content")
9490
+ ])) : R("", !0),
9491
+ n(s) ? (o(), p(ee, { key: 1 }, [
9492
+ y("div", dg, [
9493
+ V(g.$slots, "navmenu")
9494
+ ]),
9495
+ y("div", cg, [
9496
+ V(g.$slots, "user-dropdown")
9497
+ ])
9498
+ ], 64)) : (o(), p("div", vg, [
9499
+ V(g.$slots, "app-switcher")
9500
+ ]))
9501
+ ], 2)
9502
+ ], 2)
9743
9503
  ]),
9744
- _: 2
9745
- }, [
9746
- a.$slots.header ? {
9747
- name: "header",
9748
- fn: A(() => [
9749
- V(a.$slots, "header")
9750
- ]),
9751
- key: "0"
9752
- } : void 0
9753
- ]), 1032, ["confirm-label", "cancel-label", "title"]));
9504
+ _: 3
9505
+ }, 16));
9754
9506
  }
9755
- }), Og = /* @__PURE__ */ U({
9756
- __name: "vc-popup-error",
9507
+ }), mg = {
9508
+ key: 0,
9509
+ class: "mobile-layout"
9510
+ }, pg = {
9511
+ class: "mobile-layout__tabs",
9512
+ role: "tablist"
9513
+ }, gg = ["aria-selected"], bg = { class: "mobile-layout__tab-label" }, hg = ["aria-selected"], yg = { class: "mobile-layout__tab-label" }, wg = {
9514
+ key: 0,
9515
+ class: "mobile-layout__tab-badge"
9516
+ }, kg = {
9517
+ id: "mobile-layout-panel-menu",
9518
+ role: "tabpanel",
9519
+ class: "mobile-layout__panel mobile-layout__panel--menu"
9520
+ }, Sg = {
9521
+ key: 0,
9522
+ class: "mobile-layout__search"
9523
+ }, Cg = {
9524
+ id: "mobile-layout-panel-hub",
9525
+ role: "tabpanel",
9526
+ class: "mobile-layout__panel mobile-layout__panel--hub"
9527
+ }, $g = {
9528
+ key: 1,
9529
+ class: "mobile-layout__panel mobile-layout__panel--single mobile-layout__panel--hub"
9530
+ }, _g = {
9531
+ key: 2,
9532
+ class: "mobile-layout__panel mobile-layout__panel--single mobile-layout__panel--menu"
9533
+ }, Eg = {
9534
+ key: 0,
9535
+ class: "mobile-layout__search"
9536
+ }, st = 0, Ht = 1, En = 8, Ag = 0.3, Rg = 0.3, Ig = 1, Tg = 0.2, An = "transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94)", xg = /* @__PURE__ */ U({
9537
+ __name: "MobileLayout",
9757
9538
  props: {
9758
- title: {}
9539
+ logo: {},
9540
+ title: {},
9541
+ avatar: {},
9542
+ userName: {},
9543
+ userRole: {},
9544
+ disableMenu: { type: Boolean, default: !1 },
9545
+ disableAppSwitcher: { type: Boolean, default: !1 },
9546
+ appsList: { default: () => [] },
9547
+ showSearch: { type: Boolean, default: !1 },
9548
+ searchPlaceholder: {}
9759
9549
  },
9760
- emits: ["close"],
9761
- setup(e) {
9762
- return (a, t) => (o(), B(Ka, {
9763
- variant: "error",
9764
- mode: "acknowledge",
9765
- "action-label": a.$t("COMPONENTS.ORGANISMS.VC_POPUP.OK"),
9766
- title: e.title,
9767
- onClose: t[0] || (t[0] = (l) => a.$emit("close"))
9768
- }, we({
9769
- default: A(() => [
9770
- V(a.$slots, "default")
9771
- ]),
9772
- _: 2
9773
- }, [
9774
- a.$slots.header ? {
9775
- name: "header",
9776
- fn: A(() => [
9777
- V(a.$slots, "header")
9550
+ emits: ["item:click", "switch-app"],
9551
+ setup(e, { emit: a }) {
9552
+ const t = e, l = a, r = O(""), s = Fa(), i = de(ll, !1), { blades: u, activeBlade: c } = Aa(), { items: d } = Bl(), v = S(
9553
+ () => d.value.some((X) => X.badge === void 0 ? !1 : typeof X.badge == "function" ? X.badge() : !!X.badge)
9554
+ ), g = S(
9555
+ () => d.value.length > 0 || !t.disableAppSwitcher && t.appsList.length > 0
9556
+ ), f = S(() => g.value && !t.disableMenu), b = O(st), h = O(!1), m = O(0), w = O(null), k = O("idle");
9557
+ let $ = 0, E = 0, _ = 0, M = 0;
9558
+ const C = S(() => {
9559
+ const X = b.value * -50, Y = w.value?.clientWidth ?? 0;
9560
+ if (h.value && Y > 0) {
9561
+ const ue = m.value / Y * 50;
9562
+ return {
9563
+ transform: `translateX(${X + ue}%)`,
9564
+ transition: "none"
9565
+ };
9566
+ }
9567
+ return {
9568
+ transform: `translateX(${X}%)`,
9569
+ transition: An
9570
+ };
9571
+ }), L = S(() => {
9572
+ const X = w.value?.clientWidth ?? 0, Y = h.value && X > 0 ? -m.value / X : 0;
9573
+ return {
9574
+ transform: `translateX(${Math.max(0, Math.min(1, b.value + Y)) * 100}%)`,
9575
+ transition: h.value ? "none" : An
9576
+ };
9577
+ });
9578
+ function T(X) {
9579
+ b.value = Math.max(st, Math.min(Ht, X)), I();
9580
+ }
9581
+ function I() {
9582
+ m.value = 0, h.value = !1, k.value = "idle";
9583
+ }
9584
+ function G(X, Y) {
9585
+ const ue = Math.abs(X);
9586
+ if (!ue || !Y)
9587
+ return 0;
9588
+ const Q = ue * Y / (ue + Y);
9589
+ return Math.sign(X) * Q;
9590
+ }
9591
+ function N(X) {
9592
+ const Y = w.value?.clientWidth ?? 0;
9593
+ if (!Y)
9594
+ return X;
9595
+ const ue = b.value === st && X > 0, Q = b.value === Ht && X < 0;
9596
+ if (ue || Q)
9597
+ return G(X, Y * Tg);
9598
+ const j = Y * Ig;
9599
+ return Math.max(-j, Math.min(j, X));
9600
+ }
9601
+ function P(X) {
9602
+ if (!f.value || X.touches.length === 0)
9603
+ return;
9604
+ const Y = X.touches[0];
9605
+ $ = Y.clientX, E = Y.clientY, _ = Y.clientX, M = Date.now(), m.value = 0, h.value = !1, k.value = "pending";
9606
+ }
9607
+ function W(X) {
9608
+ if (!f.value || X.touches.length === 0 || k.value === "idle")
9609
+ return;
9610
+ const Y = X.touches[0], ue = Y.clientX - $, Q = Y.clientY - E, j = Math.abs(ue), ke = Math.abs(Q);
9611
+ if (k.value === "pending") {
9612
+ if (j < En && ke < En)
9613
+ return;
9614
+ if (ke > j) {
9615
+ k.value = "vertical";
9616
+ return;
9617
+ }
9618
+ k.value = "horizontal", h.value = !0;
9619
+ }
9620
+ k.value === "horizontal" && (X.cancelable && X.preventDefault(), _ = Y.clientX, m.value = N(ue));
9621
+ }
9622
+ function F(X) {
9623
+ if (!f.value) {
9624
+ I();
9625
+ return;
9626
+ }
9627
+ const Y = X.changedTouches[0];
9628
+ if (k.value !== "horizontal") {
9629
+ I();
9630
+ return;
9631
+ }
9632
+ const Q = (Y?.clientX ?? _) - $, j = Math.max(Date.now() - M, 1), ke = Math.abs(Q) / j, Z = (w.value?.clientWidth ?? 0) * Ag;
9633
+ if (ke > Rg || Math.abs(Q) > Z) {
9634
+ if (Q < 0) {
9635
+ T(b.value + 1);
9636
+ return;
9637
+ }
9638
+ if (Q > 0) {
9639
+ T(b.value - 1);
9640
+ return;
9641
+ }
9642
+ }
9643
+ I();
9644
+ }
9645
+ ne(
9646
+ () => s.isMenuOpen.value,
9647
+ (X) => {
9648
+ X || (T(st), r.value = "");
9649
+ }
9650
+ ), ne(g, (X) => {
9651
+ X || T(st);
9652
+ }), ne(f, (X) => {
9653
+ X || T(st);
9654
+ });
9655
+ const K = S(() => u.value.length <= 1), z = S(() => {
9656
+ const X = c.value?.title, Y = u.value[u.value.length - 1]?.title;
9657
+ return X ?? Y ?? "";
9658
+ });
9659
+ ne(K, (X) => {
9660
+ !X && s.isMenuOpen.value && s.closeMenu();
9661
+ });
9662
+ const te = (X) => {
9663
+ r.value = "", s.closeMenu(), l("item:click", X);
9664
+ }, ve = (X) => {
9665
+ s.closeMenu(), l("switch-app", X);
9666
+ };
9667
+ return (X, Y) => (o(), p(ee, null, [
9668
+ K.value ? (o(), p("div", mg, [
9669
+ V(X.$slots, "sidebar-header", {
9670
+ logo: e.logo,
9671
+ expanded: !1,
9672
+ isMobile: !0
9673
+ }, () => [
9674
+ x(ao, {
9675
+ logo: e.logo,
9676
+ expanded: !1,
9677
+ "is-mobile": !0,
9678
+ "mobile-title": z.value,
9679
+ "show-mobile-title": n(u).length === 1,
9680
+ class: "mobile-layout__header",
9681
+ "onLogo:click": n(s).openMenu
9682
+ }, {
9683
+ actions: A(() => [
9684
+ x(ig, {
9685
+ "is-sidebar-mode": n(s).isMenuOpen.value,
9686
+ expanded: !1
9687
+ }, null, 8, ["is-sidebar-mode"])
9688
+ ]),
9689
+ _: 1
9690
+ }, 8, ["logo", "mobile-title", "show-mobile-title", "onLogo:click"])
9691
+ ])
9692
+ ])) : R("", !0),
9693
+ x(fg, {
9694
+ "is-opened": n(s).isMenuOpen.value,
9695
+ expanded: !0,
9696
+ "onUpdate:isOpened": Y[4] || (Y[4] = (ue) => !ue && n(s).closeMenu())
9697
+ }, {
9698
+ navmenu: A(() => [
9699
+ y("div", {
9700
+ class: q(["mobile-layout__navmenu", { "mobile-layout__navmenu--tabs": f.value }])
9701
+ }, [
9702
+ f.value ? (o(), p(ee, { key: 0 }, [
9703
+ y("div", pg, [
9704
+ y("button", {
9705
+ type: "button",
9706
+ class: q(["mobile-layout__tab", { "mobile-layout__tab--active": b.value === st }]),
9707
+ role: "tab",
9708
+ "aria-selected": b.value === st,
9709
+ "aria-controls": "mobile-layout-panel-menu",
9710
+ onClick: Y[0] || (Y[0] = (ue) => T(st))
9711
+ }, [
9712
+ y("span", bg, D(X.$t("COMPONENTS.ORGANISMS.VC_APP.INTERNAL.MOBILE_LAYOUT.TAB_MENU")), 1)
9713
+ ], 10, gg),
9714
+ y("button", {
9715
+ type: "button",
9716
+ class: q(["mobile-layout__tab", { "mobile-layout__tab--active": b.value === Ht }]),
9717
+ role: "tab",
9718
+ "aria-selected": b.value === Ht,
9719
+ "aria-controls": "mobile-layout-panel-hub",
9720
+ onClick: Y[1] || (Y[1] = (ue) => T(Ht))
9721
+ }, [
9722
+ y("span", yg, [
9723
+ ie(D(X.$t("COMPONENTS.ORGANISMS.VC_APP.INTERNAL.MOBILE_LAYOUT.TAB_HUB")) + " ", 1),
9724
+ v.value ? (o(), p("span", wg)) : R("", !0)
9725
+ ])
9726
+ ], 10, hg),
9727
+ y("span", {
9728
+ class: "mobile-layout__tab-indicator",
9729
+ style: he(L.value)
9730
+ }, null, 4)
9731
+ ]),
9732
+ y("div", {
9733
+ ref_key: "sliderViewportRef",
9734
+ ref: w,
9735
+ class: "mobile-layout__slider-viewport",
9736
+ onTouchstartPassive: P,
9737
+ onTouchmove: W,
9738
+ onTouchendPassive: F,
9739
+ onTouchcancelPassive: F
9740
+ }, [
9741
+ y("div", {
9742
+ class: "mobile-layout__slider",
9743
+ style: he(C.value)
9744
+ }, [
9745
+ y("div", kg, [
9746
+ e.showSearch ? (o(), p("div", Sg, [
9747
+ x(n(Be), {
9748
+ modelValue: r.value,
9749
+ "onUpdate:modelValue": Y[2] || (Y[2] = (ue) => r.value = ue),
9750
+ placeholder: t.searchPlaceholder || X.$t("SHELL.SIDEBAR.SEARCH_PLACEHOLDER", "Search keyword"),
9751
+ size: "small",
9752
+ clearable: "",
9753
+ debounce: 300
9754
+ }, null, 8, ["modelValue", "placeholder"])
9755
+ ])) : R("", !0),
9756
+ x(n(ft), { class: "mobile-layout__menu-scroll" }, {
9757
+ default: A(() => [
9758
+ V(X.$slots, "menu", {
9759
+ expanded: !0,
9760
+ onItemClick: te,
9761
+ searchQuery: r.value
9762
+ }, () => [
9763
+ x(Ca, {
9764
+ expanded: !0,
9765
+ "search-query": r.value,
9766
+ "onItem:click": te
9767
+ }, null, 8, ["search-query"])
9768
+ ])
9769
+ ]),
9770
+ _: 3
9771
+ })
9772
+ ]),
9773
+ y("div", Cg, [
9774
+ x($a, {
9775
+ "apps-list": t.appsList,
9776
+ "show-applications": !t.disableAppSwitcher,
9777
+ mobile: "",
9778
+ onSwitchApp: ve
9779
+ }, we({ _: 2 }, [
9780
+ X.$slots["app-switcher"] && !t.disableAppSwitcher ? {
9781
+ name: "applications",
9782
+ fn: A(({ appsList: ue, switchApp: Q }) => [
9783
+ V(X.$slots, "app-switcher", {
9784
+ appsList: ue,
9785
+ switchApp: Q
9786
+ })
9787
+ ]),
9788
+ key: "0"
9789
+ } : void 0
9790
+ ]), 1032, ["apps-list", "show-applications"])
9791
+ ])
9792
+ ], 4)
9793
+ ], 544)
9794
+ ], 64)) : t.disableMenu ? (o(), p("div", $g, [
9795
+ x($a, {
9796
+ "apps-list": t.appsList,
9797
+ "show-applications": !t.disableAppSwitcher,
9798
+ mobile: "",
9799
+ onSwitchApp: ve
9800
+ }, we({ _: 2 }, [
9801
+ X.$slots["app-switcher"] && !t.disableAppSwitcher ? {
9802
+ name: "applications",
9803
+ fn: A(({ appsList: ue, switchApp: Q }) => [
9804
+ V(X.$slots, "app-switcher", {
9805
+ appsList: ue,
9806
+ switchApp: Q
9807
+ })
9808
+ ]),
9809
+ key: "0"
9810
+ } : void 0
9811
+ ]), 1032, ["apps-list", "show-applications"])
9812
+ ])) : (o(), p("div", _g, [
9813
+ e.showSearch ? (o(), p("div", Eg, [
9814
+ x(n(Be), {
9815
+ modelValue: r.value,
9816
+ "onUpdate:modelValue": Y[3] || (Y[3] = (ue) => r.value = ue),
9817
+ placeholder: t.searchPlaceholder || X.$t("SHELL.SIDEBAR.SEARCH_PLACEHOLDER", "Search keyword"),
9818
+ size: "small",
9819
+ clearable: "",
9820
+ debounce: 300
9821
+ }, null, 8, ["modelValue", "placeholder"])
9822
+ ])) : R("", !0),
9823
+ x(n(ft), { class: "mobile-layout__menu-scroll" }, {
9824
+ default: A(() => [
9825
+ V(X.$slots, "menu", {
9826
+ expanded: !0,
9827
+ onItemClick: te,
9828
+ searchQuery: r.value
9829
+ }, () => [
9830
+ x(Ca, {
9831
+ expanded: !0,
9832
+ "search-query": r.value,
9833
+ "onItem:click": te
9834
+ }, null, 8, ["search-query"])
9835
+ ])
9836
+ ]),
9837
+ _: 3
9838
+ })
9839
+ ]))
9840
+ ], 2)
9778
9841
  ]),
9779
- key: "0"
9780
- } : void 0
9781
- ]), 1032, ["action-label", "title"]));
9782
- }
9783
- }), Lg = /* @__PURE__ */ U({
9784
- __name: "vc-popup-info",
9785
- props: {
9786
- title: {}
9787
- },
9788
- emits: ["close"],
9789
- setup(e) {
9790
- return (a, t) => (o(), B(Ka, {
9791
- variant: "info",
9792
- mode: "acknowledge",
9793
- "action-label": a.$t("COMPONENTS.ORGANISMS.VC_POPUP.OK"),
9794
- title: e.title,
9795
- onClose: t[0] || (t[0] = (l) => a.$emit("close"))
9796
- }, we({
9797
- default: A(() => [
9798
- V(a.$slots, "default")
9799
- ]),
9800
- _: 2
9801
- }, [
9802
- a.$slots.header ? {
9803
- name: "header",
9804
- fn: A(() => [
9805
- V(a.$slots, "header")
9842
+ "user-dropdown": A(() => [
9843
+ V(X.$slots, e.userName, {
9844
+ avatar: e.avatar,
9845
+ role: e.userRole
9846
+ }, () => [
9847
+ n(i) ? R("", !0) : (o(), B(n(bo), {
9848
+ key: 0,
9849
+ "avatar-url": e.avatar,
9850
+ name: e.userName,
9851
+ role: e.userRole
9852
+ }, null, 8, ["avatar-url", "name", "role"]))
9853
+ ])
9806
9854
  ]),
9807
- key: "0"
9808
- } : void 0
9809
- ]), 1032, ["action-label", "title"]));
9855
+ _: 3
9856
+ }, 8, ["is-opened"])
9857
+ ], 64));
9810
9858
  }
9811
9859
  });
9812
- function An() {
9813
- return pt() && de(Wa, void 0) || ko;
9860
+ function Mg() {
9861
+ if (pt())
9862
+ return de(Wa, void 0);
9814
9863
  }
9815
- function So(e) {
9816
- const { t: a } = Ve({ useScope: "global" }), t = An();
9817
- let l;
9818
- e && (l = b(n(e))), ne(
9819
- () => e ? n(e) : void 0,
9820
- (h) => {
9821
- h && (l = b(h));
9822
- },
9823
- { deep: !0 }
9824
- );
9825
- function r(h) {
9826
- if (!h)
9827
- return;
9828
- const m = An(), w = m?.popups?.findIndex(
9829
- (k) => or(k, h, ($) => $.component)
9830
- );
9831
- typeof w == "number" && w !== -1 && m?.popups?.splice(w, 1);
9832
- }
9833
- function s(h) {
9834
- return l ?? h;
9835
- }
9836
- function i(h) {
9837
- h && (r(h), t?.popups?.push(h));
9838
- }
9839
- async function u(h) {
9840
- await Ee(), i(s(h));
9841
- }
9842
- function c(h) {
9843
- const m = s(h);
9844
- if (!m)
9845
- return;
9846
- const w = t?.popups.indexOf(m);
9847
- typeof w == "number" && w !== -1 && t?.popups?.splice(w, 1);
9848
- }
9849
- function d(h, m, w) {
9850
- const k = b({
9851
- component: h,
9852
- props: {
9853
- title: m
9854
- },
9855
- emits: {
9856
- onClose() {
9857
- c(k);
9858
- }
9859
- },
9860
- slots: {
9861
- default: w
9862
- }
9863
- });
9864
- return i(k), k;
9865
- }
9866
- function v(h) {
9867
- return new Promise((m) => {
9868
- const w = b({
9869
- component: Mg,
9870
- props: {
9871
- title: a("COMPONENTS.ORGANISMS.VC_POPUP.TITLE.CONFIRMATION")
9872
- },
9873
- emits: {
9874
- onClose() {
9875
- m(!1), c(w);
9876
- },
9877
- onConfirm() {
9878
- m(!0), c(w);
9879
- }
9880
- },
9881
- slots: {
9882
- default: h
9883
- }
9864
+ const Og = ["innerHTML"], Lg = /* @__PURE__ */ U({
9865
+ __name: "vc-popup-container",
9866
+ setup(e) {
9867
+ const a = Mg();
9868
+ function t(l) {
9869
+ return xl.sanitize(l, {
9870
+ ALLOWED_TAGS: [
9871
+ "p",
9872
+ "br",
9873
+ "strong",
9874
+ "em",
9875
+ "u",
9876
+ "s",
9877
+ "h1",
9878
+ "h2",
9879
+ "h3",
9880
+ "h4",
9881
+ "h5",
9882
+ "h6",
9883
+ "ul",
9884
+ "ol",
9885
+ "li",
9886
+ "blockquote",
9887
+ "pre",
9888
+ "code",
9889
+ "a",
9890
+ "img",
9891
+ "table",
9892
+ "thead",
9893
+ "tbody",
9894
+ "tr",
9895
+ "th",
9896
+ "td",
9897
+ "hr",
9898
+ "div",
9899
+ "span"
9900
+ ],
9901
+ ALLOWED_ATTR: ["href", "src", "alt", "title", "class", "id", "colspan", "rowspan", "align", "valign"],
9902
+ FORBID_TAGS: ["script", "object", "embed", "form", "input"],
9903
+ FORBID_ATTR: ["onerror", "onload", "onclick", "onmouseover", "onfocus", "onblur", "style"]
9884
9904
  });
9885
- i(w);
9886
- });
9887
- }
9888
- function g(h) {
9889
- d(Og, a("COMPONENTS.ORGANISMS.VC_POPUP.TITLE.ERROR"), h);
9890
- }
9891
- function f(h) {
9892
- d(Lg, a("COMPONENTS.ORGANISMS.VC_POPUP.TITLE.INFO"), h);
9893
- }
9894
- function b(h) {
9895
- const m = xt({
9896
- ...Bg(h),
9897
- id: Symbol("vc-popup-instance"),
9898
- close: () => {
9899
- },
9900
- open: () => {
9901
- }
9902
- });
9903
- return m.close = () => c(m), m.open = () => u(m), m;
9905
+ }
9906
+ return (l, r) => (o(!0), p(ee, null, me(n(a)?.popups, (s, i) => (o(), B(We(s.component), Se({
9907
+ key: s.id ?? i
9908
+ }, { ref_for: !0 }, { ...s.props, ...s.emits }, {
9909
+ onClose: () => s.close?.()
9910
+ }), we({ _: 2 }, [
9911
+ me(s.slots, (u, c) => ({
9912
+ name: c,
9913
+ fn: A(() => [
9914
+ typeof u == "string" ? (o(), p("div", {
9915
+ key: 0,
9916
+ class: "tw-h-full tw-w-full",
9917
+ innerHTML: t(u)
9918
+ }, null, 8, Og)) : (o(), B(We(u), { key: 1 }))
9919
+ ])
9920
+ }))
9921
+ ]), 1040, ["onClose"]))), 128));
9904
9922
  }
9905
- return {
9906
- open: u,
9907
- close: c,
9908
- showConfirmation: v,
9909
- showError: g,
9910
- showInfo: f
9911
- };
9912
- }
9913
- function Bg(e) {
9914
- const a = typeof e.slots > "u" ? {} : Object.fromEntries(
9915
- Object.entries(e.slots).map(([t, l]) => typeof l == "string" ? [t, l] : [t, Yt(l)])
9916
- );
9917
- return {
9918
- ...e,
9919
- slots: a,
9920
- component: Yt(ni(e.component))
9921
- };
9922
- }
9923
+ }), Bg = Lg;
9923
9924
  function Vg() {
9924
9925
  const e = O({}), a = O({});
9925
9926
  return {
@@ -10281,7 +10282,7 @@ const Ng = { class: "vc-menu-item__content" }, Pg = { class: "vc-menu-item__titl
10281
10282
  }), Xg = jg, Qg = /* @__PURE__ */ U({
10282
10283
  __name: "change-password-button",
10283
10284
  setup(e) {
10284
- const { open: a } = So({ component: Xg }), t = de(Ea, void 0), l = () => {
10285
+ const { open: a } = mo({ component: Xg }), t = de(Ea, void 0), l = () => {
10285
10286
  t?.(), a();
10286
10287
  };
10287
10288
  return (r, s) => (o(), B(n(Dl), {
@@ -10309,7 +10310,7 @@ const Ng = { class: "vc-menu-item__content" }, Pg = { class: "vc-menu-item__titl
10309
10310
  }
10310
10311
  });
10311
10312
  function Zg(e) {
10312
- const a = de(Cl), t = Yp();
10313
+ const a = de(Cl), t = lg();
10313
10314
  Dg(), ym(), Me(ll, e.isEmbedded), e.internalRoutes && Me(di, e.internalRoutes), e.dynamicModules !== void 0 && Me(Fn, e.dynamicModules), e.aiAgentConfig?.url && ci({
10314
10315
  config: e.aiAgentConfig,
10315
10316
  addGlobalToolbarButton: e.aiAgentAddGlobalToolbarButton ?? !0,
@@ -10324,7 +10325,7 @@ function eb(e) {
10324
10325
  const a = Tl();
10325
10326
  e.isEmbedded || e.registerMobileButton({
10326
10327
  id: "notifications",
10327
- component: yo,
10328
+ component: ko,
10328
10329
  icon: "lucide-bell",
10329
10330
  order: 10,
10330
10331
  isVisible: !0,
@@ -10416,7 +10417,7 @@ const ib = { class: "vc-app__main-content" }, sb = {
10416
10417
  const s = Dt().query.EmbeddedMode === "true", i = O();
10417
10418
  Me(zn, i);
10418
10419
  const u = tm();
10419
- tp();
10420
+ up();
10420
10421
  const { isAppReady: c, isAuthenticated: d, appsList: v, switchApp: g } = ob(a), { handleMenuItemClick: f, openRoot: b } = lb(), h = de(gi), m = de(Fn, void 0), w = de("aiAgentConfig", void 0), k = de("aiAgentAddGlobalToolbarButton", !0), $ = de(bi, O(!1));
10421
10422
  return Zg({
10422
10423
  isEmbedded: s,
@@ -10448,7 +10449,7 @@ const ib = { class: "vc-app__main-content" }, sb = {
10448
10449
  openRoot: n(b),
10449
10450
  handleMenuItemClick: n(f)
10450
10451
  }, () => [
10451
- (o(), B(We(E.$isDesktop.value ? Wp : Cg), {
10452
+ (o(), B(We(E.$isDesktop.value ? Zp : xg), {
10452
10453
  logo: e.logo,
10453
10454
  avatar: e.avatar,
10454
10455
  "user-name": e.name,
@@ -10502,7 +10503,7 @@ const ib = { class: "vc-app__main-content" }, sb = {
10502
10503
  n(w)?.url ? (o(), B(n(hi), { key: 1 })) : R("", !0)
10503
10504
  ])) : R("", !0)
10504
10505
  ]),
10505
- x(n(Ag))
10506
+ x(n(Bg))
10506
10507
  ])
10507
10508
  ], 2)) : (o(), B(M, {
10508
10509
  key: 0,
@@ -12532,7 +12533,7 @@ const Mh = { class: "vc-widget-container-desktop" }, Oh = { class: "vc-widget-co
12532
12533
  }
12533
12534
  });
12534
12535
  function Eo(e) {
12535
- const a = O(0), { open: t } = So(
12536
+ const a = O(0), { open: t } = mo(
12536
12537
  S(() => ({
12537
12538
  component: oy,
12538
12539
  props: {
@@ -19006,18 +19007,18 @@ const V1 = ["aria-busy"], D1 = {
19006
19007
  });
19007
19008
  export {
19008
19009
  OS as $,
19009
- Jp as A,
19010
+ ig as A,
19010
19011
  cC as B,
19011
19012
  B1 as C,
19012
- kn as D,
19013
+ Sn as D,
19013
19014
  Rn as E,
19014
19015
  vC as F,
19015
- Wp as G,
19016
+ Zp as G,
19016
19017
  Ca as H,
19017
- og as I,
19018
- Cg as J,
19019
- Zm as K,
19020
- Qm as L,
19018
+ fg as I,
19019
+ xg as J,
19020
+ sp as K,
19021
+ op as L,
19021
19022
  ao as M,
19022
19023
  fC as N,
19023
19024
  $r as O,
@@ -19054,10 +19055,10 @@ export {
19054
19055
  Va as aG,
19055
19056
  FS as aH,
19056
19057
  $l as aI,
19057
- tp as aJ,
19058
- fo as aK,
19059
- jp as aL,
19060
- ho as aM,
19058
+ up as aJ,
19059
+ po as aK,
19060
+ ag as aL,
19061
+ wo as aM,
19061
19062
  Vl as aN,
19062
19063
  dC as aO,
19063
19064
  Ll as aP,
@@ -19067,7 +19068,7 @@ export {
19067
19068
  it as aT,
19068
19069
  Eo as aU,
19069
19070
  Uf as aV,
19070
- sC as aW,
19071
+ rC as aW,
19071
19072
  Gr as aX,
19072
19073
  Zg as aY,
19073
19074
  ob as aZ,
@@ -19106,7 +19107,7 @@ export {
19106
19107
  C1 as b4,
19107
19108
  BS as b5,
19108
19109
  LS as b6,
19109
- go as b7,
19110
+ ho as b7,
19110
19111
  SC as b8,
19111
19112
  Yn as b9,
19112
19113
  xr as bA,
@@ -19129,7 +19130,7 @@ export {
19129
19130
  mm as bR,
19130
19131
  em as bS,
19131
19132
  io as bT,
19132
- So as bU,
19133
+ mo as bU,
19133
19134
  $m as bV,
19134
19135
  Fa as bW,
19135
19136
  _m as bX,
@@ -19141,18 +19142,18 @@ export {
19141
19142
  vo as bf,
19142
19143
  wm as bg,
19143
19144
  Sm as bh,
19144
- rC as bi,
19145
+ sC as bi,
19145
19146
  Xg as bj,
19146
19147
  Qg as bk,
19147
19148
  _l as bl,
19148
19149
  Hg as bm,
19149
19150
  Jg as bn,
19150
- yo as bo,
19151
- Pp as bp,
19152
- mo as bq,
19151
+ ko as bo,
19152
+ Kp as bp,
19153
+ go as bq,
19153
19154
  Dl as br,
19154
19155
  Gg as bs,
19155
- po as bt,
19156
+ bo as bt,
19156
19157
  tC as bu,
19157
19158
  aC as bv,
19158
19159
  Ba as bw,