@nivaro/react 0.2.53 → 0.2.54
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 +1 -1
- package/dist/index.d.ts +113 -2
- package/dist/layout-editor.d.ts +248 -2
- package/dist/shared/components/FormWhatsNew.js +60 -0
- package/dist/shared/components/ItemEditForm.js +4058 -3942
- package/dist/shared/components/RecordReadView.js +219 -211
- package/dist/shared/components/TipLayer.js +27 -27
- package/dist/shared/components/help-videos/api.js +51 -41
- package/dist/shared/components/help-videos/editor/DetailsTab.js +147 -130
- package/dist/shared/components/item-edit/FieldAffordances.js +7 -6
- package/dist/shared/components/item-edit/FieldRow.js +353 -304
- package/dist/shared/components/item-edit/FormHelpVideoButton.js +59 -0
- package/dist/shared/components/item-edit/GroupSection.js +419 -396
- package/dist/shared/components/item-edit/HeaderTools.js +59 -56
- package/dist/shared/components/item-edit/LayoutContentBlock.js +47 -24
- package/dist/shared/components/item-edit/lock-why.js +87 -0
- package/dist/shared/components/item-edit/useFormUsageBeacon.js +59 -0
- package/dist/shared/components/layout-editor/AddPanel.js +204 -146
- 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 +146 -0
- package/dist/shared/components/layout-editor/CollabParts.js +170 -0
- package/dist/shared/components/layout-editor/DesignNode.js +304 -115
- package/dist/shared/components/layout-editor/EditorCanvas.js +21 -20
- package/dist/shared/components/layout-editor/EditorTopBar.js +452 -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 +234 -109
- package/dist/shared/components/layout-editor/LayoutEditor.js +1101 -307
- 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/ScheduleChange.js +106 -0
- package/dist/shared/components/layout-editor/SessionHistory.js +84 -0
- package/dist/shared/components/layout-editor/StructureMenu.js +413 -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 +342 -0
- package/dist/shared/components/layout-editor/collab/collab-api.js +77 -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 +179 -163
- package/dist/shared/components/layout-editor/dnd/collision.js +25 -23
- package/dist/shared/components/layout-editor/dnd/rail-drop.js +56 -0
- package/dist/shared/components/layout-editor/draft-recovery.js +61 -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/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/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/Breadcrumb.js +36 -0
- package/dist/shared/components/layout-editor/inspector/BulkInspector.js +175 -0
- package/dist/shared/components/layout-editor/inspector/ColumnFit.js +112 -0
- package/dist/shared/components/layout-editor/inspector/GroupInspector.js +146 -92
- package/dist/shared/components/layout-editor/inspector/HelpTab.js +174 -0
- package/dist/shared/components/layout-editor/inspector/Inspector.js +256 -175
- package/dist/shared/components/layout-editor/inspector/LookTab.js +46 -40
- package/dist/shared/components/layout-editor/inspector/OverrideNotice.js +61 -0
- package/dist/shared/components/layout-editor/inspector/PickerPreview.js +134 -0
- package/dist/shared/components/layout-editor/inspector/PickerTab.js +167 -141
- package/dist/shared/components/layout-editor/inspector/RulesTab.js +175 -128
- package/dist/shared/components/layout-editor/inspector/Translations.js +156 -0
- package/dist/shared/components/layout-editor/inspector/kit.js +3 -3
- 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/overview/OverviewActions.js +15 -3
- package/dist/shared/components/layout-editor/overview/describe-conditions.js +18 -14
- package/dist/shared/components/layout-editor/overview/overview-api.js +105 -88
- 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/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/settings/FormSettings.js +123 -103
- package/dist/shared/components/layout-editor/settings/InheritanceSection.js +1 -1
- package/dist/shared/components/layout-editor/settings/ToolsSection.js +174 -100
- package/dist/shared/components/layout-editor/settings/WhoSection.js +136 -100
- package/dist/shared/components/layout-editor/settings/controls.js +8 -8
- package/dist/shared/components/layout-editor/settings/settings-registry.js +35 -11
- 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/structure-ops.js +399 -0
- package/dist/shared/components/layout-editor/testing/CostLimitSetting.js +42 -0
- package/dist/shared/components/layout-editor/testing/TestingPanels.js +551 -0
- package/dist/shared/components/layout-editor/testing/testing-api.js +67 -0
- package/dist/shared/components/layout-editor/testing/testing-model.js +393 -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/FillChip.js +27 -0
- package/dist/shared/components/layout-editor/usage/UsagePanel.js +158 -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 -307
- package/dist/shared/components/support/SuggestFormChange.js +143 -0
- package/dist/shared/lib/ai-fill.js +37 -0
- package/dist/shared/lib/form-usage-beacon.js +84 -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 +110 -106
- package/dist/shared/lib/screenshot.js +54 -28
- package/dist/shared/lib/visible-when.js +34 -0
- package/package.json +1 -1
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import { jsx as x } from "react/jsx-runtime";
|
|
2
|
-
import { useState as m, useRef as g, useEffect as
|
|
2
|
+
import { useState as m, useRef as g, useEffect as v, useLayoutEffect as h } from "react";
|
|
3
3
|
import { createPortal as b } from "react-dom";
|
|
4
|
-
let
|
|
4
|
+
let l = 0;
|
|
5
5
|
function O() {
|
|
6
|
-
const [e,
|
|
7
|
-
return
|
|
8
|
-
|
|
9
|
-
}), []),
|
|
6
|
+
const [e, i] = m(null), [t, d] = m(!1), s = g(null);
|
|
7
|
+
return v(() => (l += 1, d(l === 1), () => {
|
|
8
|
+
l -= 1;
|
|
9
|
+
}), []), v(() => {
|
|
10
10
|
if (!t) return;
|
|
11
|
-
const
|
|
12
|
-
var
|
|
13
|
-
const n = (w = (
|
|
14
|
-
if (!n || !a) {
|
|
15
|
-
|
|
11
|
+
const o = (u) => {
|
|
12
|
+
var c, w;
|
|
13
|
+
const n = (w = (c = u.target) == null ? void 0 : c.closest) == null ? void 0 : w.call(c, "[data-tip]"), a = n == null ? void 0 : n.getAttribute("data-tip");
|
|
14
|
+
if (!n || !a || n.getAttribute("aria-expanded") === "true") {
|
|
15
|
+
i((p) => p && null);
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
18
|
const f = n.getBoundingClientRect();
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
return window.addEventListener("mouseover",
|
|
22
|
-
window.removeEventListener("mouseover",
|
|
19
|
+
i({ x: f.left, y: f.bottom + 4, text: a });
|
|
20
|
+
}, r = () => i(null);
|
|
21
|
+
return window.addEventListener("mouseover", o), window.addEventListener("pointerdown", r, !0), window.addEventListener("scroll", r, !0), () => {
|
|
22
|
+
window.removeEventListener("mouseover", o), window.removeEventListener("pointerdown", r, !0), window.removeEventListener("scroll", r, !0);
|
|
23
23
|
};
|
|
24
|
-
}, [t]),
|
|
24
|
+
}, [t]), h(() => {
|
|
25
25
|
if (!e) return;
|
|
26
|
-
const
|
|
27
|
-
if (!
|
|
28
|
-
const
|
|
26
|
+
const o = s.current;
|
|
27
|
+
if (!o) return;
|
|
28
|
+
const r = o.getBoundingClientRect();
|
|
29
29
|
let { x: u, y: n } = e;
|
|
30
|
-
|
|
30
|
+
r.right > window.innerWidth - 8 && (u = Math.max(8, window.innerWidth - r.width - 8)), r.bottom > window.innerHeight - 8 && (n = Math.max(8, e.y - r.height - 30)), (u !== e.x || n !== e.y) && i({ ...e, x: u, y: n });
|
|
31
31
|
}, [e]), !t || !e ? null : b(
|
|
32
32
|
/* @__PURE__ */ x(
|
|
33
33
|
"div",
|
|
@@ -42,17 +42,17 @@ function O() {
|
|
|
42
42
|
);
|
|
43
43
|
}
|
|
44
44
|
function R(e) {
|
|
45
|
-
const
|
|
46
|
-
return
|
|
47
|
-
const t =
|
|
45
|
+
const i = g(null);
|
|
46
|
+
return h(() => {
|
|
47
|
+
const t = i.current;
|
|
48
48
|
if (!t) return;
|
|
49
|
-
const
|
|
49
|
+
const d = () => {
|
|
50
50
|
(t.scrollWidth > t.clientWidth + 1 || t.scrollHeight > t.clientHeight + 1) && e ? t.setAttribute("data-tip", e) : t.removeAttribute("data-tip");
|
|
51
51
|
};
|
|
52
|
-
if (
|
|
53
|
-
const s = new ResizeObserver(
|
|
52
|
+
if (d(), typeof ResizeObserver > "u") return;
|
|
53
|
+
const s = new ResizeObserver(d);
|
|
54
54
|
return s.observe(t), () => s.disconnect();
|
|
55
|
-
}, [e]),
|
|
55
|
+
}, [e]), i;
|
|
56
56
|
}
|
|
57
57
|
export {
|
|
58
58
|
O as TipLayer,
|
|
@@ -1,9 +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
4
|
import { patch as y, get as r, del as p, post as i, put as h } from "../../lib/commands.js";
|
|
5
5
|
import { useLiveEvent as m } from "../../lib/live.js";
|
|
6
|
-
import { cardAccent as
|
|
6
|
+
import { cardAccent as w } from "./cards.js";
|
|
7
7
|
const l = {
|
|
8
8
|
all: ["help-videos"],
|
|
9
9
|
one: (s) => ["help-videos", "one", s],
|
|
@@ -28,7 +28,7 @@ const l = {
|
|
|
28
28
|
draftEdits: (s, a) => ["help-video-draft", s, a]
|
|
29
29
|
}, q = (s, a) => String(s ?? "").toLowerCase() === String(a ?? "").toLowerCase();
|
|
30
30
|
function c(s, a) {
|
|
31
|
-
const e = f(), t =
|
|
31
|
+
const e = f(), t = F(s);
|
|
32
32
|
t.current = s, m(
|
|
33
33
|
"help-video:changed",
|
|
34
34
|
() => {
|
|
@@ -42,7 +42,7 @@ function c(s, a) {
|
|
|
42
42
|
}
|
|
43
43
|
);
|
|
44
44
|
}
|
|
45
|
-
async function
|
|
45
|
+
async function _(s, a) {
|
|
46
46
|
return (await s.request(r(`/help-videos/${a}`))).data;
|
|
47
47
|
}
|
|
48
48
|
function x(s) {
|
|
@@ -50,7 +50,7 @@ function x(s) {
|
|
|
50
50
|
return c([l.one(s ?? "")], s), u({
|
|
51
51
|
queryKey: l.one(s ?? ""),
|
|
52
52
|
enabled: !!s,
|
|
53
|
-
queryFn: () =>
|
|
53
|
+
queryFn: () => _(a, s),
|
|
54
54
|
// Poll while a render runs so the status chip and the stream switch over by themselves.
|
|
55
55
|
refetchInterval: (e) => {
|
|
56
56
|
var n, o;
|
|
@@ -73,11 +73,20 @@ function U(s, a = !0) {
|
|
|
73
73
|
)
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
|
+
function M(s, a = !0) {
|
|
77
|
+
const e = d();
|
|
78
|
+
return c([["help-videos", "form"]]), u({
|
|
79
|
+
queryKey: ["help-videos", "form", s ?? ""],
|
|
80
|
+
enabled: a && !!s,
|
|
81
|
+
staleTime: 6e4,
|
|
82
|
+
queryFn: () => e.request(r("/help-videos/for-form", { collection: s })).then((t) => t.data)
|
|
83
|
+
});
|
|
84
|
+
}
|
|
76
85
|
function K(s) {
|
|
77
86
|
const a = s[s.length - 1];
|
|
78
87
|
return a != null && a.data.length && s.reduce((t, n) => t + n.data.length, 0) < a.total ? s.length + 1 : void 0;
|
|
79
88
|
}
|
|
80
|
-
function
|
|
89
|
+
function O(s) {
|
|
81
90
|
const a = d();
|
|
82
91
|
return c([["help-videos", "library"]]), b({
|
|
83
92
|
queryKey: l.library(s),
|
|
@@ -102,7 +111,7 @@ async function g(s) {
|
|
|
102
111
|
);
|
|
103
112
|
return { data: a.data ?? [], paths: a.paths ?? [] };
|
|
104
113
|
}
|
|
105
|
-
function
|
|
114
|
+
function z() {
|
|
106
115
|
const s = d();
|
|
107
116
|
return c([l.required]), u({
|
|
108
117
|
queryKey: l.required,
|
|
@@ -110,7 +119,7 @@ function O() {
|
|
|
110
119
|
queryFn: () => g(s)
|
|
111
120
|
});
|
|
112
121
|
}
|
|
113
|
-
function
|
|
122
|
+
function I() {
|
|
114
123
|
const s = d();
|
|
115
124
|
return c([l.required]), u({
|
|
116
125
|
queryKey: l.required,
|
|
@@ -119,7 +128,7 @@ function z() {
|
|
|
119
128
|
select: (a) => a.data
|
|
120
129
|
});
|
|
121
130
|
}
|
|
122
|
-
function
|
|
131
|
+
function Q(s = !0) {
|
|
123
132
|
const a = d();
|
|
124
133
|
return u({
|
|
125
134
|
queryKey: l.myPaths,
|
|
@@ -128,7 +137,7 @@ function I(s = !0) {
|
|
|
128
137
|
queryFn: async () => (await a.request(r("/help-videos/paths/mine"))).data
|
|
129
138
|
});
|
|
130
139
|
}
|
|
131
|
-
function
|
|
140
|
+
function S(s = !0) {
|
|
132
141
|
const a = d();
|
|
133
142
|
return u({
|
|
134
143
|
queryKey: l.paths,
|
|
@@ -136,7 +145,7 @@ function Q(s = !0) {
|
|
|
136
145
|
queryFn: async () => (await a.request(r("/help-videos/paths"))).data
|
|
137
146
|
});
|
|
138
147
|
}
|
|
139
|
-
function
|
|
148
|
+
function j(s) {
|
|
140
149
|
const a = s.request.bind(s);
|
|
141
150
|
return {
|
|
142
151
|
create: (e) => a(i("/help-videos/paths", e)).then((t) => t.data),
|
|
@@ -154,7 +163,7 @@ function S(s) {
|
|
|
154
163
|
remove: (e) => a(p(`/help-videos/paths/${e}`))
|
|
155
164
|
};
|
|
156
165
|
}
|
|
157
|
-
function
|
|
166
|
+
function D(s) {
|
|
158
167
|
const a = d();
|
|
159
168
|
return u({
|
|
160
169
|
queryKey: l.walk(s ?? ""),
|
|
@@ -165,7 +174,7 @@ function j(s) {
|
|
|
165
174
|
)).data
|
|
166
175
|
});
|
|
167
176
|
}
|
|
168
|
-
function
|
|
177
|
+
function E(s) {
|
|
169
178
|
const a = d(), e = f();
|
|
170
179
|
return m(
|
|
171
180
|
"help-video:question",
|
|
@@ -183,7 +192,7 @@ function D(s) {
|
|
|
183
192
|
queryFn: () => $(a).questions(s)
|
|
184
193
|
});
|
|
185
194
|
}
|
|
186
|
-
function
|
|
195
|
+
function N(s, a = !0) {
|
|
187
196
|
const e = d();
|
|
188
197
|
return u({
|
|
189
198
|
queryKey: l.next(s ?? ""),
|
|
@@ -192,7 +201,7 @@ function E(s, a = !0) {
|
|
|
192
201
|
queryFn: () => $(e).next(s)
|
|
193
202
|
});
|
|
194
203
|
}
|
|
195
|
-
function
|
|
204
|
+
function B(s) {
|
|
196
205
|
const a = d();
|
|
197
206
|
return u({
|
|
198
207
|
queryKey: l.clips(s ?? ""),
|
|
@@ -202,13 +211,13 @@ function N(s) {
|
|
|
202
211
|
const e = await a.request(r(`/help-videos/${s}/clips`));
|
|
203
212
|
return Array.isArray(e == null ? void 0 : e.data) ? e.data : [];
|
|
204
213
|
},
|
|
205
|
-
refetchInterval: (e) =>
|
|
214
|
+
refetchInterval: (e) => V(e.state.data) ? 2500 : !1
|
|
206
215
|
});
|
|
207
216
|
}
|
|
208
|
-
function
|
|
217
|
+
function V(s) {
|
|
209
218
|
return Array.isArray(s) && s.some((a) => a.status === "queued" || a.status === "rendering");
|
|
210
219
|
}
|
|
211
|
-
function
|
|
220
|
+
function J() {
|
|
212
221
|
const s = d();
|
|
213
222
|
return u({
|
|
214
223
|
queryKey: l.pages,
|
|
@@ -397,13 +406,13 @@ function $(s) {
|
|
|
397
406
|
authorRoles: () => a(r("/settings")).then(
|
|
398
407
|
(e) => {
|
|
399
408
|
var t;
|
|
400
|
-
return
|
|
409
|
+
return C((t = e.data) == null ? void 0 : t.help_video_author_roles);
|
|
401
410
|
}
|
|
402
411
|
),
|
|
403
412
|
setAuthorRoles: (e) => a(y("/settings", { help_video_author_roles: e }))
|
|
404
413
|
};
|
|
405
414
|
}
|
|
406
|
-
async function
|
|
415
|
+
async function W(s, a, e) {
|
|
407
416
|
const t = new FormData();
|
|
408
417
|
t.append("file", e, e.name);
|
|
409
418
|
const n = await fetch(`${s.apiBase}/help-videos/${encodeURIComponent(a)}/music`, {
|
|
@@ -421,7 +430,7 @@ async function J(s, a, e) {
|
|
|
421
430
|
}
|
|
422
431
|
return o.data;
|
|
423
432
|
}
|
|
424
|
-
function
|
|
433
|
+
function G(s) {
|
|
425
434
|
var e, t;
|
|
426
435
|
if (!s || typeof s != "object") return null;
|
|
427
436
|
const a = s;
|
|
@@ -431,7 +440,7 @@ function W(s) {
|
|
|
431
440
|
...typeof ((t = a.response) == null ? void 0 : t.current_hash) == "string" ? { current_hash: a.response.current_hash } : {}
|
|
432
441
|
};
|
|
433
442
|
}
|
|
434
|
-
function
|
|
443
|
+
function C(s) {
|
|
435
444
|
return (() => {
|
|
436
445
|
if (Array.isArray(s)) return s;
|
|
437
446
|
if (typeof s != "string" || !s.trim()) return [];
|
|
@@ -448,11 +457,11 @@ function P(s, a) {
|
|
|
448
457
|
const e = s ? s.card_logo_url ?? s.logo_url : null;
|
|
449
458
|
return {
|
|
450
459
|
name: ((t = s == null ? void 0 : s.name) == null ? void 0 : t.trim()) || null,
|
|
451
|
-
color:
|
|
460
|
+
color: w(s == null ? void 0 : s.color),
|
|
452
461
|
logo: e ? `${a}${e}` : null
|
|
453
462
|
};
|
|
454
463
|
}
|
|
455
|
-
function
|
|
464
|
+
function X(s, a) {
|
|
456
465
|
var n;
|
|
457
466
|
const e = d(), t = u({
|
|
458
467
|
queryKey: ["help-video-card-brand"],
|
|
@@ -464,27 +473,28 @@ function G(s, a) {
|
|
|
464
473
|
}
|
|
465
474
|
export {
|
|
466
475
|
P as cardBrandFrom,
|
|
467
|
-
|
|
468
|
-
|
|
476
|
+
V as clipsInFlight,
|
|
477
|
+
_ as fetchHelpVideo,
|
|
469
478
|
$ as helpVideoApi,
|
|
470
|
-
|
|
479
|
+
G as helpVideoError,
|
|
471
480
|
l as helpVideoKeys,
|
|
472
|
-
|
|
481
|
+
j as learningPathApi,
|
|
473
482
|
K as nextLibraryPage,
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
483
|
+
C as parseRoleIdList,
|
|
484
|
+
W as uploadMusicFile,
|
|
485
|
+
X as useCardBrand,
|
|
477
486
|
x as useHelpVideo,
|
|
478
|
-
|
|
479
|
-
|
|
487
|
+
B as useHelpVideoClips,
|
|
488
|
+
O as useHelpVideoLibrary,
|
|
480
489
|
c as useHelpVideoLive,
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
490
|
+
N as useHelpVideoNext,
|
|
491
|
+
J as useHelpVideoPages,
|
|
492
|
+
E as useHelpVideoQuestions,
|
|
493
|
+
D as useHelpVideoWalk,
|
|
485
494
|
U as useHelpVideosFor,
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
z as
|
|
495
|
+
M as useHelpVideosForForm,
|
|
496
|
+
S as useLearningPaths,
|
|
497
|
+
Q as useMyLearningPaths,
|
|
498
|
+
z as useRequiredList,
|
|
499
|
+
I as useRequiredVideos
|
|
490
500
|
};
|