@burdenoff/microfe-support 2026.1029.2 → 2026.1031.1

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 (260) hide show
  1. package/dist/generated/global-operations.js +1 -2
  2. package/dist/generated/global-operations.js.map +1 -1
  3. package/dist/generated/global-types.js +1 -2
  4. package/dist/generated/global-types.js.map +1 -1
  5. package/dist/node_modules/@tiptap/core/dist/index.js +701 -712
  6. package/dist/node_modules/@tiptap/core/dist/index.js.map +1 -1
  7. package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +1 -2
  8. package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js.map +1 -1
  9. package/dist/node_modules/@tiptap/core/dist/rolldown-runtime-D7D4PA-g.js +1 -2
  10. package/dist/node_modules/@tiptap/core/dist/rolldown-runtime-D7D4PA-g.js.map +1 -1
  11. package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js +15 -16
  12. package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js.map +1 -1
  13. package/dist/node_modules/@tiptap/extension-bold/dist/index.js +1 -2
  14. package/dist/node_modules/@tiptap/extension-bold/dist/index.js.map +1 -1
  15. package/dist/node_modules/@tiptap/extension-code/dist/index.js +1 -2
  16. package/dist/node_modules/@tiptap/extension-code/dist/index.js.map +1 -1
  17. package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +25 -26
  18. package/dist/node_modules/@tiptap/extension-code-block/dist/index.js.map +1 -1
  19. package/dist/node_modules/@tiptap/extension-document/dist/index.js +1 -2
  20. package/dist/node_modules/@tiptap/extension-document/dist/index.js.map +1 -1
  21. package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js +1 -2
  22. package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js.map +1 -1
  23. package/dist/node_modules/@tiptap/extension-heading/dist/index.js +1 -2
  24. package/dist/node_modules/@tiptap/extension-heading/dist/index.js.map +1 -1
  25. package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +16 -17
  26. package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js.map +1 -1
  27. package/dist/node_modules/@tiptap/extension-italic/dist/index.js +1 -2
  28. package/dist/node_modules/@tiptap/extension-italic/dist/index.js.map +1 -1
  29. package/dist/node_modules/@tiptap/extension-link/dist/index.js +71 -80
  30. package/dist/node_modules/@tiptap/extension-link/dist/index.js.map +1 -1
  31. package/dist/node_modules/@tiptap/extension-list/dist/index.js +77 -90
  32. package/dist/node_modules/@tiptap/extension-list/dist/index.js.map +1 -1
  33. package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +1 -2
  34. package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js.map +1 -1
  35. package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js +1 -2
  36. package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js.map +1 -1
  37. package/dist/node_modules/@tiptap/extension-strike/dist/index.js +1 -2
  38. package/dist/node_modules/@tiptap/extension-strike/dist/index.js.map +1 -1
  39. package/dist/node_modules/@tiptap/extension-text/dist/index.js +1 -2
  40. package/dist/node_modules/@tiptap/extension-text/dist/index.js.map +1 -1
  41. package/dist/node_modules/@tiptap/extension-underline/dist/index.js +1 -2
  42. package/dist/node_modules/@tiptap/extension-underline/dist/index.js.map +1 -1
  43. package/dist/node_modules/@tiptap/extensions/dist/index.js +112 -113
  44. package/dist/node_modules/@tiptap/extensions/dist/index.js.map +1 -1
  45. package/dist/node_modules/@tiptap/react/dist/index.js +5 -10
  46. package/dist/node_modules/@tiptap/react/dist/index.js.map +1 -1
  47. package/dist/node_modules/@tiptap/starter-kit/dist/index.js +1 -2
  48. package/dist/node_modules/@tiptap/starter-kit/dist/index.js.map +1 -1
  49. package/dist/node_modules/clsx/dist/clsx.js +1 -2
  50. package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
  51. package/dist/node_modules/dompurify/dist/purify.es.js +357 -347
  52. package/dist/node_modules/dompurify/dist/purify.es.js.map +1 -1
  53. package/dist/node_modules/fast-equals/dist/es/index.js +1 -2
  54. package/dist/node_modules/fast-equals/dist/es/index.js.map +1 -1
  55. package/dist/node_modules/linkifyjs/dist/linkify.js +1 -2
  56. package/dist/node_modules/linkifyjs/dist/linkify.js.map +1 -1
  57. package/dist/node_modules/marked/lib/marked.esm.js +10 -70
  58. package/dist/node_modules/marked/lib/marked.esm.js.map +1 -1
  59. package/dist/node_modules/orderedmap/dist/index.js +1 -2
  60. package/dist/node_modules/orderedmap/dist/index.js.map +1 -1
  61. package/dist/node_modules/prosemirror-commands/dist/index.js +107 -108
  62. package/dist/node_modules/prosemirror-commands/dist/index.js.map +1 -1
  63. package/dist/node_modules/prosemirror-dropcursor/dist/index.js +12 -13
  64. package/dist/node_modules/prosemirror-dropcursor/dist/index.js.map +1 -1
  65. package/dist/node_modules/prosemirror-gapcursor/dist/index.js +42 -47
  66. package/dist/node_modules/prosemirror-gapcursor/dist/index.js.map +1 -1
  67. package/dist/node_modules/prosemirror-history/dist/index.js +47 -49
  68. package/dist/node_modules/prosemirror-history/dist/index.js.map +1 -1
  69. package/dist/node_modules/prosemirror-keymap/dist/index.js +15 -16
  70. package/dist/node_modules/prosemirror-keymap/dist/index.js.map +1 -1
  71. package/dist/node_modules/prosemirror-model/dist/index.js +37 -41
  72. package/dist/node_modules/prosemirror-model/dist/index.js.map +1 -1
  73. package/dist/node_modules/prosemirror-schema-list/dist/index.js +36 -37
  74. package/dist/node_modules/prosemirror-schema-list/dist/index.js.map +1 -1
  75. package/dist/node_modules/prosemirror-state/dist/index.js +1 -2
  76. package/dist/node_modules/prosemirror-state/dist/index.js.map +1 -1
  77. package/dist/node_modules/prosemirror-transform/dist/index.js +1 -2
  78. package/dist/node_modules/prosemirror-transform/dist/index.js.map +1 -1
  79. package/dist/node_modules/prosemirror-view/dist/index.js +302 -304
  80. package/dist/node_modules/prosemirror-view/dist/index.js.map +1 -1
  81. package/dist/node_modules/rope-sequence/dist/index.js +1 -2
  82. package/dist/node_modules/rope-sequence/dist/index.js.map +1 -1
  83. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +4 -21
  84. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
  85. package/dist/node_modules/w3c-keyname/index.js +0 -1
  86. package/dist/node_modules/w3c-keyname/index.js.map +1 -1
  87. package/dist/support/SupportAdminRoot.js +14 -15
  88. package/dist/support/SupportAdminRoot.js.map +1 -1
  89. package/dist/support/SupportAdminRoutes.js +5 -6
  90. package/dist/support/SupportAdminRoutes.js.map +1 -1
  91. package/dist/support/SupportUserRoot.js +10 -11
  92. package/dist/support/SupportUserRoot.js.map +1 -1
  93. package/dist/support/SupportUserRoutes.js +1 -2
  94. package/dist/support/SupportUserRoutes.js.map +1 -1
  95. package/dist/support/components/NotificationToast.js +1 -2
  96. package/dist/support/components/NotificationToast.js.map +1 -1
  97. package/dist/support/components/PageLayout.js +15 -16
  98. package/dist/support/components/PageLayout.js.map +1 -1
  99. package/dist/support/components/RouteHelpers.js +1 -2
  100. package/dist/support/components/RouteHelpers.js.map +1 -1
  101. package/dist/support/components/analytics/CategoryBreakdown.js +9 -10
  102. package/dist/support/components/analytics/CategoryBreakdown.js.map +1 -1
  103. package/dist/support/components/analytics/MetricCard.js +1 -2
  104. package/dist/support/components/analytics/MetricCard.js.map +1 -1
  105. package/dist/support/components/analytics/PriorityBreakdown.js +9 -10
  106. package/dist/support/components/analytics/PriorityBreakdown.js.map +1 -1
  107. package/dist/support/components/analytics/SLAReport.js +5 -6
  108. package/dist/support/components/analytics/SLAReport.js.map +1 -1
  109. package/dist/support/components/analytics/SatisfactionDistribution.js +5 -6
  110. package/dist/support/components/analytics/SatisfactionDistribution.js.map +1 -1
  111. package/dist/support/components/analytics/TopAgents.js +5 -6
  112. package/dist/support/components/analytics/TopAgents.js.map +1 -1
  113. package/dist/support/components/analytics/TrendChart.js +5 -6
  114. package/dist/support/components/analytics/TrendChart.js.map +1 -1
  115. package/dist/support/components/careers/BulkCandidateActionGuidance.js +1 -2
  116. package/dist/support/components/careers/BulkCandidateActionGuidance.js.map +1 -1
  117. package/dist/support/components/careers/BulkCandidateDialogs.js +321 -322
  118. package/dist/support/components/careers/BulkCandidateDialogs.js.map +1 -1
  119. package/dist/support/components/careers/BulkOperationFeedback.js +1 -2
  120. package/dist/support/components/careers/BulkOperationFeedback.js.map +1 -1
  121. package/dist/support/components/careers/BulkSelectionSummary.js +1 -2
  122. package/dist/support/components/careers/BulkSelectionSummary.js.map +1 -1
  123. package/dist/support/components/careers/JobApplicationFilterContextGuard.js +1 -2
  124. package/dist/support/components/careers/JobApplicationFilterContextGuard.js.map +1 -1
  125. package/dist/support/components/careers/RichTextEditor.js +17 -18
  126. package/dist/support/components/careers/RichTextEditor.js.map +1 -1
  127. package/dist/support/components/kb/ArticleForm.js +10 -11
  128. package/dist/support/components/kb/ArticleForm.js.map +1 -1
  129. package/dist/support/components/settings/CannedResponsesSettings.js +2 -3
  130. package/dist/support/components/settings/CannedResponsesSettings.js.map +1 -1
  131. package/dist/support/components/settings/SLAPoliciesSettings.js +1 -2
  132. package/dist/support/components/settings/SLAPoliciesSettings.js.map +1 -1
  133. package/dist/support/components/settings/TicketCategoriesSettings.js +3 -8
  134. package/dist/support/components/settings/TicketCategoriesSettings.js.map +1 -1
  135. package/dist/support/components/tickets/AttachmentList.js +4 -5
  136. package/dist/support/components/tickets/AttachmentList.js.map +1 -1
  137. package/dist/support/components/tickets/MarkdownContent.js +1 -2
  138. package/dist/support/components/tickets/MarkdownContent.js.map +1 -1
  139. package/dist/support/components/tickets/MessageComposer.js +1 -2
  140. package/dist/support/components/tickets/MessageComposer.js.map +1 -1
  141. package/dist/support/components/tickets/MessageThread.js +13 -14
  142. package/dist/support/components/tickets/MessageThread.js.map +1 -1
  143. package/dist/support/components/tickets/TicketDetailHeader.js +13 -14
  144. package/dist/support/components/tickets/TicketDetailHeader.js.map +1 -1
  145. package/dist/support/components/tickets/TicketHeader.js +1 -2
  146. package/dist/support/components/tickets/TicketHeader.js.map +1 -1
  147. package/dist/support/components/tickets/TicketSidebar.js +6 -7
  148. package/dist/support/components/tickets/TicketSidebar.js.map +1 -1
  149. package/dist/support/components/tickets/TriagePanel.js +25 -26
  150. package/dist/support/components/tickets/TriagePanel.js.map +1 -1
  151. package/dist/support/components/ui.js +1 -2
  152. package/dist/support/constants/pipeline.js +1 -2
  153. package/dist/support/constants/pipeline.js.map +1 -1
  154. package/dist/support/constants.js +1 -2
  155. package/dist/support/constants.js.map +1 -1
  156. package/dist/support/events/rybbit.js +1 -2
  157. package/dist/support/events/rybbit.js.map +1 -1
  158. package/dist/support/hooks/index.js +6 -6
  159. package/dist/support/hooks/useAnalyticsOperations.js +1 -2
  160. package/dist/support/hooks/useAnalyticsOperations.js.map +1 -1
  161. package/dist/support/hooks/useAttachmentsFailedToast.js +1 -2
  162. package/dist/support/hooks/useAttachmentsFailedToast.js.map +1 -1
  163. package/dist/support/hooks/useChatOperations.js +14 -15
  164. package/dist/support/hooks/useChatOperations.js.map +1 -1
  165. package/dist/support/hooks/useDebouncedUrlText.js +1 -2
  166. package/dist/support/hooks/useDebouncedUrlText.js.map +1 -1
  167. package/dist/support/hooks/useKnowledgeBaseOperations.js +62 -63
  168. package/dist/support/hooks/useKnowledgeBaseOperations.js.map +1 -1
  169. package/dist/support/hooks/useNotification.js +1 -2
  170. package/dist/support/hooks/useNotification.js.map +1 -1
  171. package/dist/support/hooks/useRegisterFooter.js +1 -2
  172. package/dist/support/hooks/useRegisterFooter.js.map +1 -1
  173. package/dist/support/hooks/useSettingsOperations.js +1 -2
  174. package/dist/support/hooks/useSettingsOperations.js.map +1 -1
  175. package/dist/support/hooks/useSupportAttachments.js +1 -2
  176. package/dist/support/hooks/useSupportAttachments.js.map +1 -1
  177. package/dist/support/hooks/useTicketListOperations.js +9 -10
  178. package/dist/support/hooks/useTicketListOperations.js.map +1 -1
  179. package/dist/support/hooks/useTicketOperations.d.ts +8 -0
  180. package/dist/support/hooks/useTicketOperations.js +92 -93
  181. package/dist/support/hooks/useTicketOperations.js.map +1 -1
  182. package/dist/support/hooks/useTr.js +1 -2
  183. package/dist/support/hooks/useTr.js.map +1 -1
  184. package/dist/support/index.js +4 -4
  185. package/dist/support/pages/AnalyticsPage.js +34 -35
  186. package/dist/support/pages/AnalyticsPage.js.map +1 -1
  187. package/dist/support/pages/ArticleDetailAdminPage.js +33 -38
  188. package/dist/support/pages/ArticleDetailAdminPage.js.map +1 -1
  189. package/dist/support/pages/ArticleDetailUserPage.js +22 -23
  190. package/dist/support/pages/ArticleDetailUserPage.js.map +1 -1
  191. package/dist/support/pages/ContactInquiriesPage.js +5 -6
  192. package/dist/support/pages/ContactInquiriesPage.js.map +1 -1
  193. package/dist/support/pages/ContactInquiryDetailPage.js +13 -14
  194. package/dist/support/pages/ContactInquiryDetailPage.js.map +1 -1
  195. package/dist/support/pages/CreateArticlePage.js +15 -16
  196. package/dist/support/pages/CreateArticlePage.js.map +1 -1
  197. package/dist/support/pages/CreateTicketPage.js +37 -44
  198. package/dist/support/pages/CreateTicketPage.js.map +1 -1
  199. package/dist/support/pages/EditArticlePage.js +20 -21
  200. package/dist/support/pages/EditArticlePage.js.map +1 -1
  201. package/dist/support/pages/InterviewersPage.js +121 -122
  202. package/dist/support/pages/InterviewersPage.js.map +1 -1
  203. package/dist/support/pages/JobApplicationDetailPage.js +322 -332
  204. package/dist/support/pages/JobApplicationDetailPage.js.map +1 -1
  205. package/dist/support/pages/JobApplicationsPage.js +556 -561
  206. package/dist/support/pages/JobApplicationsPage.js.map +1 -1
  207. package/dist/support/pages/JobPostingDetailPage.js +489 -490
  208. package/dist/support/pages/JobPostingDetailPage.js.map +1 -1
  209. package/dist/support/pages/JobPostingsPage.js +279 -280
  210. package/dist/support/pages/JobPostingsPage.js.map +1 -1
  211. package/dist/support/pages/KnowledgeBaseAdminPage.js +26 -27
  212. package/dist/support/pages/KnowledgeBaseAdminPage.js.map +1 -1
  213. package/dist/support/pages/KnowledgeBaseUserPage.js +23 -24
  214. package/dist/support/pages/KnowledgeBaseUserPage.js.map +1 -1
  215. package/dist/support/pages/SettingsPage.js +43 -44
  216. package/dist/support/pages/SettingsPage.js.map +1 -1
  217. package/dist/support/pages/TicketDetailAdminPage.js +54 -55
  218. package/dist/support/pages/TicketDetailAdminPage.js.map +1 -1
  219. package/dist/support/pages/TicketDetailUserPage.js +61 -62
  220. package/dist/support/pages/TicketDetailUserPage.js.map +1 -1
  221. package/dist/support/pages/TicketListPage.js +77 -78
  222. package/dist/support/pages/TicketListPage.js.map +1 -1
  223. package/dist/support/providers/SupportProvider.js +1 -2
  224. package/dist/support/providers/SupportProvider.js.map +1 -1
  225. package/dist/support/store/supportStore.js +1 -2
  226. package/dist/support/store/supportStore.js.map +1 -1
  227. package/dist/support/translations/en.js +1 -2
  228. package/dist/support/translations/en.js.map +1 -1
  229. package/dist/support/utils/attachments.js +1 -2
  230. package/dist/support/utils/attachments.js.map +1 -1
  231. package/dist/support/utils/breadcrumbRegistry.js +3 -4
  232. package/dist/support/utils/breadcrumbRegistry.js.map +1 -1
  233. package/dist/support/utils/bulkCandidateOperations.js +0 -1
  234. package/dist/support/utils/bulkCandidateOperations.js.map +1 -1
  235. package/dist/support/utils/bulkCandidateTargetQuery.js +1 -2
  236. package/dist/support/utils/bulkCandidateTargetQuery.js.map +1 -1
  237. package/dist/support/utils/categoryColors.js +1 -2
  238. package/dist/support/utils/categoryColors.js.map +1 -1
  239. package/dist/support/utils/cn.js +1 -2
  240. package/dist/support/utils/cn.js.map +1 -1
  241. package/dist/support/utils/context.js +3 -4
  242. package/dist/support/utils/context.js.map +1 -1
  243. package/dist/support/utils/errors.js +1 -2
  244. package/dist/support/utils/errors.js.map +1 -1
  245. package/dist/support/utils/i18n.js +1 -2
  246. package/dist/support/utils/i18n.js.map +1 -1
  247. package/dist/support/utils/index.js +1 -2
  248. package/dist/support/utils/index.js.map +1 -1
  249. package/dist/support/utils/jobApplicationFilterParams.js +1 -2
  250. package/dist/support/utils/jobApplicationFilterParams.js.map +1 -1
  251. package/dist/support/utils/markdown.js +1 -2
  252. package/dist/support/utils/markdown.js.map +1 -1
  253. package/dist/support/utils/supportFiles.js +2 -11
  254. package/dist/support/utils/supportFiles.js.map +1 -1
  255. package/dist/support/utils/ticketFilters.js +1 -2
  256. package/dist/support/utils/ticketFilters.js.map +1 -1
  257. package/dist/support/utils/uiTokens.js +1 -2
  258. package/dist/support/utils/uiTokens.js.map +1 -1
  259. package/dist/utils/nativeBridge.js +1 -2
  260. package/package.json +21 -14
