@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,8 +1,9 @@
|
|
|
1
1
|
import { useQuery as u, useInfiniteQuery as b, useQueryClient as f } from "@tanstack/react-query";
|
|
2
|
-
import { useRef as
|
|
2
|
+
import { useRef as F } from "react";
|
|
3
3
|
import { useNivaroClient as d } from "../../context.js";
|
|
4
|
-
import { patch as y, get as r, del as p, post as i, put as
|
|
4
|
+
import { patch as y, get as r, del as p, post as i, put as c } from "../../lib/commands.js";
|
|
5
5
|
import { useLiveEvent as m } from "../../lib/live.js";
|
|
6
|
+
import { useLiveRefetchInterval as w } from "../../lib/live-queries.js";
|
|
6
7
|
import { cardAccent as _ } from "./cards.js";
|
|
7
8
|
const l = {
|
|
8
9
|
all: ["help-videos"],
|
|
@@ -27,8 +28,8 @@ const l = {
|
|
|
27
28
|
* never refetch it. `n` bumps on Reload. */
|
|
28
29
|
draftEdits: (s, a) => ["help-video-draft", s, a]
|
|
29
30
|
}, q = (s, a) => String(s ?? "").toLowerCase() === String(a ?? "").toLowerCase();
|
|
30
|
-
function
|
|
31
|
-
const e = f(), t =
|
|
31
|
+
function v(s, a) {
|
|
32
|
+
const e = f(), t = F(s);
|
|
32
33
|
t.current = s, m(
|
|
33
34
|
"help-video:changed",
|
|
34
35
|
() => {
|
|
@@ -42,26 +43,28 @@ function c(s, a) {
|
|
|
42
43
|
}
|
|
43
44
|
);
|
|
44
45
|
}
|
|
45
|
-
async function
|
|
46
|
+
async function K(s, a) {
|
|
46
47
|
return (await s.request(r(`/help-videos/${a}`))).data;
|
|
47
48
|
}
|
|
48
|
-
function
|
|
49
|
+
function I(s) {
|
|
49
50
|
const a = d();
|
|
50
|
-
|
|
51
|
+
v([l.one(s ?? "")], s);
|
|
52
|
+
const e = w(4e3);
|
|
53
|
+
return u({
|
|
51
54
|
queryKey: l.one(s ?? ""),
|
|
52
55
|
enabled: !!s,
|
|
53
|
-
queryFn: () =>
|
|
56
|
+
queryFn: () => K(a, s),
|
|
54
57
|
// Poll while a render runs so the status chip and the stream switch over by themselves.
|
|
55
|
-
refetchInterval: (
|
|
56
|
-
var
|
|
57
|
-
const
|
|
58
|
-
return
|
|
58
|
+
refetchInterval: (t) => {
|
|
59
|
+
var o, h;
|
|
60
|
+
const n = (h = (o = t.state.data) == null ? void 0 : o.published) == null ? void 0 : h.render_status;
|
|
61
|
+
return n === "queued" || n === "rendering" ? e : !1;
|
|
59
62
|
}
|
|
60
63
|
});
|
|
61
64
|
}
|
|
62
|
-
function
|
|
65
|
+
function M(s, a = !0) {
|
|
63
66
|
const e = d();
|
|
64
|
-
return
|
|
67
|
+
return v([["help-videos", "for"]]), u({
|
|
65
68
|
queryKey: l.forCtx(s),
|
|
66
69
|
enabled: a && !!(s.collection || s.page),
|
|
67
70
|
staleTime: 6e4,
|
|
@@ -73,22 +76,31 @@ function U(s, a = !0) {
|
|
|
73
76
|
)
|
|
74
77
|
});
|
|
75
78
|
}
|
|
76
|
-
function
|
|
79
|
+
function O(s, a = !0) {
|
|
80
|
+
const e = d();
|
|
81
|
+
return v([["help-videos", "form"]]), u({
|
|
82
|
+
queryKey: ["help-videos", "form", s ?? ""],
|
|
83
|
+
enabled: a && !!s,
|
|
84
|
+
staleTime: 6e4,
|
|
85
|
+
queryFn: () => e.request(r("/help-videos/for-form", { collection: s })).then((t) => t.data)
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
function V(s) {
|
|
77
89
|
const a = s[s.length - 1];
|
|
78
90
|
return a != null && a.data.length && s.reduce((t, n) => t + n.data.length, 0) < a.total ? s.length + 1 : void 0;
|
|
79
91
|
}
|
|
80
|
-
function
|
|
92
|
+
function z(s) {
|
|
81
93
|
const a = d();
|
|
82
|
-
return
|
|
94
|
+
return v([["help-videos", "library"]]), b({
|
|
83
95
|
queryKey: l.library(s),
|
|
84
96
|
initialPageParam: 1,
|
|
85
97
|
queryFn: ({ pageParam: e }) => a.request(r("/help-videos", { ...s, page: e })),
|
|
86
|
-
getNextPageParam: (e, t) =>
|
|
98
|
+
getNextPageParam: (e, t) => V(t),
|
|
87
99
|
placeholderData: (e) => e,
|
|
88
100
|
select: (e) => {
|
|
89
101
|
var t, n, o;
|
|
90
102
|
return {
|
|
91
|
-
data: e.pages.flatMap((
|
|
103
|
+
data: e.pages.flatMap((h) => h.data),
|
|
92
104
|
total: ((t = e.pages[e.pages.length - 1]) == null ? void 0 : t.total) ?? 0,
|
|
93
105
|
categories: ((n = e.pages[0]) == null ? void 0 : n.categories) ?? [],
|
|
94
106
|
can_author: ((o = e.pages[0]) == null ? void 0 : o.can_author) ?? !1
|
|
@@ -102,24 +114,24 @@ async function g(s) {
|
|
|
102
114
|
);
|
|
103
115
|
return { data: a.data ?? [], paths: a.paths ?? [] };
|
|
104
116
|
}
|
|
105
|
-
function
|
|
117
|
+
function Q() {
|
|
106
118
|
const s = d();
|
|
107
|
-
return
|
|
119
|
+
return v([l.required]), u({
|
|
108
120
|
queryKey: l.required,
|
|
109
121
|
staleTime: 6e4,
|
|
110
122
|
queryFn: () => g(s)
|
|
111
123
|
});
|
|
112
124
|
}
|
|
113
|
-
function
|
|
125
|
+
function S() {
|
|
114
126
|
const s = d();
|
|
115
|
-
return
|
|
127
|
+
return v([l.required]), u({
|
|
116
128
|
queryKey: l.required,
|
|
117
129
|
staleTime: 6e4,
|
|
118
130
|
queryFn: () => g(s),
|
|
119
131
|
select: (a) => a.data
|
|
120
132
|
});
|
|
121
133
|
}
|
|
122
|
-
function
|
|
134
|
+
function j(s = !0) {
|
|
123
135
|
const a = d();
|
|
124
136
|
return u({
|
|
125
137
|
queryKey: l.myPaths,
|
|
@@ -128,7 +140,7 @@ function I(s = !0) {
|
|
|
128
140
|
queryFn: async () => (await a.request(r("/help-videos/paths/mine"))).data
|
|
129
141
|
});
|
|
130
142
|
}
|
|
131
|
-
function
|
|
143
|
+
function D(s = !0) {
|
|
132
144
|
const a = d();
|
|
133
145
|
return u({
|
|
134
146
|
queryKey: l.paths,
|
|
@@ -136,25 +148,25 @@ function Q(s = !0) {
|
|
|
136
148
|
queryFn: async () => (await a.request(r("/help-videos/paths"))).data
|
|
137
149
|
});
|
|
138
150
|
}
|
|
139
|
-
function
|
|
151
|
+
function E(s) {
|
|
140
152
|
const a = s.request.bind(s);
|
|
141
153
|
return {
|
|
142
154
|
create: (e) => a(i("/help-videos/paths", e)).then((t) => t.data),
|
|
143
155
|
update: (e, t) => a(y(`/help-videos/paths/${e}`, t)).then((n) => n.data),
|
|
144
156
|
/** The ordered video list; unknown ids are dropped. */
|
|
145
|
-
setItems: (e, t) => a(
|
|
157
|
+
setItems: (e, t) => a(c(`/help-videos/paths/${e}/items`, { video_ids: t })).then(
|
|
146
158
|
(n) => n.data
|
|
147
159
|
),
|
|
148
160
|
/** The roles; a published path tells the roles that became required. */
|
|
149
161
|
setRoles: (e, t) => a(
|
|
150
|
-
|
|
162
|
+
c(`/help-videos/paths/${e}/roles`, {
|
|
151
163
|
roles: t
|
|
152
164
|
})
|
|
153
165
|
).then((n) => n.data),
|
|
154
166
|
remove: (e) => a(p(`/help-videos/paths/${e}`))
|
|
155
167
|
};
|
|
156
168
|
}
|
|
157
|
-
function
|
|
169
|
+
function N(s) {
|
|
158
170
|
const a = d();
|
|
159
171
|
return u({
|
|
160
172
|
queryKey: l.walk(s ?? ""),
|
|
@@ -165,7 +177,7 @@ function j(s) {
|
|
|
165
177
|
)).data
|
|
166
178
|
});
|
|
167
179
|
}
|
|
168
|
-
function
|
|
180
|
+
function B(s) {
|
|
169
181
|
const a = d(), e = f();
|
|
170
182
|
return m(
|
|
171
183
|
"help-video:question",
|
|
@@ -183,7 +195,7 @@ function D(s) {
|
|
|
183
195
|
queryFn: () => $(a).questions(s)
|
|
184
196
|
});
|
|
185
197
|
}
|
|
186
|
-
function
|
|
198
|
+
function J(s, a = !0) {
|
|
187
199
|
const e = d();
|
|
188
200
|
return u({
|
|
189
201
|
queryKey: l.next(s ?? ""),
|
|
@@ -192,7 +204,7 @@ function E(s, a = !0) {
|
|
|
192
204
|
queryFn: () => $(e).next(s)
|
|
193
205
|
});
|
|
194
206
|
}
|
|
195
|
-
function
|
|
207
|
+
function W(s) {
|
|
196
208
|
const a = d();
|
|
197
209
|
return u({
|
|
198
210
|
queryKey: l.clips(s ?? ""),
|
|
@@ -208,7 +220,7 @@ function N(s) {
|
|
|
208
220
|
function C(s) {
|
|
209
221
|
return Array.isArray(s) && s.some((a) => a.status === "queued" || a.status === "rendering");
|
|
210
222
|
}
|
|
211
|
-
function
|
|
223
|
+
function G() {
|
|
212
224
|
const s = d();
|
|
213
225
|
return u({
|
|
214
226
|
queryKey: l.pages,
|
|
@@ -234,8 +246,8 @@ function $(s) {
|
|
|
234
246
|
...n ? { draft: 1 } : {}
|
|
235
247
|
})
|
|
236
248
|
).then((o) => o.data.url),
|
|
237
|
-
setContexts: (e, t) => a(
|
|
238
|
-
setRequirements: (e, t) => a(
|
|
249
|
+
setContexts: (e, t) => a(c(`/help-videos/${e}/contexts`, { contexts: t })),
|
|
250
|
+
setRequirements: (e, t) => a(c(`/help-videos/${e}/requirements`, { role_ids: t })),
|
|
239
251
|
archive: (e) => a(p(`/help-videos/${e}`)),
|
|
240
252
|
/** Deletes the video, its versions, files, views and requirements for good. Administrators
|
|
241
253
|
* only (403 ADMIN_ONLY otherwise); 404 when it is already gone. */
|
|
@@ -243,7 +255,7 @@ function $(s) {
|
|
|
243
255
|
draft: (e) => a(r(`/help-videos/${e}/draft/edits`)).then((t) => t.data),
|
|
244
256
|
/** 409 HELP_VIDEO_EDITS_CONFLICT (with `current_hash`) when `base_hash` is stale;
|
|
245
257
|
* 422 HELP_VIDEO_EDITS_INVALID when the edits keep under a second. */
|
|
246
|
-
saveDraft: (e, t, n) => a(
|
|
258
|
+
saveDraft: (e, t, n) => a(c(`/help-videos/${e}/draft/edits`, { edits: t, base_hash: n })).then(
|
|
247
259
|
(o) => o.data
|
|
248
260
|
),
|
|
249
261
|
publish: (e, t, n) => a(
|
|
@@ -266,7 +278,7 @@ function $(s) {
|
|
|
266
278
|
analytics: (e) => a(r(`/help-videos/${e}/analytics`)).then((t) => t.data),
|
|
267
279
|
/** "Was this helpful?" — one vote per person per video, changeable. 403
|
|
268
280
|
* HELP_VIDEO_MASQUERADE while viewing as someone else. */
|
|
269
|
-
rate: (e, t) => a(
|
|
281
|
+
rate: (e, t) => a(c(`/help-videos/${e}/rating`, { helpful: t })).then(
|
|
270
282
|
(n) => n.data
|
|
271
283
|
),
|
|
272
284
|
/** This person's questions on the video (authors: everyone's, with who
|
|
@@ -397,13 +409,13 @@ function $(s) {
|
|
|
397
409
|
authorRoles: () => a(r("/settings")).then(
|
|
398
410
|
(e) => {
|
|
399
411
|
var t;
|
|
400
|
-
return
|
|
412
|
+
return P((t = e.data) == null ? void 0 : t.help_video_author_roles);
|
|
401
413
|
}
|
|
402
414
|
),
|
|
403
415
|
setAuthorRoles: (e) => a(y("/settings", { help_video_author_roles: e }))
|
|
404
416
|
};
|
|
405
417
|
}
|
|
406
|
-
async function
|
|
418
|
+
async function X(s, a, e) {
|
|
407
419
|
const t = new FormData();
|
|
408
420
|
t.append("file", e, e.name);
|
|
409
421
|
const n = await fetch(`${s.apiBase}/help-videos/${encodeURIComponent(a)}/music`, {
|
|
@@ -413,15 +425,15 @@ async function J(s, a, e) {
|
|
|
413
425
|
body: t
|
|
414
426
|
}), o = await n.json().catch(() => ({}));
|
|
415
427
|
if (!n.ok || !o.data) {
|
|
416
|
-
const
|
|
417
|
-
throw Object.assign(new Error(
|
|
428
|
+
const h = o.message || o.error;
|
|
429
|
+
throw Object.assign(new Error(h || "The music could not be uploaded"), {
|
|
418
430
|
status: n.status,
|
|
419
431
|
code: o.code
|
|
420
432
|
});
|
|
421
433
|
}
|
|
422
434
|
return o.data;
|
|
423
435
|
}
|
|
424
|
-
function
|
|
436
|
+
function Y(s) {
|
|
425
437
|
var e, t;
|
|
426
438
|
if (!s || typeof s != "object") return null;
|
|
427
439
|
const a = s;
|
|
@@ -431,7 +443,7 @@ function W(s) {
|
|
|
431
443
|
...typeof ((t = a.response) == null ? void 0 : t.current_hash) == "string" ? { current_hash: a.response.current_hash } : {}
|
|
432
444
|
};
|
|
433
445
|
}
|
|
434
|
-
function
|
|
446
|
+
function P(s) {
|
|
435
447
|
return (() => {
|
|
436
448
|
if (Array.isArray(s)) return s;
|
|
437
449
|
if (typeof s != "string" || !s.trim()) return [];
|
|
@@ -443,7 +455,7 @@ function V(s) {
|
|
|
443
455
|
}
|
|
444
456
|
})().filter((e) => typeof e == "string" && e.length > 0);
|
|
445
457
|
}
|
|
446
|
-
function
|
|
458
|
+
function L(s, a) {
|
|
447
459
|
var t;
|
|
448
460
|
const e = s ? s.card_logo_url ?? s.logo_url : null;
|
|
449
461
|
return {
|
|
@@ -452,7 +464,7 @@ function P(s, a) {
|
|
|
452
464
|
logo: e ? `${a}${e}` : null
|
|
453
465
|
};
|
|
454
466
|
}
|
|
455
|
-
function
|
|
467
|
+
function Z(s, a) {
|
|
456
468
|
var n;
|
|
457
469
|
const e = d(), t = u({
|
|
458
470
|
queryKey: ["help-video-card-brand"],
|
|
@@ -460,31 +472,32 @@ function G(s, a) {
|
|
|
460
472
|
staleTime: 5 * 6e4,
|
|
461
473
|
queryFn: () => e.request(r("/auth/branding"))
|
|
462
474
|
});
|
|
463
|
-
return
|
|
475
|
+
return L((n = t.data) == null ? void 0 : n.data, a);
|
|
464
476
|
}
|
|
465
477
|
export {
|
|
466
|
-
|
|
478
|
+
L as cardBrandFrom,
|
|
467
479
|
C as clipsInFlight,
|
|
468
|
-
|
|
480
|
+
K as fetchHelpVideo,
|
|
469
481
|
$ as helpVideoApi,
|
|
470
|
-
|
|
482
|
+
Y as helpVideoError,
|
|
471
483
|
l as helpVideoKeys,
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
484
|
+
E as learningPathApi,
|
|
485
|
+
V as nextLibraryPage,
|
|
486
|
+
P as parseRoleIdList,
|
|
487
|
+
X as uploadMusicFile,
|
|
488
|
+
Z as useCardBrand,
|
|
489
|
+
I as useHelpVideo,
|
|
490
|
+
W as useHelpVideoClips,
|
|
491
|
+
z as useHelpVideoLibrary,
|
|
492
|
+
v as useHelpVideoLive,
|
|
493
|
+
J as useHelpVideoNext,
|
|
494
|
+
G as useHelpVideoPages,
|
|
495
|
+
B as useHelpVideoQuestions,
|
|
496
|
+
N as useHelpVideoWalk,
|
|
497
|
+
M as useHelpVideosFor,
|
|
498
|
+
O as useHelpVideosForForm,
|
|
499
|
+
D as useLearningPaths,
|
|
500
|
+
j as useMyLearningPaths,
|
|
501
|
+
Q as useRequiredList,
|
|
502
|
+
S as useRequiredVideos
|
|
490
503
|
};
|