@nivaro/react 0.2.53 → 0.2.55
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.
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +99 -98
- package/dist/index.d.ts +452 -4
- package/dist/index.js +644 -618
- package/dist/layout-editor.d.ts +252 -2
- package/dist/shared/components/BackgroundRunOffer.js +117 -0
- package/dist/shared/components/BroadcastView.js +214 -213
- package/dist/shared/components/CollectionBrowserView.js +2592 -2695
- package/dist/shared/components/FormWhatsNew.js +60 -0
- package/dist/shared/components/ItemEditForm.js +3968 -3618
- package/dist/shared/components/JobsTray.js +100 -55
- package/dist/shared/components/MyWorkView.js +91 -89
- package/dist/shared/components/NotificationBell.js +80 -79
- package/dist/shared/components/ProfileView.js +568 -520
- package/dist/shared/components/RecordCompare.js +254 -0
- package/dist/shared/components/RecordReadView.js +598 -543
- package/dist/shared/components/ReportView.js +578 -543
- package/dist/shared/components/RowPresence.js +91 -0
- package/dist/shared/components/TipLayer.js +27 -27
- package/dist/shared/components/WidgetSlot.js +474 -458
- package/dist/shared/components/ai/AiAnalyticsView.js +16 -6
- package/dist/shared/components/ai/AskPanel.js +139 -119
- package/dist/shared/components/ai/FirstWeekCard.js +126 -0
- package/dist/shared/components/bulk/BulkFieldUpdate.js +289 -0
- package/dist/shared/components/bulk/bulk-field-options.js +45 -0
- package/dist/shared/components/charts/CumulativeFlowChart.js +176 -0
- package/dist/shared/components/chat/ChannelArchive.js +326 -0
- package/dist/shared/components/chat/ChannelExtras.js +141 -121
- package/dist/shared/components/chat/ChatAnalyticsView.js +112 -110
- package/dist/shared/components/chat/ChatPanel.js +1695 -1733
- package/dist/shared/components/chat/Composer.js +357 -303
- package/dist/shared/components/chat/MessageActions.js +92 -0
- package/dist/shared/components/chat/MessageFormat.js +290 -264
- package/dist/shared/components/chat/OutboxBubbles.js +146 -0
- package/dist/shared/components/chat/RequestIdCard.js +135 -0
- package/dist/shared/components/chat/RoomHeaderMenu.js +202 -0
- package/dist/shared/components/chat/RoomParts.js +213 -274
- package/dist/shared/components/chat/ScreenClip.js +184 -0
- package/dist/shared/components/chat/chat-core.js +402 -483
- package/dist/shared/components/chat/chat-drafts.js +59 -0
- package/dist/shared/components/chat/chat-emoji.js +348 -0
- package/dist/shared/components/chat/chat-local-time.js +41 -0
- package/dist/shared/components/chat/chat-outbox.js +303 -0
- package/dist/shared/components/chat/chat-window.js +163 -0
- package/dist/shared/components/chat/huddle/HuddleControls.js +143 -0
- package/dist/shared/components/chat/huddle/HuddleStage.js +164 -0
- package/dist/shared/components/chat/huddle/huddle-store.js +342 -0
- package/dist/shared/components/chat/huddle/useHuddle.js +58 -0
- package/dist/shared/components/help-videos/api.js +80 -67
- package/dist/shared/components/help-videos/editor/DetailsTab.js +147 -130
- package/dist/shared/components/item-edit/CatalogPickerField.js +113 -112
- package/dist/shared/components/item-edit/ChangeReasonDialog.js +13 -13
- package/dist/shared/components/item-edit/FieldAffordances.js +9 -8
- package/dist/shared/components/item-edit/FieldRenderer.js +248 -245
- package/dist/shared/components/item-edit/FieldRow.js +382 -320
- package/dist/shared/components/item-edit/FormHelpVideoButton.js +59 -0
- package/dist/shared/components/item-edit/GroupSection.js +786 -639
- package/dist/shared/components/item-edit/HeaderTools.js +59 -56
- package/dist/shared/components/item-edit/InlineTableField.js +3 -1
- package/dist/shared/components/item-edit/LayoutContentBlock.js +47 -24
- package/dist/shared/components/item-edit/RelationCombobox.js +186 -176
- package/dist/shared/components/item-edit/entry/EntryStrip.js +54 -0
- package/dist/shared/components/item-edit/entry/entry-keys.js +27 -0
- package/dist/shared/components/item-edit/entry/useEntryKeyboard.js +70 -0
- package/dist/shared/components/item-edit/entry/useEntryMode.js +59 -0
- package/dist/shared/components/item-edit/form-structure-ui.js +105 -0
- package/dist/shared/components/item-edit/lazy-sections.js +36 -0
- package/dist/shared/components/item-edit/lock-why.js +94 -0
- package/dist/shared/components/item-edit/picker-miss.js +26 -0
- package/dist/shared/components/item-edit/placement-behaviour.js +196 -0
- package/dist/shared/components/item-edit/useFormUsageBeacon.js +65 -0
- package/dist/shared/components/layout-editor/AddPanel.js +226 -151
- package/dist/shared/components/layout-editor/ArrangeButton.js +34 -0
- package/dist/shared/components/layout-editor/AutoArrange.js +86 -0
- package/dist/shared/components/layout-editor/CanvasCompare.js +79 -0
- package/dist/shared/components/layout-editor/ChangeNote.js +147 -0
- package/dist/shared/components/layout-editor/CollabParts.js +175 -0
- package/dist/shared/components/layout-editor/DesignNode.js +311 -116
- package/dist/shared/components/layout-editor/EditorCanvas.js +30 -26
- package/dist/shared/components/layout-editor/EditorTopBar.js +463 -175
- package/dist/shared/components/layout-editor/FindReplace.js +188 -0
- package/dist/shared/components/layout-editor/FormMapButton.js +141 -0
- package/dist/shared/components/layout-editor/HistoryPanel.js +250 -109
- package/dist/shared/components/layout-editor/LayoutEditor.js +1196 -305
- package/dist/shared/components/layout-editor/LayoutsRail.js +94 -67
- package/dist/shared/components/layout-editor/NoteMarker.js +38 -0
- package/dist/shared/components/layout-editor/PlacementsTable.js +187 -0
- package/dist/shared/components/layout-editor/RestorePiece.js +143 -0
- package/dist/shared/components/layout-editor/ScheduleChange.js +106 -0
- package/dist/shared/components/layout-editor/SessionHistory.js +84 -0
- package/dist/shared/components/layout-editor/StagedChip.js +22 -0
- package/dist/shared/components/layout-editor/StructureMenu.js +464 -0
- package/dist/shared/components/layout-editor/UnsavedConfirm.js +103 -0
- package/dist/shared/components/layout-editor/ai/AiToolsButton.js +625 -0
- package/dist/shared/components/layout-editor/ai/ChangeCheck.js +153 -0
- package/dist/shared/components/layout-editor/ai/ai-tools-api.js +80 -0
- package/dist/shared/components/layout-editor/ai/assist-ops.js +38 -0
- package/dist/shared/components/layout-editor/ai/autofill-ops.js +73 -0
- package/dist/shared/components/layout-editor/ai/canvas-capture.js +41 -0
- package/dist/shared/components/layout-editor/ai-forms/AiComposer.js +271 -0
- package/dist/shared/components/layout-editor/ai-forms/AiFormsButton.js +182 -0
- package/dist/shared/components/layout-editor/ai-forms/MeaningSuggestions.js +109 -0
- package/dist/shared/components/layout-editor/ai-forms/SlimPanel.js +170 -0
- package/dist/shared/components/layout-editor/ai-forms/ai-forms-api.js +40 -0
- package/dist/shared/components/layout-editor/ai-forms/pending.js +25 -0
- package/dist/shared/components/layout-editor/ai-forms/plan.js +263 -0
- package/dist/shared/components/layout-editor/ai-rules/AiAskPopover.js +160 -0
- package/dist/shared/components/layout-editor/ai-rules/CascadeWriter.js +175 -0
- package/dist/shared/components/layout-editor/ai-rules/FieldRuleWriter.js +97 -0
- package/dist/shared/components/layout-editor/ai-rules/RuleWriter.js +94 -0
- package/dist/shared/components/layout-editor/ai-rules/ValidationSuggest.js +153 -0
- package/dist/shared/components/layout-editor/ai-rules/api.js +6 -0
- package/dist/shared/components/layout-editor/ai-text/AiTextTools.js +383 -0
- package/dist/shared/components/layout-editor/ai-text/text-ops.js +125 -0
- package/dist/shared/components/layout-editor/assist/AskPanel.js +278 -0
- package/dist/shared/components/layout-editor/assist/ExplainDiff.js +93 -0
- package/dist/shared/components/layout-editor/assist/ProposalsButton.js +150 -0
- package/dist/shared/components/layout-editor/assist/assist-api.js +63 -0
- package/dist/shared/components/layout-editor/assist/jump.js +142 -0
- package/dist/shared/components/layout-editor/assist/settings-index.js +118 -0
- package/dist/shared/components/layout-editor/auto-arrange.js +101 -0
- package/dist/shared/components/layout-editor/bulk/BulkChangesButton.js +221 -0
- package/dist/shared/components/layout-editor/bulk/BulkRun.js +237 -0
- package/dist/shared/components/layout-editor/bulk/MacrosPanel.js +230 -0
- package/dist/shared/components/layout-editor/bulk/bulk-api.js +65 -0
- package/dist/shared/components/layout-editor/bulk/field-labels.js +22 -0
- package/dist/shared/components/layout-editor/bulk/macro-record.js +142 -0
- package/dist/shared/components/layout-editor/bulk/useMacroRecorder.js +65 -0
- package/dist/shared/components/layout-editor/bundle-to-active.js +1 -0
- package/dist/shared/components/layout-editor/canvas-diff.js +157 -0
- package/dist/shared/components/layout-editor/collab/FormFollowShare.js +388 -0
- package/dist/shared/components/layout-editor/collab/collab-api.js +80 -0
- package/dist/shared/components/layout-editor/commands/CommandPalette.js +221 -0
- package/dist/shared/components/layout-editor/commands/intents.js +214 -0
- package/dist/shared/components/layout-editor/commands/parse.js +242 -0
- package/dist/shared/components/layout-editor/design-context.js +26 -6
- package/dist/shared/components/layout-editor/dnd/LayoutDndProvider.js +181 -164
- package/dist/shared/components/layout-editor/dnd/collision.js +25 -23
- package/dist/shared/components/layout-editor/dnd/node.js +69 -57
- package/dist/shared/components/layout-editor/dnd/rail-drop.js +56 -0
- package/dist/shared/components/layout-editor/draft-recovery.js +131 -0
- package/dist/shared/components/layout-editor/editor-notes.js +78 -0
- package/dist/shared/components/layout-editor/editors/swap-config.js +1 -0
- package/dist/shared/components/layout-editor/entry/PlacementPresets.js +149 -0
- package/dist/shared/components/layout-editor/entry/entry-editor-context.js +10 -0
- package/dist/shared/components/layout-editor/entry/presets.js +71 -0
- package/dist/shared/components/layout-editor/entry/tab-order.js +110 -0
- package/dist/shared/components/layout-editor/entry/theme-preview.js +37 -0
- package/dist/shared/components/layout-editor/explain/CanvasRules.js +142 -0
- package/dist/shared/components/layout-editor/explain/default-ghosts.js +81 -0
- package/dist/shared/components/layout-editor/explain/driver-hover.js +62 -0
- package/dist/shared/components/layout-editor/explain/field-sources.js +246 -0
- package/dist/shared/components/layout-editor/explain/rule-graph.js +215 -0
- package/dist/shared/components/layout-editor/explain/use-explain.js +132 -0
- package/dist/shared/components/layout-editor/field-zones.js +116 -0
- package/dist/shared/components/layout-editor/form-map.js +138 -0
- package/dist/shared/components/layout-editor/grid-guides.js +142 -0
- package/dist/shared/components/layout-editor/history-api.js +87 -0
- package/dist/shared/components/layout-editor/inheritance.js +55 -0
- package/dist/shared/components/layout-editor/inspect/inspect-api.js +66 -0
- package/dist/shared/components/layout-editor/inspect/picker-preview.js +48 -0
- package/dist/shared/components/layout-editor/inspect/width-fit.js +87 -0
- package/dist/shared/components/layout-editor/inspector/AiFillSetting.js +85 -0
- package/dist/shared/components/layout-editor/inspector/BehaviourSettings.js +402 -0
- package/dist/shared/components/layout-editor/inspector/Breadcrumb.js +36 -0
- package/dist/shared/components/layout-editor/inspector/BulkInspector.js +179 -0
- package/dist/shared/components/layout-editor/inspector/ColumnFit.js +112 -0
- package/dist/shared/components/layout-editor/inspector/GroupInspector.js +291 -141
- package/dist/shared/components/layout-editor/inspector/HelpTab.js +174 -0
- package/dist/shared/components/layout-editor/inspector/Inspector.js +282 -180
- package/dist/shared/components/layout-editor/inspector/LookTab.js +166 -109
- package/dist/shared/components/layout-editor/inspector/OverrideNotice.js +61 -0
- package/dist/shared/components/layout-editor/inspector/PickerMisses.js +129 -0
- package/dist/shared/components/layout-editor/inspector/PickerPreview.js +134 -0
- package/dist/shared/components/layout-editor/inspector/PickerTab.js +146 -118
- package/dist/shared/components/layout-editor/inspector/RulesTab.js +162 -111
- package/dist/shared/components/layout-editor/inspector/Translations.js +156 -0
- package/dist/shared/components/layout-editor/inspector/kit.js +71 -70
- package/dist/shared/components/layout-editor/inspector/tab-request.js +21 -0
- package/dist/shared/components/layout-editor/is-typing.js +9 -0
- package/dist/shared/components/layout-editor/keyboard-move.js +66 -0
- package/dist/shared/components/layout-editor/lint/LintPanel.js +190 -0
- package/dist/shared/components/layout-editor/lint/lint-api.js +52 -0
- package/dist/shared/components/layout-editor/load-error.js +37 -0
- package/dist/shared/components/layout-editor/matrix/FieldStateMatrix.js +305 -0
- package/dist/shared/components/layout-editor/matrix/MatrixGrid.js +181 -0
- package/dist/shared/components/layout-editor/matrix/RoleSectionMatrix.js +147 -0
- package/dist/shared/components/layout-editor/matrix/matrix-api.js +48 -0
- package/dist/shared/components/layout-editor/matrix/role-matrix.js +36 -0
- package/dist/shared/components/layout-editor/matrix/state-matrix.js +145 -0
- package/dist/shared/components/layout-editor/nav/FindPanel.js +109 -0
- package/dist/shared/components/layout-editor/nav/NavTools.js +114 -0
- package/dist/shared/components/layout-editor/nav/OutlinePanel.js +228 -0
- package/dist/shared/components/layout-editor/nav/ShortcutSheet.js +31 -0
- package/dist/shared/components/layout-editor/nav/find.js +20 -0
- package/dist/shared/components/layout-editor/nav/tree.js +142 -0
- package/dist/shared/components/layout-editor/nav/useEditorNav.js +101 -0
- package/dist/shared/components/layout-editor/nav/view-prefs.js +34 -0
- package/dist/shared/components/layout-editor/ops/ChangeRequestsPanel.js +143 -0
- package/dist/shared/components/layout-editor/ops/DependencyDiagram.js +179 -0
- package/dist/shared/components/layout-editor/ops/LayoutOpsBlocks.js +92 -0
- package/dist/shared/components/layout-editor/ops/PromotePanel.js +287 -0
- package/dist/shared/components/layout-editor/ops/ops-api.js +122 -0
- package/dist/shared/components/layout-editor/outputs/OutputsButton.js +254 -0
- package/dist/shared/components/layout-editor/outputs/help-sheet.js +154 -0
- package/dist/shared/components/layout-editor/outputs/output-api.js +61 -0
- package/dist/shared/components/layout-editor/overview/OverviewActions.js +15 -3
- package/dist/shared/components/layout-editor/overview/describe-conditions.js +24 -14
- package/dist/shared/components/layout-editor/overview/overview-api.js +105 -88
- package/dist/shared/components/layout-editor/overview/purpose.js +15 -13
- package/dist/shared/components/layout-editor/panel-style.js +8 -7
- package/dist/shared/components/layout-editor/parity-keys.json.js +4 -0
- package/dist/shared/components/layout-editor/pin.js +25 -0
- package/dist/shared/components/layout-editor/presence.js +111 -0
- package/dist/shared/components/layout-editor/preview/PreviewModes.js +224 -0
- package/dist/shared/components/layout-editor/preview/PreviewPanes.js +262 -0
- package/dist/shared/components/layout-editor/preview/preview-api.js +57 -0
- package/dist/shared/components/layout-editor/preview/preview-model.js +157 -0
- package/dist/shared/components/layout-editor/restore-piece.js +192 -0
- package/dist/shared/components/layout-editor/reuse/FieldMapStep.js +70 -0
- package/dist/shared/components/layout-editor/reuse/FormMoreMenu.js +127 -0
- package/dist/shared/components/layout-editor/reuse/LibraryRows.js +150 -0
- package/dist/shared/components/layout-editor/reuse/NewFormStart.js +20 -0
- package/dist/shared/components/layout-editor/reuse/SectionReuseActions.js +291 -0
- package/dist/shared/components/layout-editor/reuse/field-match.js +77 -0
- package/dist/shared/components/layout-editor/reuse/reuse-api.js +73 -0
- package/dist/shared/components/layout-editor/reuse/seed.js +13 -0
- package/dist/shared/components/layout-editor/reuse/useFormFromRecord.js +43 -0
- package/dist/shared/components/layout-editor/reuse/useRailCopy.js +34 -0
- package/dist/shared/components/layout-editor/section-structure.js +241 -0
- package/dist/shared/components/layout-editor/settings/EntrySection.js +296 -0
- package/dist/shared/components/layout-editor/settings/FormSettings.js +125 -103
- package/dist/shared/components/layout-editor/settings/InheritanceSection.js +1 -1
- package/dist/shared/components/layout-editor/settings/ResolveSettings.js +255 -0
- package/dist/shared/components/layout-editor/settings/ToolsSection.js +215 -105
- package/dist/shared/components/layout-editor/settings/WhoSection.js +139 -100
- package/dist/shared/components/layout-editor/settings/controls.js +8 -8
- package/dist/shared/components/layout-editor/settings/settings-registry.js +142 -21
- package/dist/shared/components/layout-editor/shortcuts.js +88 -0
- package/dist/shared/components/layout-editor/show-when.js +35 -0
- package/dist/shared/components/layout-editor/slot-names.js +4 -3
- package/dist/shared/components/layout-editor/staged-api.js +64 -0
- package/dist/shared/components/layout-editor/structure-ops.js +403 -0
- package/dist/shared/components/layout-editor/testing/CostLimitSetting.js +42 -0
- package/dist/shared/components/layout-editor/testing/TestingPanels.js +556 -0
- package/dist/shared/components/layout-editor/testing/testing-api.js +67 -0
- package/dist/shared/components/layout-editor/testing/testing-model.js +406 -0
- package/dist/shared/components/layout-editor/testing/use-record-check.js +44 -0
- package/dist/shared/components/layout-editor/toolbar-kit.js +242 -0
- package/dist/shared/components/layout-editor/unsaved-marks.js +72 -0
- package/dist/shared/components/layout-editor/usage/AbTestSection.js +355 -0
- package/dist/shared/components/layout-editor/usage/FillChip.js +27 -0
- package/dist/shared/components/layout-editor/usage/UsagePanel.js +232 -0
- package/dist/shared/components/layout-editor/usage/ab-api.js +86 -0
- package/dist/shared/components/layout-editor/usage/suggest-collapse.js +32 -0
- package/dist/shared/components/layout-editor/usage/suggest-sections.js +55 -0
- package/dist/shared/components/layout-editor/usage/usage-api.js +104 -0
- package/dist/shared/components/layout-editor/useLayoutDraft.js +573 -306
- package/dist/shared/components/notifications/NotificationAnalyticsView.js +148 -77
- package/dist/shared/components/panels/ErpFailureBanner.js +18 -17
- package/dist/shared/components/panels/ExternalRequestsChip.js +63 -62
- package/dist/shared/components/pipeline/PipelineEditorView.js +106 -104
- package/dist/shared/components/profile/AgentsPanel.js +479 -0
- package/dist/shared/components/queue/QueueWorklist.js +1026 -1040
- package/dist/shared/components/support/SuggestFormChange.js +143 -0
- package/dist/shared/components/support/SupportAnalytics.js +171 -0
- package/dist/shared/components/support/SupportView.js +75 -73
- package/dist/shared/lib/ai-fill.js +37 -0
- package/dist/shared/lib/background-runs.js +150 -0
- package/dist/shared/lib/delivery-ack.js +9 -0
- package/dist/shared/lib/entry-badge-style.js +13 -0
- package/dist/shared/lib/entry-config.js +71 -0
- package/dist/shared/lib/form-sections.js +64 -0
- package/dist/shared/lib/form-structure.js +99 -0
- package/dist/shared/lib/form-usage-beacon.js +133 -0
- package/dist/shared/lib/jobs-tray.js +25 -23
- package/dist/shared/lib/keyset-pager.js +37 -0
- package/dist/shared/lib/layout-i18n.js +66 -0
- package/dist/shared/lib/layout-lint.js +490 -0
- package/dist/shared/lib/layout-ops.js +116 -110
- package/dist/shared/lib/layout-resolve.js +113 -0
- package/dist/shared/lib/placement-behaviour.js +144 -0
- package/dist/shared/lib/prefetch.js +149 -0
- package/dist/shared/lib/presence-hooks.js +199 -0
- package/dist/shared/lib/record-outbox.js +82 -81
- package/dist/shared/lib/replay-socket.js +93 -0
- package/dist/shared/lib/request-gate.js +51 -50
- package/dist/shared/lib/room-gaps.js +96 -0
- package/dist/shared/lib/screenshot.js +54 -28
- package/dist/shared/lib/search-log.js +27 -0
- package/dist/shared/lib/socket-realtime.js +101 -80
- package/dist/shared/lib/visible-when.js +34 -0
- package/dist/shared/lib/worker-socket.js +200 -0
- package/package.json +1 -1
|
@@ -1,92 +1,93 @@
|
|
|
1
1
|
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
|
-
import { useQueryClient as se, useQuery as oe, useMutation as
|
|
2
|
+
import { useQueryClient as se, useQuery as oe, useMutation as D } from "@tanstack/react-query";
|
|
3
3
|
import { useState as N, useRef as q, useEffect as E, useMemo as ie } from "react";
|
|
4
4
|
import { useApiFetchConfig as le, useItemNavigation as ce, useNavigation as me } from "../context.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { useLiveEvent as ue } from "../lib/live.js";
|
|
6
|
+
import { useLiveOps as pe, useFreshIds as be } from "../lib/live-ops.js";
|
|
7
|
+
import { resolveNotificationTarget as Z, runNotificationTarget as xe } from "../lib/notification-target.js";
|
|
8
8
|
import { useOptionalRealtime as he } from "../lib/realtime.js";
|
|
9
9
|
import { withinDay as G, slaChip as ge } from "../lib/sla-chip.js";
|
|
10
|
-
import { cn as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
10
|
+
import { cn as A } from "../lib/utils.js";
|
|
11
|
+
import { FirstWeekCard as fe } from "./ai/FirstWeekCard.js";
|
|
12
|
+
import { openChatRoom as ke, canOpenChatRoom as ye } from "./chat/chat-core.js";
|
|
13
|
+
import { useMyRecordRooms as Ne } from "./chat/chat-hooks.js";
|
|
14
|
+
import { LearningPathCard as we } from "./help-videos/viewer/LearningPathCard.js";
|
|
15
|
+
import { RequiredVideosCard as ve } from "./help-videos/viewer/RequiredVideosCard.js";
|
|
16
|
+
import { TickerNumber as _e } from "./TickerNumber.js";
|
|
17
|
+
import { UserAvatar as Ce } from "./UserAvatar.js";
|
|
18
|
+
const $e = 8e3, X = ["records", "tasks", "team", "waiting", "notifications"], Se = {
|
|
18
19
|
records: "Waiting on you",
|
|
19
20
|
tasks: "My tasks",
|
|
20
21
|
team: "Team tasks",
|
|
21
22
|
waiting: "Waiting on others",
|
|
22
23
|
notifications: "Notifications"
|
|
23
|
-
},
|
|
24
|
+
}, Te = () => (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), M = (l) => !!l && String(l).slice(0, 10) < Te(), je = {
|
|
24
25
|
alert: "bg-red-500/10 text-red-600 dark:text-red-400",
|
|
25
26
|
warn: "bg-amber-400/15 text-amber-700 dark:text-amber-400",
|
|
26
27
|
neutral: "bg-slate-500/10 text-slate-600 dark:text-slate-400",
|
|
27
28
|
ok: "bg-emerald-500/10 text-emerald-700 dark:text-emerald-400"
|
|
28
29
|
};
|
|
29
|
-
function
|
|
30
|
-
const
|
|
31
|
-
return
|
|
30
|
+
function Ae({ sla: l }) {
|
|
31
|
+
const c = ge(l);
|
|
32
|
+
return c ? /* @__PURE__ */ e(
|
|
32
33
|
"span",
|
|
33
34
|
{
|
|
34
|
-
"data-sla-chip":
|
|
35
|
-
className: `rounded px-1.5 py-0.5 text-[10px] font-semibold tabular-nums ${
|
|
36
|
-
children:
|
|
35
|
+
"data-sla-chip": c.tone,
|
|
36
|
+
className: `rounded px-1.5 py-0.5 text-[10px] font-semibold tabular-nums ${je[c.tone]}`,
|
|
37
|
+
children: c.label
|
|
37
38
|
}
|
|
38
39
|
) : null;
|
|
39
40
|
}
|
|
40
|
-
function
|
|
41
|
+
function Me({ state: l, color: c }) {
|
|
41
42
|
return l ? /* @__PURE__ */ e(
|
|
42
43
|
"span",
|
|
43
44
|
{
|
|
44
45
|
className: "rounded-full px-2 py-0.5 text-[10.5px] font-medium",
|
|
45
46
|
style: {
|
|
46
|
-
backgroundColor:
|
|
47
|
-
color:
|
|
47
|
+
backgroundColor: c ? `${c}22` : "rgba(100,116,139,.12)",
|
|
48
|
+
color: c ?? void 0
|
|
48
49
|
},
|
|
49
50
|
children: l.replace(/_/g, " ")
|
|
50
51
|
}
|
|
51
52
|
) : null;
|
|
52
53
|
}
|
|
53
|
-
function
|
|
54
|
+
function O({ label: l, value: c, tone: u }) {
|
|
54
55
|
return /* @__PURE__ */ s("div", { className: "rounded-lg border border-slate-200 bg-white p-3 dark:border-border dark:bg-card", children: [
|
|
55
56
|
/* @__PURE__ */ e("p", { className: "text-[10.5px] uppercase tracking-wide text-muted-foreground", children: l }),
|
|
56
|
-
/* @__PURE__ */ e("p", { className: `mt-0.5 text-[18px] font-semibold tabular-nums ${u ?? ""}`, children: /* @__PURE__ */ e(
|
|
57
|
+
/* @__PURE__ */ e("p", { className: `mt-0.5 text-[18px] font-semibold tabular-nums ${u ?? ""}`, children: /* @__PURE__ */ e(_e, { value: c }) })
|
|
57
58
|
] });
|
|
58
59
|
}
|
|
59
|
-
function
|
|
60
|
+
function Ze({
|
|
60
61
|
notificationRoutes: l,
|
|
61
|
-
onOpenPath:
|
|
62
|
+
onOpenPath: c
|
|
62
63
|
} = {}) {
|
|
63
|
-
const { apiBase: u, authHeaders: w, credentials: v } = le(), { open: U } = ce(), _ = me(), h = se(),
|
|
64
|
+
const { apiBase: u, authHeaders: w, credentials: v } = le(), { open: U } = ce(), _ = me(), h = se(), W = (t) => {
|
|
64
65
|
var b, i;
|
|
65
66
|
const d = ((b = l == null ? void 0 : l.support) == null ? void 0 : b.call(l, String(t))) ?? ((i = _.consoleUrl) == null ? void 0 : i.call(_, `/support?ticket=${t}`)) ?? `/support?ticket=${t}`;
|
|
66
|
-
|
|
67
|
-
},
|
|
67
|
+
c ? c(d) : _.navigate(d);
|
|
68
|
+
}, F = he(), [R, C] = N(!1), [x, ee] = N(() => {
|
|
68
69
|
try {
|
|
69
70
|
const t = localStorage.getItem("nvr_mywork_sections");
|
|
70
71
|
if (t) {
|
|
71
72
|
const d = JSON.parse(t);
|
|
72
73
|
if (Array.isArray(d == null ? void 0 : d.order) && Array.isArray(d == null ? void 0 : d.hidden)) {
|
|
73
|
-
const b = X.map((i,
|
|
74
|
+
const b = X.map((i, m) => ({
|
|
74
75
|
k: i,
|
|
75
|
-
at: d.order.indexOf(i) >= 0 ? d.order.indexOf(i) :
|
|
76
|
-
})).sort((i,
|
|
76
|
+
at: d.order.indexOf(i) >= 0 ? d.order.indexOf(i) : m - 0.5
|
|
77
|
+
})).sort((i, m) => i.at - m.at).map((i) => i.k);
|
|
77
78
|
return { order: b, hidden: d.hidden.filter((i) => b.includes(i)) };
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
81
|
} catch {
|
|
81
82
|
}
|
|
82
83
|
return { order: [...X], hidden: [] };
|
|
83
|
-
}),
|
|
84
|
+
}), K = (t) => {
|
|
84
85
|
ee(t);
|
|
85
86
|
try {
|
|
86
87
|
localStorage.setItem("nvr_mywork_sections", JSON.stringify(t));
|
|
87
88
|
} catch {
|
|
88
89
|
}
|
|
89
|
-
}, [te, re] = N(!1),
|
|
90
|
+
}, [te, re] = N(!1), P = q(0), [$, ae] = N("all"), { data: a, isLoading: de, refetch: Q, isFetching: B } = oe({
|
|
90
91
|
queryKey: ["my-work"],
|
|
91
92
|
queryFn: async () => {
|
|
92
93
|
const t = await fetch(`${u}/my-work`, { headers: w, credentials: v });
|
|
@@ -97,34 +98,34 @@ function Ve({
|
|
|
97
98
|
}), z = q(0), g = q(null), J = () => {
|
|
98
99
|
const t = () => {
|
|
99
100
|
g.current = null, z.current = Date.now(), C(!1), h.invalidateQueries({ queryKey: ["my-work"] });
|
|
100
|
-
}, d = z.current +
|
|
101
|
+
}, d = z.current + $e - Date.now();
|
|
101
102
|
g.current || (d <= 0 ? t() : g.current = setTimeout(t, d));
|
|
102
103
|
};
|
|
103
|
-
|
|
104
|
+
pe("my-work", J, { debounceMs: 1500 }), ue("notification:new", J, { debounceMs: 1500 }), E(
|
|
104
105
|
() => () => {
|
|
105
106
|
g.current && clearTimeout(g.current);
|
|
106
107
|
},
|
|
107
108
|
[]
|
|
108
109
|
);
|
|
109
|
-
const H =
|
|
110
|
+
const H = be([
|
|
110
111
|
...((a == null ? void 0 : a.owned) ?? []).map((t) => `o:${t.collection}:${t.item}`),
|
|
111
112
|
...((a == null ? void 0 : a.tasks) ?? []).map((t) => `t:${t.id}`),
|
|
112
113
|
...((a == null ? void 0 : a.team_tasks) ?? []).map((t) => `tt:${t.id}`),
|
|
113
114
|
...((a == null ? void 0 : a.requested) ?? []).map((t) => `r:${t.id}`),
|
|
114
115
|
...((a == null ? void 0 : a.notifications) ?? []).map((t) => `n:${t.id}`)
|
|
115
|
-
]), f = (t) => H.has(t) ? "bg-nvr-cyan/10 transition-colors duration-700" : "transition-colors duration-700",
|
|
116
|
+
]), f = (t) => H.has(t) ? "bg-nvr-cyan/10 transition-colors duration-700" : "transition-colors duration-700", I = ie(() => {
|
|
116
117
|
const t = /* @__PURE__ */ new Set();
|
|
117
118
|
for (const d of (a == null ? void 0 : a.owned) ?? []) d.collection && t.add(d.collection);
|
|
118
119
|
return [...t];
|
|
119
120
|
}, [a]);
|
|
120
121
|
E(() => {
|
|
121
|
-
if (!(!
|
|
122
|
-
return
|
|
122
|
+
if (!(!F || I.length === 0))
|
|
123
|
+
return F.subscribeCollections(I, () => {
|
|
123
124
|
const t = Date.now();
|
|
124
|
-
t -
|
|
125
|
+
t - P.current < 3e4 || (P.current = t, C(!0));
|
|
125
126
|
});
|
|
126
|
-
}, [
|
|
127
|
-
const V =
|
|
127
|
+
}, [F, I]);
|
|
128
|
+
const V = D({
|
|
128
129
|
// A ticket closes through /support so its requester hears about it.
|
|
129
130
|
mutationFn: (t) => fetch(`${u}/${t.kind === "support" ? "support/tickets" : "tasks"}/${t.id}`, {
|
|
130
131
|
method: "PATCH",
|
|
@@ -133,7 +134,7 @@ function Ve({
|
|
|
133
134
|
body: JSON.stringify({ status: "done" })
|
|
134
135
|
}),
|
|
135
136
|
onSuccess: () => h.invalidateQueries({ queryKey: ["my-work"] })
|
|
136
|
-
}), S =
|
|
137
|
+
}), S = D({
|
|
137
138
|
mutationFn: async ({ id: t, action: d }) => {
|
|
138
139
|
const b = await fetch(`${u}/tasks/${t}/${d}`, {
|
|
139
140
|
method: "POST",
|
|
@@ -145,16 +146,16 @@ function Ve({
|
|
|
145
146
|
return d;
|
|
146
147
|
},
|
|
147
148
|
onSuccess: (t) => {
|
|
148
|
-
|
|
149
|
+
L(t === "claim" ? "It’s yours — it moved to My tasks." : "Reminder sent."), h.invalidateQueries({ queryKey: ["my-work"] });
|
|
149
150
|
},
|
|
150
|
-
onError: (t) =>
|
|
151
|
-
}), [T,
|
|
151
|
+
onError: (t) => L(t instanceof Error ? t.message : "Failed")
|
|
152
|
+
}), [T, L] = N(null);
|
|
152
153
|
E(() => {
|
|
153
154
|
if (!T) return;
|
|
154
|
-
const t = setTimeout(() =>
|
|
155
|
+
const t = setTimeout(() => L(null), 4e3);
|
|
155
156
|
return () => clearTimeout(t);
|
|
156
157
|
}, [T]);
|
|
157
|
-
const Y =
|
|
158
|
+
const Y = D({
|
|
158
159
|
mutationFn: (t) => fetch(`${u}/notifications/mark-read`, {
|
|
159
160
|
method: "POST",
|
|
160
161
|
headers: { ...w, "content-type": "application/json" },
|
|
@@ -166,17 +167,17 @@ function Ve({
|
|
|
166
167
|
}
|
|
167
168
|
}), k = (t, d) => {
|
|
168
169
|
const b = {
|
|
169
|
-
record: (
|
|
170
|
+
record: (m, r) => (U({ collection: m, itemId: r }), null),
|
|
170
171
|
...l
|
|
171
172
|
}, i = Z(t, d, {
|
|
172
173
|
...b,
|
|
173
|
-
record: (
|
|
174
|
+
record: (m, r) => {
|
|
174
175
|
var p;
|
|
175
|
-
return ((p = l == null ? void 0 : l.record) == null ? void 0 : p.call(l,
|
|
176
|
+
return ((p = l == null ? void 0 : l.record) == null ? void 0 : p.call(l, m, r)) ?? null;
|
|
176
177
|
}
|
|
177
178
|
});
|
|
178
179
|
if (i) {
|
|
179
|
-
|
|
180
|
+
xe(i, (m) => c == null ? void 0 : c(m));
|
|
180
181
|
return;
|
|
181
182
|
}
|
|
182
183
|
t && d && !/^nivaro_/i.test(t) && t !== "__chat__" && U({ collection: t, itemId: d });
|
|
@@ -185,19 +186,20 @@ function Ve({
|
|
|
185
186
|
...l
|
|
186
187
|
});
|
|
187
188
|
return de || !a ? /* @__PURE__ */ e("div", { className: "grid grid-cols-4 gap-3 p-6", children: [1, 2, 3, 4].map((t) => /* @__PURE__ */ e("div", { className: "h-16 animate-pulse rounded-lg bg-[hsl(var(--nvr-skeleton))]" }, t)) }) : /* @__PURE__ */ s("div", { className: "space-y-5 p-6", "data-my-work": !0, children: [
|
|
189
|
+
/* @__PURE__ */ e(fe, { onOpenPath: c }),
|
|
188
190
|
/* @__PURE__ */ s("div", { className: "flex items-start justify-between", children: [
|
|
189
191
|
/* @__PURE__ */ s("div", { className: "grid flex-1 grid-cols-2 gap-3 lg:grid-cols-4", children: [
|
|
190
|
-
/* @__PURE__ */ e(
|
|
192
|
+
/* @__PURE__ */ e(O, { label: "Waiting on you", value: a.counts.owned }),
|
|
191
193
|
/* @__PURE__ */ e(
|
|
192
|
-
|
|
194
|
+
O,
|
|
193
195
|
{
|
|
194
196
|
label: "SLA breached",
|
|
195
197
|
value: a.counts.owned_breached,
|
|
196
198
|
tone: a.counts.owned_breached > 0 ? "text-red-600 dark:text-red-400" : ""
|
|
197
199
|
}
|
|
198
200
|
),
|
|
199
|
-
/* @__PURE__ */ e(
|
|
200
|
-
/* @__PURE__ */ e(
|
|
201
|
+
/* @__PURE__ */ e(O, { label: "Open tasks", value: a.counts.tasks }),
|
|
202
|
+
/* @__PURE__ */ e(O, { label: "Unread notifications", value: a.counts.notifications })
|
|
201
203
|
] }),
|
|
202
204
|
R && /* @__PURE__ */ s(
|
|
203
205
|
"button",
|
|
@@ -238,16 +240,16 @@ function Ve({
|
|
|
238
240
|
te && /* @__PURE__ */ s("div", { className: "absolute right-0 top-full z-20 mt-1 w-56 rounded-lg border border-slate-200 bg-white p-2 shadow-lg dark:border-border dark:bg-card", children: [
|
|
239
241
|
/* @__PURE__ */ e("p", { className: "px-1 pb-1.5 text-[11px] font-semibold text-slate-500", children: "Sections" }),
|
|
240
242
|
x.order.map((t, d) => {
|
|
241
|
-
const b =
|
|
243
|
+
const b = Se[t] ?? t, i = x.hidden.includes(t), m = (r) => {
|
|
242
244
|
const p = [...x.order], n = d + r;
|
|
243
|
-
n < 0 || n >= p.length || ([p[d], p[n]] = [p[n], p[d]],
|
|
245
|
+
n < 0 || n >= p.length || ([p[d], p[n]] = [p[n], p[d]], K({ ...x, order: p }));
|
|
244
246
|
};
|
|
245
247
|
return /* @__PURE__ */ s("div", { className: "flex items-center gap-1 rounded px-1 py-1 hover:bg-muted", children: [
|
|
246
248
|
/* @__PURE__ */ e(
|
|
247
249
|
"button",
|
|
248
250
|
{
|
|
249
251
|
type: "button",
|
|
250
|
-
onClick: () =>
|
|
252
|
+
onClick: () => K({
|
|
251
253
|
...x,
|
|
252
254
|
hidden: i ? x.hidden.filter((r) => r !== t) : [...x.hidden, t]
|
|
253
255
|
}),
|
|
@@ -267,7 +269,7 @@ function Ve({
|
|
|
267
269
|
"button",
|
|
268
270
|
{
|
|
269
271
|
type: "button",
|
|
270
|
-
onClick: () =>
|
|
272
|
+
onClick: () => m(-1),
|
|
271
273
|
disabled: d === 0,
|
|
272
274
|
className: "px-1 text-[11px] text-slate-400 hover:text-foreground disabled:opacity-30",
|
|
273
275
|
children: "↑"
|
|
@@ -277,7 +279,7 @@ function Ve({
|
|
|
277
279
|
"button",
|
|
278
280
|
{
|
|
279
281
|
type: "button",
|
|
280
|
-
onClick: () =>
|
|
282
|
+
onClick: () => m(1),
|
|
281
283
|
disabled: d === x.order.length - 1,
|
|
282
284
|
className: "px-1 text-[11px] text-slate-400 hover:text-foreground disabled:opacity-30",
|
|
283
285
|
children: "↓"
|
|
@@ -297,8 +299,8 @@ function Ve({
|
|
|
297
299
|
children: T
|
|
298
300
|
}
|
|
299
301
|
),
|
|
302
|
+
/* @__PURE__ */ e(ve, { className: "mb-4" }),
|
|
300
303
|
/* @__PURE__ */ e(we, { className: "mb-4" }),
|
|
301
|
-
/* @__PURE__ */ e(Ne, { className: "mb-4" }),
|
|
302
304
|
(() => {
|
|
303
305
|
const t = {
|
|
304
306
|
records: () => {
|
|
@@ -347,8 +349,8 @@ function Ve({
|
|
|
347
349
|
children: [
|
|
348
350
|
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-[12.5px] font-medium", children: o.label }),
|
|
349
351
|
/* @__PURE__ */ e("span", { className: "hidden text-[11px] text-muted-foreground sm:inline", children: o.collection.replace(/_/g, " ") }),
|
|
350
|
-
/* @__PURE__ */ e(
|
|
351
|
-
/* @__PURE__ */ e(
|
|
352
|
+
/* @__PURE__ */ e(Me, { state: o.state, color: o.state_color }),
|
|
353
|
+
/* @__PURE__ */ e(Ae, { sla: o.sla })
|
|
352
354
|
]
|
|
353
355
|
}
|
|
354
356
|
)
|
|
@@ -362,7 +364,7 @@ function Ve({
|
|
|
362
364
|
a.tasks.length === 0 ? /* @__PURE__ */ e("p", { className: "px-4 py-5 text-center text-[12.5px] text-muted-foreground", children: "No open tasks." }) : /* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: a.tasks.map((r) => /* @__PURE__ */ s(
|
|
363
365
|
"li",
|
|
364
366
|
{
|
|
365
|
-
className:
|
|
367
|
+
className: A("flex items-center gap-2.5 px-4 py-2", f(`t:${r.id}`)),
|
|
366
368
|
children: [
|
|
367
369
|
/* @__PURE__ */ e(
|
|
368
370
|
"button",
|
|
@@ -381,7 +383,7 @@ function Ve({
|
|
|
381
383
|
"button",
|
|
382
384
|
{
|
|
383
385
|
type: "button",
|
|
384
|
-
onClick: () => r.kind === "support" ?
|
|
386
|
+
onClick: () => r.kind === "support" ? W(r.id) : k(r.collection, r.item),
|
|
385
387
|
className: "min-w-0 flex-1 truncate text-left text-[12.5px] hover:underline",
|
|
386
388
|
children: [
|
|
387
389
|
r.title,
|
|
@@ -392,7 +394,7 @@ function Ve({
|
|
|
392
394
|
r.due_date && /* @__PURE__ */ e(
|
|
393
395
|
"span",
|
|
394
396
|
{
|
|
395
|
-
className: `text-[11px] tabular-nums ${
|
|
397
|
+
className: `text-[11px] tabular-nums ${M(r.due_date) ? "font-medium text-red-600 dark:text-red-400" : "text-muted-foreground"}`,
|
|
396
398
|
children: new Date(r.due_date).toLocaleDateString(void 0, { timeZone: "UTC" })
|
|
397
399
|
}
|
|
398
400
|
)
|
|
@@ -414,7 +416,7 @@ function Ve({
|
|
|
414
416
|
(a.team_tasks ?? []).length === 0 ? /* @__PURE__ */ e("p", { className: "px-4 py-5 text-center text-[12.5px] text-muted-foreground", children: "Nothing waiting with your teams." }) : /* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: (a.team_tasks ?? []).map((r) => /* @__PURE__ */ s(
|
|
415
417
|
"li",
|
|
416
418
|
{
|
|
417
|
-
className:
|
|
419
|
+
className: A("flex items-center gap-2.5 px-4 py-2", f(`tt:${r.id}`)),
|
|
418
420
|
"data-my-work-team-task": r.id,
|
|
419
421
|
children: [
|
|
420
422
|
r.priority === "urgent" && /* @__PURE__ */ e("span", { className: "shrink-0 rounded bg-red-500/10 px-1 py-px text-[9.5px] font-semibold uppercase tracking-wide text-red-600 dark:text-red-400", children: "urgent" }),
|
|
@@ -433,7 +435,7 @@ function Ve({
|
|
|
433
435
|
r.due_date && /* @__PURE__ */ e(
|
|
434
436
|
"span",
|
|
435
437
|
{
|
|
436
|
-
className: `text-[11px] tabular-nums ${
|
|
438
|
+
className: `text-[11px] tabular-nums ${M(r.due_date) ? "font-medium text-red-600 dark:text-red-400" : "text-muted-foreground"}`,
|
|
437
439
|
children: new Date(r.due_date).toLocaleDateString(void 0, {
|
|
438
440
|
timeZone: "UTC"
|
|
439
441
|
})
|
|
@@ -458,7 +460,7 @@ function Ve({
|
|
|
458
460
|
}
|
|
459
461
|
),
|
|
460
462
|
waiting: () => {
|
|
461
|
-
const r = a.requested ?? [], p = r.filter((n) =>
|
|
463
|
+
const r = a.requested ?? [], p = r.filter((n) => M(n.due_date)).length;
|
|
462
464
|
return /* @__PURE__ */ s(
|
|
463
465
|
"section",
|
|
464
466
|
{
|
|
@@ -476,18 +478,18 @@ function Ve({
|
|
|
476
478
|
/* @__PURE__ */ e("p", { className: "text-[11px] text-muted-foreground", children: "Tasks you asked someone else to do." })
|
|
477
479
|
] }),
|
|
478
480
|
r.length === 0 ? /* @__PURE__ */ e("p", { className: "px-4 py-5 text-center text-[12.5px] text-muted-foreground", children: "You are not waiting on anyone." }) : /* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: r.map((n) => {
|
|
479
|
-
const j =
|
|
481
|
+
const j = M(n.due_date), o = !!n.nudged_at && Date.now() - new Date(n.nudged_at).getTime() < 20 * 36e5;
|
|
480
482
|
return /* @__PURE__ */ s(
|
|
481
483
|
"li",
|
|
482
484
|
{
|
|
483
|
-
className:
|
|
485
|
+
className: A("flex items-center gap-2.5 px-4 py-2", f(`r:${n.id}`)),
|
|
484
486
|
"data-my-work-requested": n.id,
|
|
485
487
|
children: [
|
|
486
488
|
/* @__PURE__ */ s(
|
|
487
489
|
"button",
|
|
488
490
|
{
|
|
489
491
|
type: "button",
|
|
490
|
-
onClick: () => n.kind === "support" ?
|
|
492
|
+
onClick: () => n.kind === "support" ? W(n.id) : k(n.collection, n.item),
|
|
491
493
|
className: "min-w-0 flex-1 truncate text-left text-[12.5px] hover:underline",
|
|
492
494
|
children: [
|
|
493
495
|
n.title,
|
|
@@ -547,10 +549,10 @@ function Ve({
|
|
|
547
549
|
a.notifications.length === 0 ? /* @__PURE__ */ e("p", { className: "px-4 py-5 text-center text-[12.5px] text-muted-foreground", children: "You're all caught up." }) : /* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: a.notifications.map((r) => /* @__PURE__ */ s(
|
|
548
550
|
"li",
|
|
549
551
|
{
|
|
550
|
-
className:
|
|
552
|
+
className: A("flex items-start gap-2.5 px-4 py-2", f(`n:${r.id}`)),
|
|
551
553
|
children: [
|
|
552
554
|
/* @__PURE__ */ e(
|
|
553
|
-
|
|
555
|
+
Ce,
|
|
554
556
|
{
|
|
555
557
|
userId: r.sender,
|
|
556
558
|
className: "mt-0.5 h-5 w-5",
|
|
@@ -587,37 +589,37 @@ function Ve({
|
|
|
587
589
|
}, d = new Map(
|
|
588
590
|
x.order.filter((r) => !x.hidden.includes(r) && t[r]).map((r) => [r, t[r]()]).filter(([, r]) => r != null)
|
|
589
591
|
), b = [...d.keys()], i = [];
|
|
590
|
-
let
|
|
591
|
-
for (;
|
|
592
|
-
const r = b[
|
|
592
|
+
let m = 0;
|
|
593
|
+
for (; m < b.length; ) {
|
|
594
|
+
const r = b[m];
|
|
593
595
|
if (r === "records")
|
|
594
|
-
i.push(/* @__PURE__ */ e("div", { children: d.get(r) }, r)),
|
|
596
|
+
i.push(/* @__PURE__ */ e("div", { children: d.get(r) }, r)), m++;
|
|
595
597
|
else {
|
|
596
598
|
const p = [r];
|
|
597
|
-
|
|
599
|
+
m + 1 < b.length && b[m + 1] !== "records" && p.push(b[m + 1]), i.push(
|
|
598
600
|
/* @__PURE__ */ e("div", { className: "grid gap-5 lg:grid-cols-2", children: p.map((n) => /* @__PURE__ */ e("div", { children: d.get(n) }, n)) }, p.join("+"))
|
|
599
|
-
),
|
|
601
|
+
), m += p.length;
|
|
600
602
|
}
|
|
601
603
|
}
|
|
602
604
|
return i;
|
|
603
605
|
})(),
|
|
604
|
-
/* @__PURE__ */ e(
|
|
606
|
+
/* @__PURE__ */ e(Oe, {})
|
|
605
607
|
] });
|
|
606
608
|
}
|
|
607
|
-
function
|
|
608
|
-
const l =
|
|
609
|
-
return !l ||
|
|
609
|
+
function Oe() {
|
|
610
|
+
const l = ye(), { rooms: c } = Ne(l);
|
|
611
|
+
return !l || c.length === 0 ? null : /* @__PURE__ */ s(
|
|
610
612
|
"section",
|
|
611
613
|
{
|
|
612
614
|
className: "rounded-lg border border-slate-200 bg-white dark:border-border dark:bg-card",
|
|
613
615
|
"data-my-work-chat": !0,
|
|
614
616
|
children: [
|
|
615
617
|
/* @__PURE__ */ e("div", { className: "border-b border-slate-200 px-4 py-2.5 dark:border-border", children: /* @__PURE__ */ e("h2", { className: "text-[13px] font-medium", children: "Record conversations" }) }),
|
|
616
|
-
/* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children:
|
|
618
|
+
/* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: c.map((u) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ s(
|
|
617
619
|
"button",
|
|
618
620
|
{
|
|
619
621
|
type: "button",
|
|
620
|
-
onClick: () =>
|
|
622
|
+
onClick: () => ke(u.room, u.label),
|
|
621
623
|
className: "flex w-full items-center gap-2.5 px-4 py-2 text-left hover:bg-slate-50 dark:hover:bg-muted/40",
|
|
622
624
|
"data-my-work-chat-room": u.room,
|
|
623
625
|
children: [
|
|
@@ -638,5 +640,5 @@ function Ae() {
|
|
|
638
640
|
);
|
|
639
641
|
}
|
|
640
642
|
export {
|
|
641
|
-
|
|
643
|
+
Ze as MyWorkView
|
|
642
644
|
};
|