@parallelworks/ui 0.76.0 → 0.78.0
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/README.md +30 -5
- package/dist/access/AccessDrawer.d.ts +28 -7
- package/dist/access/AccessDrawer.js +216 -35
- package/dist/access/AccessList.d.ts +19 -1
- package/dist/access/AccessList.js +220 -9
- package/dist/access/GrantView.d.ts +3 -1
- package/dist/access/GrantView.js +17 -4
- package/dist/access/PrincipalPicker.js +5 -5
- package/dist/access/focus.js +1 -1
- package/dist/access/index.d.ts +2 -2
- package/dist/access/index.js +2 -2
- package/dist/access/strings.d.ts +18 -0
- package/dist/access/strings.js +20 -2
- package/dist/access/types.d.ts +26 -0
- package/dist/ai/adapter/types.d.ts +1 -0
- package/dist/ai/components/AllocationSelector.js +1 -1
- package/dist/ai/components/AttachmentManager.js +5 -5
- package/dist/ai/components/AttachmentUpload.js +2 -2
- package/dist/ai/components/BranchNavigator.js +1 -1
- package/dist/ai/components/ChatActivity.d.ts +2 -0
- package/dist/ai/components/ChatActivity.js +31 -0
- package/dist/ai/components/ChatEmptyState.js +3 -3
- package/dist/ai/components/ChatInput.js +3 -5
- package/dist/ai/components/ChatLayout.js +1 -1
- package/dist/ai/components/ChatMessage.js +1 -1
- package/dist/ai/components/ChatMessageList.js +2 -2
- package/dist/ai/components/ChatSidebar.js +3 -3
- package/dist/ai/components/ChatThread.js +4 -4
- package/dist/ai/components/ComposerAddMenu.js +9 -20
- package/dist/ai/components/ModelSelector.js +3 -3
- package/dist/ai/components/PastedText.js +5 -5
- package/dist/ai/components/SessionView.js +5 -2
- package/dist/ai/components/ShareDialog.js +3 -3
- package/dist/ai/components/SlashMenu.d.ts +31 -4
- package/dist/ai/components/SlashMenu.js +36 -63
- package/dist/ai/components/agent/ActivityLine.js +1 -1
- package/dist/ai/components/agent/AgentMessageParts.d.ts +1 -1
- package/dist/ai/components/agent/AgentMessageParts.js +44 -18
- package/dist/ai/components/conversationActions.js +3 -3
- package/dist/ai/core/ChatProvider.js +11 -2
- package/dist/ai/core/config.d.ts +10 -1
- package/dist/ai/core/config.js +1 -1
- package/dist/ai/index.d.ts +1 -1
- package/dist/ai/strings.d.ts +2 -0
- package/dist/ai/strings.js +2 -1
- package/dist/ai/types.d.ts +3 -0
- package/dist/ai/ui/ConversationSidebar.js +3 -3
- package/dist/ai/ui/sidebar.js +3 -3
- package/dist/assets/yaml.worker-DOBV2lND.js +884 -0
- package/dist/components/ActionMenu.d.ts +38 -9
- package/dist/components/ActionMenu.js +48 -22
- package/dist/components/Avatar.d.ts +66 -6
- package/dist/components/Avatar.js +130 -18
- package/dist/components/Breadcrumbs.d.ts +4 -0
- package/dist/components/Breadcrumbs.js +26 -10
- package/dist/components/Button.d.ts +3 -2
- package/dist/components/Button.js +11 -1
- package/dist/components/Callout.d.ts +3 -2
- package/dist/components/Callout.js +3 -2
- package/dist/components/Card.d.ts +33 -9
- package/dist/components/Card.js +24 -8
- package/dist/components/Checkbox.d.ts +3 -1
- package/dist/components/Checkbox.js +4 -2
- package/dist/components/ColorInput.js +1 -1
- package/dist/components/Combobox.d.ts +23 -0
- package/dist/components/Combobox.js +252 -86
- package/dist/components/ConfirmModal.d.ts +26 -2
- package/dist/components/ConfirmModal.js +81 -15
- package/dist/components/ContextMenu.d.ts +29 -2
- package/dist/components/ContextMenu.js +60 -8
- package/dist/components/CopyButton.d.ts +21 -8
- package/dist/components/CopyButton.js +29 -9
- package/dist/components/CreateModal.d.ts +16 -4
- package/dist/components/CreateModal.js +27 -16
- package/dist/components/DatePicker.d.ts +31 -1
- package/dist/components/DatePicker.js +178 -47
- package/dist/components/DescriptionList.d.ts +13 -3
- package/dist/components/DescriptionList.js +43 -11
- package/dist/components/Disclosure.d.ts +10 -2
- package/dist/components/Disclosure.js +18 -7
- package/dist/components/Drawer.js +5 -5
- package/dist/components/EmptyState.d.ts +12 -4
- package/dist/components/EmptyState.js +18 -10
- package/dist/components/ErrorPage.d.ts +40 -0
- package/dist/components/ErrorPage.js +101 -0
- package/dist/components/ExternalLink.d.ts +4 -1
- package/dist/components/ExternalLink.js +4 -5
- package/dist/components/Field.d.ts +21 -6
- package/dist/components/Field.js +32 -16
- package/dist/components/FileButton.d.ts +19 -0
- package/dist/components/FileButton.js +32 -0
- package/dist/components/HoverCard.d.ts +26 -6
- package/dist/components/HoverCard.js +11 -5
- package/dist/components/IconButton.js +4 -2
- package/dist/components/InfoTip.js +3 -3
- package/dist/components/Input.d.ts +33 -3
- package/dist/components/Input.js +149 -14
- package/dist/components/Kbd.d.ts +40 -0
- package/dist/components/Kbd.js +168 -0
- package/dist/components/Listbox.d.ts +103 -0
- package/dist/components/Listbox.js +190 -0
- package/dist/components/Loader.d.ts +8 -2
- package/dist/components/Loader.js +16 -1
- package/dist/components/Markdown.js +1 -1
- package/dist/components/MarkdownImpl.js +1 -1
- package/dist/components/Menu.d.ts +20 -2
- package/dist/components/Menu.js +48 -19
- package/dist/components/MenuEntries.d.ts +38 -2
- package/dist/components/MenuEntries.js +266 -39
- package/dist/components/Meter.d.ts +50 -11
- package/dist/components/Meter.js +71 -21
- package/dist/components/Modal.d.ts +9 -3
- package/dist/components/Modal.js +68 -29
- package/dist/components/OneTimeCodeInput.js +1 -1
- package/dist/components/PageHeader.js +111 -7
- package/dist/components/PageHeaderAction.d.ts +8 -3
- package/dist/components/PageHeaderAction.js +122 -34
- package/dist/components/Pagination.d.ts +13 -1
- package/dist/components/Pagination.js +90 -19
- package/dist/components/Popover.d.ts +13 -2
- package/dist/components/Popover.js +20 -21
- package/dist/components/Provider.d.ts +140 -3
- package/dist/components/Provider.js +142 -12
- package/dist/components/RefreshButton.d.ts +13 -6
- package/dist/components/RefreshButton.js +17 -9
- package/dist/components/RunStatusIcon.d.ts +16 -7
- package/dist/components/RunStatusIcon.js +21 -8
- package/dist/components/Section.d.ts +11 -4
- package/dist/components/Section.js +33 -22
- package/dist/components/SegmentedControl.d.ts +16 -3
- package/dist/components/SegmentedControl.js +7 -3
- package/dist/components/Select.d.ts +19 -3
- package/dist/components/Select.js +114 -68
- package/dist/components/SelectionCopy.d.ts +10 -0
- package/dist/components/SelectionCopy.js +105 -0
- package/dist/components/SettingModeOption.js +1 -1
- package/dist/components/SettingsCard.js +1 -1
- package/dist/components/Skeleton.js +1 -1
- package/dist/components/StatusBadge.d.ts +55 -10
- package/dist/components/StatusBadge.js +91 -15
- package/dist/components/StickyBar.js +1 -1
- package/dist/components/Table.d.ts +22 -4
- package/dist/components/Table.js +46 -24
- package/dist/components/Tabs.d.ts +9 -4
- package/dist/components/Tabs.js +9 -4
- package/dist/components/Tag.d.ts +49 -0
- package/dist/components/Tag.js +199 -0
- package/dist/components/ThemeEditor.js +1 -1
- package/dist/components/Toast.js +1 -1
- package/dist/components/ToggleGroup.d.ts +4 -1
- package/dist/components/ToggleGroup.js +30 -13
- package/dist/components/Tooltip.d.ts +9 -3
- package/dist/components/Tooltip.js +55 -39
- package/dist/components/buttonClasses.d.ts +5 -2
- package/dist/components/buttonClasses.js +11 -10
- package/dist/components/chart.d.ts +69 -0
- package/dist/components/chart.js +145 -0
- package/dist/components/comboboxItems.d.ts +7 -1
- package/dist/components/comboboxItems.js +6 -2
- package/dist/components/dismiss.d.ts +5 -1
- package/dist/components/dismiss.js +6 -2
- package/dist/components/floating.d.ts +4 -4
- package/dist/components/floating.js +5 -5
- package/dist/components/headerActionsFit.d.ts +37 -0
- package/dist/components/headerActionsFit.js +81 -0
- package/dist/components/pageHeaderStore.d.ts +3 -0
- package/dist/components/pageHeaderStore.js +3 -0
- package/dist/components/pathBreaks.js +2 -2
- package/dist/components/popupContainer.d.ts +17 -0
- package/dist/components/popupContainer.js +69 -0
- package/dist/components/relativeTime.d.ts +21 -10
- package/dist/components/relativeTime.js +50 -22
- package/dist/components/segmented.d.ts +18 -4
- package/dist/components/segmented.js +48 -6
- package/dist/components/typedDate.d.ts +5 -0
- package/dist/components/typedDate.js +50 -0
- package/dist/components/useClosingValue.d.ts +4 -0
- package/dist/components/useClosingValue.js +12 -0
- package/dist/components/useCopy.d.ts +6 -0
- package/dist/components/useCopy.js +3 -3
- package/dist/components/useNarrow.d.ts +2 -0
- package/dist/components/useNarrow.js +16 -0
- package/dist/editor/Editor.js +1 -1
- package/dist/editor/FormCodePanel.js +1 -1
- package/dist/editor/Monaco.js +1 -1
- package/dist/editor/workers.js +1 -1
- package/dist/file-explorer/FileExplorer.js +16 -15
- package/dist/file-explorer/FileExplorerContext.js +2 -2
- package/dist/file-explorer/FilePreview/Viewer.js +3 -3
- package/dist/file-explorer/FilePreview/index.js +2 -2
- package/dist/file-explorer/FileRowsWindow.js +3 -3
- package/dist/file-explorer/FileTable.js +1 -1
- package/dist/file-explorer/LoadMoreRow.js +1 -1
- package/dist/file-explorer/TreeView.js +5 -5
- package/dist/file-explorer/helpers.js +2 -2
- package/dist/file-explorer/toasts.js +2 -2
- package/dist/form/Fields/CheckboxGroupField.js +1 -1
- package/dist/form/Fields/DropdownField.js +1 -1
- package/dist/form/Fields/DurationField.js +2 -2
- package/dist/form/Fields/MultiDropdownField.js +1 -1
- package/dist/form/Fields/NumberField.js +1 -1
- package/dist/form/Fields/ObjectField.js +1 -1
- package/dist/form/Fields/RangeField.js +1 -1
- package/dist/form/Fields/StringField.js +1 -1
- package/dist/form/Form.js +3 -3
- package/dist/form/FormLayout.js +1 -1
- package/dist/form/Wizard/WizardContainer.js +1 -1
- package/dist/form/Wizard/WizardNavigation.js +1 -1
- package/dist/form/Wizard/WizardStepContent.js +1 -1
- package/dist/form/fieldRegistry.js +1 -1
- package/dist/form/formEditing.js +1 -1
- package/dist/format.d.ts +17 -7
- package/dist/format.js +39 -16
- package/dist/graph/AnnotationBanner.js +2 -2
- package/dist/graph/Connectors.js +5 -5
- package/dist/graph/DependencyGraph.js +10 -9
- package/dist/graph/GraphEditor.js +4 -4
- package/dist/graph/GraphEditorDialogs.js +13 -12
- package/dist/graph/GraphNode.js +1 -1
- package/dist/graph/InputDialog.js +5 -5
- package/dist/graph/InputsEditor.js +7 -7
- package/dist/graph/MatrixGroup.js +2 -2
- package/dist/graph/ProblemsButton.js +3 -3
- package/dist/graph/Reveal.js +1 -1
- package/dist/graph/RunWarningsList.js +1 -1
- package/dist/graph/ShortcutsButton.js +25 -8
- package/dist/graph/StepSummaries.js +1 -1
- package/dist/graph/TreeView.js +2 -2
- package/dist/graph/WorkflowSettingsDialog.js +3 -3
- package/dist/graph/editorFields.js +3 -3
- package/dist/graph/editorPrimitives.js +1 -1
- package/dist/graph/editorRows.js +5 -5
- package/dist/graph/fieldProblems.js +2 -2
- package/dist/graph/inputRefs.js +7 -6
- package/dist/graph/stepWith.js +2 -2
- package/dist/index.d.ts +30 -21
- package/dist/index.js +20 -12
- package/dist/list/ActionToolbar.d.ts +4 -0
- package/dist/list/ActionToolbar.js +35 -12
- package/dist/list/ListFilterBar.d.ts +42 -0
- package/dist/list/ListFilterBar.js +789 -0
- package/dist/list/ListPage.d.ts +42 -4
- package/dist/list/ListPage.js +56 -22
- package/dist/list/ListTable.d.ts +27 -3
- package/dist/list/ListTable.js +48 -23
- package/dist/list/ListToolbar.d.ts +31 -0
- package/dist/list/ListToolbar.js +43 -0
- package/dist/list/ListViewControls.d.ts +8 -4
- package/dist/list/ListViewControls.js +22 -14
- package/dist/list/UserHoverCard.d.ts +8 -2
- package/dist/list/UserHoverCard.js +26 -13
- package/dist/list/filterModel.d.ts +122 -0
- package/dist/list/filterModel.js +308 -0
- package/dist/list/index.d.ts +6 -2
- package/dist/list/index.js +6 -2
- package/dist/list/listSearch.d.ts +1 -1
- package/dist/list/listSearch.js +8 -4
- package/dist/list/listView.d.ts +24 -2
- package/dist/list/listView.js +47 -45
- package/dist/list/rowMenu.d.ts +10 -5
- package/dist/list/rowMenu.js +17 -7
- package/dist/list/useListFilters.d.ts +68 -0
- package/dist/list/useListFilters.js +252 -0
- package/dist/logviewer/LogViewer.js +4 -4
- package/dist/styles/theme.css +94 -0
- package/dist/styles.css +1 -1
- package/package.json +11 -11
- package/dist/assets/yaml.worker-k9AdOqzf.js +0 -1441
- package/dist/components/fullscreen.d.ts +0 -4
- package/dist/components/fullscreen.js +0 -18
|
@@ -5,6 +5,12 @@ export interface CopyOptions {
|
|
|
5
5
|
/** No toast on success, for a control that shows its own check. A failure
|
|
6
6
|
* still says so. */
|
|
7
7
|
quiet?: boolean | undefined;
|
|
8
|
+
/** The whole success toast, in place of "Copied …", such as "Link copied" or one that
|
|
9
|
+
* names the value: "Copied feature/login". */
|
|
10
|
+
success?: string | undefined;
|
|
11
|
+
/** The whole failure toast, in place of "Couldn't copy …", such as one that says where
|
|
12
|
+
* else to copy the value from. */
|
|
13
|
+
failure?: string | undefined;
|
|
8
14
|
}
|
|
9
15
|
/** Copies text to the clipboard and says how it went. `copied` stays true for a
|
|
10
16
|
* moment after, for a button that turns into a check. */
|
|
@@ -11,14 +11,14 @@ function useCopy() {
|
|
|
11
11
|
const reset = useRef(void 0);
|
|
12
12
|
useEffect(() => () => clearTimeout(reset.current), []);
|
|
13
13
|
return {
|
|
14
|
-
copy: useCallback(async (text, { label, quiet = false } = {}) => {
|
|
14
|
+
copy: useCallback(async (text, { label, quiet = false, success, failure } = {}) => {
|
|
15
15
|
try {
|
|
16
16
|
await navigator.clipboard.writeText(text);
|
|
17
17
|
} catch {
|
|
18
|
-
toast.error(label ? t.copyThingFailed(label) : t.copyFailed);
|
|
18
|
+
toast.error(failure ?? (label ? t.copyThingFailed(label) : t.copyFailed));
|
|
19
19
|
return false;
|
|
20
20
|
}
|
|
21
|
-
if (!quiet) toast.success(label ? t.copiedThing(label) : t.copiedToClipboard);
|
|
21
|
+
if (!quiet) toast.success(success ?? (label ? t.copiedThing(label) : t.copiedToClipboard));
|
|
22
22
|
setCopied(true);
|
|
23
23
|
clearTimeout(reset.current);
|
|
24
24
|
reset.current = setTimeout(() => setCopied(false), COPIED_FOR_MS);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useSyncExternalStore } from "react";
|
|
2
|
+
//#region src/components/useNarrow.ts
|
|
3
|
+
var NARROW = "(max-width: 639px)";
|
|
4
|
+
function subscribe(onChange) {
|
|
5
|
+
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return () => {};
|
|
6
|
+
const media = window.matchMedia(NARROW);
|
|
7
|
+
media.addEventListener("change", onChange);
|
|
8
|
+
return () => media.removeEventListener("change", onChange);
|
|
9
|
+
}
|
|
10
|
+
var isNarrow = () => typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia(NARROW).matches;
|
|
11
|
+
/** Whether the screen is phone width, under 640px. */
|
|
12
|
+
function useNarrow() {
|
|
13
|
+
return useSyncExternalStore(subscribe, isNarrow, () => false);
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { useNarrow };
|
package/dist/editor/Editor.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Loader } from "../components/Loader.js";
|
|
2
2
|
import { editorLanguagesLoading } from "./languages.js";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
3
|
import { Suspense, lazy, use } from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/editor/Editor.tsx
|
|
6
6
|
var loadMonaco = () => import("./Monaco.js");
|
|
7
7
|
var MonacoEditor = lazy(loadMonaco);
|
|
@@ -6,8 +6,8 @@ import { useCopy } from "../components/useCopy.js";
|
|
|
6
6
|
import { Switch } from "../components/Switch.js";
|
|
7
7
|
import { flattenGroups, impureSetValueFromPath } from "../form/lib.js";
|
|
8
8
|
import { Editor } from "./Editor.js";
|
|
9
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
9
|
import { useRef, useState } from "react";
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
//#region src/editor/FormCodePanel.tsx
|
|
12
12
|
var isObject = (value) => typeof value === "object" && value !== null;
|
|
13
13
|
var shouldIgnoreField = (engine, fieldSchema, inputs, arrayIndex) => {
|
package/dist/editor/Monaco.js
CHANGED
|
@@ -11,8 +11,8 @@ import { setupMonacoWorkers } from "./workers.js";
|
|
|
11
11
|
import { holdListeners, modelFor } from "./editorModel.js";
|
|
12
12
|
import "./monacoFeatures.js";
|
|
13
13
|
import { ensureYamlLanguage } from "./yamlLanguage.js";
|
|
14
|
-
import { jsx } from "react/jsx-runtime";
|
|
15
14
|
import { useEffect, useId, useLayoutEffect, useRef } from "react";
|
|
15
|
+
import { jsx } from "react/jsx-runtime";
|
|
16
16
|
import * as monaco from "monaco-editor/editor/editor.api";
|
|
17
17
|
//#region src/editor/Monaco.tsx
|
|
18
18
|
setupMonacoWorkers();
|
package/dist/editor/workers.js
CHANGED
|
@@ -31,7 +31,7 @@ function setupMonacoWorkers() {
|
|
|
31
31
|
function createYamlWorker() {
|
|
32
32
|
return new Worker(new URL(
|
|
33
33
|
/* @vite-ignore */
|
|
34
|
-
new URL("../assets/yaml.worker-
|
|
34
|
+
new URL("../assets/yaml.worker-DOBV2lND.js", import.meta.url).href,
|
|
35
35
|
"" + import.meta.url
|
|
36
36
|
), { type: "module" });
|
|
37
37
|
}
|
|
@@ -3,18 +3,18 @@ import { buttonClasses } from "../components/buttonClasses.js";
|
|
|
3
3
|
import { AccessIcon, ChevronDownIcon, CollapseIcon, DownloadIcon, FileIcon, FileTextIcon, FolderIcon, FolderTreeIcon, LinkIcon, PreviewIcon, ShareIcon, TrashIcon, UploadIcon } from "../icons.js";
|
|
4
4
|
import { MenuItem, MenuPopup, MenuSeparator } from "../components/Menu.js";
|
|
5
5
|
import { safeUrl } from "../safeUrl.js";
|
|
6
|
+
import { useContextMenu } from "../components/ContextMenu.js";
|
|
6
7
|
import { Loader } from "../components/Loader.js";
|
|
7
8
|
import { toast } from "../components/Toast.js";
|
|
8
|
-
import { keyedByContent } from "../components/keys.js";
|
|
9
9
|
import { Tooltip } from "../components/Tooltip.js";
|
|
10
|
-
import { useNavigation, usePersistedState, useSlots, useStrings } from "../components/Provider.js";
|
|
10
|
+
import { useLocale, useNavigation, usePersistedState, useSlots, useStrings } from "../components/Provider.js";
|
|
11
|
+
import { keyedByContent } from "../components/keys.js";
|
|
11
12
|
import { useCopy } from "../components/useCopy.js";
|
|
12
13
|
import { Breadcrumbs } from "../components/Breadcrumbs.js";
|
|
13
14
|
import { Button } from "../components/Button.js";
|
|
14
15
|
import { Callout } from "../components/Callout.js";
|
|
15
16
|
import { InfoTip } from "../components/InfoTip.js";
|
|
16
17
|
import { ConfirmModal } from "../components/ConfirmModal.js";
|
|
17
|
-
import { useContextMenu } from "../components/ContextMenu.js";
|
|
18
18
|
import { CopyButton, CopyCodeBlock } from "../components/CopyButton.js";
|
|
19
19
|
import { CreateModal } from "../components/CreateModal.js";
|
|
20
20
|
import { useSplitter } from "../components/splitter.js";
|
|
@@ -40,8 +40,8 @@ import { FileTable } from "./FileTable.js";
|
|
|
40
40
|
import { advanceListing, beginLoadingMore, canAutoLoadMore, clearListingError, clearListingsUnder, hasMore, incompletePaths, isListed, isLoadingMore, loadMoreError, nextHydrationStep, recordListingError, replaceListing, retainListings } from "./lib/paging.js";
|
|
41
41
|
import { TreeView } from "./TreeView.js";
|
|
42
42
|
import { Menu } from "@base-ui/react/menu";
|
|
43
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
44
43
|
import { useCallback, useEffect, useEffectEvent, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
44
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
45
45
|
import { DateTime } from "luxon";
|
|
46
46
|
//#region src/file-explorer/FileExplorer.tsx
|
|
47
47
|
function UriCard({ value }) {
|
|
@@ -121,6 +121,7 @@ function FileExplorer({ storages, onRefresh, refreshKey, onOpenFile, showUserHie
|
|
|
121
121
|
const copySubmenu = useCopySubmenu();
|
|
122
122
|
const t = useStrings().fileExplorer;
|
|
123
123
|
const { common } = useStrings();
|
|
124
|
+
const locale = useLocale();
|
|
124
125
|
const { copy } = useCopy();
|
|
125
126
|
const slots = useSlots();
|
|
126
127
|
const { goTo } = useNavigation();
|
|
@@ -1054,7 +1055,7 @@ function FileExplorer({ storages, onRefresh, refreshKey, onOpenFile, showUserHie
|
|
|
1054
1055
|
selectedStorage: null,
|
|
1055
1056
|
onRefresh: handleRefresh
|
|
1056
1057
|
})]
|
|
1057
|
-
}) : !selectedNode ? /* @__PURE__ */ jsx(NoFileSelectedPreview, {}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1058
|
+
}) : !selectedNode ? /* @__PURE__ */ jsx(NoFileSelectedPreview, {}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
1058
1059
|
/* @__PURE__ */ jsxs("div", {
|
|
1059
1060
|
className: "@container flex items-center justify-between gap-3 px-4 h-12 shrink-0 border-b theme-border",
|
|
1060
1061
|
children: [renderBreadcrumb(), /* @__PURE__ */ jsxs("div", {
|
|
@@ -1166,7 +1167,7 @@ function FileExplorer({ storages, onRefresh, refreshKey, onOpenFile, showUserHie
|
|
|
1166
1167
|
children: [/* @__PURE__ */ jsx(MenuItem, {
|
|
1167
1168
|
onClick: handleDownload,
|
|
1168
1169
|
children: t.chrome.downloadFromBrowser
|
|
1169
|
-
}), downloadCommand && downloadCommandText && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(MenuSeparator, {}), /* @__PURE__ */ jsxs("div", {
|
|
1170
|
+
}), downloadCommand && downloadCommandText && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(MenuSeparator, {}), /* @__PURE__ */ jsxs("div", {
|
|
1170
1171
|
className: "px-2 py-1.5",
|
|
1171
1172
|
children: [/* @__PURE__ */ jsx("p", {
|
|
1172
1173
|
className: "text-sm text-center pb-1.5",
|
|
@@ -1311,7 +1312,7 @@ function FileExplorer({ storages, onRefresh, refreshKey, onOpenFile, showUserHie
|
|
|
1311
1312
|
className: "tabular-nums",
|
|
1312
1313
|
children: formatBytes(selectedNode.size)
|
|
1313
1314
|
}),
|
|
1314
|
-
modifiedDt && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
1315
|
+
modifiedDt && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
|
|
1315
1316
|
"aria-hidden": true,
|
|
1316
1317
|
children: "·"
|
|
1317
1318
|
}), /* @__PURE__ */ jsxs("span", { children: [
|
|
@@ -1345,50 +1346,50 @@ function FileExplorer({ storages, onRefresh, refreshKey, onOpenFile, showUserHie
|
|
|
1345
1346
|
}), /* @__PURE__ */ jsxs("dl", {
|
|
1346
1347
|
className: "grid grid-cols-[minmax(0,140px)_1fr] gap-x-6 gap-y-2 text-sm",
|
|
1347
1348
|
children: [
|
|
1348
|
-
typeof selectedNode.size === "number" && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("dt", {
|
|
1349
|
+
typeof selectedNode.size === "number" && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("dt", {
|
|
1349
1350
|
className: "theme-muted-text",
|
|
1350
1351
|
children: t.chrome.size
|
|
1351
1352
|
}), /* @__PURE__ */ jsx("dd", {
|
|
1352
1353
|
className: "tabular-nums",
|
|
1353
1354
|
children: formatBytes(selectedNode.size)
|
|
1354
1355
|
})] }),
|
|
1355
|
-
selectedNode.contentType && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("dt", {
|
|
1356
|
+
selectedNode.contentType && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("dt", {
|
|
1356
1357
|
className: "theme-muted-text",
|
|
1357
1358
|
children: t.chrome.contentType
|
|
1358
1359
|
}), /* @__PURE__ */ jsx("dd", {
|
|
1359
1360
|
className: "font-mono text-xs",
|
|
1360
1361
|
children: selectedNode.contentType
|
|
1361
1362
|
})] }),
|
|
1362
|
-
createdDt && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("dt", {
|
|
1363
|
+
createdDt && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("dt", {
|
|
1363
1364
|
className: "theme-muted-text",
|
|
1364
1365
|
children: t.chrome.created
|
|
1365
1366
|
}), /* @__PURE__ */ jsxs("dd", { children: [
|
|
1366
|
-
formatDateTime(createdDt),
|
|
1367
|
+
formatDateTime(createdDt, "medium", locale),
|
|
1367
1368
|
" ",
|
|
1368
1369
|
/* @__PURE__ */ jsxs("span", {
|
|
1369
1370
|
className: "theme-muted-text",
|
|
1370
1371
|
children: ["· ", /* @__PURE__ */ jsx(RelativeTime, { value: createdDt })]
|
|
1371
1372
|
})
|
|
1372
1373
|
] })] }),
|
|
1373
|
-
modifiedDt && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("dt", {
|
|
1374
|
+
modifiedDt && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("dt", {
|
|
1374
1375
|
className: "theme-muted-text",
|
|
1375
1376
|
children: t.chrome.lastModified
|
|
1376
1377
|
}), /* @__PURE__ */ jsxs("dd", { children: [
|
|
1377
|
-
formatDateTime(modifiedDt),
|
|
1378
|
+
formatDateTime(modifiedDt, "medium", locale),
|
|
1378
1379
|
" ",
|
|
1379
1380
|
/* @__PURE__ */ jsxs("span", {
|
|
1380
1381
|
className: "theme-muted-text",
|
|
1381
1382
|
children: ["· ", /* @__PURE__ */ jsx(RelativeTime, { value: modifiedDt })]
|
|
1382
1383
|
})
|
|
1383
1384
|
] })] }),
|
|
1384
|
-
selectedNode.hash && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("dt", {
|
|
1385
|
+
selectedNode.hash && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("dt", {
|
|
1385
1386
|
className: "theme-muted-text",
|
|
1386
1387
|
children: t.chrome.hash
|
|
1387
1388
|
}), /* @__PURE__ */ jsx("dd", {
|
|
1388
1389
|
className: "font-mono text-xs break-all",
|
|
1389
1390
|
children: selectedNode.hash.replace(/^"|"$/g, "")
|
|
1390
1391
|
})] }),
|
|
1391
|
-
selectedNode.storageClass && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("dt", {
|
|
1392
|
+
selectedNode.storageClass && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("dt", {
|
|
1392
1393
|
className: "theme-muted-text",
|
|
1393
1394
|
children: t.chrome.storageClass
|
|
1394
1395
|
}), /* @__PURE__ */ jsx("dd", {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { toast } from "../components/Toast.js";
|
|
2
|
-
import { keyedByContent } from "../components/keys.js";
|
|
3
2
|
import { useStrings } from "../components/Provider.js";
|
|
3
|
+
import { keyedByContent } from "../components/keys.js";
|
|
4
4
|
import { mapWithConcurrency } from "./lib/batch.js";
|
|
5
5
|
import { calculateUploadNodesTotalSize, getUploadSessionETA, removeLeadingSlash } from "./lib/utils.js";
|
|
6
6
|
import { UploadSessionToast } from "./toasts.js";
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
7
|
import { createContext, use, useRef } from "react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
//#region src/file-explorer/FileExplorerContext.tsx
|
|
10
10
|
var UPLOAD_CONCURRENCY = 3;
|
|
11
11
|
var FileExplorerContext = createContext(void 0);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { cx } from "../../cx.js";
|
|
2
2
|
import { DownloadIcon, FileIcon, LockIcon, MusicIcon, ZipIcon } from "../../icons.js";
|
|
3
3
|
import { Loader } from "../../components/Loader.js";
|
|
4
|
-
import { positionKeys, withPositionKeys } from "../../components/keys.js";
|
|
5
4
|
import { useStrings } from "../../components/Provider.js";
|
|
5
|
+
import { positionKeys, withPositionKeys } from "../../components/keys.js";
|
|
6
6
|
import { Button } from "../../components/Button.js";
|
|
7
7
|
import Markdown from "../../components/Markdown.js";
|
|
8
8
|
import { formatBytes } from "../../format.js";
|
|
@@ -14,8 +14,8 @@ import { joinSource, parseDelimited, parseNotebook, stripAnsi } from "./parse.js
|
|
|
14
14
|
import { countLines } from "./readCappedBytes.js";
|
|
15
15
|
import { useObjectBlobUrl } from "./useObjectBlobUrl.js";
|
|
16
16
|
import { useObjectText } from "./useObjectText.js";
|
|
17
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
18
17
|
import { useCallback, useMemo, useState } from "react";
|
|
18
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
19
19
|
//#region src/file-explorer/FilePreview/Viewer.tsx
|
|
20
20
|
var PREVIEW_MARKDOWN_CONTROLS = {
|
|
21
21
|
table: { fullscreen: false },
|
|
@@ -473,7 +473,7 @@ function PreviewFetchState({ loading, tooLarge, size, error, corsError, storage,
|
|
|
473
473
|
onDownload
|
|
474
474
|
});
|
|
475
475
|
if (error) return /* @__PURE__ */ jsx(PreviewError, { onDownload });
|
|
476
|
-
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
476
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children });
|
|
477
477
|
}
|
|
478
478
|
function NotPreviewable({ icon, title, message, onDownload }) {
|
|
479
479
|
const t = useStrings().fileExplorer;
|
|
@@ -9,8 +9,8 @@ import { getPreviewKind } from "./previewType.js";
|
|
|
9
9
|
import { StreamedBadge } from "./StreamedBadge.js";
|
|
10
10
|
import { usePresignedUrl } from "./usePresignedUrl.js";
|
|
11
11
|
import { FilePreviewViewer } from "./Viewer.js";
|
|
12
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
12
|
import { useEffect, useState } from "react";
|
|
13
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
//#region src/file-explorer/FilePreview/index.tsx
|
|
15
15
|
/** Document views run their own chrome and text to the edge of the stage, which
|
|
16
16
|
* full-window bars would float on top of; they get the bars in flow instead. */
|
|
@@ -174,7 +174,7 @@ function FilePreview({ open, node, siblings, storage, getPresignedUrl, onNavigat
|
|
|
174
174
|
else if (e.key === "ArrowLeft") goPrev();
|
|
175
175
|
},
|
|
176
176
|
children: [
|
|
177
|
-
isOverlay && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(EdgeButton, {
|
|
177
|
+
isOverlay && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(EdgeButton, {
|
|
178
178
|
side: "left",
|
|
179
179
|
label: t.preview.previousFile,
|
|
180
180
|
disabled: !hasPrev,
|
|
@@ -4,8 +4,8 @@ import { canPreview } from "./FilePreview/previewType.js";
|
|
|
4
4
|
import { getNodeIcon } from "./helpers.js";
|
|
5
5
|
import { FileRow, ROW_HEIGHT_TALL, isTwoLineRow } from "./FileRow.js";
|
|
6
6
|
import { LoadMoreRow } from "./LoadMoreRow.js";
|
|
7
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
7
|
import { useEffect } from "react";
|
|
8
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
//#region src/file-explorer/FileRowsWindow.tsx
|
|
10
10
|
/** `start`/`end` include scrollMargin but getTotalSize() does not, so the margin
|
|
11
11
|
* has to come back out of both. */
|
|
@@ -26,7 +26,7 @@ function spacerHeights(items, totalSize, scrollMargin) {
|
|
|
26
26
|
function FileRowsWindow({ items, padTop, padBottom, nodes, checkedItems, activeIndex, rowIdPrefix, scrollEl, loadMore, getItems, openMenu, onOpen, onToggleCheck, onPreview, pathHref }) {
|
|
27
27
|
useNestedScrollerWarning(scrollEl, nodes.length);
|
|
28
28
|
useRowPitchAudit(scrollEl, nodes, items);
|
|
29
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
29
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
30
30
|
padTop > 0 && /* @__PURE__ */ jsx(Spacer, { height: padTop }, "pad-top"),
|
|
31
31
|
items.map((item) => {
|
|
32
32
|
const node = nodes[item.index];
|
|
@@ -60,7 +60,7 @@ function FileRowsWindow({ items, padTop, padBottom, nodes, checkedItems, activeI
|
|
|
60
60
|
] });
|
|
61
61
|
}
|
|
62
62
|
function Spacer({ height }) {
|
|
63
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("tr", {
|
|
63
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx("tr", {
|
|
64
64
|
"aria-hidden": "true",
|
|
65
65
|
className: "border-0",
|
|
66
66
|
children: /* @__PURE__ */ jsx("td", {
|
|
@@ -5,8 +5,8 @@ import { listTableFixedProps } from "../list/ListTable.js";
|
|
|
5
5
|
import { fileRowHeight } from "./FileRow.js";
|
|
6
6
|
import { FileRowsWindow, spacerHeights } from "./FileRowsWindow.js";
|
|
7
7
|
import { FileTableHeaders } from "./FileTableHeaders.js";
|
|
8
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
8
|
import { useCallback, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
11
11
|
//#region src/file-explorer/FileTable.tsx
|
|
12
12
|
/** The file table. Give it a `key` of the folder path: a folder change must reset
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Loader } from "../components/Loader.js";
|
|
2
2
|
import { useStrings } from "../components/Provider.js";
|
|
3
3
|
import { useNearEnd } from "./useNearEnd.js";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
4
|
import { useRef } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
function LoadMoreRow({ rowId, rowIndex, loading, error, auto, root, onLoadMore }) {
|
|
7
7
|
const t = useStrings().fileExplorer;
|
|
8
8
|
const { common } = useStrings();
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { cx } from "../cx.js";
|
|
2
2
|
import { ChevronRightIcon, FolderIcon, FolderOpenIcon } from "../icons.js";
|
|
3
3
|
import { isDev } from "../dev.js";
|
|
4
|
-
import { positionKeys } from "../components/keys.js";
|
|
5
4
|
import { useStrings } from "../components/Provider.js";
|
|
6
5
|
import { AppLink, isPlainClick } from "../components/AppLink.js";
|
|
6
|
+
import { positionKeys } from "../components/keys.js";
|
|
7
7
|
import { Skeleton } from "../components/Skeleton.js";
|
|
8
8
|
import { carriesFiles, getParentPath } from "./lib/utils.js";
|
|
9
9
|
import { canPreview } from "./FilePreview/previewType.js";
|
|
10
10
|
import { getNodeIcon } from "./helpers.js";
|
|
11
11
|
import { edgeRow, findRowIndex, firstChildRow, flattenTreeRows, nextFileLimit, parentRow, stepRow } from "./treeRows.js";
|
|
12
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
12
|
import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
13
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
15
15
|
//#region src/file-explorer/TreeView.tsx
|
|
16
16
|
/** 9px margin + 12px padding, per level. */
|
|
@@ -196,7 +196,7 @@ function indentStyle(depth, isDirectory) {
|
|
|
196
196
|
}
|
|
197
197
|
function IndentGuides({ depth }) {
|
|
198
198
|
if (depth === 0) return null;
|
|
199
|
-
return /* @__PURE__ */ jsx(Fragment, { children: positionKeys(depth, "indent").map((key, level) => /* @__PURE__ */ jsx("span", {
|
|
199
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children: positionKeys(depth, "indent").map((key, level) => /* @__PURE__ */ jsx("span", {
|
|
200
200
|
"aria-hidden": "true",
|
|
201
201
|
className: "pointer-events-none absolute inset-y-0 w-px bg-(--theme-border)/60",
|
|
202
202
|
style: { left: GUIDE_OFFSET + level * INDENT_PER_LEVEL }
|
|
@@ -208,7 +208,7 @@ function RowIcons({ isDirectory, isExpanded, customIcon }) {
|
|
|
208
208
|
children: customIcon
|
|
209
209
|
});
|
|
210
210
|
const folder = isExpanded ? /* @__PURE__ */ jsx(FolderOpenIcon, { className: "h-4 w-4 mr-1 text-sky-500" }) : /* @__PURE__ */ jsx(FolderIcon, { className: "h-4 w-4 mr-1 text-sky-500/80" });
|
|
211
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ChevronRightIcon, { className: cx("h-3.5 w-3.5 shrink-0 theme-muted-text transition-transform duration-150", isExpanded && "rotate-90") }), customIcon ?? folder] });
|
|
211
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(ChevronRightIcon, { className: cx("h-3.5 w-3.5 shrink-0 theme-muted-text transition-transform duration-150", isExpanded && "rotate-90") }), customIcon ?? folder] });
|
|
212
212
|
}
|
|
213
213
|
/** Click-only, unlike the table's sentinel: the tree is a navigation aid, and
|
|
214
214
|
* growing it automatically as the user scrolls is what the cap exists to prevent. */
|
|
@@ -368,7 +368,7 @@ var TreeRowItem = memo(function TreeRowItem({ row, isSelected, href, onFollowLin
|
|
|
368
368
|
"aria-setsize": row.setSize,
|
|
369
369
|
"aria-selected": isSelected,
|
|
370
370
|
...isDirectory && { "aria-expanded": isExpanded },
|
|
371
|
-
children: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(RowIcons, {
|
|
371
|
+
children: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(RowIcons, {
|
|
372
372
|
isDirectory,
|
|
373
373
|
isExpanded,
|
|
374
374
|
customIcon
|
|
@@ -11,8 +11,8 @@ import { useElapsed } from "../components/relativeTime.js";
|
|
|
11
11
|
import { ListSkeleton } from "../list/ListTable.js";
|
|
12
12
|
import { carriesFiles, getFileExtension } from "./lib/utils.js";
|
|
13
13
|
import { CorsError } from "./lib/errors.js";
|
|
14
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
15
14
|
import { useState, useTransition } from "react";
|
|
15
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
16
16
|
//#region src/file-explorer/helpers.tsx
|
|
17
17
|
var SIDEBAR_WIDTH_STORAGE_KEY = "fileExplorerSidebarWidth";
|
|
18
18
|
var contentTypeIconMap = [
|
|
@@ -360,7 +360,7 @@ function PropagationStage({ status, label }) {
|
|
|
360
360
|
"aria-hidden": "true",
|
|
361
361
|
children: /* @__PURE__ */ jsx("polyline", { points: "3.5 8.5 6.5 11.5 12.5 5" })
|
|
362
362
|
}),
|
|
363
|
-
status === "active" && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", { className: "absolute inline-flex h-full w-full motion-safe:animate-ping rounded-full bg-(--theme-info)/60" }), /* @__PURE__ */ jsx("span", { className: "relative inline-flex h-2 w-2 rounded-full bg-(--theme-info)" })] }),
|
|
363
|
+
status === "active" && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", { className: "absolute inline-flex h-full w-full motion-safe:animate-ping rounded-full bg-(--theme-info)/60" }), /* @__PURE__ */ jsx("span", { className: "relative inline-flex h-2 w-2 rounded-full bg-(--theme-info)" })] }),
|
|
364
364
|
status === "pending" && /* @__PURE__ */ jsx("span", { className: "inline-flex h-1.5 w-1.5 rounded-full theme-muted-text opacity-60" })
|
|
365
365
|
]
|
|
366
366
|
}), /* @__PURE__ */ jsx("span", {
|
|
@@ -7,8 +7,8 @@ import { IconButton } from "../components/IconButton.js";
|
|
|
7
7
|
import { Callout } from "../components/Callout.js";
|
|
8
8
|
import { ProgressBar } from "../components/Meter.js";
|
|
9
9
|
import { formatBytes, formatTimeLeft } from "../format.js";
|
|
10
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
10
|
import { useState } from "react";
|
|
11
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
//#region src/file-explorer/toasts.tsx
|
|
13
13
|
function getSessionStatusInfo(session, queueLength, strings) {
|
|
14
14
|
switch (session.status) {
|
|
@@ -212,7 +212,7 @@ function UploadSessionToast({ session, queueLength, onCancel, onCancelFile }) {
|
|
|
212
212
|
})
|
|
213
213
|
]
|
|
214
214
|
})]
|
|
215
|
-
}), isToastExpanded && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
215
|
+
}), isToastExpanded && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
216
216
|
/* @__PURE__ */ jsxs("div", {
|
|
217
217
|
className: "flex items-center justify-between",
|
|
218
218
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
@@ -4,8 +4,8 @@ import { Field, FieldOption } from "../../components/Field.js";
|
|
|
4
4
|
import { fieldFrame } from "../fieldFrame.js";
|
|
5
5
|
import { useFieldValue } from "../useFieldValue.js";
|
|
6
6
|
import { fieldOption } from "./fieldOption.js";
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
7
|
import { useId, useState } from "react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
//#region src/form/Fields/CheckboxGroupField.tsx
|
|
10
10
|
function impliedFrom(values, implies = {}) {
|
|
11
11
|
const result = /* @__PURE__ */ new Set();
|
|
@@ -5,8 +5,8 @@ import { fieldFrame } from "../fieldFrame.js";
|
|
|
5
5
|
import { useChoiceField } from "../useChoiceField.js";
|
|
6
6
|
import { useDependentOptions } from "../utils/dependentOptions.js";
|
|
7
7
|
import { getPlaceholder } from "../utils/getPlaceholder.js";
|
|
8
|
-
import { jsx } from "react/jsx-runtime";
|
|
9
8
|
import { useMemo } from "react";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
10
|
//#region src/form/Fields/DropdownField.tsx
|
|
11
11
|
function DropdownField(props) {
|
|
12
12
|
const { field, disabled, onChange } = props;
|
|
@@ -6,8 +6,8 @@ import { fieldFrame } from "../fieldFrame.js";
|
|
|
6
6
|
import { useFieldValue } from "../useFieldValue.js";
|
|
7
7
|
import { formatDurationText, parseDurationText } from "../utils/duration.js";
|
|
8
8
|
import { setDurationValidity } from "./durationValidity.js";
|
|
9
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
9
|
import { useEffect, useRef, useState } from "react";
|
|
10
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { useFormContext } from "react-hook-form";
|
|
12
12
|
//#region src/form/Fields/DurationField.tsx
|
|
13
13
|
var isNumericString = (value) => typeof value === "string" && /^\d+$/.test(value.trim());
|
|
@@ -82,7 +82,7 @@ function DurationField(props) {
|
|
|
82
82
|
return /* @__PURE__ */ jsx(Field, {
|
|
83
83
|
...fieldFrame(props),
|
|
84
84
|
error: error ?? props.error,
|
|
85
|
-
children: (control) => /* @__PURE__ */ jsxs(Fragment, { children: [!isSentinel && /* @__PURE__ */ jsx("input", {
|
|
85
|
+
children: (control) => /* @__PURE__ */ jsxs(Fragment$1, { children: [!isSentinel && /* @__PURE__ */ jsx("input", {
|
|
86
86
|
...control,
|
|
87
87
|
"data-1p-ignore": true,
|
|
88
88
|
className: fieldBox(),
|
|
@@ -5,8 +5,8 @@ import { fieldFrame } from "../fieldFrame.js";
|
|
|
5
5
|
import { useFieldValue } from "../useFieldValue.js";
|
|
6
6
|
import { useDependentOptions } from "../utils/dependentOptions.js";
|
|
7
7
|
import { usePrevious } from "../usePrevious.js";
|
|
8
|
-
import { jsx } from "react/jsx-runtime";
|
|
9
8
|
import { useEffect, useMemo } from "react";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
10
|
//#region src/form/Fields/MultiDropdownField.tsx
|
|
11
11
|
function MultiDropdownField(props) {
|
|
12
12
|
const { field, disabled, onChange } = props;
|
|
@@ -3,8 +3,8 @@ import { NumberInput } from "../../components/NumberInput.js";
|
|
|
3
3
|
import { fieldFrame } from "../fieldFrame.js";
|
|
4
4
|
import { useFieldValue } from "../useFieldValue.js";
|
|
5
5
|
import { getPlaceholder } from "../utils/getPlaceholder.js";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
6
|
import { useEffect } from "react";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
//#region src/form/Fields/NumberField.tsx
|
|
9
9
|
/** A value held as text, as one read from a workflow's inputs may be, still shows as its number. */
|
|
10
10
|
function toNumber(value) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { InfoTip } from "../../components/InfoTip.js";
|
|
2
2
|
import { Section } from "../../components/Section.js";
|
|
3
3
|
import { FieldsFromOptions, resolveMetaOverrides, sectionSpacing } from "../Form.js";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
4
|
import { useMemo } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/form/Fields/ObjectField.tsx
|
|
7
7
|
function ObjectField({ field, label, help, labelPosition, spaceCompact }) {
|
|
8
8
|
const fieldName = field.name ?? "";
|
|
@@ -3,8 +3,8 @@ import { NumberInput } from "../../components/NumberInput.js";
|
|
|
3
3
|
import { Slider } from "../../components/Slider.js";
|
|
4
4
|
import { fieldFrame } from "../fieldFrame.js";
|
|
5
5
|
import { useFieldValue } from "../useFieldValue.js";
|
|
6
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
6
|
import { useEffect } from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { useFormContext } from "react-hook-form";
|
|
9
9
|
//#region src/form/Fields/RangeField.tsx
|
|
10
10
|
/** A value held as text, as one read from a workflow's inputs may be, still places the slider. */
|
|
@@ -3,8 +3,8 @@ import { Input } from "../../components/Input.js";
|
|
|
3
3
|
import { fieldFrame } from "../fieldFrame.js";
|
|
4
4
|
import { useFieldValue } from "../useFieldValue.js";
|
|
5
5
|
import { getPlaceholder } from "../utils/getPlaceholder.js";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
6
|
import { useMemo } from "react";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
//#region src/form/Fields/StringField.tsx
|
|
9
9
|
function StringField(props) {
|
|
10
10
|
const { field, disabled, onChange } = props;
|
package/dist/form/Form.js
CHANGED
|
@@ -17,8 +17,8 @@ import { atIndex, fieldPath, rowIndexOf } from "./utils/fieldPath.js";
|
|
|
17
17
|
import { getValueUsingPath } from "./utils/getValueUsingPath.js";
|
|
18
18
|
import { getParentValue } from "./utils/getParentValue.js";
|
|
19
19
|
import { WizardContainer } from "./Wizard/WizardContainer.js";
|
|
20
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
21
20
|
import { createContext, memo, useCallback, useContext, useEffect, useEffectEvent, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
21
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
22
22
|
import { dequal } from "dequal";
|
|
23
23
|
import { FormProvider, get, useForm, useFormContext, useFormState, useWatch } from "react-hook-form";
|
|
24
24
|
//#region src/form/Form.tsx
|
|
@@ -508,7 +508,7 @@ function FieldsFromOptions({ options = {}, parentInfo, labelPosition = "left", s
|
|
|
508
508
|
className: "order-2 w-full px-2",
|
|
509
509
|
children: add
|
|
510
510
|
})]
|
|
511
|
-
}) : /* @__PURE__ */ jsxs(Fragment, { children: [names.map((name) => fieldOf(name, void 0)), add] })
|
|
511
|
+
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [names.map((name) => fieldOf(name, void 0)), add] })
|
|
512
512
|
});
|
|
513
513
|
}
|
|
514
514
|
function repeatsPage(field) {
|
|
@@ -564,7 +564,7 @@ function DynamicFormContent({ options, labelPosition, spaceCompact, organization
|
|
|
564
564
|
onSubmit,
|
|
565
565
|
className: "w-full",
|
|
566
566
|
...meta
|
|
567
|
-
}) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(FieldsFromOptions, {
|
|
567
|
+
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(FieldsFromOptions, {
|
|
568
568
|
...meta,
|
|
569
569
|
options: opts
|
|
570
570
|
}), onSubmit !== void 0 && !workflowForm && /* @__PURE__ */ jsx("div", {
|
package/dist/form/FormLayout.js
CHANGED
|
@@ -2,8 +2,8 @@ import { cx } from "../cx.js";
|
|
|
2
2
|
import { FieldRowContext } from "../components/Field.js";
|
|
3
3
|
import { layoutBreakpoints, responsiveLayoutValues } from "./layout.js";
|
|
4
4
|
import { resolveLayoutCSS } from "./layoutCSS.js";
|
|
5
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
5
|
import { createContext, useContext, useId, useMemo } from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
//#region src/form/FormLayout.tsx
|
|
8
8
|
var LayoutCSSContext = createContext(false);
|
|
9
9
|
var gaps = {
|
|
@@ -11,8 +11,8 @@ import { WizardNavigation } from "./WizardNavigation.js";
|
|
|
11
11
|
import { WizardStepContent } from "./WizardStepContent.js";
|
|
12
12
|
import { WizardStepIndicator } from "./WizardStepIndicator.js";
|
|
13
13
|
import { WizardPagesContext } from "./wizardPages.js";
|
|
14
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
14
|
import { useCallback, useContext, useEffect, useEffectEvent, useMemo, useRef, useState } from "react";
|
|
15
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
16
|
import { useFormContext, useWatch } from "react-hook-form";
|
|
17
17
|
//#region src/form/Wizard/WizardContainer.tsx
|
|
18
18
|
function WizardContainer({ wizardConfig, onSubmit, className = "", labelPosition = "left", spaceCompact = false, nested = false, fieldNamePrefix = "" }) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { WarningIcon } from "../../icons.js";
|
|
2
2
|
import { useStrings } from "../../components/Provider.js";
|
|
3
3
|
import { Button } from "../../components/Button.js";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
4
|
import { useState } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/form/Wizard/WizardNavigation.tsx
|
|
7
7
|
function WizardNavigation({ isLastStep, canGoBack, isCurrentStepValid, nextLabel, prevLabel, submitLabel: submitLabelProp, onNext, onPrevious, onSubmit }) {
|
|
8
8
|
const { form: t, common } = useStrings();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { stepText } from "./utils.js";
|
|
2
2
|
import { EditingScope, useFormEditing } from "../formEditing.js";
|
|
3
3
|
import { FieldsFromOptions } from "../Form.js";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
4
|
import { useMemo } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/form/Wizard/WizardStepContent.tsx
|
|
7
7
|
function WizardStepContent({ currentStep, stepConfig, flatten = true, fieldNamePrefix = "", copy, ...fieldsProps }) {
|
|
8
8
|
const editing = useFormEditing();
|
|
@@ -13,8 +13,8 @@ import RangeField from "./Fields/RangeField.js";
|
|
|
13
13
|
import StepField from "./Fields/StepField.js";
|
|
14
14
|
import StringField from "./Fields/StringField.js";
|
|
15
15
|
import TextAreaField from "./Fields/TextAreaField.js";
|
|
16
|
-
import { jsx } from "react/jsx-runtime";
|
|
17
16
|
import { Suspense, createContext, useContext } from "react";
|
|
17
|
+
import { jsx } from "react/jsx-runtime";
|
|
18
18
|
//#region src/form/fieldRegistry.tsx
|
|
19
19
|
var CORE_FIELD_COMPONENTS = {
|
|
20
20
|
string: StringField,
|
package/dist/form/formEditing.js
CHANGED