@@ -1,21 +1,21 @@
1
- import { Button as e, Checkbox as t, Dialog as n, DialogContent as r, DialogDescription as ee, DialogFooter as i, DialogHeader as te, DialogTitle as a, Label as o, Select as s, SelectContent as c, SelectItem as l, SelectTrigger as u, SelectValue as ne, Textarea as d } from "../ui.js";
2
- import { BulkEnsureInterviewRoundsDocument as f, BulkRandomizeAndSendAssignmentDocument as p, BulkSendCustomEmailDocument as m, BulkSendRoundMessageDocument as h, BulkUpdateApplicationStatusDocument as g, NotifyDuplicateApplicantsDocument as _, useGetJobPostingQuery as v } from "../../../generated/global-operations.js";
3
- import { InterviewRoundType as y } from "../../../generated/global-types.js";
4
- import { statusLabels as b, statusOrder as x } from "../../constants/pipeline.js";
5
- import { nativeNotify as re } from "../../../utils/nativeBridge.js";
6
- import { RichTextEditor as S } from "./RichTextEditor.js";
7
- import { aggregateBulkCustomEmailResult as C, aggregateBulkStatusUpdateResult as w, aggregateCandidateEmailResult as T, aggregateDuplicateNoticeResult as E, aggregateEnsureRoundResult as D, assertCompleteBulkCustomEmailChunkResult as O, assertCompleteBulkStatusUpdateChunkResult as k, assertCompleteCandidateEmailChunkResult as A, assertCompleteEnsureRoundChunkResult as j, createEmptyBulkCustomEmailAggregate as M, createEmptyBulkStatusUpdateAggregate as N, createEmptyCandidateEmailAggregate as P, createEmptyDuplicateNoticeAggregate as F, createEmptyEnsureRoundAggregate as I, executeSequentialCandidateChunks as ie, getBulkOperationNotificationSeverity as ae, getCandidateSelectionCount as oe, getSelectedCandidateIds as L, hasCandidateEmailType as R, resolveExactCandidateRounds as z } from "../../utils/bulkCandidateOperations.js";
8
- import { BulkCandidateActionGuidance as B } from "./BulkCandidateActionGuidance.js";
9
- import { BulkCustomEmailResultDetails as V, BulkOperationProgress as se, BulkStatusUpdateResultDetails as ce, CandidateEmailResultDetails as le, DuplicateNoticeResultDetails as H, EnsureRoundResultDetails as ue, StoppedBulkOperationNotice as U } from "./BulkOperationFeedback.js";
10
- import { useEffect as de, useMemo as fe, useState as W } from "react";
11
- import { AlertCircle as pe, Loader2 as G, Mail as K, Send as me, Tag as q, UserPlus as he } from "lucide-react";
1
+ import { BulkEnsureInterviewRoundsDocument as e, BulkRandomizeAndSendAssignmentDocument as t, BulkSendCustomEmailDocument as n, BulkSendRoundMessageDocument as r, BulkUpdateApplicationStatusDocument as i, NotifyDuplicateApplicantsDocument as a, useGetJobPostingQuery as o } from "../../../generated/global-operations.js";
2
+ import { InterviewRoundType as s } from "../../../generated/global-types.js";
3
+ import { nativeNotify as ee } from "../../../utils/nativeBridge.js";
4
+ import { statusLabels as c, statusOrder as l } from "../../constants/pipeline.js";
5
+ import { aggregateBulkCustomEmailResult as u, aggregateBulkStatusUpdateResult as d, aggregateCandidateEmailResult as f, aggregateDuplicateNoticeResult as p, aggregateEnsureRoundResult as m, assertCompleteBulkCustomEmailChunkResult as h, assertCompleteBulkStatusUpdateChunkResult as g, assertCompleteCandidateEmailChunkResult as _, assertCompleteEnsureRoundChunkResult as v, createEmptyBulkCustomEmailAggregate as y, createEmptyBulkStatusUpdateAggregate as b, createEmptyCandidateEmailAggregate as x, createEmptyDuplicateNoticeAggregate as S, createEmptyEnsureRoundAggregate as C, executeSequentialCandidateChunks as te, getBulkOperationNotificationSeverity as ne, getCandidateSelectionCount as re, getSelectedCandidateIds as w, hasCandidateEmailType as T, resolveExactCandidateRounds as E } from "../../utils/bulkCandidateOperations.js";
6
+ import { RichTextEditor as D } from "./RichTextEditor.js";
7
+ import { BulkCandidateActionGuidance as O } from "./BulkCandidateActionGuidance.js";
8
+ import { BulkCustomEmailResultDetails as k, BulkOperationProgress as A, BulkStatusUpdateResultDetails as j, CandidateEmailResultDetails as M, DuplicateNoticeResultDetails as N, EnsureRoundResultDetails as P, StoppedBulkOperationNotice as F } from "./BulkOperationFeedback.js";
9
+ import { Button as I, Checkbox as L, Dialog as ie, DialogContent as ae, DialogDescription as R, DialogFooter as z, DialogHeader as oe, DialogTitle as se, Label as B, Select as ce, SelectContent as le, SelectItem as ue, SelectTrigger as de, SelectValue as fe, Textarea as pe } from "../ui.js";
10
+ import { useEffect as V, useMemo as H, useState as U } from "react";
11
+ import { AlertCircle as W, Loader2 as G, Mail as K, Send as me, Tag as q, UserPlus as he } from "lucide-react";
12
12
  import { graphqlFetch as ge } from "@burdenoff/fe-libs/shared/graphql/fetch";
