alinea 2.0.0-preview.2 → 2.0.0-preview.4
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/LICENSES.md +157 -103
- package/dist/adapter/next/DevRemote.js +10 -2
- package/dist/adapter/next/previews.js +4 -1
- package/dist/adapter/next/previews.spec.d.ts +1 -0
- package/dist/backend/Handler.js +14 -7
- package/dist/backend/api/BasicAuth.d.ts +1 -1
- package/dist/backend/api/BasicAuth.js +14 -14
- package/dist/backend/api/OAuth2.d.ts +3 -3
- package/dist/backend/api/OAuth2.js +7 -4
- package/dist/bundled.d.ts +159 -42
- package/dist/chunks/{chunk-Y7XOMJOC.js → chunk-CFNRVI3Y.js} +220 -247
- package/dist/chunks/chunk-D6UJHBJJ.js +183 -0
- package/dist/chunks/chunk-TIJTT5ZI.js +228 -0
- package/dist/chunks/{chunk-UVOEM4AH.js → chunk-XMOVGDFI.js} +1 -1
- package/dist/cli/Serve.js +1 -1
- package/dist/cli/bin.js +1 -1
- package/dist/cli/serve/LocalAuth.js +1 -1
- package/dist/cloud/AuthResult.d.ts +2 -0
- package/dist/cloud/CloudHandshake.d.ts +7 -0
- package/dist/cloud/CloudHandshake.js +64 -0
- package/dist/cloud/CloudRemote.d.ts +4 -1
- package/dist/cloud/CloudRemote.js +21 -3
- package/dist/components/Breadcrumbs.js +2 -2
- package/dist/components/Calendar.js +6 -6
- package/dist/components/Checkbox.js +3 -3
- package/dist/components/ComboBox.js +11 -11
- package/dist/components/DateField.js +3 -3
- package/dist/components/DatePicker.js +4 -4
- package/dist/components/DateRangePicker.js +6 -6
- package/dist/components/Disclosure.js +8 -8
- package/dist/components/Label.js +5 -5
- package/dist/components/List.js +34 -34
- package/dist/components/Menu.js +4 -4
- package/dist/components/Modal.js +3 -3
- package/dist/components/MultipleSelect.js +25 -25
- package/dist/components/NumberField.js +6 -6
- package/dist/components/ProgressCircle.js +2 -2
- package/dist/components/RadioGroup.js +2 -2
- package/dist/components/SearchField.js +3 -3
- package/dist/components/Select.js +7 -7
- package/dist/components/Surface.js +2 -2
- package/dist/components/Table.js +7 -7
- package/dist/components/Tabs.js +4 -4
- package/dist/components/TagGroup.js +2 -2
- package/dist/components/TextField.js +6 -6
- package/dist/components/TimeField.js +2 -2
- package/dist/components/Toggle.d.ts +1 -1
- package/dist/components/Toggle.js +2 -2
- package/dist/components/Toolbar.js +2 -2
- package/dist/components/Tooltip.js +3 -3
- package/dist/components/Tree.d.ts +4 -2
- package/dist/components/Tree.js +18 -4
- package/dist/core/Connection.d.ts +7 -4
- package/dist/core/Entry.d.ts +6 -0
- package/dist/core/Entry.js +10 -0
- package/dist/core/Graph.d.ts +1 -1
- package/dist/core/Id.d.ts +1 -0
- package/dist/core/Id.js +8 -0
- package/dist/core/Infer.d.ts +8 -1
- package/dist/core/db/EntryAliases.js +1 -4
- package/dist/core/db/EntryResolver.js +6 -6
- package/dist/core/db/EntryTransaction.js +1 -0
- package/dist/core/db/Operation.d.ts +2 -2
- package/dist/core/db/Operation.js +15 -4
- package/dist/dashboard/App.js +37 -17
- package/dist/dashboard/StoryProvider.js +2 -2
- package/dist/dashboard/app/AccessDenied.d.ts +16 -1
- package/dist/dashboard/app/AccessDenied.js +21 -12
- package/dist/dashboard/app/ActivityStatus.js +19 -19
- package/dist/dashboard/app/AppearanceToggle.d.ts +1 -0
- package/dist/dashboard/app/AppearanceToggle.js +43 -0
- package/dist/dashboard/app/AuthView.d.ts +1 -1
- package/dist/dashboard/app/AuthView.js +16 -18
- package/dist/dashboard/app/Badge.js +2 -2
- package/dist/dashboard/app/CompactField.js +17 -17
- package/dist/dashboard/app/DashboardErrorBoundary.js +22 -10
- package/dist/dashboard/app/DashboardLayout.js +15 -8
- package/dist/dashboard/app/DashboardMeta.d.ts +2 -1
- package/dist/dashboard/app/DashboardMeta.js +20 -5
- package/dist/dashboard/app/EntryFields.js +6 -6
- package/dist/dashboard/app/EntryHeader.js +25 -25
- package/dist/dashboard/app/EntryReferences.js +16 -16
- package/dist/dashboard/app/EntrySidebar.js +26 -26
- package/dist/dashboard/app/EntrySidebarPreview.js +61 -34
- package/dist/dashboard/app/EntrySidebarPreview.story.d.ts +6 -1
- package/dist/dashboard/app/EntryTranslationBanner.js +8 -8
- package/dist/dashboard/app/Explorer.d.ts +2 -1
- package/dist/dashboard/app/Explorer.js +79 -67
- package/dist/dashboard/app/ExplorerCards.js +62 -66
- package/dist/dashboard/app/ExplorerFileCard.js +20 -20
- package/dist/dashboard/app/ExplorerList.js +22 -22
- package/dist/dashboard/app/ExplorerModal.js +3 -3
- package/dist/dashboard/app/ExplorerPickerContent.js +2 -2
- package/dist/dashboard/app/ExplorerTable.js +68 -68
- package/dist/dashboard/app/ImagePicker.js +7 -7
- package/dist/dashboard/app/LinkPicker.js +44 -24
- package/dist/dashboard/app/LocaleMenu.js +5 -7
- package/dist/dashboard/app/SidebarLayout.js +7 -7
- package/dist/dashboard/app/SidebarTree.js +66 -74
- package/dist/dashboard/app/WorkspaceMenu.d.ts +10 -3
- package/dist/dashboard/app/WorkspaceMenu.js +85 -64
- package/dist/dashboard/app/WorkspaceMenu.stories.d.ts +2 -0
- package/dist/dashboard/app/WorkspaceRoots.d.ts +3 -1
- package/dist/dashboard/app/WorkspaceRoots.js +82 -107
- package/dist/dashboard/app/editor/FileEditor.js +31 -31
- package/dist/dashboard/app/editor/FilePreview.js +4 -4
- package/dist/dashboard/app/editor/MediaAltField.view.js +4 -4
- package/dist/dashboard/app/modals/CreateEntry.js +14 -14
- package/dist/dashboard/app/pages/EntryPage.js +28 -30
- package/dist/dashboard/app/pages/RootPage.js +4 -4
- package/dist/dashboard/app/pages/SplashPage.d.ts +3 -0
- package/dist/dashboard/app/pages/SplashPage.js +414 -0
- package/dist/dashboard/app/pages/UsersPage.js +35 -35
- package/dist/dashboard/app/ui/DashboardModal.js +19 -19
- package/dist/dashboard/app/ui/Rail.js +3 -3
- package/dist/dashboard/atoms/ReactiveNode.js +1 -1
- package/dist/dashboard/atoms/activity.js +2 -3
- package/dist/dashboard/atoms/auth.d.ts +2 -0
- package/dist/dashboard/atoms/auth.js +6 -2
- package/dist/dashboard/atoms/config.js +1 -1
- package/dist/dashboard/atoms/core.js +2 -2
- package/dist/dashboard/atoms/create.js +1 -1
- package/dist/dashboard/atoms/dashboard.js +2 -2
- package/dist/dashboard/atoms/editor.js +1 -1
- package/dist/dashboard/atoms/entry.js +2 -2
- package/dist/dashboard/atoms/explorer.d.ts +1 -3
- package/dist/dashboard/atoms/explorer.js +7 -9
- package/dist/dashboard/atoms/graph.d.ts +1 -0
- package/dist/dashboard/atoms/graph.js +7 -2
- package/dist/dashboard/atoms/link.js +2 -2
- package/dist/dashboard/atoms/nav.d.ts +4 -3
- package/dist/dashboard/atoms/nav.js +10 -5
- package/dist/dashboard/atoms/preview.js +1 -1
- package/dist/dashboard/atoms/root.js +2 -2
- package/dist/dashboard/atoms/upload.js +1 -1
- package/dist/dashboard/atoms/user.d.ts +1 -1
- package/dist/dashboard/atoms/user.js +8 -6
- package/dist/dashboard/atoms/utils.js +2 -2
- package/dist/dashboard/boot/Boot.js +2 -4
- package/dist/dashboard/boot/DashboardWorker.js +34 -29
- package/dist/dashboard/editor/UseField.js +6 -6
- package/dist/dashboard/fixture/cms.d.ts +12 -0
- package/dist/dashboard/fixture/cms.js +53 -2
- package/dist/dashboard/hook/UseGraph.js +4 -4
- package/dist/dashboard/hook/UseRoot.js +4 -4
- package/dist/dashboard/hooks.js +16 -16
- package/dist/field/check/CheckField.view.js +2 -2
- package/dist/field/code/CodeField.view.js +15 -15
- package/dist/field/link/EntryLink.d.ts +1 -1
- package/dist/field/link/EntryLink.js +1 -0
- package/dist/field/link/Link.js +1 -0
- package/dist/field/link/LinkField.d.ts +5 -0
- package/dist/field/link/LinkField.view.js +81 -64
- package/dist/field/list/ListField.view.js +26 -26
- package/dist/field/localiser/LocalisedField.view.js +76 -5
- package/dist/field/metadata/MetadataField.d.ts +2 -0
- package/dist/field/metadata/MetadataField.js +2 -1
- package/dist/field/metadata/MetadataField.view.js +20 -20
- package/dist/field/richtext/PickTextLink.js +6 -6
- package/dist/field/richtext/RichTextBlock.js +6 -6
- package/dist/field/richtext/RichTextBlocks.js +1 -1
- package/dist/field/richtext/RichTextExtensions.js +23 -23
- package/dist/field/richtext/RichTextField.view.js +9 -9
- package/dist/field/richtext/RichTextState.js +1 -1
- package/dist/field/text/TextField.view.js +2 -2
- package/dist/index.css +436 -28
- package/dist/preview/PreviewMessage.d.ts +3 -0
- package/dist/preview/PreviewMessage.js +1 -0
- package/dist/preview/RegisterPreview.d.ts +1 -1
- package/dist/preview/RegisterPreview.js +28 -10
- package/dist/preview/react.d.ts +5 -1
- package/dist/preview/react.js +12 -9
- package/dist/preview/widget.js +6 -12
- package/dist/query.d.ts +7 -7
- package/package.json +1 -1
- package/dist/chunks/chunk-STAJCW4Z.js +0 -322
- package/dist/chunks/chunk-U4VOHNR2.js +0 -210
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "../../../chunks/chunk-NUFRM6SI.js";
|
|
2
2
|
import {
|
|
3
3
|
useAtom,
|
|
4
|
-
|
|
4
|
+
useAtomValueRaw,
|
|
5
5
|
useSetAtom
|
|
6
|
-
} from "../../../chunks/chunk-
|
|
6
|
+
} from "../../../chunks/chunk-D6UJHBJJ.js";
|
|
7
7
|
import {
|
|
8
8
|
atom
|
|
9
|
-
} from "../../../chunks/chunk-
|
|
9
|
+
} from "../../../chunks/chunk-CFNRVI3Y.js";
|
|
10
10
|
import {
|
|
11
11
|
$232f8dea1b0a4f2f$export$762f73dccccd255d
|
|
12
12
|
} from "../../../chunks/chunk-NIVGVRDS.js";
|
|
@@ -56,54 +56,54 @@ import { SidebarHeader } from "../ui/Sidebar.js";
|
|
|
56
56
|
|
|
57
57
|
// src/dashboard/app/pages/UsersPage.module.css
|
|
58
58
|
var UsersPage_default = {
|
|
59
|
-
"UsersPage-createButton": "alinea-UsersPage-createButton",
|
|
60
|
-
"UsersPageCreateButton": "alinea-UsersPage-createButton",
|
|
61
59
|
"UsersPage-noRoles": "alinea-UsersPage-noRoles",
|
|
62
60
|
"UsersPageNoRoles": "alinea-UsersPage-noRoles",
|
|
61
|
+
"UsersPage-status": "alinea-UsersPage-status",
|
|
62
|
+
"UsersPageStatus": "alinea-UsersPage-status",
|
|
63
|
+
"UsersPageSidebar-icon": "alinea-UsersPageSidebar-icon",
|
|
64
|
+
"UsersPageSidebarIcon": "alinea-UsersPageSidebar-icon",
|
|
65
|
+
"UsersPage-createButton": "alinea-UsersPage-createButton",
|
|
66
|
+
"UsersPageCreateButton": "alinea-UsersPage-createButton",
|
|
67
|
+
"UsersPage-search": "alinea-UsersPage-search",
|
|
68
|
+
"UsersPageSearch": "alinea-UsersPage-search",
|
|
69
|
+
"UsersPageSidebar-nav": "alinea-UsersPageSidebar-nav",
|
|
70
|
+
"UsersPageSidebarNav": "alinea-UsersPageSidebar-nav",
|
|
63
71
|
"UsersPageSidebar-item": "alinea-UsersPageSidebar-item",
|
|
64
72
|
"UsersPageSidebarItem": "alinea-UsersPageSidebar-item",
|
|
65
73
|
"UsersPage-identity-text": "alinea-UsersPage-identity-text",
|
|
66
74
|
"UsersPageIdentityText": "alinea-UsersPage-identity-text",
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"UsersPage-header": "alinea-UsersPage-header",
|
|
70
|
-
"UsersPageHeader": "alinea-UsersPage-header",
|
|
75
|
+
"UsersPage-identity": "alinea-UsersPage-identity",
|
|
76
|
+
"UsersPageIdentity": "alinea-UsersPage-identity",
|
|
71
77
|
"UsersPage-identity-email": "alinea-UsersPage-identity-email",
|
|
72
78
|
"UsersPageIdentityEmail": "alinea-UsersPage-identity-email",
|
|
79
|
+
"UsersPage-rolesCell": "alinea-UsersPage-rolesCell",
|
|
80
|
+
"UsersPageRolesCell": "alinea-UsersPage-rolesCell",
|
|
73
81
|
"UsersPage-table": "alinea-UsersPage-table",
|
|
74
82
|
"UsersPageTable": "alinea-UsersPage-table",
|
|
75
|
-
"UsersPage-header-title": "alinea-UsersPage-header-title",
|
|
76
|
-
"UsersPageHeaderTitle": "alinea-UsersPage-header-title",
|
|
77
|
-
"UsersPage-content": "alinea-UsersPage-content",
|
|
78
|
-
"UsersPageContent": "alinea-UsersPage-content",
|
|
79
|
-
"UsersPage-empty": "alinea-UsersPage-empty",
|
|
80
|
-
"UsersPageEmpty": "alinea-UsersPage-empty",
|
|
81
|
-
"UsersPage-status": "alinea-UsersPage-status",
|
|
82
|
-
"UsersPageStatus": "alinea-UsersPage-status",
|
|
83
83
|
"UsersPage": "alinea-UsersPage",
|
|
84
|
-
"UsersPage-roles": "alinea-UsersPage-roles",
|
|
85
|
-
"UsersPageRoles": "alinea-UsersPage-roles",
|
|
86
84
|
"UsersPage-status-text": "alinea-UsersPage-status-text",
|
|
87
85
|
"UsersPageStatusText": "alinea-UsersPage-status-text",
|
|
86
|
+
"UsersPage-empty": "alinea-UsersPage-empty",
|
|
87
|
+
"UsersPageEmpty": "alinea-UsersPage-empty",
|
|
88
|
+
"UsersPageSidebar-footer": "alinea-UsersPageSidebar-footer",
|
|
89
|
+
"UsersPageSidebarFooter": "alinea-UsersPageSidebar-footer",
|
|
90
|
+
"UsersPage-form-error": "alinea-UsersPage-form-error",
|
|
91
|
+
"UsersPageFormError": "alinea-UsersPage-form-error",
|
|
88
92
|
"UsersPage-form-fields": "alinea-UsersPage-form-fields",
|
|
89
93
|
"UsersPageFormFields": "alinea-UsersPage-form-fields",
|
|
90
|
-
"UsersPage-
|
|
91
|
-
"
|
|
94
|
+
"UsersPage-header": "alinea-UsersPage-header",
|
|
95
|
+
"UsersPageHeader": "alinea-UsersPage-header",
|
|
96
|
+
"UsersPage-header-title": "alinea-UsersPage-header-title",
|
|
97
|
+
"UsersPageHeaderTitle": "alinea-UsersPage-header-title",
|
|
98
|
+
"UsersPageSidebar": "alinea-UsersPageSidebar",
|
|
92
99
|
"UsersPage-identity-title": "alinea-UsersPage-identity-title",
|
|
93
100
|
"UsersPageIdentityTitle": "alinea-UsersPage-identity-title",
|
|
94
|
-
"UsersPage-
|
|
95
|
-
"
|
|
96
|
-
"UsersPage-
|
|
97
|
-
"
|
|
101
|
+
"UsersPage-roles": "alinea-UsersPage-roles",
|
|
102
|
+
"UsersPageRoles": "alinea-UsersPage-roles",
|
|
103
|
+
"UsersPage-content": "alinea-UsersPage-content",
|
|
104
|
+
"UsersPageContent": "alinea-UsersPage-content",
|
|
98
105
|
"UsersPage-confirmation": "alinea-UsersPage-confirmation",
|
|
99
|
-
"UsersPageConfirmation": "alinea-UsersPage-confirmation"
|
|
100
|
-
"UsersPageSidebar": "alinea-UsersPageSidebar",
|
|
101
|
-
"UsersPageSidebar-nav": "alinea-UsersPageSidebar-nav",
|
|
102
|
-
"UsersPageSidebarNav": "alinea-UsersPageSidebar-nav",
|
|
103
|
-
"UsersPageSidebar-icon": "alinea-UsersPageSidebar-icon",
|
|
104
|
-
"UsersPageSidebarIcon": "alinea-UsersPageSidebar-icon",
|
|
105
|
-
"UsersPage-search": "alinea-UsersPage-search",
|
|
106
|
-
"UsersPageSearch": "alinea-UsersPage-search"
|
|
106
|
+
"UsersPageConfirmation": "alinea-UsersPage-confirmation"
|
|
107
107
|
};
|
|
108
108
|
|
|
109
109
|
// src/dashboard/app/pages/UsersPage.tsx
|
|
@@ -179,7 +179,7 @@ var usersPage = page((page2) => {
|
|
|
179
179
|
] }) });
|
|
180
180
|
});
|
|
181
181
|
function UsersPage() {
|
|
182
|
-
const config =
|
|
182
|
+
const config = useAtomValueRaw(configAtom);
|
|
183
183
|
const [usersState] = useAtom(usersAtom);
|
|
184
184
|
const [query, setQuery] = useState("");
|
|
185
185
|
const [editingUser, setEditingUser] = useState();
|
|
@@ -416,7 +416,7 @@ function DeactivateUserModal({ user }) {
|
|
|
416
416
|
] });
|
|
417
417
|
}
|
|
418
418
|
function UserModal({ user }) {
|
|
419
|
-
const config =
|
|
419
|
+
const config = useAtomValueRaw(configAtom);
|
|
420
420
|
const saveUser = useSetAtom(usersAtom);
|
|
421
421
|
const modal = useDashboardModal();
|
|
422
422
|
const isEditing = user !== void 0;
|
|
@@ -24,32 +24,32 @@ import { IcRoundClose } from "../../icons.js";
|
|
|
24
24
|
|
|
25
25
|
// src/dashboard/app/ui/DashboardModal.module.css
|
|
26
26
|
var DashboardModal_default = {
|
|
27
|
-
"DashboardModalContent": "alinea-DashboardModalContent",
|
|
28
|
-
"is-explorer": "alinea-is-explorer",
|
|
29
|
-
"isExplorer": "alinea-is-explorer",
|
|
30
27
|
"DashboardModal": "alinea-DashboardModal",
|
|
28
|
+
"DashboardModalForm": "alinea-DashboardModalForm",
|
|
29
|
+
"DashboardModalFormFooter": "alinea-DashboardModalFormFooter",
|
|
30
|
+
"DashboardModalFormBody": "alinea-DashboardModalFormBody",
|
|
31
|
+
"is-loading": "alinea-is-loading",
|
|
32
|
+
"isLoading": "alinea-is-loading",
|
|
33
|
+
"DashboardModalContent": "alinea-DashboardModalContent",
|
|
31
34
|
"DashboardModalDialog-header": "alinea-DashboardModalDialog-header",
|
|
32
35
|
"DashboardModalDialogHeader": "alinea-DashboardModalDialog-header",
|
|
33
|
-
"DashboardModalSeparator": "alinea-DashboardModalSeparator",
|
|
34
|
-
"DashboardModalFormFooter": "alinea-DashboardModalFormFooter",
|
|
35
|
-
"DashboardModalDialog": "alinea-DashboardModalDialog",
|
|
36
|
-
"DashboardModalForm": "alinea-DashboardModalForm",
|
|
37
36
|
"DashboardModalOverlay": "alinea-DashboardModalOverlay",
|
|
38
|
-
"DashboardModal-surface": "alinea-DashboardModal-surface",
|
|
39
|
-
"DashboardModalSurface": "alinea-DashboardModal-surface",
|
|
40
|
-
"DashboardModalCloseButton": "alinea-DashboardModalCloseButton",
|
|
41
|
-
"DashboardModalFooter": "alinea-DashboardModalFooter",
|
|
42
|
-
"DashboardModal-enter": "alinea-DashboardModal-enter",
|
|
43
|
-
"DashboardModalEnter": "alinea-DashboardModal-enter",
|
|
44
|
-
"DashboardModalDialog-controls": "alinea-DashboardModalDialog-controls",
|
|
45
|
-
"DashboardModalDialogControls": "alinea-DashboardModalDialog-controls",
|
|
46
|
-
"DashboardModalFormBody": "alinea-DashboardModalFormBody",
|
|
47
37
|
"DashboardModalDialog-loader": "alinea-DashboardModalDialog-loader",
|
|
48
38
|
"DashboardModalDialogLoader": "alinea-DashboardModalDialog-loader",
|
|
39
|
+
"DashboardModalTitle": "alinea-DashboardModalTitle",
|
|
40
|
+
"DashboardModalDialog-controls": "alinea-DashboardModalDialog-controls",
|
|
41
|
+
"DashboardModalDialogControls": "alinea-DashboardModalDialog-controls",
|
|
42
|
+
"DashboardModalSeparator": "alinea-DashboardModalSeparator",
|
|
43
|
+
"DashboardModal-enter": "alinea-DashboardModal-enter",
|
|
44
|
+
"DashboardModalEnter": "alinea-DashboardModal-enter",
|
|
49
45
|
"DashboardModalFormHeader": "alinea-DashboardModalFormHeader",
|
|
50
|
-
"is-
|
|
51
|
-
"
|
|
52
|
-
"
|
|
46
|
+
"is-explorer": "alinea-is-explorer",
|
|
47
|
+
"isExplorer": "alinea-is-explorer",
|
|
48
|
+
"DashboardModal-surface": "alinea-DashboardModal-surface",
|
|
49
|
+
"DashboardModalSurface": "alinea-DashboardModal-surface",
|
|
50
|
+
"DashboardModalDialog": "alinea-DashboardModalDialog",
|
|
51
|
+
"DashboardModalCloseButton": "alinea-DashboardModalCloseButton",
|
|
52
|
+
"DashboardModalFooter": "alinea-DashboardModalFooter"
|
|
53
53
|
};
|
|
54
54
|
|
|
55
55
|
// src/dashboard/app/ui/DashboardModal.tsx
|
|
@@ -6,12 +6,12 @@ import "../../../chunks/chunk-CQ52GEHY.js";
|
|
|
6
6
|
// src/dashboard/app/ui/Rail.module.css
|
|
7
7
|
var Rail_default = {
|
|
8
8
|
"RailFooter": "alinea-RailFooter",
|
|
9
|
+
"RailContent": "alinea-RailContent",
|
|
10
|
+
"RailBody": "alinea-RailBody",
|
|
9
11
|
"is-main": "alinea-is-main",
|
|
10
12
|
"isMain": "alinea-is-main",
|
|
11
|
-
"RailBody": "alinea-RailBody",
|
|
12
13
|
"RailHeader": "alinea-RailHeader",
|
|
13
|
-
"Rail": "alinea-Rail"
|
|
14
|
-
"RailContent": "alinea-RailContent"
|
|
14
|
+
"Rail": "alinea-Rail"
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
// src/dashboard/app/ui/Rail.tsx
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
atom
|
|
3
|
-
} from "../../chunks/chunk-
|
|
3
|
+
} from "../../chunks/chunk-CFNRVI3Y.js";
|
|
4
4
|
import "../../chunks/chunk-CQ52GEHY.js";
|
|
5
5
|
|
|
6
6
|
// src/dashboard/atoms/activity.ts
|
|
7
|
-
import { startTransition } from "react";
|
|
8
7
|
import {
|
|
9
8
|
ActivityEvent
|
|
10
9
|
} from "../boot/ActivityEvent.js";
|
|
@@ -33,7 +32,7 @@ var activityAtom = Object.assign(
|
|
|
33
32
|
const source = get(graphAtom);
|
|
34
33
|
let active = true;
|
|
35
34
|
function update(activities) {
|
|
36
|
-
|
|
35
|
+
set(activityValueAtom, activities);
|
|
37
36
|
}
|
|
38
37
|
function listen(event) {
|
|
39
38
|
if (event instanceof ActivityEvent) update(event.activities);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { BackendCapabilities } from 'alinea/core/Connection';
|
|
1
2
|
import { User } from 'alinea/core/User';
|
|
2
3
|
export declare const authRequiredAtom: import("jotai").Atom<boolean>;
|
|
3
4
|
export interface DashboardAuthLoading {
|
|
@@ -20,6 +21,7 @@ export interface DashboardAuthError {
|
|
|
20
21
|
export interface DashboardAuthAuthenticated {
|
|
21
22
|
status: 'authenticated';
|
|
22
23
|
user: User;
|
|
24
|
+
capabilities?: BackendCapabilities;
|
|
23
25
|
}
|
|
24
26
|
export type DashboardAuthState = DashboardAuthLoading | DashboardAuthMissingHandler | DashboardAuthMissingApiKey | DashboardAuthRedirecting | DashboardAuthError | DashboardAuthAuthenticated;
|
|
25
27
|
interface DashboardAuthCheck {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
atom
|
|
3
|
-
} from "../../chunks/chunk-
|
|
3
|
+
} from "../../chunks/chunk-CFNRVI3Y.js";
|
|
4
4
|
import "../../chunks/chunk-CQ52GEHY.js";
|
|
5
5
|
|
|
6
6
|
// src/dashboard/atoms/auth.ts
|
|
@@ -69,7 +69,11 @@ var authAtom = Object.assign(
|
|
|
69
69
|
() => set(authAtom, { type: "check" })
|
|
70
70
|
)
|
|
71
71
|
);
|
|
72
|
-
set(authState, {
|
|
72
|
+
set(authState, {
|
|
73
|
+
status: "authenticated",
|
|
74
|
+
user: result.user,
|
|
75
|
+
capabilities: result.capabilities
|
|
76
|
+
});
|
|
73
77
|
return;
|
|
74
78
|
case AuthResultType.UnAuthenticated:
|
|
75
79
|
set(authState, { status: "redirecting" });
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useStore
|
|
3
|
-
} from "../../chunks/chunk-
|
|
3
|
+
} from "../../chunks/chunk-D6UJHBJJ.js";
|
|
4
4
|
import {
|
|
5
5
|
atom
|
|
6
|
-
} from "../../chunks/chunk-
|
|
6
|
+
} from "../../chunks/chunk-CFNRVI3Y.js";
|
|
7
7
|
import "../../chunks/chunk-CQ52GEHY.js";
|
|
8
8
|
|
|
9
9
|
// src/dashboard/atoms/core.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
atomWithStorage
|
|
3
|
-
} from "../../chunks/chunk-
|
|
3
|
+
} from "../../chunks/chunk-TIJTT5ZI.js";
|
|
4
4
|
import {
|
|
5
5
|
atom
|
|
6
|
-
} from "../../chunks/chunk-
|
|
6
|
+
} from "../../chunks/chunk-CFNRVI3Y.js";
|
|
7
7
|
import "../../chunks/chunk-CQ52GEHY.js";
|
|
8
8
|
|
|
9
9
|
// src/dashboard/atoms/dashboard.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
unwrap
|
|
3
|
-
} from "../../chunks/chunk-
|
|
3
|
+
} from "../../chunks/chunk-TIJTT5ZI.js";
|
|
4
4
|
import {
|
|
5
5
|
atom
|
|
6
|
-
} from "../../chunks/chunk-
|
|
6
|
+
} from "../../chunks/chunk-CFNRVI3Y.js";
|
|
7
7
|
import "../../chunks/chunk-CQ52GEHY.js";
|
|
8
8
|
|
|
9
9
|
// src/dashboard/atoms/entry.ts
|
|
@@ -35,7 +35,6 @@ export interface ExplorerOptions {
|
|
|
35
35
|
condition?: Filter<EntryFields>;
|
|
36
36
|
defaultOrderBy?: Atom<OrderBy | Array<OrderBy> | undefined>;
|
|
37
37
|
enableNavigation?: boolean;
|
|
38
|
-
hideResultsUntilSearch?: boolean;
|
|
39
38
|
initialView?: ExplorerView;
|
|
40
39
|
initialResultMode?: ExplorerResultMode;
|
|
41
40
|
initialSearchScope?: 'workspace' | 'everything';
|
|
@@ -75,6 +74,7 @@ export interface ExplorerReadyPage {
|
|
|
75
74
|
location: ExplorerLocation;
|
|
76
75
|
root: ExplorerRootData;
|
|
77
76
|
resultMode: ExplorerResultMode;
|
|
77
|
+
search: string;
|
|
78
78
|
searchScope: 'workspace' | 'everything';
|
|
79
79
|
searchesEverything: boolean;
|
|
80
80
|
view: ExplorerView;
|
|
@@ -184,7 +184,6 @@ export declare class ExplorerAtoms {
|
|
|
184
184
|
readonly hasRowAction: boolean;
|
|
185
185
|
readonly mode: 'browse' | 'search';
|
|
186
186
|
readonly hasSelection: boolean;
|
|
187
|
-
readonly hideResultsUntilSearch: boolean;
|
|
188
187
|
readonly linkedKeys: ReadonlySet<Key>;
|
|
189
188
|
readonly searchDepth: "all" | "current";
|
|
190
189
|
readonly supportsInlineExpansion: boolean;
|
|
@@ -216,7 +215,6 @@ export declare class ExplorerAtoms {
|
|
|
216
215
|
constructor(location: WritableAtom<ExplorerLocation, [
|
|
217
216
|
SetStateAction<ExplorerLocation>
|
|
218
217
|
], void>, options: ExplorerOptions, initialLocation: ExplorerLocation);
|
|
219
|
-
showResults: Atom<boolean>;
|
|
220
218
|
isMedia: Atom<boolean>;
|
|
221
219
|
view: WritableAtom<ExplorerView, [view: ExplorerView], void>;
|
|
222
220
|
sort: WritableAtom<ExplorerSort, [sortBy: ExplorerSortBy], void>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
unwrap
|
|
3
|
-
} from "../../chunks/chunk-
|
|
3
|
+
} from "../../chunks/chunk-TIJTT5ZI.js";
|
|
4
4
|
import {
|
|
5
5
|
atom
|
|
6
|
-
} from "../../chunks/chunk-
|
|
6
|
+
} from "../../chunks/chunk-CFNRVI3Y.js";
|
|
7
7
|
import "../../chunks/chunk-CQ52GEHY.js";
|
|
8
8
|
|
|
9
9
|
// src/dashboard/atoms/explorer.ts
|
|
@@ -153,7 +153,6 @@ var ExplorerAtoms = class {
|
|
|
153
153
|
this.breadcrumbs = options.breadcrumbs ?? false;
|
|
154
154
|
this.autoSelectFirstItem = options.autoSelectFirstItem ?? this.mode === "search";
|
|
155
155
|
this.hasSelection = this.selectionMode !== "none";
|
|
156
|
-
this.hideResultsUntilSearch = options.hideResultsUntilSearch ?? this.mode === "search";
|
|
157
156
|
this.searchDepth = options.searchDepth ?? (this.mode === "search" ? "all" : "current");
|
|
158
157
|
this.linkedKeys = new Set(options.initialSelection);
|
|
159
158
|
this.supportsInlineExpansion = options.nestedNavigation ?? false;
|
|
@@ -276,6 +275,7 @@ var ExplorerAtoms = class {
|
|
|
276
275
|
this.pageReady = atom(async (get) => {
|
|
277
276
|
const locale = get(this.selectedLocale);
|
|
278
277
|
const location2 = get(this.location);
|
|
278
|
+
const search = get(this.search);
|
|
279
279
|
const resultMode = get(this.resultMode);
|
|
280
280
|
const searchScope = get(this.searchScope);
|
|
281
281
|
const searchesEverything = get(this.searchesEverything);
|
|
@@ -298,6 +298,7 @@ var ExplorerAtoms = class {
|
|
|
298
298
|
location: location2,
|
|
299
299
|
resultMode,
|
|
300
300
|
root,
|
|
301
|
+
search,
|
|
301
302
|
searchScope,
|
|
302
303
|
searchesEverything,
|
|
303
304
|
view
|
|
@@ -316,7 +317,6 @@ var ExplorerAtoms = class {
|
|
|
316
317
|
hasRowAction;
|
|
317
318
|
mode;
|
|
318
319
|
hasSelection;
|
|
319
|
-
hideResultsUntilSearch;
|
|
320
320
|
linkedKeys;
|
|
321
321
|
searchDepth;
|
|
322
322
|
supportsInlineExpansion;
|
|
@@ -342,9 +342,6 @@ var ExplorerAtoms = class {
|
|
|
342
342
|
pageReady;
|
|
343
343
|
page;
|
|
344
344
|
#options;
|
|
345
|
-
showResults = atom((get) => {
|
|
346
|
-
return !this.hideResultsUntilSearch || Boolean(get(this.search).trim());
|
|
347
|
-
});
|
|
348
345
|
isMedia = atom(
|
|
349
346
|
(get) => Boolean(this.#options.rootData && get(this.#options.rootData).isMediaRoot)
|
|
350
347
|
);
|
|
@@ -569,12 +566,13 @@ var ExplorerAtoms = class {
|
|
|
569
566
|
const location = get(this.location);
|
|
570
567
|
const search = get(this.search).trim();
|
|
571
568
|
const searchesEverything = get(this.searchesEverything);
|
|
569
|
+
const searchesMultipleRoots = searchesEverything || this.rootScope === "workspace";
|
|
572
570
|
const resultMode = get(this.resultMode);
|
|
573
571
|
const workspace = searchesEverything ? void 0 : location.workspace;
|
|
574
572
|
const root = searchesEverything ? void 0 : this.rootScope === "workspace" ? void 0 : location.root;
|
|
575
573
|
if (!searchesEverything && !location.root && this.rootScope === "current")
|
|
576
574
|
return [];
|
|
577
|
-
if (this.
|
|
575
|
+
if (this.mode === "search" && !search) return [];
|
|
578
576
|
const graph = get(graphAtom);
|
|
579
577
|
const sort = get(this.sort);
|
|
580
578
|
const selectedSort = get(this.#selectedSort);
|
|
@@ -588,7 +586,7 @@ var ExplorerAtoms = class {
|
|
|
588
586
|
workspace,
|
|
589
587
|
root,
|
|
590
588
|
parentId: this.pickChildren ? location.parentId ?? null : flatList ? void 0 : searchesEverything ? null : location.parentId ?? null,
|
|
591
|
-
locale:
|
|
589
|
+
locale: searchesMultipleRoots ? void 0 : locale,
|
|
592
590
|
search: search || void 0,
|
|
593
591
|
filter: filterSelectable ? this.#options.condition : void 0,
|
|
594
592
|
type: filter,
|
|
@@ -3,3 +3,4 @@ export declare const entryRevisionAtom: (id: string) => import("jotai").Atom<str
|
|
|
3
3
|
export declare const syncAtom: import("jotai").WritableAtom<null, [], Promise<string | undefined>> & {
|
|
4
4
|
init: null;
|
|
5
5
|
};
|
|
6
|
+
export declare const graphReadyAtom: import("jotai").Atom<Promise<void>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
selectAtom
|
|
3
|
-
} from "../../chunks/chunk-
|
|
3
|
+
} from "../../chunks/chunk-TIJTT5ZI.js";
|
|
4
4
|
import {
|
|
5
5
|
atom
|
|
6
|
-
} from "../../chunks/chunk-
|
|
6
|
+
} from "../../chunks/chunk-CFNRVI3Y.js";
|
|
7
7
|
import "../../chunks/chunk-CQ52GEHY.js";
|
|
8
8
|
|
|
9
9
|
// src/dashboard/atoms/graph.ts
|
|
@@ -49,6 +49,10 @@ var syncAtom = atom(null, async (get, set) => {
|
|
|
49
49
|
set(indexStateValueAtom, (current) => ({ ...current, sha }));
|
|
50
50
|
return sha;
|
|
51
51
|
});
|
|
52
|
+
var graphReadyAtom = atom(async (get) => {
|
|
53
|
+
const graph = get(graphAtom);
|
|
54
|
+
if (isSyncableGraph(graph)) await graph.sync();
|
|
55
|
+
});
|
|
52
56
|
function readGraphSha(graph) {
|
|
53
57
|
return graph.sha;
|
|
54
58
|
}
|
|
@@ -57,6 +61,7 @@ function isSyncableGraph(graph) {
|
|
|
57
61
|
}
|
|
58
62
|
export {
|
|
59
63
|
entryRevisionAtom,
|
|
64
|
+
graphReadyAtom,
|
|
60
65
|
shaAtom,
|
|
61
66
|
syncAtom
|
|
62
67
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
unwrap
|
|
3
|
-
} from "../../chunks/chunk-
|
|
3
|
+
} from "../../chunks/chunk-TIJTT5ZI.js";
|
|
4
4
|
import {
|
|
5
5
|
atom
|
|
6
|
-
} from "../../chunks/chunk-
|
|
6
|
+
} from "../../chunks/chunk-CFNRVI3Y.js";
|
|
7
7
|
import "../../chunks/chunk-CQ52GEHY.js";
|
|
8
8
|
|
|
9
9
|
// src/dashboard/atoms/link.ts
|
|
@@ -11,7 +11,7 @@ export declare const routeBlockAtom: import("jotai").PrimitiveAtom<RouteBlock |
|
|
|
11
11
|
init: RouteBlock | null;
|
|
12
12
|
};
|
|
13
13
|
export interface DashboardRoute {
|
|
14
|
-
page?: 'entry' | 'users';
|
|
14
|
+
page?: 'splash' | 'entry' | 'users';
|
|
15
15
|
workspace?: string;
|
|
16
16
|
root?: string;
|
|
17
17
|
entry?: string;
|
|
@@ -19,9 +19,10 @@ export interface DashboardRoute {
|
|
|
19
19
|
view?: EntryDefaultView;
|
|
20
20
|
}
|
|
21
21
|
interface ResolvedDashboardRoute extends DashboardRoute {
|
|
22
|
-
page: 'entry' | 'users';
|
|
22
|
+
page: 'splash' | 'entry' | 'users';
|
|
23
23
|
}
|
|
24
24
|
export declare const nav: {
|
|
25
|
+
splash(): string;
|
|
25
26
|
users(): string;
|
|
26
27
|
entry(workspace?: string, root?: string, entryId?: string, locale?: string | null, view?: EntryDefaultView): string;
|
|
27
28
|
};
|
|
@@ -34,7 +35,7 @@ export declare const routeAtom: import("jotai").WritableAtom<ResolvedDashboardRo
|
|
|
34
35
|
onMount(navigate: (request: NavigationRequest) => void): (() => void) | undefined;
|
|
35
36
|
};
|
|
36
37
|
export interface Page {
|
|
37
|
-
type: 'users' | 'entry';
|
|
38
|
+
type: 'splash' | 'users' | 'entry';
|
|
38
39
|
workspace: string | undefined;
|
|
39
40
|
root: string | undefined;
|
|
40
41
|
requestedRoot?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
atom
|
|
3
|
-
} from "../../chunks/chunk-
|
|
3
|
+
} from "../../chunks/chunk-CFNRVI3Y.js";
|
|
4
4
|
import "../../chunks/chunk-CQ52GEHY.js";
|
|
5
5
|
|
|
6
6
|
// node_modules/jotai-location/dist/atomWithLocation.js
|
|
@@ -65,6 +65,9 @@ import { policyAtom } from "./user.js";
|
|
|
65
65
|
var routeGuardAtom = atom(null);
|
|
66
66
|
var routeBlockAtom = atom(null);
|
|
67
67
|
var nav = {
|
|
68
|
+
splash() {
|
|
69
|
+
return "/";
|
|
70
|
+
},
|
|
68
71
|
users() {
|
|
69
72
|
return "/users";
|
|
70
73
|
},
|
|
@@ -77,7 +80,7 @@ var nav = {
|
|
|
77
80
|
function routeFromHash(hash) {
|
|
78
81
|
const [path, search = ""] = hash.slice(1).split("?");
|
|
79
82
|
const [action, workspace, rootPart = "", entry] = path.split("/").slice(1);
|
|
80
|
-
const page2 = action === "users" ? "users" : "entry";
|
|
83
|
+
const page2 = action === "users" ? "users" : action === "entry" ? "entry" : "splash";
|
|
81
84
|
const [root, locale] = rootPart.split(":");
|
|
82
85
|
const view = new URLSearchParams(search).get("view");
|
|
83
86
|
return {
|
|
@@ -91,6 +94,7 @@ function routeFromHash(hash) {
|
|
|
91
94
|
}
|
|
92
95
|
function routeFromUpdate(update) {
|
|
93
96
|
if (update.page === "users") return { page: "users" };
|
|
97
|
+
if (update.page === "splash") return { page: "splash" };
|
|
94
98
|
return {
|
|
95
99
|
page: "entry",
|
|
96
100
|
workspace: update.workspace,
|
|
@@ -101,7 +105,7 @@ function routeFromUpdate(update) {
|
|
|
101
105
|
};
|
|
102
106
|
}
|
|
103
107
|
function hashFromRoute(route) {
|
|
104
|
-
return route.page === "users" ? `#${nav.users()}` : `#${nav.entry(
|
|
108
|
+
return route.page === "splash" ? `#${nav.splash()}` : route.page === "users" ? `#${nav.users()}` : `#${nav.entry(
|
|
105
109
|
route.workspace,
|
|
106
110
|
route.root,
|
|
107
111
|
route.entry,
|
|
@@ -188,7 +192,8 @@ var pageAtom = atom((get) => {
|
|
|
188
192
|
const config = get(configAtom);
|
|
189
193
|
const policy = get(policyAtom);
|
|
190
194
|
const workspaces = get(workspacesAtom);
|
|
191
|
-
const
|
|
195
|
+
const pageType = route.page === "splash" && workspaces.length === 1 ? "entry" : route.page;
|
|
196
|
+
const workspace = pageType === "splash" ? void 0 : route.workspace && workspaces.includes(route.workspace) ? route.workspace : workspaces[0];
|
|
192
197
|
const workspaceConfig = workspace ? get(workspaceAtom(workspace)) : void 0;
|
|
193
198
|
const roots = workspaceConfig ? Object.keys(workspaceConfig.roots).filter(
|
|
194
199
|
(root2) => policy.canRead({ workspace, root: root2 })
|
|
@@ -198,7 +203,7 @@ var pageAtom = atom((get) => {
|
|
|
198
203
|
const i18n = rootConfig ? getRoot(rootConfig).i18n : void 0;
|
|
199
204
|
const locale = route.locale && i18n?.locales.includes(route.locale) ? route.locale : i18n?.locales[0] ?? null;
|
|
200
205
|
return {
|
|
201
|
-
type:
|
|
206
|
+
type: pageType,
|
|
202
207
|
workspace,
|
|
203
208
|
root,
|
|
204
209
|
requestedRoot: route.root,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
unwrap
|
|
3
|
-
} from "../../chunks/chunk-
|
|
3
|
+
} from "../../chunks/chunk-TIJTT5ZI.js";
|
|
4
4
|
import {
|
|
5
5
|
atom
|
|
6
|
-
} from "../../chunks/chunk-
|
|
6
|
+
} from "../../chunks/chunk-CFNRVI3Y.js";
|
|
7
7
|
import "../../chunks/chunk-CQ52GEHY.js";
|
|
8
8
|
|
|
9
9
|
// src/dashboard/atoms/root.ts
|
|
@@ -5,5 +5,5 @@ export declare const policyAtom: import("jotai").Atom<Policy>;
|
|
|
5
5
|
export declare const preloadUserPolicyAtom: import("jotai").WritableAtom<null, [user: User, policy: Policy], void> & {
|
|
6
6
|
init: null;
|
|
7
7
|
};
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const userPolicyReadyAtom: import("jotai").Atom<Promise<void>>;
|
|
9
9
|
export declare const canManageMembersAtom: import("jotai").Atom<Promise<boolean>>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
selectAtom,
|
|
3
3
|
unwrap
|
|
4
|
-
} from "../../chunks/chunk-
|
|
4
|
+
} from "../../chunks/chunk-TIJTT5ZI.js";
|
|
5
5
|
import {
|
|
6
6
|
atom
|
|
7
|
-
} from "../../chunks/chunk-
|
|
7
|
+
} from "../../chunks/chunk-CFNRVI3Y.js";
|
|
8
8
|
import "../../chunks/chunk-CQ52GEHY.js";
|
|
9
9
|
|
|
10
10
|
// src/dashboard/atoms/user.ts
|
|
@@ -52,7 +52,7 @@ var preloadUserPolicyAtom = atom(
|
|
|
52
52
|
set(preloadedPolicyAtom, policy);
|
|
53
53
|
}
|
|
54
54
|
);
|
|
55
|
-
var
|
|
55
|
+
var userPolicyReadyAtom = atom(async (get) => {
|
|
56
56
|
get(resolvedUser);
|
|
57
57
|
await get(userResult);
|
|
58
58
|
get(userAtom);
|
|
@@ -61,15 +61,17 @@ var authReady = atom(async (get) => {
|
|
|
61
61
|
get(policyAtom);
|
|
62
62
|
});
|
|
63
63
|
var canManageMembersAtom = atom(async (get) => {
|
|
64
|
-
const
|
|
64
|
+
const auth = get(authAtom);
|
|
65
|
+
if (auth.status !== "authenticated") return false;
|
|
66
|
+
const capabilities = auth.capabilities ?? await get(clientAtom).capabilities();
|
|
65
67
|
if (!capabilities.users) return false;
|
|
66
68
|
const policy = await get(policyResult);
|
|
67
69
|
return policy.canManageMembers();
|
|
68
70
|
});
|
|
69
71
|
export {
|
|
70
|
-
authReady,
|
|
71
72
|
canManageMembersAtom,
|
|
72
73
|
policyAtom,
|
|
73
74
|
preloadUserPolicyAtom,
|
|
74
|
-
userAtom
|
|
75
|
+
userAtom,
|
|
76
|
+
userPolicyReadyAtom
|
|
75
77
|
};
|