alinea 2.0.0-preview.11 → 2.0.0-preview.13
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/.init/content/pages/welcome.json +1 -1
- package/dist/.mcp/later/dev.json +1 -1
- package/dist/.mcp/online/dev.json +1 -1
- package/dist/adapter/next/cms.js +16 -8
- package/dist/adapter/next/dashboardUrl.d.ts +6 -0
- package/dist/adapter/next/dashboardUrl.js +13 -0
- package/dist/adapter/next/syncCheck.d.ts +15 -2
- package/dist/adapter/next/syncCheck.js +26 -9
- package/dist/backend/Handler.js +5 -1
- package/dist/backend/api/BlobStore.d.ts +21 -0
- package/dist/backend/api/BlobStore.js +63 -0
- package/dist/backend/api/CreateBackend.js +10 -8
- package/dist/backend/api/DatabaseApi.d.ts +4 -1
- package/dist/backend/api/DatabaseApi.js +88 -4
- package/dist/backend/api/GithubApi.js +47 -24
- package/dist/backend/api/database.js +6 -6
- package/dist/bundled.d.ts +687 -248
- package/dist/chunks/{bun-sqlite-5SHXN3AT.js → bun-sqlite-RI6BYU5S.js} +3 -3
- package/dist/chunks/{chunk-YCQR5GRT.js → chunk-3QFSGTGF.js} +2 -3
- package/dist/chunks/{chunk-QJGGYF6E.js → chunk-4ZA6KZHS.js} +5 -5
- package/dist/chunks/{chunk-ASYKC6IE.js → chunk-5H4D5JQL.js} +1 -1
- package/dist/chunks/{chunk-ETWOY4AL.js → chunk-A2I6MCCS.js} +1 -1
- package/dist/chunks/{chunk-W5AXN7GH.js → chunk-CYVOGRSD.js} +1 -2
- package/dist/chunks/{chunk-TIJTT5ZI.js → chunk-G43W7AME.js} +1 -0
- package/dist/chunks/{chunk-RE523BQ7.js → chunk-HOETF6HN.js} +5829 -5830
- package/dist/chunks/{chunk-AIU6CMVT.js → chunk-PTYZMV5G.js} +1 -1
- package/dist/chunks/{chunk-JOF663EG.js → chunk-QHHMKJUO.js} +1 -1
- package/dist/chunks/{chunk-66YZ47TY.js → chunk-RAR44T5O.js} +1 -1
- package/dist/chunks/{chunk-QSN6RH6X.js → chunk-VA6NC3MI.js} +1 -1
- package/dist/chunks/{node-sqlite-XVNTNMCY.js → node-sqlite-C7VJ2NSN.js} +3 -3
- package/dist/cli/Mcp.js +1 -1
- package/dist/cli/Serve.js +1 -1
- package/dist/cli/bin.js +2 -3
- package/dist/cli/generate/GenerateDashboard.js +17 -5
- package/dist/cli/serve/mcp/DevMcp.js +1 -1
- package/dist/cli/serve/mcp/McpTools.js +29 -1
- package/dist/cli/static/dashboard/entry.js +2 -1
- package/dist/cloud/CloudRemote.js +1 -1
- package/dist/components/Alert.js +3 -3
- package/dist/components/AppShell.js +2 -2
- package/dist/components/Badge.d.ts +3 -1
- package/dist/components/Badge.js +5 -3
- package/dist/components/Breadcrumbs.js +6 -6
- package/dist/components/Button.d.ts +6 -1
- package/dist/components/Button.js +14 -5
- package/dist/components/Calendar.js +20 -20
- package/dist/components/Checkbox.js +9 -9
- package/dist/components/CheckboxGroup.js +4 -4
- package/dist/components/Collapsible.js +3 -3
- package/dist/components/ColorSwatch.js +2 -2
- package/dist/components/ColorSwatchPicker.js +2 -2
- package/dist/components/ComboBox.js +7 -7
- package/dist/components/Command.js +10 -9
- package/dist/components/ContentCard.d.ts +3 -1
- package/dist/components/ContentCard.js +39 -17
- package/dist/components/ContentGrid.js +15 -15
- package/dist/components/DataList.js +2 -2
- package/dist/components/DateField.js +2 -2
- package/dist/components/DatePicker.js +2 -2
- package/dist/components/DateRangePicker.js +2 -2
- package/dist/components/Dialog.js +6 -6
- package/dist/components/DropZone.js +4 -4
- package/dist/components/DropdownMenu.js +10 -10
- package/dist/components/Empty.js +4 -4
- package/dist/components/Field.js +8 -8
- package/dist/components/List.js +23 -23
- package/dist/components/MediaPreview.js +5 -5
- package/dist/components/MultipleSelect.js +20 -20
- package/dist/components/NavRail.js +4 -4
- package/dist/components/NumberField.js +5 -5
- package/dist/components/Page.js +5 -5
- package/dist/components/Popover.js +2 -2
- package/dist/components/PreviewFrame.js +5 -5
- package/dist/components/RadioGroup.js +6 -6
- package/dist/components/Resizable.js +5 -5
- package/dist/components/SearchField.d.ts +6 -1
- package/dist/components/SearchField.js +7 -5
- package/dist/components/Select.js +14 -14
- package/dist/components/Sheet.d.ts +50 -0
- package/dist/components/Sheet.js +202 -0
- package/dist/components/Sidebar.js +4 -4
- package/dist/components/SortableList.d.ts +34 -30
- package/dist/components/SortableList.js +162 -265
- package/dist/components/Spinner.js +1 -1
- package/dist/components/Surface.js +2 -2
- package/dist/components/Switch.js +7 -7
- package/dist/components/Table.d.ts +3 -1
- package/dist/components/Table.js +53 -42
- package/dist/components/Tabs.js +5 -5
- package/dist/components/TagGroup.js +9 -9
- package/dist/components/TextField.js +10 -10
- package/dist/components/TimeField.js +8 -8
- package/dist/components/Timestamp.js +1 -1
- package/dist/components/ToggleGroup.js +2 -2
- package/dist/components/Toolbar.js +4 -4
- package/dist/components/Tooltip.js +5 -5
- package/dist/components/Tree.js +29 -29
- package/dist/components/internal/DateControl.js +10 -10
- package/dist/components/internal/ListBoxOption.js +13 -13
- package/dist/components/internal/Locale.js +2 -2
- package/dist/components/internal/PopoverSurface.js +2 -2
- package/dist/components/internal/SelectionCheckbox.js +6 -6
- package/dist/components/internal/Slot.js +1 -1
- package/dist/components/internal/ToggleButton.js +3 -3
- package/dist/components/internal/Trigger.js +2 -2
- package/dist/components/internal/sortableDrag.d.ts +19 -0
- package/dist/components/internal/sortableDrag.js +175 -0
- package/dist/components/internal/useDragDrop.js +2 -2
- package/dist/components.d.ts +1 -0
- package/dist/components.js +1 -0
- package/dist/core/Config.d.ts +6 -1
- package/dist/core/Document.d.ts +9 -1
- package/dist/core/Document.js +31 -6
- package/dist/core/Overview.d.ts +2 -4
- package/dist/core/TextDoc.d.ts +4 -0
- package/dist/core/Validation.d.ts +0 -1
- package/dist/core/Validation.js +0 -6
- package/dist/core/field/RichTextField.js +23 -4
- package/dist/core/media/MediaTypes.js +1 -1
- package/dist/core/source/GithubSource.d.ts +4 -0
- package/dist/core/source/GithubSource.js +127 -25
- package/dist/core/source/GithubUsage.d.ts +21 -0
- package/dist/core/source/GithubUsage.js +47 -0
- package/dist/dashboard/App.d.ts +2 -2
- package/dist/dashboard/App.js +5 -3
- package/dist/dashboard/ViewKeys.d.ts +1 -0
- package/dist/dashboard/ViewKeys.js +1 -0
- package/dist/dashboard/app/ActivityStatus.js +11 -11
- package/dist/dashboard/app/AuthView.js +5 -5
- package/dist/dashboard/app/BlockSheet.d.ts +50 -0
- package/dist/dashboard/app/BlockSheet.js +207 -0
- package/dist/dashboard/app/BlockSheetStoryFrame.d.ts +6 -0
- package/dist/dashboard/app/BlockSheetStoryFrame.js +29 -0
- package/dist/dashboard/app/CompactField.js +15 -15
- package/dist/dashboard/app/CroppedImage.js +2 -2
- package/dist/dashboard/app/DashboardErrorBoundary.js +3 -3
- package/dist/dashboard/app/DashboardLayout.js +3 -1
- package/dist/dashboard/app/EntryHeader.js +32 -33
- package/dist/dashboard/app/EntryReferences.js +5 -5
- package/dist/dashboard/app/EntrySidebar.js +8 -8
- package/dist/dashboard/app/EntrySidebarPreview.js +4 -4
- package/dist/dashboard/app/EntryStatusIcon.d.ts +23 -0
- package/dist/dashboard/app/EntryStatusIcon.js +58 -0
- package/dist/dashboard/app/EntryValidationModal.d.ts +6 -5
- package/dist/dashboard/app/EntryValidationModal.js +18 -18
- package/dist/dashboard/app/Explorer.d.ts +3 -1
- package/dist/dashboard/app/Explorer.js +51 -47
- package/dist/dashboard/app/ExplorerBatchActions.d.ts +3 -1
- package/dist/dashboard/app/ExplorerBatchActions.js +68 -43
- package/dist/dashboard/app/ExplorerCards.js +7 -1
- package/dist/dashboard/app/ExplorerControls.js +6 -6
- package/dist/dashboard/app/ExplorerList.js +5 -5
- package/dist/dashboard/app/ExplorerModal.js +1 -1
- package/dist/dashboard/app/ExplorerTable.js +14 -11
- package/dist/dashboard/app/ImageEditor.js +25 -25
- package/dist/dashboard/app/ImagePicker.js +3 -13
- package/dist/dashboard/app/LinkPicker.js +29 -27
- package/dist/dashboard/app/LocaleMenu.js +7 -7
- package/dist/dashboard/app/MediaPreviewCell.js +2 -2
- package/dist/dashboard/app/MoveConfirmDialog.d.ts +5 -0
- package/dist/dashboard/app/MoveConfirmDialog.js +79 -0
- package/dist/dashboard/app/OverviewCell.js +8 -13
- package/dist/dashboard/app/ReadOnlyBadge.d.ts +1 -1
- package/dist/dashboard/app/RemoveDialog.d.ts +17 -0
- package/dist/dashboard/app/{DeleteDialog.js → RemoveDialog.js} +67 -27
- package/dist/dashboard/app/RemoveRedirect.d.ts +7 -0
- package/dist/dashboard/app/RemoveRedirect.js +123 -0
- package/dist/dashboard/app/SearchBar.d.ts +9 -0
- package/dist/dashboard/app/SearchBar.js +31 -0
- package/dist/dashboard/app/SidebarTree.js +29 -74
- package/dist/dashboard/app/WorkspaceMenu.js +8 -8
- package/dist/dashboard/app/WorkspaceRoots.js +11 -11
- package/dist/dashboard/app/editor/FileEditor.js +16 -16
- package/dist/dashboard/app/modals/CreateEntry.js +5 -5
- package/dist/dashboard/app/pages/EntryPage.d.ts +2 -1
- package/dist/dashboard/app/pages/EntryPage.js +35 -16
- package/dist/dashboard/app/pages/SplashPage.js +35 -35
- package/dist/dashboard/app/pages/UsersPage.js +14 -14
- package/dist/dashboard/app/ui/DashboardModal.js +17 -16
- package/dist/dashboard/atoms/dashboard.js +1 -1
- package/dist/dashboard/atoms/entry.js +1 -14
- package/dist/dashboard/atoms/entryTable.js +1 -0
- package/dist/dashboard/atoms/explorer.d.ts +4 -0
- package/dist/dashboard/atoms/explorer.js +19 -7
- package/dist/dashboard/atoms/graph.js +1 -1
- package/dist/dashboard/atoms/link.js +5 -2
- package/dist/dashboard/atoms/move.d.ts +5 -0
- package/dist/dashboard/atoms/move.js +29 -3
- package/dist/dashboard/atoms/moveConfirmation.d.ts +34 -0
- package/dist/dashboard/atoms/moveConfirmation.js +95 -0
- package/dist/dashboard/atoms/nav.d.ts +9 -5
- package/dist/dashboard/atoms/nav.js +120 -45
- package/dist/dashboard/atoms/overview.d.ts +6 -5
- package/dist/dashboard/atoms/overview.js +2 -16
- package/dist/dashboard/atoms/remove.d.ts +112 -0
- package/dist/dashboard/atoms/remove.js +268 -0
- package/dist/dashboard/atoms/root.d.ts +2 -2
- package/dist/dashboard/atoms/root.js +41 -26
- package/dist/dashboard/atoms/user.js +1 -1
- package/dist/dashboard/atoms/utils.js +1 -1
- package/dist/dashboard/boot/Boot.js +25 -17
- package/dist/dashboard/boot/BootProd.d.ts +6 -1
- package/dist/dashboard/boot/BootProd.js +2 -2
- package/dist/dashboard/boot/DashboardWorker.d.ts +1 -0
- package/dist/dashboard/boot/DashboardWorker.js +18 -18
- package/dist/dashboard/boot/LoadWorker.js +17 -10
- package/dist/dashboard/cms/EntryTable.js +6 -3
- package/dist/database/BrowserEntryStore.d.ts +17 -29
- package/dist/database/BrowserEntryStore.js +116 -144
- package/dist/database/DatabaseTables.js +2 -2
- package/dist/database/EntryDatabase.js +21 -1
- package/dist/database/EntryTransaction.js +0 -35
- package/dist/database/EntryUrlAliases.d.ts +4 -0
- package/dist/database/EntryUrlAliases.js +16 -10
- package/dist/database/driver/RuntimeDatabase.js +3 -3
- package/dist/database/driver/WasmDatabase.d.ts +5 -18
- package/dist/database/driver/WasmDatabase.js +15 -16
- package/dist/database/entry/EntryTable.js +2 -2
- package/dist/database/query/EntryQuery.js +1 -1
- package/dist/database/query/Relation.js +1 -1
- package/dist/database/query/Search.js +2 -2
- package/dist/field/check/CheckField.view.js +2 -2
- package/dist/field/code/CodeField.view.js +14 -14
- package/dist/field/link/EntryLink.d.ts +4 -4
- package/dist/field/link/FileLink.d.ts +4 -4
- package/dist/field/link/ImageLink.d.ts +4 -4
- package/dist/field/link/Link.d.ts +1 -1
- package/dist/field/link/LinkField.d.ts +5 -0
- package/dist/field/link/LinkField.view.js +246 -372
- package/dist/field/link/UrlLink.d.ts +4 -4
- package/dist/field/list/ListField.d.ts +2 -0
- package/dist/field/list/ListField.view.d.ts +15 -0
- package/dist/field/list/ListField.view.js +343 -301
- package/dist/field/metadata/MetadataField.d.ts +17 -7
- package/dist/field/metadata/MetadataField.js +14 -3
- package/dist/field/metadata/MetadataField.view.d.ts +1 -0
- package/dist/field/metadata/MetadataField.view.js +27 -23
- package/dist/field/richtext/RichTextBlock.d.ts +3 -1
- package/dist/field/richtext/RichTextBlock.js +178 -75
- package/dist/field/richtext/RichTextBlockHost.js +1 -1
- package/dist/field/richtext/RichTextExtensions.js +35 -35
- package/dist/field/richtext/RichTextField.view.js +14 -8
- package/dist/field/richtext/RichTextInsertMenu.js +43 -27
- package/dist/field/views.js +2 -0
- package/dist/index.css +490 -309
- package/dist/picker/url/UrlPicker.js +1 -0
- package/docs/components/badge.md +1 -0
- package/docs/components/button.md +1 -0
- package/docs/components/content-card.md +1 -0
- package/docs/components/search-field.md +1 -0
- package/docs/components/sortable-list.md +5 -20
- package/docs/components/table.md +1 -0
- package/docs/configuration.md +1 -1
- package/docs/deploy/self-host.md +1 -1
- package/docs/deploy.md +5 -4
- package/docs/fields.md +1 -1
- package/docs/index.md +1 -1
- package/docs/instant-publishing.md +7 -22
- package/docs/overviews.md +3 -4
- package/docs/upgrading.md +3 -2
- package/llms-full.txt +31 -55
- package/package.json +2 -3
- package/dist/core/db/EntryValidationError.d.ts +0 -13
- package/dist/core/db/EntryValidationError.js +0 -23
- package/dist/dashboard/app/DeleteDialog.d.ts +0 -11
- package/dist/dashboard/atoms/delete.d.ts +0 -68
- package/dist/dashboard/atoms/delete.js +0 -143
- package/dist/chunks/{chunk-MOWR65LM.js → chunk-PYDOMKJZ.js} +71 -71
|
@@ -27,20 +27,20 @@ import {
|
|
|
27
27
|
import {
|
|
28
28
|
EntryUrlConflictError
|
|
29
29
|
} from "alinea/core/db/EntryUrlConflictError";
|
|
30
|
-
import { EntryValidationError } from "alinea/core/db/EntryValidationError";
|
|
31
30
|
import { getType } from "alinea/core/Internal";
|
|
32
31
|
import { MediaFile, MediaLibrary } from "alinea/core/media/MediaTypes";
|
|
33
32
|
import { assert } from "alinea/core/util/Assert";
|
|
34
33
|
import { isRecord } from "alinea/core/util/Objects";
|
|
35
34
|
import { activityAtom } from "../atoms/activity.js";
|
|
36
35
|
import { configAtom } from "../atoms/core.js";
|
|
36
|
+
import { loadMoveTargetsAtom } from "../atoms/move.js";
|
|
37
|
+
import { routeAtom } from "../atoms/nav.js";
|
|
37
38
|
import {
|
|
39
|
+
archiveDirectlyAtom,
|
|
38
40
|
archiveEntriesAtom,
|
|
39
41
|
deleteEntriesAtom,
|
|
40
|
-
|
|
41
|
-
} from "../atoms/
|
|
42
|
-
import { loadMoveTargetsAtom } from "../atoms/move.js";
|
|
43
|
-
import { routeAtom } from "../atoms/nav.js";
|
|
42
|
+
loadRemovePlanAtom
|
|
43
|
+
} from "../atoms/remove.js";
|
|
44
44
|
import { policyAtom } from "../atoms/user.js";
|
|
45
45
|
import { useSaveShortcut } from "../hook/UseSaveShortcut.js";
|
|
46
46
|
import {
|
|
@@ -62,21 +62,20 @@ import {
|
|
|
62
62
|
IcRoundSync,
|
|
63
63
|
IcRoundVisibilityOff
|
|
64
64
|
} from "../icons.js";
|
|
65
|
-
import { DeleteDialog } from "./DeleteDialog.js";
|
|
66
65
|
|
|
67
66
|
// src/dashboard/app/EntryHeader.module.css
|
|
68
67
|
var EntryHeader_default = {
|
|
69
|
-
"EntryHeader-status": "alinea-EntryHeader-status",
|
|
70
|
-
"EntryHeaderStatus": "alinea-EntryHeader-status",
|
|
71
68
|
"EntryHeader": "alinea-EntryHeader",
|
|
72
|
-
"EntryHeader-actions": "alinea-EntryHeader-actions",
|
|
73
|
-
"EntryHeaderActions": "alinea-EntryHeader-actions",
|
|
74
69
|
"is-dirty": "alinea-is-dirty",
|
|
75
70
|
"isDirty": "alinea-is-dirty",
|
|
71
|
+
"EntryHeader-actions": "alinea-EntryHeader-actions",
|
|
72
|
+
"EntryHeaderActions": "alinea-EntryHeader-actions",
|
|
76
73
|
"EntryHeader-type": "alinea-EntryHeader-type",
|
|
77
74
|
"EntryHeaderType": "alinea-EntryHeader-type",
|
|
78
75
|
"EntryHeader-sidebarToggle": "alinea-EntryHeader-sidebarToggle",
|
|
79
|
-
"EntryHeaderSidebarToggle": "alinea-EntryHeader-sidebarToggle"
|
|
76
|
+
"EntryHeaderSidebarToggle": "alinea-EntryHeader-sidebarToggle",
|
|
77
|
+
"EntryHeader-status": "alinea-EntryHeader-status",
|
|
78
|
+
"EntryHeaderStatus": "alinea-EntryHeader-status"
|
|
80
79
|
};
|
|
81
80
|
|
|
82
81
|
// src/dashboard/app/EntryHeader.tsx
|
|
@@ -90,6 +89,7 @@ import {
|
|
|
90
89
|
} from "./EntryValidationModal.js";
|
|
91
90
|
import { MoveDialog } from "./MoveDialog.js";
|
|
92
91
|
import { ReadOnlyBadge } from "./ReadOnlyBadge.js";
|
|
92
|
+
import { RemoveDialog } from "./RemoveDialog.js";
|
|
93
93
|
import {
|
|
94
94
|
DashboardModal,
|
|
95
95
|
DashboardModalContent,
|
|
@@ -143,15 +143,6 @@ function entryUrlConflictInfo(error) {
|
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
|
-
function entryValidationFailure(error) {
|
|
147
|
-
if (error instanceof EntryValidationError)
|
|
148
|
-
return { errors: error.info.errors, message: error.message };
|
|
149
|
-
if (!isRecord(error) || error.name !== "EntryValidationError") return;
|
|
150
|
-
const info = error.info;
|
|
151
|
-
if (isRecord(info) && Array.isArray(info.errors))
|
|
152
|
-
return { errors: info.errors };
|
|
153
|
-
return { message: typeof error.message === "string" ? error.message : "" };
|
|
154
|
-
}
|
|
155
146
|
var variantDescription = {
|
|
156
147
|
published: "Published",
|
|
157
148
|
unpublished: "Unpublished",
|
|
@@ -210,7 +201,7 @@ function EntryHeader({
|
|
|
210
201
|
const unpublish = useSetAtom(localeData.unpublish);
|
|
211
202
|
const archive = useSetAtom(localeData.archive);
|
|
212
203
|
const publishArchived = useSetAtom(localeData.publishArchived);
|
|
213
|
-
const
|
|
204
|
+
const loadRemovePlan = useSetAtom(loadRemovePlanAtom);
|
|
214
205
|
const loadMoveTargets = useSetAtom(loadMoveTargetsAtom);
|
|
215
206
|
const deleteEntries = useSetAtom(deleteEntriesAtom);
|
|
216
207
|
const archiveEntries = useSetAtom(archiveEntriesAtom);
|
|
@@ -239,31 +230,37 @@ function EntryHeader({
|
|
|
239
230
|
const [urlConflict, setUrlConflict] = useState();
|
|
240
231
|
const [invalid, setInvalid] = useState();
|
|
241
232
|
const [moving, setMoving] = useState();
|
|
242
|
-
const [
|
|
233
|
+
const [removing, setRemoving] = useState();
|
|
243
234
|
function runAction(action) {
|
|
244
235
|
startTransition(async () => {
|
|
245
236
|
try {
|
|
246
237
|
await action();
|
|
247
238
|
} catch (error) {
|
|
248
239
|
const conflict = entryUrlConflictInfo(error);
|
|
249
|
-
const failure = entryValidationFailure(error);
|
|
250
240
|
if (conflict) setUrlConflict(conflict);
|
|
251
|
-
else if (failure) setInvalid(failure);
|
|
252
241
|
else throw error;
|
|
253
242
|
}
|
|
254
243
|
});
|
|
255
244
|
}
|
|
256
245
|
function runPublish(action) {
|
|
257
246
|
const errors = store.get(localeData.errors(node));
|
|
258
|
-
if (errors.length > 0) setInvalid({ errors });
|
|
247
|
+
if (errors.length > 0) setInvalid({ errors, publish: action });
|
|
259
248
|
else runAction(action);
|
|
260
249
|
}
|
|
261
250
|
async function openDeleteDialog() {
|
|
262
251
|
assert(activeVersion);
|
|
263
252
|
const locale = untranslated ? localeData.requestedLocale : activeVersion.locale;
|
|
264
|
-
|
|
265
|
-
|
|
253
|
+
const plan = await loadRemovePlan(
|
|
254
|
+
[{ ...activeVersion, hasChildren, locale }],
|
|
255
|
+
locales
|
|
266
256
|
);
|
|
257
|
+
setRemoving({ action: "delete", plan });
|
|
258
|
+
}
|
|
259
|
+
async function openArchiveDialog() {
|
|
260
|
+
assert(activeVersion);
|
|
261
|
+
if (store.get(archiveDirectlyAtom)) return archive();
|
|
262
|
+
const plan = await loadRemovePlan([{ ...activeVersion, hasChildren }]);
|
|
263
|
+
setRemoving({ action: "archive", plan });
|
|
267
264
|
}
|
|
268
265
|
async function deleteAndNavigate(plan) {
|
|
269
266
|
assert(activeVersion);
|
|
@@ -440,7 +437,7 @@ function EntryHeader({
|
|
|
440
437
|
menuItems.push({
|
|
441
438
|
id: "archive",
|
|
442
439
|
label: "Archive",
|
|
443
|
-
action:
|
|
440
|
+
action: openArchiveDialog,
|
|
444
441
|
icon: IcRoundArchive
|
|
445
442
|
});
|
|
446
443
|
if (actions.publish)
|
|
@@ -537,16 +534,18 @@ function EntryHeader({
|
|
|
537
534
|
EntryValidationModal,
|
|
538
535
|
{
|
|
539
536
|
failure: invalid,
|
|
540
|
-
onClose: () => setInvalid(void 0)
|
|
537
|
+
onClose: () => setInvalid(void 0),
|
|
538
|
+
onPublish: runAction
|
|
541
539
|
}
|
|
542
540
|
),
|
|
543
541
|
/* @__PURE__ */ jsx(MoveDialog, { targets: moving, onClose: () => setMoving(void 0) }),
|
|
544
542
|
/* @__PURE__ */ jsx(
|
|
545
|
-
|
|
543
|
+
RemoveDialog,
|
|
546
544
|
{
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
545
|
+
action: removing?.action ?? "delete",
|
|
546
|
+
plan: removing?.plan,
|
|
547
|
+
onClose: () => setRemoving(void 0),
|
|
548
|
+
onConfirm: removing?.action === "archive" ? archiveEntries : deleteAndNavigate,
|
|
550
549
|
onArchive: archiveEntries
|
|
551
550
|
}
|
|
552
551
|
)
|
|
@@ -27,13 +27,13 @@ import { IcRoundLink, LucideFile } from "../icons.js";
|
|
|
27
27
|
|
|
28
28
|
// src/dashboard/app/EntryReferences.module.css
|
|
29
29
|
var EntryReferences_default = {
|
|
30
|
+
"EntryReferences-tab": "alinea-EntryReferences-tab",
|
|
31
|
+
"EntryReferencesTab": "alinea-EntryReferences-tab",
|
|
30
32
|
"EntryReferences": "alinea-EntryReferences",
|
|
31
33
|
"EntryReferences-trailing": "alinea-EntryReferences-trailing",
|
|
32
34
|
"EntryReferencesTrailing": "alinea-EntryReferences-trailing",
|
|
33
35
|
"EntryReferences-list": "alinea-EntryReferences-list",
|
|
34
|
-
"EntryReferencesList": "alinea-EntryReferences-list"
|
|
35
|
-
"EntryReferences-tab": "alinea-EntryReferences-tab",
|
|
36
|
-
"EntryReferencesTab": "alinea-EntryReferences-tab"
|
|
36
|
+
"EntryReferencesList": "alinea-EntryReferences-list"
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
// src/dashboard/app/EntryReferences.tsx
|
|
@@ -104,9 +104,9 @@ function EntryReferenceItem({ item, onClick }) {
|
|
|
104
104
|
/* @__PURE__ */ jsx(ListItemTitle, { children: source.title }),
|
|
105
105
|
/* @__PURE__ */ jsxs(ListItemDescription, { children: [
|
|
106
106
|
formatFields(item.fields),
|
|
107
|
+
item.locale && ` \xB7 ${formatLocale(item.locale)}`,
|
|
107
108
|
" \xB7 ",
|
|
108
|
-
source.path
|
|
109
|
-
item.locale && ` \xB7 ${formatLocale(item.locale)}`
|
|
109
|
+
source.path
|
|
110
110
|
] })
|
|
111
111
|
]
|
|
112
112
|
}
|
|
@@ -61,24 +61,24 @@ var EntrySidebar_default = {
|
|
|
61
61
|
"EntrySidebarDisclosureTrigger": "alinea-EntrySidebar-disclosureTrigger",
|
|
62
62
|
"EntrySidebar-body": "alinea-EntrySidebar-body",
|
|
63
63
|
"EntrySidebarBody": "alinea-EntrySidebar-body",
|
|
64
|
-
"EntrySidebar-section": "alinea-EntrySidebar-section",
|
|
65
|
-
"EntrySidebarSection": "alinea-EntrySidebar-section",
|
|
66
64
|
"EntrySidebar-disclosurePanel": "alinea-EntrySidebar-disclosurePanel",
|
|
67
65
|
"EntrySidebarDisclosurePanel": "alinea-EntrySidebar-disclosurePanel",
|
|
68
66
|
"EntrySidebar-tabs": "alinea-EntrySidebar-tabs",
|
|
69
67
|
"EntrySidebarTabs": "alinea-EntrySidebar-tabs",
|
|
70
68
|
"EntrySidebar-previewPanel": "alinea-EntrySidebar-previewPanel",
|
|
71
69
|
"EntrySidebarPreviewPanel": "alinea-EntrySidebar-previewPanel",
|
|
72
|
-
"EntrySidebar-referencesPanel": "alinea-EntrySidebar-referencesPanel",
|
|
73
|
-
"EntrySidebarReferencesPanel": "alinea-EntrySidebar-referencesPanel",
|
|
74
70
|
"EntrySidebar-historyPanel": "alinea-EntrySidebar-historyPanel",
|
|
75
71
|
"EntrySidebarHistoryPanel": "alinea-EntrySidebar-historyPanel",
|
|
76
|
-
"EntrySidebar-
|
|
77
|
-
"
|
|
72
|
+
"EntrySidebar-history": "alinea-EntrySidebar-history",
|
|
73
|
+
"EntrySidebarHistory": "alinea-EntrySidebar-history",
|
|
78
74
|
"EntrySidebar-loading": "alinea-EntrySidebar-loading",
|
|
79
75
|
"EntrySidebarLoading": "alinea-EntrySidebar-loading",
|
|
80
|
-
"EntrySidebar-
|
|
81
|
-
"
|
|
76
|
+
"EntrySidebar-section": "alinea-EntrySidebar-section",
|
|
77
|
+
"EntrySidebarSection": "alinea-EntrySidebar-section",
|
|
78
|
+
"EntrySidebar-disclosure": "alinea-EntrySidebar-disclosure",
|
|
79
|
+
"EntrySidebarDisclosure": "alinea-EntrySidebar-disclosure",
|
|
80
|
+
"EntrySidebar-referencesPanel": "alinea-EntrySidebar-referencesPanel",
|
|
81
|
+
"EntrySidebarReferencesPanel": "alinea-EntrySidebar-referencesPanel"
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
// src/dashboard/app/EntrySidebar.tsx
|
|
@@ -20,11 +20,11 @@ import { IcRoundVisibilityOff } from "../icons.js";
|
|
|
20
20
|
|
|
21
21
|
// src/dashboard/app/EntrySidebarPreview.module.css
|
|
22
22
|
var EntrySidebarPreview_default = {
|
|
23
|
-
"EntrySidebarPreview-empty": "alinea-EntrySidebarPreview-empty",
|
|
24
|
-
"EntrySidebarPreviewEmpty": "alinea-EntrySidebarPreview-empty",
|
|
25
|
-
"EntrySidebarPreview": "alinea-EntrySidebarPreview",
|
|
26
23
|
"EntrySidebarPreview-component": "alinea-EntrySidebarPreview-component",
|
|
27
|
-
"EntrySidebarPreviewComponent": "alinea-EntrySidebarPreview-component"
|
|
24
|
+
"EntrySidebarPreviewComponent": "alinea-EntrySidebarPreview-component",
|
|
25
|
+
"EntrySidebarPreview": "alinea-EntrySidebarPreview",
|
|
26
|
+
"EntrySidebarPreview-empty": "alinea-EntrySidebarPreview-empty",
|
|
27
|
+
"EntrySidebarPreviewEmpty": "alinea-EntrySidebarPreview-empty"
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
// src/dashboard/app/EntrySidebarPreview.tsx
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type IconType } from 'alinea/components';
|
|
2
|
+
import type { EntryStatus } from 'alinea/core/Entry';
|
|
3
|
+
export interface EntryStatusDisplay {
|
|
4
|
+
icon: IconType;
|
|
5
|
+
label: string;
|
|
6
|
+
status: 'draft' | 'unpublished' | 'archived' | 'untranslated';
|
|
7
|
+
}
|
|
8
|
+
/** A listed version of an entry, its draft when it has one */
|
|
9
|
+
export interface ListedEntry {
|
|
10
|
+
status?: EntryStatus;
|
|
11
|
+
/** The version is the main one, a draft then was never published */
|
|
12
|
+
main?: boolean;
|
|
13
|
+
locale: string | null;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* How a listed entry differs from a published one, undefined when it does
|
|
17
|
+
* not. With a locale, entries of another locale are untranslated.
|
|
18
|
+
*/
|
|
19
|
+
export declare function entryStatus(entry: ListedEntry, locale?: string | null): EntryStatusDisplay | undefined;
|
|
20
|
+
export interface EntryStatusIconProps {
|
|
21
|
+
status: EntryStatusDisplay;
|
|
22
|
+
}
|
|
23
|
+
export declare function EntryStatusIcon({ status }: EntryStatusIconProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import {
|
|
2
|
+
dist_default
|
|
3
|
+
} from "../../chunks/chunk-I4OYYAX5.js";
|
|
4
|
+
import "../../chunks/chunk-CQ52GEHY.js";
|
|
5
|
+
|
|
6
|
+
// src/dashboard/app/EntryStatusIcon.tsx
|
|
7
|
+
import { Icon } from "alinea/components";
|
|
8
|
+
import {
|
|
9
|
+
IcOutlineArchive,
|
|
10
|
+
IcRoundEdit,
|
|
11
|
+
IcRoundTranslate,
|
|
12
|
+
RiFlashlightFill
|
|
13
|
+
} from "../icons.js";
|
|
14
|
+
|
|
15
|
+
// src/dashboard/app/EntryStatusIcon.module.css
|
|
16
|
+
var EntryStatusIcon_default = {
|
|
17
|
+
"EntryStatusIcon-icon": "alinea-EntryStatusIcon-icon",
|
|
18
|
+
"EntryStatusIconIcon": "alinea-EntryStatusIcon-icon",
|
|
19
|
+
"is-draft": "alinea-is-draft",
|
|
20
|
+
"isDraft": "alinea-is-draft",
|
|
21
|
+
"is-unpublished": "alinea-is-unpublished",
|
|
22
|
+
"isUnpublished": "alinea-is-unpublished",
|
|
23
|
+
"EntryStatusIcon": "alinea-EntryStatusIcon"
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
// src/dashboard/app/EntryStatusIcon.tsx
|
|
27
|
+
import { jsx } from "react/jsx-runtime";
|
|
28
|
+
var styles = dist_default(EntryStatusIcon_default);
|
|
29
|
+
function entryStatus(entry, locale = null) {
|
|
30
|
+
if (locale && entry.locale !== locale)
|
|
31
|
+
return {
|
|
32
|
+
icon: IcRoundTranslate,
|
|
33
|
+
label: "Untranslated",
|
|
34
|
+
status: "untranslated"
|
|
35
|
+
};
|
|
36
|
+
if (entry.status === "archived")
|
|
37
|
+
return { icon: IcOutlineArchive, label: "Archived", status: "archived" };
|
|
38
|
+
if (entry.status === "draft" && entry.main)
|
|
39
|
+
return { icon: RiFlashlightFill, label: "Unpublished", status: "unpublished" };
|
|
40
|
+
if (entry.status === "draft")
|
|
41
|
+
return { icon: IcRoundEdit, label: "Draft", status: "draft" };
|
|
42
|
+
}
|
|
43
|
+
function EntryStatusIcon({ status }) {
|
|
44
|
+
return /* @__PURE__ */ jsx(
|
|
45
|
+
"span",
|
|
46
|
+
{
|
|
47
|
+
className: styles.EntryStatusIcon({ [status.status]: true }),
|
|
48
|
+
"aria-label": status.label,
|
|
49
|
+
role: "img",
|
|
50
|
+
title: status.label,
|
|
51
|
+
children: /* @__PURE__ */ jsx(Icon, { icon: status.icon, className: styles.EntryStatusIcon.icon() })
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
export {
|
|
56
|
+
EntryStatusIcon,
|
|
57
|
+
entryStatus
|
|
58
|
+
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { FieldValidationError } from 'alinea/core/Validation';
|
|
2
2
|
export interface EntryValidationFailure {
|
|
3
|
-
errors
|
|
4
|
-
/**
|
|
5
|
-
|
|
3
|
+
errors: Array<FieldValidationError>;
|
|
4
|
+
/** Publishes the entry as it is */
|
|
5
|
+
publish(): void | Promise<void>;
|
|
6
6
|
}
|
|
7
7
|
export interface EntryValidationModalProps {
|
|
8
8
|
failure?: EntryValidationFailure;
|
|
9
9
|
onClose(): void;
|
|
10
|
+
onPublish(publish: () => void | Promise<void>): void;
|
|
10
11
|
}
|
|
11
|
-
/**
|
|
12
|
-
export declare function EntryValidationModal({ failure, onClose }: EntryValidationModalProps): import("react").JSX.Element;
|
|
12
|
+
/** Lists the invalid fields of an entry about to be published */
|
|
13
|
+
export declare function EntryValidationModal({ failure, onClose, onPublish }: EntryValidationModalProps): import("react").JSX.Element;
|
|
@@ -11,9 +11,7 @@ var EntryValidationModal_default = {
|
|
|
11
11
|
"EntryValidationModal-list": "alinea-EntryValidationModal-list",
|
|
12
12
|
"EntryValidationModalList": "alinea-EntryValidationModal-list",
|
|
13
13
|
"EntryValidationModal-item": "alinea-EntryValidationModal-item",
|
|
14
|
-
"EntryValidationModalItem": "alinea-EntryValidationModal-item"
|
|
15
|
-
"EntryValidationModal-message": "alinea-EntryValidationModal-message",
|
|
16
|
-
"EntryValidationModalMessage": "alinea-EntryValidationModal-message"
|
|
14
|
+
"EntryValidationModalItem": "alinea-EntryValidationModal-item"
|
|
17
15
|
};
|
|
18
16
|
|
|
19
17
|
// src/dashboard/app/EntryValidationModal.tsx
|
|
@@ -38,13 +36,19 @@ function focusFirstInvalidField() {
|
|
|
38
36
|
}
|
|
39
37
|
function EntryValidationModal({
|
|
40
38
|
failure,
|
|
41
|
-
onClose
|
|
39
|
+
onClose,
|
|
40
|
+
onPublish
|
|
42
41
|
}) {
|
|
43
42
|
const isOpen = Boolean(failure);
|
|
44
43
|
function close() {
|
|
45
44
|
onClose();
|
|
46
45
|
requestAnimationFrame(focusFirstInvalidField);
|
|
47
46
|
}
|
|
47
|
+
function publishAnyway() {
|
|
48
|
+
if (!failure) return;
|
|
49
|
+
onClose();
|
|
50
|
+
onPublish(failure.publish);
|
|
51
|
+
}
|
|
48
52
|
return /* @__PURE__ */ jsx(
|
|
49
53
|
DashboardModal,
|
|
50
54
|
{
|
|
@@ -52,22 +56,18 @@ function EntryValidationModal({
|
|
|
52
56
|
onOpenChange: (open) => {
|
|
53
57
|
if (!open) close();
|
|
54
58
|
},
|
|
55
|
-
children: isOpen && /* @__PURE__ */ jsxs(DashboardModalDialog, { label: "
|
|
59
|
+
children: isOpen && /* @__PURE__ */ jsxs(DashboardModalDialog, { label: "Some fields are invalid", children: [
|
|
56
60
|
/* @__PURE__ */ jsxs(DashboardModalContent, { children: [
|
|
57
|
-
/* @__PURE__ */ jsx(Text, { as: "p", children: "
|
|
58
|
-
|
|
59
|
-
"
|
|
60
|
-
{
|
|
61
|
-
|
|
62
|
-
children: [
|
|
63
|
-
/* @__PURE__ */ jsx(Text, { weight: "medium", children: error.labels.join(" \u203A ") }),
|
|
64
|
-
/* @__PURE__ */ jsx(Text, { color: "destructive", children: error.message })
|
|
65
|
-
]
|
|
66
|
-
},
|
|
67
|
-
index
|
|
68
|
-
)) }) : /* @__PURE__ */ jsx(Text, { as: "p", className: styles.EntryValidationModal.message(), children: failure?.message })
|
|
61
|
+
/* @__PURE__ */ jsx(Text, { as: "p", children: "Fix these fields before publishing, or publish the entry as it is." }),
|
|
62
|
+
/* @__PURE__ */ jsx("ul", { className: styles.EntryValidationModal.list(), children: failure?.errors.map((error, index) => /* @__PURE__ */ jsxs("li", { className: styles.EntryValidationModal.item(), children: [
|
|
63
|
+
/* @__PURE__ */ jsx(Text, { weight: "medium", children: error.labels.join(" \u203A ") }),
|
|
64
|
+
/* @__PURE__ */ jsx(Text, { color: "destructive", children: error.message })
|
|
65
|
+
] }, index)) })
|
|
69
66
|
] }),
|
|
70
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ jsxs(DashboardModalFooter, { children: [
|
|
68
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", onClick: publishAnyway, children: "Publish anyway" }),
|
|
69
|
+
/* @__PURE__ */ jsx(Button, { color: "primary", onClick: close, children: "Show fields" })
|
|
70
|
+
] })
|
|
71
71
|
] })
|
|
72
72
|
}
|
|
73
73
|
);
|
|
@@ -35,6 +35,8 @@ export interface ExplorerBodyProps {
|
|
|
35
35
|
*/
|
|
36
36
|
onPick?: (entry: DashboardEntry) => void;
|
|
37
37
|
page: ExplorerReadyPage;
|
|
38
|
+
/** Floats over the list, such as the actions on the selected entries */
|
|
39
|
+
children?: ReactNode;
|
|
38
40
|
}
|
|
39
41
|
interface ExplorerSearchProps {
|
|
40
42
|
autoFocus?: boolean;
|
|
@@ -45,6 +47,6 @@ interface ExplorerSearchProps {
|
|
|
45
47
|
}
|
|
46
48
|
export declare function ExplorerSearch({ autoFocus, explorer, onEntryAction, onEscape, page }: ExplorerSearchProps): import("react").JSX.Element;
|
|
47
49
|
export declare function ExplorerHeader({ canBrowse, autoFocusSearch, onSearchEscape, controls, explorer, headerEntry, navigate, page, readOnly, titleControls }: ExplorerHeaderProps): import("react").JSX.Element;
|
|
48
|
-
export declare function ExplorerBody({ compactTable, explorer, onPick, page }: ExplorerBodyProps): import("react").JSX.Element;
|
|
50
|
+
export declare function ExplorerBody({ compactTable, explorer, onPick, page, children }: ExplorerBodyProps): import("react").JSX.Element;
|
|
49
51
|
export declare function Explorer({ controls, explorer, headerEntry, page: loadedPage, readOnly, titleControls }: ExplorerProps): import("react").JSX.Element;
|
|
50
52
|
export {};
|
|
@@ -54,55 +54,55 @@ import {
|
|
|
54
54
|
|
|
55
55
|
// src/dashboard/app/Explorer.module.css
|
|
56
56
|
var Explorer_default = {
|
|
57
|
-
"Explorer-toolbar-mediaActions": "alinea-Explorer-toolbar-mediaActions",
|
|
58
|
-
"ExplorerToolbarMediaActions": "alinea-Explorer-toolbar-mediaActions",
|
|
59
|
-
"ExplorerHeader": "alinea-ExplorerHeader",
|
|
60
57
|
"ExplorerHeader-primary": "alinea-ExplorerHeader-primary",
|
|
61
58
|
"ExplorerHeaderPrimary": "alinea-ExplorerHeader-primary",
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"Explorer-locationBreadcrumbs-separator": "alinea-Explorer-locationBreadcrumbs-separator",
|
|
65
|
-
"ExplorerLocationBreadcrumbsSeparator": "alinea-Explorer-locationBreadcrumbs-separator",
|
|
66
|
-
"Explorer-toolbar-tools": "alinea-Explorer-toolbar-tools",
|
|
67
|
-
"ExplorerToolbarTools": "alinea-Explorer-toolbar-tools",
|
|
68
|
-
"Explorer-locationBreadcrumbs-root-locale": "alinea-Explorer-locationBreadcrumbs-root-locale",
|
|
69
|
-
"ExplorerLocationBreadcrumbsRootLocale": "alinea-Explorer-locationBreadcrumbs-root-locale",
|
|
70
|
-
"Explorer-locationBreadcrumbs-parentValue": "alinea-Explorer-locationBreadcrumbs-parentValue",
|
|
71
|
-
"ExplorerLocationBreadcrumbsParentValue": "alinea-Explorer-locationBreadcrumbs-parentValue",
|
|
59
|
+
"ExplorerHeader-location": "alinea-ExplorerHeader-location",
|
|
60
|
+
"ExplorerHeaderLocation": "alinea-ExplorerHeader-location",
|
|
72
61
|
"ExplorerHeader-main": "alinea-ExplorerHeader-main",
|
|
73
62
|
"ExplorerHeaderMain": "alinea-ExplorerHeader-main",
|
|
74
|
-
"
|
|
75
|
-
"ExplorerLocationBreadcrumbsLocaleValue": "alinea-Explorer-locationBreadcrumbs-localeValue",
|
|
76
|
-
"Explorer-locationBreadcrumbs-current": "alinea-Explorer-locationBreadcrumbs-current",
|
|
77
|
-
"ExplorerLocationBreadcrumbsCurrent": "alinea-Explorer-locationBreadcrumbs-current",
|
|
78
|
-
"Explorer-searchScope": "alinea-Explorer-searchScope",
|
|
79
|
-
"ExplorerSearchScope": "alinea-Explorer-searchScope",
|
|
63
|
+
"ExplorerHeader": "alinea-ExplorerHeader",
|
|
80
64
|
"ExplorerHeader-content": "alinea-ExplorerHeader-content",
|
|
81
65
|
"ExplorerHeaderContent": "alinea-ExplorerHeader-content",
|
|
82
|
-
"Explorer-
|
|
83
|
-
"
|
|
84
|
-
"Explorer-toolbar": "alinea-Explorer-toolbar",
|
|
85
|
-
"ExplorerToolbar": "alinea-Explorer-toolbar",
|
|
66
|
+
"Explorer-toolbar-tools": "alinea-Explorer-toolbar-tools",
|
|
67
|
+
"ExplorerToolbarTools": "alinea-Explorer-toolbar-tools",
|
|
86
68
|
"is-navigation": "alinea-is-navigation",
|
|
87
69
|
"isNavigation": "alinea-is-navigation",
|
|
88
|
-
"Explorer-
|
|
89
|
-
"
|
|
90
|
-
"Explorer-
|
|
91
|
-
"
|
|
70
|
+
"Explorer-search": "alinea-Explorer-search",
|
|
71
|
+
"ExplorerSearch": "alinea-Explorer-search",
|
|
72
|
+
"Explorer-resultMode": "alinea-Explorer-resultMode",
|
|
73
|
+
"ExplorerResultMode": "alinea-Explorer-resultMode",
|
|
74
|
+
"Explorer-viewport": "alinea-Explorer-viewport",
|
|
75
|
+
"ExplorerViewport": "alinea-Explorer-viewport",
|
|
92
76
|
"Explorer-locationBreadcrumbs": "alinea-Explorer-locationBreadcrumbs",
|
|
93
77
|
"ExplorerLocationBreadcrumbs": "alinea-Explorer-locationBreadcrumbs",
|
|
94
|
-
"Explorer-locationBreadcrumbs-
|
|
95
|
-
"
|
|
78
|
+
"Explorer-locationBreadcrumbs-value": "alinea-Explorer-locationBreadcrumbs-value",
|
|
79
|
+
"ExplorerLocationBreadcrumbsValue": "alinea-Explorer-locationBreadcrumbs-value",
|
|
80
|
+
"Explorer-actions": "alinea-Explorer-actions",
|
|
81
|
+
"ExplorerActions": "alinea-Explorer-actions",
|
|
82
|
+
"Explorer-locationBreadcrumbs-separator": "alinea-Explorer-locationBreadcrumbs-separator",
|
|
83
|
+
"ExplorerLocationBreadcrumbsSeparator": "alinea-Explorer-locationBreadcrumbs-separator",
|
|
84
|
+
"Explorer-locationBreadcrumbs-localeValue": "alinea-Explorer-locationBreadcrumbs-localeValue",
|
|
85
|
+
"ExplorerLocationBreadcrumbsLocaleValue": "alinea-Explorer-locationBreadcrumbs-localeValue",
|
|
86
|
+
"Explorer-locationBreadcrumbs-current": "alinea-Explorer-locationBreadcrumbs-current",
|
|
87
|
+
"ExplorerLocationBreadcrumbsCurrent": "alinea-Explorer-locationBreadcrumbs-current",
|
|
88
|
+
"Explorer-locationBreadcrumbs-parentValue": "alinea-Explorer-locationBreadcrumbs-parentValue",
|
|
89
|
+
"ExplorerLocationBreadcrumbsParentValue": "alinea-Explorer-locationBreadcrumbs-parentValue",
|
|
96
90
|
"Explorer-locationBreadcrumbs-item": "alinea-Explorer-locationBreadcrumbs-item",
|
|
97
91
|
"ExplorerLocationBreadcrumbsItem": "alinea-Explorer-locationBreadcrumbs-item",
|
|
98
|
-
"
|
|
99
|
-
"
|
|
92
|
+
"Explorer-toolbar": "alinea-Explorer-toolbar",
|
|
93
|
+
"ExplorerToolbar": "alinea-Explorer-toolbar",
|
|
94
|
+
"Explorer-toolbar-mediaActions": "alinea-Explorer-toolbar-mediaActions",
|
|
95
|
+
"ExplorerToolbarMediaActions": "alinea-Explorer-toolbar-mediaActions",
|
|
96
|
+
"Explorer-searchScope": "alinea-Explorer-searchScope",
|
|
97
|
+
"ExplorerSearchScope": "alinea-Explorer-searchScope",
|
|
100
98
|
"Explorer-locationBreadcrumbs-parentAction": "alinea-Explorer-locationBreadcrumbs-parentAction",
|
|
101
99
|
"ExplorerLocationBreadcrumbsParentAction": "alinea-Explorer-locationBreadcrumbs-parentAction",
|
|
102
|
-
"Explorer-
|
|
103
|
-
"
|
|
104
|
-
"Explorer-
|
|
105
|
-
"
|
|
100
|
+
"Explorer-locationBreadcrumbs-root": "alinea-Explorer-locationBreadcrumbs-root",
|
|
101
|
+
"ExplorerLocationBreadcrumbsRoot": "alinea-Explorer-locationBreadcrumbs-root",
|
|
102
|
+
"Explorer-searchSlot": "alinea-Explorer-searchSlot",
|
|
103
|
+
"ExplorerSearchSlot": "alinea-Explorer-searchSlot",
|
|
104
|
+
"Explorer-locationBreadcrumbs-root-locale": "alinea-Explorer-locationBreadcrumbs-root-locale",
|
|
105
|
+
"ExplorerLocationBreadcrumbsRootLocale": "alinea-Explorer-locationBreadcrumbs-root-locale"
|
|
106
106
|
};
|
|
107
107
|
|
|
108
108
|
// src/dashboard/app/Explorer.tsx
|
|
@@ -262,6 +262,7 @@ function ExplorerSearch({
|
|
|
262
262
|
icon: IcRoundSearch,
|
|
263
263
|
loading: isPending || inputValue !== page.search,
|
|
264
264
|
placeholder: "Search...",
|
|
265
|
+
variant: "inline",
|
|
265
266
|
value: inputValue,
|
|
266
267
|
onValueChange: onSearchChange,
|
|
267
268
|
onKeyDown: onSearchKeyDown,
|
|
@@ -730,17 +731,21 @@ function ExplorerBody({
|
|
|
730
731
|
compactTable,
|
|
731
732
|
explorer,
|
|
732
733
|
onPick,
|
|
733
|
-
page
|
|
734
|
+
page,
|
|
735
|
+
children
|
|
734
736
|
}) {
|
|
735
|
-
return /* @__PURE__ */ jsx(PageContent, { children: /* @__PURE__ */
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
737
|
+
return /* @__PURE__ */ jsx(PageContent, { children: /* @__PURE__ */ jsxs("div", { className: styles.Explorer.viewport(), children: [
|
|
738
|
+
/* @__PURE__ */ jsx(
|
|
739
|
+
ExplorerList,
|
|
740
|
+
{
|
|
741
|
+
compactTable,
|
|
742
|
+
explorer,
|
|
743
|
+
onPick,
|
|
744
|
+
page
|
|
745
|
+
}
|
|
746
|
+
),
|
|
747
|
+
children
|
|
748
|
+
] }) });
|
|
744
749
|
}
|
|
745
750
|
function Explorer({
|
|
746
751
|
controls,
|
|
@@ -764,8 +769,7 @@ function Explorer({
|
|
|
764
769
|
titleControls
|
|
765
770
|
}
|
|
766
771
|
),
|
|
767
|
-
/* @__PURE__ */ jsx(ExplorerBody, { explorer, page })
|
|
768
|
-
explorer.hasRowAction && explorer.selectionMode === "multiple" && /* @__PURE__ */ jsx(ExplorerBatchActions, { explorer })
|
|
772
|
+
/* @__PURE__ */ jsx(ExplorerBody, { explorer, page, children: explorer.hasRowAction && explorer.selectionMode === "multiple" && /* @__PURE__ */ jsx(ExplorerBatchActions, { explorer }) })
|
|
769
773
|
] });
|
|
770
774
|
}
|
|
771
775
|
export {
|
|
@@ -6,12 +6,14 @@ export interface ExplorerBatchActionsProps {
|
|
|
6
6
|
export declare function ExplorerBatchActions({ explorer }: ExplorerBatchActionsProps): import("react").JSX.Element | null;
|
|
7
7
|
export interface ExplorerBatchActionBarProps {
|
|
8
8
|
count: number;
|
|
9
|
+
/** Every selected entry can be deleted */
|
|
9
10
|
canDelete: boolean;
|
|
11
|
+
/** Every selected entry can be moved */
|
|
10
12
|
canMove: boolean;
|
|
11
13
|
isPending?: boolean;
|
|
12
14
|
onClear(): void;
|
|
13
15
|
onDelete(): void;
|
|
14
16
|
onMove(): void;
|
|
15
17
|
}
|
|
16
|
-
/**
|
|
18
|
+
/** Floats over the list: how many entries are selected and their actions */
|
|
17
19
|
export declare function ExplorerBatchActionBar({ count, canDelete, canMove, isPending, onClear, onDelete, onMove }: ExplorerBatchActionBarProps): import("react").JSX.Element;
|