13
13
  import { jsx as J, jsxs as Y } from "react/jsx-runtime";
14
14
  import { useApolloClient as _e } from "@apollo/client/react";
15
15
  import { print as ve } from "graphql";
16
- //#region src/support/components/careers/BulkCandidateDialogs.tsx
16
+ // src/support/components/careers/BulkCandidateDialogs.tsx
17
17
  function ye(e) {
18
- return e.isAssignmentRound || e.roundType === y.TakeHome;
18
+ return e.isAssignmentRound || e.roundType === s.TakeHome;
19
19
  }
20
20
  var be = {
21
21
  message: "ROUND_MESSAGE",
@@ -37,119 +37,119 @@ async function X(e, t, n) {
37
37
  return r.data;
38
38
  }
39
39
  function Se(e, t) {
40
- let n = L(t);
40
+ let n = w(t);
41
41
  return e.filter((e) => n.has(e.id));
42
42
  }
43
- function Ce({ mode: f, open: m, onClose: g, onOpenAddRound: _, targets: y, selection: b, jobPostingId: x, previewLoading: S, previewError: C }) {
44
- let w = _e(), [E, D] = W(""), [O, k] = W(""), [j, M] = W(!1), [N, F] = W(null), [I, L] = W(P), [V, ce] = W(null), [H, ue] = W(!1), [K, q] = W(!1), { data: ge, loading: ve, error: Ce } = v({
45
- variables: { id: x },
46
- skip: !m || !x,
43
+ function Ce({ mode: e, open: n, onClose: i, onOpenAddRound: a, targets: s, selection: c, jobPostingId: l, previewLoading: u, previewError: d }) {
44
+ let p = _e(), [m, h] = U(""), [g, v] = U(""), [y, b] = U(!1), [S, C] = U(null), [w, D] = U(x), [k, j] = U(null), [N, P] = U(!1), [K, q] = U(!1), { data: ge, loading: ve, error: Ce } = o({
45
+ variables: { id: l },
46
+ skip: !n || !l,
47
47
  fetchPolicy: "network-only"
48
48
  });
49
- de(() => {
50
- m && (D(""), k(""), M(!1), F(null), L(P()), ce(null), ue(!1), q(!1));
51
- }, [m, f]);
52
- let we = fe(() => Se(y, b), [b, y]), Te = oe(b), Ee = we.length === Te, De = ge?.jobPosting?.rounds ?? [], Oe = De.filter((e) => f !== "assignment" || ye(e)), ke = De.find((e) => e.id === E), Z = ke ? z(we, ke.id) : {
49
+ V(() => {
50
+ n && (h(""), v(""), b(!1), C(null), D(x()), j(null), P(!1), q(!1));
51
+ }, [n, e]);
52
+ let we = H(() => Se(s, c), [c, s]), Te = re(c), Ee = we.length === Te, De = ge?.jobPosting?.rounds ?? [], Oe = De.filter((t) => e !== "assignment" || ye(t)), ke = De.find((e) => e.id === m), Z = ke ? E(we, ke.id) : {
53
53
  pairs: [],
54
54
  unresolved: []
55
- }, Ae = Z.unresolved.filter((e) => e.reason === "MISSING").length, je = Z.unresolved.filter((e) => e.reason === "AMBIGUOUS").length, Me = be[f], Ne = Z.pairs.filter(({ round: e }) => R(e, Me)).length, Pe = Z.pairs.filter(({ round: e }) => j || !R(e, Me)).length, Fe = we.some((e) => e.jobPostingId !== x), Q = C;
56
- !Q && Ce ? Q = "Could not load the posting rounds. Nothing will be sent." : !Q && !S && !Ee ? Q = "Some selected candidate details are unavailable. Refresh the selection before sending." : !Q && Fe ? Q = "Some selected candidates do not belong to the filtered posting." : !Q && E && !ve && !ke ? Q = "The selected round is no longer available. Choose another round." : !Q && je > 0 && (Q = `${je} selected candidate${je === 1 ? " has" : "s have"} multiple concrete rounds for this configuration. Nothing will be sent until the data is corrected.`);
55
+ }, Ae = Z.unresolved.filter((e) => e.reason === "MISSING").length, je = Z.unresolved.filter((e) => e.reason === "AMBIGUOUS").length, Me = be[e], Ne = Z.pairs.filter(({ round: e }) => T(e, Me)).length, Pe = Z.pairs.filter(({ round: e }) => y || !T(e, Me)).length, Fe = we.some((e) => e.jobPostingId !== l), Q = d;
56
+ !Q && Ce ? Q = "Could not load the posting rounds. Nothing will be sent." : !Q && !u && !Ee ? Q = "Some selected candidate details are unavailable. Refresh the selection before sending." : !Q && Fe ? Q = "Some selected candidates do not belong to the filtered posting." : !Q && m && !ve && !ke ? Q = "The selected round is no longer available. Choose another round." : !Q && je > 0 && (Q = `${je} selected candidate${je === 1 ? " has" : "s have"} multiple concrete rounds for this configuration. Nothing will be sent until the data is corrected.`);
57
57
  let Ie = async () => {
58
- if (K || H || S || ve || Q || !Ee || !ke || Z.pairs.length === 0 || Pe === 0 || f === "message" && !O.trim()) return;
59
- q(!0), ue(!0), ce(null), L(P());
60
- let e = await ie({
58
+ if (K || N || u || ve || Q || !Ee || !ke || Z.pairs.length === 0 || Pe === 0 || e === "message" && !g.trim()) return;
59
+ q(!0), P(!0), j(null), D(x());
60
+ let n = await te({
61
61
  items: Z.pairs.map(({ applicationId: e, roundId: t }) => ({
62
62
  applicationId: e,
63
63
  roundId: t
64
64
  })),
65
- initialAggregate: P(),
66
- onProgress: F,
67
- executeChunk: async (e) => {
68
- if (f === "assignment") {
69
- let t = (await X(p, { input: {
70
- items: [...e],
71
- force: j
65
+ initialAggregate: x(),
66
+ onProgress: C,
67
+ executeChunk: async (n) => {
68
+ if (e === "assignment") {
69
+ let e = (await X(t, { input: {
70
+ items: [...n],
71
+ force: y
72
72
  } }, "BulkRandomizeAndSendAssignment")).bulkRandomizeAndSendAssignment;
73
- if (!t) throw Error("The assignment request returned no result.");
74
- let n = {
75
- succeeded: t.succeeded.map((e) => ({
73
+ if (!e) throw Error("The assignment request returned no result.");
74
+ let r = {
75
+ succeeded: e.succeeded.map((e) => ({
76
76
  applicationId: e.applicationId,
77
77
  roundId: e.id
78
78
  })),
79
- skipped: t.skipped.map((e) => ({
79
+ skipped: e.skipped.map((e) => ({
80
80
  applicationId: e.applicationId,
81
81
  roundId: e.roundId,
82
82
  reason: e.reason,
83
83
  message: e.message
84
84
  })),
85
- failed: t.failed.map((e) => ({
85
+ failed: e.failed.map((e) => ({
86
86
  applicationId: e.applicationId,
87
87
  roundId: e.roundId,
88
88
  message: e.message
89
89
  }))
90
90
  };
91
- return A(e, n), n;
91
+ return _(n, r), r;
92
92
  }
93
- let t = (await X(h, { input: {
94
- items: [...e],
95
- message: O.trim(),
96
- force: j
93
+ let i = (await X(r, { input: {
94
+ items: [...n],
95
+ message: g.trim(),
96
+ force: y
97
97
  } }, "BulkSendRoundMessage")).bulkSendRoundMessage;
98
- if (!t) throw Error("The message request returned no result.");
99
- let n = {
100
- succeeded: t.succeeded.map((e) => ({
98
+ if (!i) throw Error("The message request returned no result.");
99
+ let a = {
100
+ succeeded: i.succeeded.map((e) => ({
101
101
  applicationId: e.applicationId,
102
102
  roundId: e.id
103
103
  })),
104
- skipped: t.skipped.map((e) => ({
104
+ skipped: i.skipped.map((e) => ({
105
105
  applicationId: e.applicationId,
106
106
  roundId: e.roundId,
107
107
  reason: e.reason,
108
108
  message: e.message
109
109
  })),
110
- failed: t.failed.map((e) => ({
110
+ failed: i.failed.map((e) => ({
111
111
  applicationId: e.applicationId,
112
112
  roundId: e.roundId,
113
113
  message: e.message
114
114
  }))
115
115
  };
116
- return A(e, n), n;
116
+ return _(n, a), a;
117
117
  },
118
- mergeResult: T
118
+ mergeResult: f
119
119
  });
120
- L(e.aggregate), e.error && ce({
121
- knownCompleted: e.processedItems.length,
122
- ambiguous: e.ambiguousItems.length,
123
- notStarted: e.notStartedItems.length,
124
- message: xe(e.error)
125
- }), re(ae({
126
- succeeded: e.aggregate.succeeded.length,
127
- skipped: e.aggregate.skipped.length,
128
- failed: e.aggregate.failed.length,
129
- ambiguous: !!e.error
130
- })), q(!1), w.refetchQueries({ include: ["GetJobApplications", "GetJobApplicationInterviewRounds"] }).catch(() => void 0);
131
- }, $ = S || ve;
132
- return /* @__PURE__ */ J(n, {
133
- open: m,
120
+ D(n.aggregate), n.error && j({
121
+ knownCompleted: n.processedItems.length,
122
+ ambiguous: n.ambiguousItems.length,
123
+ notStarted: n.notStartedItems.length,
124
+ message: xe(n.error)
125
+ }), ee(ne({
126
+ succeeded: n.aggregate.succeeded.length,
127
+ skipped: n.aggregate.skipped.length,
128
+ failed: n.aggregate.failed.length,
129
+ ambiguous: !!n.error
130
+ })), q(!1), p.refetchQueries({ include: ["GetJobApplications", "GetJobApplicationInterviewRounds"] }).catch(() => void 0);
131
+ }, $ = u || ve;
132
+ return /* @__PURE__ */ J(ie, {
133
+ open: n,
134
134
  onOpenChange: (e) => {
135
- !e && !K && g();
135
+ !e && !K && i();
136
136
  },
137
- children: /* @__PURE__ */ Y(r, {
137
+ children: /* @__PURE__ */ Y(ae, {
138
138
  className: "sm:max-w-xl max-h-[90vh] overflow-y-auto",
139
139
  children: [
140
- /* @__PURE__ */ Y(te, { children: [/* @__PURE__ */ J(a, { children: f === "assignment" ? "Assign & Email Random Take-Home" : "Send Message" }), /* @__PURE__ */ J(ee, { children: "Choose one configured round for the candidates in the filtered posting." })] }),
141
- /* @__PURE__ */ J(B, {
142
- action: f,
140
+ /* @__PURE__ */ Y(oe, { children: [/* @__PURE__ */ J(se, { children: e === "assignment" ? "Assign & Email Random Take-Home" : "Send Message" }), /* @__PURE__ */ J(R, { children: "Choose one configured round for the candidates in the filtered posting." })] }),
141
+ /* @__PURE__ */ J(O, {
142
+ action: e,
143
143
  unresolvedCount: Ae
144
144
  }),
145
- H ? /* @__PURE__ */ Y("div", {
145
+ N ? /* @__PURE__ */ Y("div", {
146
146
  className: "space-y-4",
147
147
  children: [
148
- N ? /* @__PURE__ */ J(se, { progress: N }) : null,
149
- /* @__PURE__ */ J(le, { result: I }),
150
- V ? /* @__PURE__ */ J(U, { details: V }) : null,
151
- /* @__PURE__ */ J(i, { children: /* @__PURE__ */ J(e, {
152
- onClick: g,
148
+ S ? /* @__PURE__ */ J(A, { progress: S }) : null,
149
+ /* @__PURE__ */ J(M, { result: w }),
150
+ k ? /* @__PURE__ */ J(F, { details: k }) : null,
151
+ /* @__PURE__ */ J(z, { children: /* @__PURE__ */ J(I, {
152
+ onClick: i,
153
153
  disabled: K,
154
154
  children: "Done"
155
155
  }) })
@@ -167,7 +167,7 @@ function Ce({ mode: f, open: m, onClose: g, onOpenAddRound: _, targets: y, selec
167
167
  Q ? /* @__PURE__ */ Y("div", {
168
168
  className: "flex items-start gap-2 text-sm text-status-error-text",
169
169
  role: "alert",
170
- children: [/* @__PURE__ */ J(pe, {
170
+ children: [/* @__PURE__ */ J(W, {
171
171
  size: 14,
172
172
  className: "mt-0.5 shrink-0"
173
173
  }), /* @__PURE__ */ J("span", { children: Q })]
@@ -175,18 +175,18 @@ function Ce({ mode: f, open: m, onClose: g, onOpenAddRound: _, targets: y, selec
175
175
  /* @__PURE__ */ Y("div", {
176
176
  className: "space-y-1.5",
177
177
  children: [
178
- /* @__PURE__ */ J(o, {
178
+ /* @__PURE__ */ J(B, {
179
179
  htmlFor: "bulk-round-config",
180
180
  children: "Target round"
181
181
  }),
182
- /* @__PURE__ */ Y(s, {
183
- value: E,
184
- onValueChange: D,
182
+ /* @__PURE__ */ Y(ce, {
183
+ value: m,
184
+ onValueChange: h,
185
185
  disabled: $ || !!Q,
186
- children: [/* @__PURE__ */ J(u, {
186
+ children: [/* @__PURE__ */ J(de, {
187
187
  id: "bulk-round-config",
188
- children: /* @__PURE__ */ J(ne, { placeholder: "Select a round" })
189
- }), /* @__PURE__ */ J(c, { children: Oe.map((e) => /* @__PURE__ */ Y(l, {
188
+ children: /* @__PURE__ */ J(fe, { placeholder: "Select a round" })
189
+ }), /* @__PURE__ */ J(le, { children: Oe.map((e) => /* @__PURE__ */ Y(ue, {
190
190
  value: e.id,
191
191
  children: [
192
192
  "Round ",
@@ -198,24 +198,24 @@ function Ce({ mode: f, open: m, onClose: g, onOpenAddRound: _, targets: y, selec
198
198
  }),
199
199
  Oe.length === 0 && !$ && !Q ? /* @__PURE__ */ J("p", {
200
200
  className: "text-xs text-status-warning-text",
201
- children: f === "assignment" ? "This posting has no configured assignment round." : "This posting has no configured interview rounds."
201
+ children: e === "assignment" ? "This posting has no configured assignment round." : "This posting has no configured interview rounds."
202
202
  }) : null
203
203
  ]
204
204
  }),
205
- f === "message" ? /* @__PURE__ */ Y("div", {
205
+ e === "message" ? /* @__PURE__ */ Y("div", {
206
206
  className: "space-y-1.5",
207
- children: [/* @__PURE__ */ J(o, {
207
+ children: [/* @__PURE__ */ J(B, {
208
208
  htmlFor: "bulk-message",
209
209
  children: "Free-text message"
210
- }), /* @__PURE__ */ J(d, {
210
+ }), /* @__PURE__ */ J(pe, {
211
211
  id: "bulk-message",
212
- value: O,
213
- onChange: (e) => k(e.target.value),
212
+ value: g,
213
+ onChange: (e) => v(e.target.value),
214
214
  placeholder: "Write the message sent to each candidate",
215
215
  rows: 5
216
216
  })]
217
217
  }) : null,
218
- E && !$ && !Q ? /* @__PURE__ */ Y("div", {
218
+ m && !$ && !Q ? /* @__PURE__ */ Y("div", {
219
219
  className: "space-y-2 rounded-md border border-border-seam bg-bg-sunken/30 p-3 text-xs text-text-secondary",
220
220
  children: [
221
221
  /* @__PURE__ */ J("p", {
@@ -236,33 +236,33 @@ function Ce({ mode: f, open: m, onClose: g, onOpenAddRound: _, targets: y, selec
236
236
  Ne,
237
237
  " already received this email type",
238
238
  " ",
239
- j ? "(force will send again)" : "(the backend will skip them)",
239
+ y ? "(force will send again)" : "(the backend will skip them)",
240
240
  "."
241
241
  ] }) : null,
242
- Ae > 0 ? /* @__PURE__ */ Y(e, {
242
+ Ae > 0 ? /* @__PURE__ */ Y(I, {
243
243
  type: "button",
244
244
  size: "sm",
245
245
  variant: "outline",
246
- onClick: _,
246
+ onClick: a,
247
247
  children: [/* @__PURE__ */ J(he, { size: 14 }), "Add Selected to Round"]
248
248
  }) : null,
249
249
  /* @__PURE__ */ Y("label", {
250
250
  className: "flex cursor-pointer items-start gap-2 pt-1",
251
- children: [/* @__PURE__ */ J(t, {
252
- checked: j,
253
- onCheckedChange: (e) => M(e === !0)
251
+ children: [/* @__PURE__ */ J(L, {
252
+ checked: y,
253
+ onCheckedChange: (e) => b(e === !0)
254
254
  }), /* @__PURE__ */ J("span", { children: "Force resend to candidates with a prior email. Force sends are non-idempotent and are never retried automatically." })]
255
255
  })
256
256
  ]
257
257
  }) : null,
258
- /* @__PURE__ */ Y(i, { children: [/* @__PURE__ */ J(e, {
258
+ /* @__PURE__ */ Y(z, { children: [/* @__PURE__ */ J(I, {
259
259
  variant: "outline",
260
- onClick: g,
260
+ onClick: i,
261
261
  disabled: K,
262
262
  children: "Cancel"
263
- }), /* @__PURE__ */ Y(e, {
263
+ }), /* @__PURE__ */ Y(I, {
264
264
  onClick: () => void Ie(),
265
- disabled: K || $ || !!Q || !Ee || !E || Z.pairs.length === 0 || Pe === 0 || f === "message" && !O.trim(),
265
+ disabled: K || $ || !!Q || !Ee || !m || Z.pairs.length === 0 || Pe === 0 || e === "message" && !g.trim(),
266
266
  children: [K ? /* @__PURE__ */ J(G, {
267
267
  size: 16,
268
268
  className: "mr-2 animate-spin"
@@ -274,84 +274,84 @@ function Ce({ mode: f, open: m, onClose: g, onOpenAddRound: _, targets: y, selec
274
274
  })
275
275
  });
276
276
  }
277
- function we({ open: t, onClose: d, targets: p, selection: m, jobPostingId: h, previewLoading: g, previewError: _ }) {
278
- let y = _e(), [b, x] = W(""), [S, C] = W(null), [w, T] = W(I), [E, O] = W(null), [k, A] = W(!1), [M, N] = W(!1), { data: P, loading: F, error: L } = v({
279
- variables: { id: h },
280
- skip: !t || !h,
277
+ function we({ open: t, onClose: n, targets: r, selection: i, jobPostingId: a, previewLoading: s, previewError: c }) {
278
+ let l = _e(), [u, d] = U(""), [f, p] = U(null), [h, g] = U(C), [_, y] = U(null), [b, x] = U(!1), [S, w] = U(!1), { data: T, loading: E, error: D } = o({
279
+ variables: { id: a },
280
+ skip: !t || !a,
281
281
  fetchPolicy: "network-only"
282
282
  });
283
- de(() => {
284
- t && (x(""), C(null), T(I()), O(null), A(!1), N(!1));
283
+ V(() => {
284
+ t && (d(""), p(null), g(C()), y(null), x(!1), w(!1));
285
285
  }, [t]);
286
- let R = fe(() => Se(p, m), [m, p]), z = oe(m), B = R.length === z, V = R.map((e) => e.id), ce = R.some((e) => e.jobPostingId !== h), le = P?.jobPosting?.rounds ?? [], H = le.find((e) => e.id === b), K = _;
287
- !K && L ? K = "Could not load the posting rounds. Nothing will be changed." : !K && !g && !B ? K = "Some selected candidate details are unavailable. Refresh the selection before adding rounds." : !K && ce ? K = "Some selected candidates do not belong to the filtered posting." : !K && b && !F && !H && (K = "The selected round is no longer available. Choose another round.");
286
+ let O = H(() => Se(r, i), [i, r]), k = re(i), j = O.length === k, M = O.map((e) => e.id), N = O.some((e) => e.jobPostingId !== a), L = T?.jobPosting?.rounds ?? [], pe = L.find((e) => e.id === u), K = c;
287
+ !K && D ? K = "Could not load the posting rounds. Nothing will be changed." : !K && !s && !j ? K = "Some selected candidate details are unavailable. Refresh the selection before adding rounds." : !K && N ? K = "Some selected candidates do not belong to the filtered posting." : !K && u && !E && !pe && (K = "The selected round is no longer available. Choose another round.");
288
288
  let me = async () => {
289
- if (M || k || g || F || K || !B || !H || V.length === 0) return;
290
- N(!0), A(!0), O(null), T(I());
291
- let e = await ie({
292
- items: V,
293
- initialAggregate: I(),
294
- onProgress: C,
295
- executeChunk: async (e) => {
296
- let t = (await X(f, { input: {
297
- jobPostingId: h,
298
- roundConfigId: H.id,
299
- applicationIds: [...e]
289
+ if (S || b || s || E || K || !j || !pe || M.length === 0) return;
290
+ w(!0), x(!0), y(null), g(C());
291
+ let t = await te({
292
+ items: M,
293
+ initialAggregate: C(),
294
+ onProgress: p,
295
+ executeChunk: async (t) => {
296
+ let n = (await X(e, { input: {
297
+ jobPostingId: a,
298
+ roundConfigId: pe.id,
299
+ applicationIds: [...t]
300
300
  } }, "BulkEnsureInterviewRounds")).bulkEnsureInterviewRounds;
301
- if (!t) throw Error("The add-to-round request returned no result.");
302
- let n = {
303
- created: t.created.map((e) => ({
301
+ if (!n) throw Error("The add-to-round request returned no result.");
302
+ let r = {
303
+ created: n.created.map((e) => ({
304
304
  id: e.round.id,
305
305
  applicationId: e.applicationId
306
306
  })),
307
- alreadyPresent: t.alreadyPresent.map((e) => ({
307
+ alreadyPresent: n.alreadyPresent.map((e) => ({
308
308
  id: e.round.id,
309
309
  applicationId: e.applicationId
310
310
  })),
311
- failed: t.failed.map((e) => ({
311
+ failed: n.failed.map((e) => ({
312
312
  applicationId: e.applicationId,
313
313
  code: e.code,
314
314
  message: e.message
315
315
  }))
316
316
  };
317
- return j(e, n), n;
317
+ return v(t, r), r;
318
318
  },
319
- mergeResult: D
319
+ mergeResult: m
320
320
  });
321
- T(e.aggregate), e.error && O({
322
- knownCompleted: e.processedItems.length,
323
- ambiguous: e.ambiguousItems.length,
324
- notStarted: e.notStartedItems.length,
325
- message: xe(e.error)
326
- }), re(ae({
327
- succeeded: e.aggregate.created.length + e.aggregate.alreadyPresent.length,
321
+ g(t.aggregate), t.error && y({
322
+ knownCompleted: t.processedItems.length,
323
+ ambiguous: t.ambiguousItems.length,
324
+ notStarted: t.notStartedItems.length,
325
+ message: xe(t.error)
326
+ }), ee(ne({
327
+ succeeded: t.aggregate.created.length + t.aggregate.alreadyPresent.length,
328
328
  skipped: 0,
329
- failed: e.aggregate.failed.length,
330
- ambiguous: !!e.error
331
- })), N(!1), y.refetchQueries({ include: ["GetJobApplications", "GetJobApplicationInterviewRounds"] }).catch(() => void 0);
332
- }, q = g || F;
333
- return /* @__PURE__ */ J(n, {
329
+ failed: t.aggregate.failed.length,
330
+ ambiguous: !!t.error
331
+ })), w(!1), l.refetchQueries({ include: ["GetJobApplications", "GetJobApplicationInterviewRounds"] }).catch(() => void 0);
332
+ }, q = s || E;
333
+ return /* @__PURE__ */ J(ie, {
334
334
  open: t,
335
335
  onOpenChange: (e) => {
336
- !e && !M && d();
336
+ !e && !S && n();
337
337
  },
338
- children: /* @__PURE__ */ Y(r, {
338
+ children: /* @__PURE__ */ Y(ae, {
339
339
  className: "sm:max-w-xl max-h-[90vh] overflow-y-auto",
340
340
  children: [
341
- /* @__PURE__ */ Y(te, { children: [/* @__PURE__ */ J(a, { children: "Add Selected to Round" }), /* @__PURE__ */ J(ee, { children: "Add every selected candidate in this posting to one configured interview round." })] }),
341
+ /* @__PURE__ */ Y(oe, { children: [/* @__PURE__ */ J(se, { children: "Add Selected to Round" }), /* @__PURE__ */ J(R, { children: "Add every selected candidate in this posting to one configured interview round." })] }),
342
342
  /* @__PURE__ */ J("div", {
343
343
  className: "rounded-md border border-border-seam bg-bg-sunken/30 p-3 text-sm text-text-secondary",
344
344
  children: "Candidates without this concrete round are added with status Scheduled. Existing target rounds are left unchanged, and all prior round history and application status remain unchanged."
345
345
  }),
346
- k ? /* @__PURE__ */ Y("div", {
346
+ b ? /* @__PURE__ */ Y("div", {
347
347
  className: "space-y-4",
348
348
  children: [
349
- S ? /* @__PURE__ */ J(se, { progress: S }) : null,
350
- /* @__PURE__ */ J(ue, { result: w }),
351
- E ? /* @__PURE__ */ J(U, { details: E }) : null,
352
- /* @__PURE__ */ J(i, { children: /* @__PURE__ */ J(e, {
353
- onClick: d,
354
- disabled: M,
349
+ f ? /* @__PURE__ */ J(A, { progress: f }) : null,
350
+ /* @__PURE__ */ J(P, { result: h }),
351
+ _ ? /* @__PURE__ */ J(F, { details: _ }) : null,
352
+ /* @__PURE__ */ J(z, { children: /* @__PURE__ */ J(I, {
353
+ onClick: n,
354
+ disabled: S,
355
355
  children: "Done"
356
356
  }) })
357
357
  ]
@@ -368,7 +368,7 @@ function we({ open: t, onClose: d, targets: p, selection: m, jobPostingId: h, pr
368
368
  K ? /* @__PURE__ */ Y("div", {
369
369
  className: "flex items-start gap-2 text-sm text-status-error-text",
370
370
  role: "alert",
371
- children: [/* @__PURE__ */ J(pe, {
371
+ children: [/* @__PURE__ */ J(W, {
372
372
  size: 14,
373
373
  className: "mt-0.5 shrink-0"
374
374
  }), /* @__PURE__ */ J("span", { children: K })]
@@ -376,18 +376,18 @@ function we({ open: t, onClose: d, targets: p, selection: m, jobPostingId: h, pr
376
376
  /* @__PURE__ */ Y("div", {
377
377
  className: "space-y-1.5",
378
378
  children: [
379
- /* @__PURE__ */ J(o, {
379
+ /* @__PURE__ */ J(B, {
380
380
  htmlFor: "ensure-round-config",
381
381
  children: "Interview round"
382
382
  }),
383
- /* @__PURE__ */ Y(s, {
384
- value: b,
385
- onValueChange: x,
383
+ /* @__PURE__ */ Y(ce, {
384
+ value: u,
385
+ onValueChange: d,
386
386
  disabled: q || !!K,
387
- children: [/* @__PURE__ */ J(u, {
387
+ children: [/* @__PURE__ */ J(de, {
388
388
  id: "ensure-round-config",
389
- children: /* @__PURE__ */ J(ne, { placeholder: "Select a round" })
390
- }), /* @__PURE__ */ J(c, { children: le.map((e) => /* @__PURE__ */ Y(l, {
389
+ children: /* @__PURE__ */ J(fe, { placeholder: "Select a round" })
390
+ }), /* @__PURE__ */ J(le, { children: L.map((e) => /* @__PURE__ */ Y(ue, {
391
391
  value: e.id,
392
392
  children: [
393
393
  "Round ",
@@ -397,7 +397,7 @@ function we({ open: t, onClose: d, targets: p, selection: m, jobPostingId: h, pr
397
397
  ]
398
398
  }, e.id)) })]
399
399
  }),
400
- le.length === 0 && !q && !K ? /* @__PURE__ */ J("p", {
400
+ L.length === 0 && !q && !K ? /* @__PURE__ */ J("p", {
401
401
  className: "text-xs text-status-warning-text",
402
402
  children: "This posting has no configured interview rounds."
403
403
  }) : null
@@ -406,25 +406,25 @@ function we({ open: t, onClose: d, targets: p, selection: m, jobPostingId: h, pr
406
406
  /* @__PURE__ */ Y("p", {
407
407
  className: "text-xs text-text-secondary",
408
408
  children: [
409
- z,
409
+ k,
410
410
  " selected candidate",
411
- z === 1 ? "" : "s",
411
+ k === 1 ? "" : "s",
412
412
  " ",
413
413
  "will be checked. Existing target rounds are reported as already present."
414
414
  ]
415
415
  }),
416
- /* @__PURE__ */ Y(i, { children: [/* @__PURE__ */ J(e, {
416
+ /* @__PURE__ */ Y(z, { children: [/* @__PURE__ */ J(I, {
417
417
  variant: "outline",
418
- onClick: d,
419
- disabled: M,
418
+ onClick: n,
419
+ disabled: S,
420
420
  children: "Cancel"
421
- }), /* @__PURE__ */ Y(e, {
421
+ }), /* @__PURE__ */ Y(I, {
422
422
  onClick: () => void me(),
423
- disabled: M || q || !!K || !B || !b || V.length === 0,
424
- children: [M ? /* @__PURE__ */ J(G, {
423
+ disabled: S || q || !!K || !j || !u || M.length === 0,
424
+ children: [S ? /* @__PURE__ */ J(G, {
425
425
  size: 16,
426
426
  className: "mr-2 animate-spin"
427
- }) : /* @__PURE__ */ J(he, { size: 16 }), M ? "Adding…" : "Add Selected to Round"]
427
+ }) : /* @__PURE__ */ J(he, { size: 16 }), S ? "Adding…" : "Add Selected to Round"]
428
428
  })] })
429
429
  ]
430
430
  })
@@ -432,22 +432,22 @@ function we({ open: t, onClose: d, targets: p, selection: m, jobPostingId: h, pr
432
432
  })
433
433
  });
434
434
  }
435
- function Te({ open: t, onClose: o, targets: s, selection: c, jobPostingId: l, previewLoading: u, previewError: ne }) {
436
- let d = _e(), [f, p] = W(null), [m, h] = W(F), [g, v] = W(null), [y, b] = W(!1), [x, S] = W(!1);
437
- de(() => {
438
- t && (p(null), h(F()), v(null), b(!1), S(!1));
439
- }, [t]);
440
- let C = fe(() => Se(s, c), [c, s]), w = oe(c), T = C.length === w, D = C.map((e) => e.id), O = C.some((e) => e.jobPostingId !== l), k = ne;
441
- !k && !u && !T ? k = "Some selected candidate details are unavailable. Refresh the selection before notifying." : !k && O && (k = "Some selected candidates do not belong to the filtered posting.");
442
- let A = async () => {
443
- if (x || y || u || k || !T || D.length === 0) return;
444
- S(!0), b(!0), v(null), h(F());
445
- let e = await ie({
446
- items: D,
447
- initialAggregate: F(),
448
- onProgress: p,
435
+ function Te({ open: e, onClose: t, targets: n, selection: r, jobPostingId: i, previewLoading: o, previewError: s }) {
436
+ let c = _e(), [l, u] = U(null), [d, f] = U(S), [m, h] = U(null), [g, _] = U(!1), [v, y] = U(!1);
437
+ V(() => {
438
+ e && (u(null), f(S()), h(null), _(!1), y(!1));
439
+ }, [e]);
440
+ let b = H(() => Se(n, r), [r, n]), x = re(r), C = b.length === x, w = b.map((e) => e.id), T = b.some((e) => e.jobPostingId !== i), E = s;
441
+ !E && !o && !C ? E = "Some selected candidate details are unavailable. Refresh the selection before notifying." : !E && T && (E = "Some selected candidates do not belong to the filtered posting.");
442
+ let D = async () => {
443
+ if (v || g || o || E || !C || w.length === 0) return;
444
+ y(!0), _(!0), h(null), f(S());
445
+ let e = await te({
446
+ items: w,
447
+ initialAggregate: S(),
448
+ onProgress: u,
449
449
  executeChunk: async (e) => {
450
- let t = (await X(_, { input: { applicationIds: [...e] } }, "NotifyDuplicateApplicants")).notifyDuplicateApplicants;
450
+ let t = (await X(a, { input: { applicationIds: [...e] } }, "NotifyDuplicateApplicants")).notifyDuplicateApplicants;
451
451
  if (!t) throw Error("The duplicate-notice request returned no result.");
452
452
  return {
453
453
  succeeded: t.succeeded.map((e) => ({ email: e.email })),
@@ -462,85 +462,85 @@ function Te({ open: t, onClose: o, targets: s, selection: c, jobPostingId: l, pr
462
462
  }))
463
463
  };
464
464
  },
465
- mergeResult: E
465
+ mergeResult: p
466
466
  });
467
- h(e.aggregate), e.error && v({
467
+ f(e.aggregate), e.error && h({
468
468
  knownCompleted: e.processedItems.length,
469
469
  ambiguous: e.ambiguousItems.length,
470
470
  notStarted: e.notStartedItems.length,
471
471
  message: xe(e.error)
472
- }), re(ae({
472
+ }), ee(ne({
473
473
  succeeded: e.aggregate.succeeded.length,
474
474
  skipped: e.aggregate.skipped.length,
475
475
  failed: e.aggregate.failed.length,
476
476
  ambiguous: !!e.error
477
- })), S(!1), d.refetchQueries({ include: ["GetJobApplications"] }).catch(() => void 0);
477
+ })), y(!1), c.refetchQueries({ include: ["GetJobApplications"] }).catch(() => void 0);
478
478
  };
479
- return /* @__PURE__ */ J(n, {
480
- open: t,
479
+ return /* @__PURE__ */ J(ie, {
480
+ open: e,
481
481
  onOpenChange: (e) => {
482
- !e && !x && o();
482
+ !e && !v && t();
483
483
  },
484
- children: /* @__PURE__ */ Y(r, {
484
+ children: /* @__PURE__ */ Y(ae, {
485
485
  className: "sm:max-w-xl max-h-[90vh] overflow-y-auto",
486
486
  children: [
487
- /* @__PURE__ */ Y(te, { children: [/* @__PURE__ */ J(a, { children: "Notify Duplicate Applicants" }), /* @__PURE__ */ J(ee, { children: "Let candidates with more than one application know they only need to complete one take-home assignment." })] }),
487
+ /* @__PURE__ */ Y(oe, { children: [/* @__PURE__ */ J(se, { children: "Notify Duplicate Applicants" }), /* @__PURE__ */ J(R, { children: "Let candidates with more than one application know they only need to complete one take-home assignment." })] }),
488
488
  /* @__PURE__ */ J("div", {
489
489
  className: "rounded-md border border-border-seam bg-bg-sunken/30 p-3 text-sm text-text-secondary",
490
490
  children: "Selected applications are grouped by email address — exactly one notice goes out per unique candidate, even if you select several of their duplicate applications. An email that only appears once among your selection is skipped (it isn't a duplicate), and an email already notified before is skipped automatically."
491
491
  }),
492
- y ? /* @__PURE__ */ Y("div", {
492
+ g ? /* @__PURE__ */ Y("div", {
493
493
  className: "space-y-4",
494
494
  children: [
495
- f ? /* @__PURE__ */ J(se, { progress: f }) : null,
496
- /* @__PURE__ */ J(H, { result: m }),
497
- g ? /* @__PURE__ */ J(U, { details: g }) : null,
498
- /* @__PURE__ */ J(i, { children: /* @__PURE__ */ J(e, {
499
- onClick: o,
500
- disabled: x,
495
+ l ? /* @__PURE__ */ J(A, { progress: l }) : null,
496
+ /* @__PURE__ */ J(N, { result: d }),
497
+ m ? /* @__PURE__ */ J(F, { details: m }) : null,
498
+ /* @__PURE__ */ J(z, { children: /* @__PURE__ */ J(I, {
499
+ onClick: t,
500
+ disabled: v,
501
501
  children: "Done"
502
502
  }) })
503
503
  ]
504
504
  }) : /* @__PURE__ */ Y("div", {
505
505
  className: "space-y-4",
506
506
  children: [
507
- u ? /* @__PURE__ */ Y("div", {
507
+ o ? /* @__PURE__ */ Y("div", {
508
508
  className: "flex items-center gap-2 text-sm text-text-secondary",
509
509
  children: [/* @__PURE__ */ J(G, {
510
510
  size: 14,
511
511
  className: "animate-spin"
512
512
  }), "Refreshing candidates…"]
513
513
  }) : null,
514
- k ? /* @__PURE__ */ Y("div", {
514
+ E ? /* @__PURE__ */ Y("div", {
515
515
  className: "flex items-start gap-2 text-sm text-status-error-text",
516
516
  role: "alert",
517
- children: [/* @__PURE__ */ J(pe, {
517
+ children: [/* @__PURE__ */ J(W, {
518
518
  size: 14,
519
519
  className: "mt-0.5 shrink-0"
520
- }), /* @__PURE__ */ J("span", { children: k })]
520
+ }), /* @__PURE__ */ J("span", { children: E })]
521
521
  }) : null,
522
522
  /* @__PURE__ */ Y("p", {
523
523
  className: "text-xs text-text-secondary",
524
524
  children: [
525
- w,
525
+ x,
526
526
  " selected application",
527
- w === 1 ? "" : "s",
527
+ x === 1 ? "" : "s",
528
528
  " ",
529
529
  "will be checked and grouped by email."
530
530
  ]
531
531
  }),
532
- /* @__PURE__ */ Y(i, { children: [/* @__PURE__ */ J(e, {
532
+ /* @__PURE__ */ Y(z, { children: [/* @__PURE__ */ J(I, {
533
533
  variant: "outline",
534
- onClick: o,
535
- disabled: x,
534
+ onClick: t,
535
+ disabled: v,
536
536
  children: "Cancel"
537
- }), /* @__PURE__ */ Y(e, {
538
- onClick: () => void A(),
539
- disabled: x || u || !!k || !T || D.length === 0,
540
- children: [x ? /* @__PURE__ */ J(G, {
537
+ }), /* @__PURE__ */ Y(I, {
538
+ onClick: () => void D(),
539
+ disabled: v || o || !!E || !C || w.length === 0,
540
+ children: [v ? /* @__PURE__ */ J(G, {
541
541
  size: 16,
542
542
  className: "mr-2 animate-spin"
543
- }) : /* @__PURE__ */ J(K, { size: 16 }), x ? "Notifying…" : "Notify Duplicate Applicants"]
543
+ }) : /* @__PURE__ */ J(K, { size: 16 }), v ? "Notifying…" : "Notify Duplicate Applicants"]
544
544
  })] })
545
545
  ]
546
546
  })
@@ -548,28 +548,28 @@ function Te({ open: t, onClose: o, targets: s, selection: c, jobPostingId: l, pr
548
548
  })
549
549
  });
550
550
  }
551
- function Ee({ open: t, onClose: s, targets: c, selection: l, previewLoading: u, previewError: ne }) {
552
- let d = _e(), [f, p] = W(""), [h, g] = W(""), [_, v] = W(null), [y, b] = W(M), [x, w] = W(null), [T, E] = W(!1), [D, k] = W(!1);
553
- de(() => {
554
- t && (p(""), g(""), v(null), b(M()), w(null), E(!1), k(!1));
555
- }, [t]);
556
- let A = fe(() => Se(c, l), [l, c]), j = oe(l), N = A.length === j, P = A.map((e) => e.id), F = f.trim().length > 0, I = h.trim().length > 0, L = ne;
557
- !L && !u && !N && (L = "Some selected candidate details are unavailable. Refresh the selection before sending.");
558
- let R = !D && !T && !u && !L && N && P.length > 0 && F && I, z = async () => {
559
- if (!R) return;
560
- k(!0), E(!0), w(null), b(M());
561
- let e = await ie({
562
- items: P,
563
- initialAggregate: M(),
564
- onProgress: v,
551
+ function Ee({ open: e, onClose: t, targets: r, selection: i, previewLoading: a, previewError: o }) {
552
+ let s = _e(), [c, l] = U(""), [d, f] = U(""), [p, m] = U(null), [g, _] = U(y), [v, b] = U(null), [x, S] = U(!1), [C, w] = U(!1);
553
+ V(() => {
554
+ e && (l(""), f(""), m(null), _(y()), b(null), S(!1), w(!1));
555
+ }, [e]);
556
+ let T = H(() => Se(r, i), [i, r]), E = re(i), O = T.length === E, j = T.map((e) => e.id), M = c.trim().length > 0, N = d.trim().length > 0, P = o;
557
+ P || a || O || (P = "Some selected candidate details are unavailable. Refresh the selection before sending.");
558
+ let L = !C && !x && !a && !P && O && j.length > 0 && M && N, ce = async () => {
559
+ if (!L) return;
560
+ w(!0), S(!0), b(null), _(y());
561
+ let e = await te({
562
+ items: j,
563
+ initialAggregate: y(),
564
+ onProgress: m,
565
565
  executeChunk: async (e) => {
566
- let t = (await X(m, { input: {
566
+ let t = (await X(n, { input: {
567
567
  applicationIds: [...e],
568
- subject: f.trim(),
569
- message: h
568
+ subject: c.trim(),
569
+ message: d
570
570
  } }, "BulkSendCustomEmail")).bulkSendCustomEmail;
571
571
  if (!t) throw Error("The bulk email request returned no result.");
572
- let n = {
572
+ let r = {
573
573
  succeeded: t.succeeded.map((e) => ({
574
574
  applicationId: e.id,
575
575
  email: e.email
@@ -579,79 +579,79 @@ function Ee({ open: t, onClose: s, targets: c, selection: l, previewLoading: u,
579
579
  message: e.message
580
580
  }))
581
581
  };
582
- return O([...e], n), n;
582
+ return h([...e], r), r;
583
583
  },
584
- mergeResult: C
584
+ mergeResult: u
585
585
  });
586
- b(e.aggregate), e.error && w({
586
+ _(e.aggregate), e.error && b({
587
587
  knownCompleted: e.processedItems.length,
588
588
  ambiguous: e.ambiguousItems.length,
589
589
  notStarted: e.notStartedItems.length,
590
590
  message: xe(e.error)
591
- }), re(ae({
591
+ }), ee(ne({
592
592
  succeeded: e.aggregate.succeeded.length,
593
593
  skipped: 0,
594
594
  failed: e.aggregate.failed.length,
595
595
  ambiguous: !!e.error
596
- })), k(!1), d.refetchQueries({ include: ["GetJobApplications"] }).catch(() => void 0);
596
+ })), w(!1), s.refetchQueries({ include: ["GetJobApplications"] }).catch(() => void 0);
597
597
  };
598
- return /* @__PURE__ */ J(n, {
599
- open: t,
598
+ return /* @__PURE__ */ J(ie, {
599
+ open: e,
600
600
  onOpenChange: (e) => {
601
- !e && !D && s();
601
+ !e && !C && t();
602
602
  },
603
- children: /* @__PURE__ */ Y(r, {
603
+ children: /* @__PURE__ */ Y(ae, {
604
604
  className: "sm:max-w-xl max-h-[90vh] overflow-y-auto",
605
- children: [/* @__PURE__ */ Y(te, { children: [/* @__PURE__ */ J(a, { children: "Send Custom Email" }), /* @__PURE__ */ J(ee, { children: "Send the same branded email — your own subject and message — to every selected candidate, regardless of their stage or round. Useful for progress updates or a closing note to candidates who won't move forward." })] }), T ? /* @__PURE__ */ Y("div", {
605
+ children: [/* @__PURE__ */ Y(oe, { children: [/* @__PURE__ */ J(se, { children: "Send Custom Email" }), /* @__PURE__ */ J(R, { children: "Send the same branded email — your own subject and message — to every selected candidate, regardless of their stage or round. Useful for progress updates or a closing note to candidates who won't move forward." })] }), x ? /* @__PURE__ */ Y("div", {
606
606
  className: "space-y-4",
607
607
  children: [
608
- _ ? /* @__PURE__ */ J(se, { progress: _ }) : null,
609
- /* @__PURE__ */ J(V, { result: y }),
610
- x ? /* @__PURE__ */ J(U, { details: x }) : null,
611
- /* @__PURE__ */ J(i, { children: /* @__PURE__ */ J(e, {
612
- onClick: s,
613
- disabled: D,
608
+ p ? /* @__PURE__ */ J(A, { progress: p }) : null,
609
+ /* @__PURE__ */ J(k, { result: g }),
610
+ v ? /* @__PURE__ */ J(F, { details: v }) : null,
611
+ /* @__PURE__ */ J(z, { children: /* @__PURE__ */ J(I, {
612
+ onClick: t,
613
+ disabled: C,
614
614
  children: "Done"
615
615
  }) })
616
616
  ]
617
617
  }) : /* @__PURE__ */ Y("div", {
618
618
  className: "space-y-4",
619
619
  children: [
620
- u ? /* @__PURE__ */ Y("div", {
620
+ a ? /* @__PURE__ */ Y("div", {
621
621
  className: "flex items-center gap-2 text-sm text-text-secondary",
622
622
  children: [/* @__PURE__ */ J(G, {
623
623
  size: 14,
624
624
  className: "animate-spin"
625
625
  }), "Refreshing candidates…"]
626
626
  }) : null,
627
- L ? /* @__PURE__ */ Y("div", {
627
+ P ? /* @__PURE__ */ Y("div", {
628
628
  className: "flex items-start gap-2 text-sm text-status-error-text",
629
629
  role: "alert",
630
- children: [/* @__PURE__ */ J(pe, {
630
+ children: [/* @__PURE__ */ J(W, {
631
631
  size: 14,
632
632
  className: "mt-0.5 shrink-0"
633
- }), /* @__PURE__ */ J("span", { children: L })]
633
+ }), /* @__PURE__ */ J("span", { children: P })]
634
634
  }) : null,
635
- /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J(o, {
635
+ /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J(B, {
636
636
  htmlFor: "bulk-custom-email-subject",
637
637
  children: "Subject"
638
638
  }), /* @__PURE__ */ J("input", {
639
639
  id: "bulk-custom-email-subject",
640
640
  type: "text",
641
- value: f,
642
- onChange: (e) => p(e.target.value),
641
+ value: c,
642
+ onChange: (e) => l(e.target.value),
643
643
  placeholder: "e.g. An update on your application",
644
644
  className: "mt-1.5 w-full rounded-lg border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-primary/30"
645
645
  })] }),
646
- /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J(o, {
646
+ /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J(B, {
647
647
  htmlFor: "bulk-custom-email-message",
648
648
  children: "Message"
649
649
  }), /* @__PURE__ */ J("div", {
650
650
  className: "mt-1.5",
651
- children: /* @__PURE__ */ J(S, {
651
+ children: /* @__PURE__ */ J(D, {
652
652
  id: "bulk-custom-email-message",
653
- value: h,
654
- onChange: g,
653
+ value: d,
654
+ onChange: f,
655
655
  placeholder: "Type your message… This will be sent as a branded email to every selected candidate.",
656
656
  "aria-required": !0
657
657
  })
@@ -659,49 +659,49 @@ function Ee({ open: t, onClose: s, targets: c, selection: l, previewLoading: u,
659
659
  /* @__PURE__ */ Y("p", {
660
660
  className: "text-xs text-text-secondary",
661
661
  children: [
662
- j,
662
+ E,
663
663
  " selected candidate",
664
- j === 1 ? "" : "s",
664
+ E === 1 ? "" : "s",
665
665
  " ",
666
666
  "will each receive their own copy of this email."
667
667
  ]
668
668
  }),
669
- /* @__PURE__ */ Y(i, { children: [/* @__PURE__ */ J(e, {
669
+ /* @__PURE__ */ Y(z, { children: [/* @__PURE__ */ J(I, {
670
670
  variant: "outline",
671
- onClick: s,
672
- disabled: D,
671
+ onClick: t,
672
+ disabled: C,
673
673
  children: "Cancel"
674
- }), /* @__PURE__ */ Y(e, {
675
- onClick: () => void z(),
676
- disabled: !R,
677
- children: [D ? /* @__PURE__ */ J(G, {
674
+ }), /* @__PURE__ */ Y(I, {
675
+ onClick: () => void ce(),
676
+ disabled: !L,
677
+ children: [C ? /* @__PURE__ */ J(G, {
678
678
  size: 16,
679
679
  className: "mr-2 animate-spin"
680
- }) : /* @__PURE__ */ J(K, { size: 16 }), D ? "Sending…" : "Send Email"]
680
+ }) : /* @__PURE__ */ J(K, { size: 16 }), C ? "Sending…" : "Send Email"]
681
681
  })] })
682
682
  ]
683
683
  })]
684
684
  })
685
685
  });
686
686
  }
687
- function De({ open: t, onClose: d, targets: f, selection: p, previewLoading: m, previewError: h }) {
688
- let _ = _e(), [v, y] = W(null), [S, C] = W(null), [T, E] = W(N), [D, O] = W(null), [A, j] = W(!1), [M, P] = W(!1);
689
- de(() => {
690
- t && (y(null), C(null), E(N()), O(null), j(!1), P(!1));
691
- }, [t]);
692
- let F = fe(() => Se(f, p), [p, f]), I = oe(p), L = F.length === I, R = F.map((e) => e.id), z = h;
693
- !z && !m && !L && (z = "Some selected candidate details are unavailable. Refresh the selection before updating.");
694
- let B = !M && !A && !m && !z && L && R.length > 0 && v !== null, V = async () => {
695
- if (!B || v === null) return;
696
- P(!0), j(!0), O(null), E(N());
697
- let e = await ie({
698
- items: R,
699
- initialAggregate: N(),
700
- onProgress: C,
687
+ function De({ open: e, onClose: t, targets: n, selection: r, previewLoading: a, previewError: o }) {
688
+ let s = _e(), [u, f] = U(null), [p, m] = U(null), [h, _] = U(b), [v, y] = U(null), [x, S] = U(!1), [C, w] = U(!1);
689
+ V(() => {
690
+ e && (f(null), m(null), _(b()), y(null), S(!1), w(!1));
691
+ }, [e]);
692
+ let T = H(() => Se(n, r), [r, n]), E = re(r), D = T.length === E, O = T.map((e) => e.id), k = o;
693
+ k || a || D || (k = "Some selected candidate details are unavailable. Refresh the selection before updating.");
694
+ let M = !C && !x && !a && !k && D && O.length > 0 && u !== null, N = async () => {
695
+ if (!M || u === null) return;
696
+ w(!0), S(!0), y(null), _(b());
697
+ let e = await te({
698
+ items: O,
699
+ initialAggregate: b(),
700
+ onProgress: m,
701
701
  executeChunk: async (e) => {
702
- let t = (await X(g, { input: {
702
+ let t = (await X(i, { input: {
703
703
  applicationIds: [...e],
704
- status: v
704
+ status: u
705
705
  } }, "BulkUpdateApplicationStatus")).bulkUpdateApplicationStatus;
706
706
  if (!t) throw Error("The bulk status update request returned no result.");
707
707
  let n = {
@@ -714,103 +714,102 @@ function De({ open: t, onClose: d, targets: f, selection: p, previewLoading: m,
714
714
  message: e.message
715
715
  }))
716
716
  };
717
- return k([...e], n), n;
717
+ return g([...e], n), n;
718
718
  },
719
- mergeResult: w
719
+ mergeResult: d
720
720
  });
721
- E(e.aggregate), e.error && O({
721
+ _(e.aggregate), e.error && y({
722
722
  knownCompleted: e.processedItems.length,
723
723
  ambiguous: e.ambiguousItems.length,
724
724
  notStarted: e.notStartedItems.length,
725
725
  message: xe(e.error)
726
- }), re(ae({
726
+ }), ee(ne({
727
727
  succeeded: e.aggregate.succeeded.length,
728
728
  skipped: 0,
729
729
  failed: e.aggregate.failed.length,
730
730
  ambiguous: !!e.error
731
- })), P(!1), _.refetchQueries({ include: ["GetJobApplications"] }).catch(() => void 0);
731
+ })), w(!1), s.refetchQueries({ include: ["GetJobApplications"] }).catch(() => void 0);
732
732
  };
733
- return /* @__PURE__ */ J(n, {
734
- open: t,
733
+ return /* @__PURE__ */ J(ie, {
734
+ open: e,
735
735
  onOpenChange: (e) => {
736
- !e && !M && d();
736
+ !e && !C && t();
737
737
  },
738
- children: /* @__PURE__ */ Y(r, {
738
+ children: /* @__PURE__ */ Y(ae, {
739
739
  className: "sm:max-w-md",
740
- children: [/* @__PURE__ */ Y(te, { children: [/* @__PURE__ */ J(a, { children: "Update Status" }), /* @__PURE__ */ J(ee, { children: "Set the same status on every selected candidate — e.g. mark everyone you just sent a bulk email as \"Email Sent\" so a later send doesn't reach them twice, then move them back to their real stage once you decide the outcome." })] }), A ? /* @__PURE__ */ Y("div", {
740
+ children: [/* @__PURE__ */ Y(oe, { children: [/* @__PURE__ */ J(se, { children: "Update Status" }), /* @__PURE__ */ J(R, { children: "Set the same status on every selected candidate — e.g. mark everyone you just sent a bulk email as \"Email Sent\" so a later send doesn't reach them twice, then move them back to their real stage once you decide the outcome." })] }), x ? /* @__PURE__ */ Y("div", {
741
741
  className: "space-y-4",
742
742
  children: [
743
- S ? /* @__PURE__ */ J(se, { progress: S }) : null,
744
- /* @__PURE__ */ J(ce, { result: T }),
745
- D ? /* @__PURE__ */ J(U, { details: D }) : null,
746
- /* @__PURE__ */ J(i, { children: /* @__PURE__ */ J(e, {
747
- onClick: d,
748
- disabled: M,
743
+ p ? /* @__PURE__ */ J(A, { progress: p }) : null,
744
+ /* @__PURE__ */ J(j, { result: h }),
745
+ v ? /* @__PURE__ */ J(F, { details: v }) : null,
746
+ /* @__PURE__ */ J(z, { children: /* @__PURE__ */ J(I, {
747
+ onClick: t,
748
+ disabled: C,
749
749
  children: "Done"
750
750
  }) })
751
751
  ]
752
752
  }) : /* @__PURE__ */ Y("div", {
753
753
  className: "space-y-4",
754
754
  children: [
755
- m ? /* @__PURE__ */ Y("div", {
755
+ a ? /* @__PURE__ */ Y("div", {
756
756
  className: "flex items-center gap-2 text-sm text-text-secondary",
757
757
  children: [/* @__PURE__ */ J(G, {
758
758
  size: 14,
759
759
  className: "animate-spin"
760
760
  }), "Refreshing candidates…"]
761
761
  }) : null,
762
- z ? /* @__PURE__ */ Y("div", {
762
+ k ? /* @__PURE__ */ Y("div", {
763
763
  className: "flex items-start gap-2 text-sm text-status-error-text",
764
764
  role: "alert",
765
- children: [/* @__PURE__ */ J(pe, {
765
+ children: [/* @__PURE__ */ J(W, {
766
766
  size: 14,
767
767
  className: "mt-0.5 shrink-0"
768
- }), /* @__PURE__ */ J("span", { children: z })]
768
+ }), /* @__PURE__ */ J("span", { children: k })]
769
769
  }) : null,
770
- /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J(o, {
770
+ /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J(B, {
771
771
  htmlFor: "bulk-status-update-status",
772
772
  children: "New status"
773
- }), /* @__PURE__ */ Y(s, {
774
- value: v ?? "",
775
- onValueChange: (e) => y(e),
776
- children: [/* @__PURE__ */ J(u, {
773
+ }), /* @__PURE__ */ Y(ce, {
774
+ value: u ?? "",
775
+ onValueChange: (e) => f(e),
776
+ children: [/* @__PURE__ */ J(de, {
777
777
  id: "bulk-status-update-status",
778
778
  className: "mt-1.5",
779
- children: /* @__PURE__ */ J(ne, { placeholder: "Select a status" })
780
- }), /* @__PURE__ */ J(c, { children: x.map((e) => /* @__PURE__ */ J(l, {
779
+ children: /* @__PURE__ */ J(fe, { placeholder: "Select a status" })
780
+ }), /* @__PURE__ */ J(le, { children: l.map((e) => /* @__PURE__ */ J(ue, {
781
781
  value: e,
782
- children: b[e] || e
782
+ children: c[e] || e
783
783
  }, e)) })]
784
784
  })] }),
785
785
  /* @__PURE__ */ Y("p", {
786
786
  className: "text-xs text-text-secondary",
787
787
  children: [
788
- I,
788
+ E,
789
789
  " selected candidate",
790
- I === 1 ? "" : "s",
790
+ E === 1 ? "" : "s",
791
791
  " ",
792
792
  "will be moved to this status."
793
793
  ]
794
794
  }),
795
- /* @__PURE__ */ Y(i, { children: [/* @__PURE__ */ J(e, {
795
+ /* @__PURE__ */ Y(z, { children: [/* @__PURE__ */ J(I, {
796
796
  variant: "outline",
797
- onClick: d,
798
- disabled: M,
797
+ onClick: t,
798
+ disabled: C,
799
799
  children: "Cancel"
800
- }), /* @__PURE__ */ Y(e, {
801
- onClick: () => void V(),
802
- disabled: !B,
803
- children: [M ? /* @__PURE__ */ J(G, {
800
+ }), /* @__PURE__ */ Y(I, {
801
+ onClick: () => void N(),
802
+ disabled: !M,
803
+ children: [C ? /* @__PURE__ */ J(G, {
804
804
  size: 16,
805
805
  className: "mr-2 animate-spin"
806
- }) : /* @__PURE__ */ J(q, { size: 16 }), M ? "Updating…" : "Update Status"]
806
+ }) : /* @__PURE__ */ J(q, { size: 16 }), C ? "Updating…" : "Update Status"]
807
807
  })] })
808
808
  ]
809
809
  })]
810
810
  })
811
811
  });
812
812
  }
813
- //#endregion
814
813
  export { we as AddSelectedToRoundDialog, Ce as BulkCandidateSendDialog, Ee as BulkCustomEmailDialog, De as BulkStatusUpdateDialog, Te as NotifyDuplicateApplicantsDialog, ye as isAssignmentRoundConfig };
815
814
 
816
815
  //# sourceMappingURL=BulkCandidateDialogs.js.map