@alpaca-editor/core 1.0.3906 → 1.0.3908
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/components/ActionButton.d.ts +1 -1
- package/dist/components/ui/card.js +2 -2
- package/dist/components/ui/card.js.map +1 -1
- package/dist/config/config.js +34 -2
- package/dist/config/config.js.map +1 -1
- package/dist/editor/ConfirmationDialog.js +1 -1
- package/dist/editor/ConfirmationDialog.js.map +1 -1
- package/dist/editor/Titlebar.js +2 -2
- package/dist/editor/Titlebar.js.map +1 -1
- package/dist/editor/client/EditorClient.js +4 -2
- package/dist/editor/client/EditorClient.js.map +1 -1
- package/dist/editor/menubar/ActionsMenu.js +1 -0
- package/dist/editor/menubar/ActionsMenu.js.map +1 -1
- package/dist/editor/sidebar/ViewSelector.js +3 -3
- package/dist/editor/sidebar/ViewSelector.js.map +1 -1
- package/dist/editor/ui/Icons.d.ts +1 -0
- package/dist/editor/ui/Icons.js +4 -1
- package/dist/editor/ui/Icons.js.map +1 -1
- package/dist/editor/ui/Spinner.js +1 -1
- package/dist/editor/ui/Spinner.js.map +1 -1
- package/dist/editor/ui/Splitter.js +2 -2
- package/dist/editor/ui/Splitter.js.map +1 -1
- package/dist/page-wizard/WizardSteps.js +1 -1
- package/dist/page-wizard/WizardSteps.js.map +1 -1
- package/dist/page-wizard/steps/CollectStep.d.ts +1 -1
- package/dist/page-wizard/steps/CollectStep.js +22 -11
- package/dist/page-wizard/steps/CollectStep.js.map +1 -1
- package/dist/page-wizard/steps/ComponentTypesSelector.js +3 -5
- package/dist/page-wizard/steps/ComponentTypesSelector.js.map +1 -1
- package/dist/page-wizard/steps/ContentStep.js +111 -10
- package/dist/page-wizard/steps/ContentStep.js.map +1 -1
- package/dist/page-wizard/steps/ImagesStep.js +12 -2
- package/dist/page-wizard/steps/ImagesStep.js.map +1 -1
- package/dist/page-wizard/steps/LayoutStep.js +1 -1
- package/dist/page-wizard/steps/LayoutStep.js.map +1 -1
- package/dist/page-wizard/steps/MetaDataStep.d.ts +2 -0
- package/dist/page-wizard/steps/MetaDataStep.js +90 -0
- package/dist/page-wizard/steps/MetaDataStep.js.map +1 -0
- package/dist/page-wizard/steps/SelectStep.js +1 -1
- package/dist/page-wizard/steps/SelectStep.js.map +1 -1
- package/dist/revision.d.ts +2 -2
- package/dist/revision.js +2 -2
- package/dist/splash-screen/NewPage.js +15 -13
- package/dist/splash-screen/NewPage.js.map +1 -1
- package/dist/splash-screen/OpenPage.d.ts +1 -0
- package/dist/splash-screen/OpenPage.js +58 -0
- package/dist/splash-screen/OpenPage.js.map +1 -0
- package/dist/splash-screen/SplashScreen.d.ts +1 -1
- package/dist/splash-screen/SplashScreen.js +51 -76
- package/dist/splash-screen/SplashScreen.js.map +1 -1
- package/dist/styles.css +36 -36
- package/package.json +1 -1
- package/src/components/ActionButton.tsx +1 -1
- package/src/components/ui/card.tsx +52 -47
- package/src/config/config.tsx +35 -4
- package/src/editor/ConfirmationDialog.tsx +1 -1
- package/src/editor/Titlebar.tsx +2 -2
- package/src/editor/client/EditorClient.tsx +5 -2
- package/src/editor/menubar/ActionsMenu.tsx +1 -0
- package/src/editor/menubar/SecondaryControls.tsx +1 -1
- package/src/editor/sidebar/ViewSelector.tsx +3 -3
- package/src/editor/ui/Icons.tsx +22 -1
- package/src/editor/ui/Spinner.tsx +3 -1
- package/src/editor/ui/Splitter.tsx +2 -2
- package/src/page-wizard/WizardSteps.tsx +1 -1
- package/src/page-wizard/steps/CollectStep.tsx +137 -115
- package/src/page-wizard/steps/ComponentTypesSelector.tsx +4 -25
- package/src/page-wizard/steps/ContentStep.tsx +232 -23
- package/src/page-wizard/steps/ImagesStep.tsx +43 -3
- package/src/page-wizard/steps/LayoutStep.tsx +1 -1
- package/src/page-wizard/steps/MetaDataStep.tsx +173 -0
- package/src/page-wizard/steps/SelectStep.tsx +1 -1
- package/src/revision.ts +2 -2
- package/src/splash-screen/NewPage.tsx +133 -104
- package/src/splash-screen/OpenPage.tsx +146 -0
- package/src/splash-screen/SplashScreen.tsx +93 -164
- package/dist/page-wizard/steps/SetupPageStep.d.ts +0 -2
- package/dist/page-wizard/steps/SetupPageStep.js +0 -152
- package/dist/page-wizard/steps/SetupPageStep.js.map +0 -1
- package/src/page-wizard/steps/SetupPageStep.tsx +0 -329
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { HistoryEntry } from "../types";
|
|
4
|
+
import { useEffect, useState } from "react";
|
|
5
|
+
import { useEditContext } from "../editor/client/editContext";
|
|
6
|
+
import { ScrollingContentTree } from "../editor/ScrollingContentTree";
|
|
7
|
+
import { Spinner } from "../editor/ui/Spinner";
|
|
8
|
+
import { ItemDescriptor } from "../editor/pageModel";
|
|
9
|
+
import { Card } from "../components/ui/card";
|
|
10
|
+
import { Logo, MagicEditIcon } from "../editor/ui/Icons";
|
|
11
|
+
import { ActionButton } from "../components/ActionButton";
|
|
12
|
+
|
|
13
|
+
export function OpenPage() {
|
|
14
|
+
const savedHistory =
|
|
15
|
+
typeof window !== "undefined"
|
|
16
|
+
? localStorage.getItem("editor.browseHistory")
|
|
17
|
+
: null;
|
|
18
|
+
|
|
19
|
+
const [selectedPage, setSelectedPage] = useState<HistoryEntry | null>(null);
|
|
20
|
+
const editContext = useEditContext();
|
|
21
|
+
const recentPages: HistoryEntry[] = savedHistory
|
|
22
|
+
? JSON.parse(savedHistory)
|
|
23
|
+
: [];
|
|
24
|
+
|
|
25
|
+
const [history, setHistory] = useState<HistoryEntry[]>();
|
|
26
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
27
|
+
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
const fetchItems = async () => {
|
|
30
|
+
const pages = await editContext?.itemsRepository.getItems(recentPages);
|
|
31
|
+
setHistory(pages);
|
|
32
|
+
};
|
|
33
|
+
fetchItems();
|
|
34
|
+
}, [editContext?.itemsRepository]);
|
|
35
|
+
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
if (recentPages.length > 0 && recentPages[0])
|
|
38
|
+
setSelectedPage(recentPages[0]);
|
|
39
|
+
}, []);
|
|
40
|
+
|
|
41
|
+
if (isLoading) {
|
|
42
|
+
return (
|
|
43
|
+
<div className="flex h-full items-center justify-center bg-gray-100">
|
|
44
|
+
<Spinner />
|
|
45
|
+
</div>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const loadItem = (item: ItemDescriptor) => {
|
|
50
|
+
setIsLoading(true);
|
|
51
|
+
editContext?.switchView("page-editor");
|
|
52
|
+
editContext
|
|
53
|
+
?.loadItem({
|
|
54
|
+
id: item.id,
|
|
55
|
+
language: item.language ?? "en",
|
|
56
|
+
version: item.version,
|
|
57
|
+
})
|
|
58
|
+
.finally(() => {
|
|
59
|
+
setIsLoading(false);
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const renderContent = () => {
|
|
64
|
+
return (
|
|
65
|
+
<div className="flex h-full flex-col gap-6">
|
|
66
|
+
<div className="flex gap-4">
|
|
67
|
+
<Logo className="h-8 w-8" />
|
|
68
|
+
<div className="flex-1 text-neutral-800">
|
|
69
|
+
<div className="text-lg font-semibold md:text-xl">Open Page</div>
|
|
70
|
+
<div className="mt-1 text-xs font-light md:text-sm">
|
|
71
|
+
Browse your content structure or access recently viewed pages
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
<div className="flex items-start">
|
|
75
|
+
<ActionButton
|
|
76
|
+
onClick={() => editContext?.switchView("new-page")}
|
|
77
|
+
isLoading={false}
|
|
78
|
+
>
|
|
79
|
+
Create New Page <MagicEditIcon />
|
|
80
|
+
</ActionButton>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
<div className="flex flex-1 flex-col gap-4 text-sm md:flex-row">
|
|
85
|
+
<div className="flex-1">
|
|
86
|
+
<Card
|
|
87
|
+
icon={<i className="pi pi-sitemap text-sm"></i>}
|
|
88
|
+
title="Browse Content"
|
|
89
|
+
description="Navigate through your content structure"
|
|
90
|
+
noPadding
|
|
91
|
+
className="h-full"
|
|
92
|
+
>
|
|
93
|
+
<div className="h-full px-4">
|
|
94
|
+
<div className="relative h-full">
|
|
95
|
+
<ScrollingContentTree
|
|
96
|
+
selectedItemId={selectedPage?.id}
|
|
97
|
+
onSelectionChange={(selection) => {
|
|
98
|
+
const selectedItem = selection[0];
|
|
99
|
+
if (selectedItem) {
|
|
100
|
+
loadItem(selectedItem);
|
|
101
|
+
}
|
|
102
|
+
}}
|
|
103
|
+
/>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
</Card>
|
|
107
|
+
</div>
|
|
108
|
+
<div className="flex-1 md:pl-4">
|
|
109
|
+
<Card
|
|
110
|
+
icon={<i className="pi pi-history text-sm"></i>}
|
|
111
|
+
title="Recent Pages"
|
|
112
|
+
description="Quick access to your recently viewed pages"
|
|
113
|
+
noPadding
|
|
114
|
+
className="h-full"
|
|
115
|
+
>
|
|
116
|
+
<div className="relative h-full">
|
|
117
|
+
<ul className="absolute inset-0 overflow-auto p-4 pt-0 md:p-6">
|
|
118
|
+
{history?.map((page, index) => (
|
|
119
|
+
<li
|
|
120
|
+
key={index}
|
|
121
|
+
onMouseOver={() => setSelectedPage(page)}
|
|
122
|
+
onClick={() => loadItem(page)}
|
|
123
|
+
className="flex cursor-pointer items-center gap-2 rounded p-1.5 text-xs hover:bg-gray-100"
|
|
124
|
+
>
|
|
125
|
+
{page.icon && (
|
|
126
|
+
<img src={page.icon} width="16" height="16" />
|
|
127
|
+
)}{" "}
|
|
128
|
+
{page.name}{" "}
|
|
129
|
+
<span className="text-gray-500">({page.language})</span>
|
|
130
|
+
</li>
|
|
131
|
+
))}
|
|
132
|
+
</ul>
|
|
133
|
+
</div>
|
|
134
|
+
</Card>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
);
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
return (
|
|
142
|
+
<div className="flex h-full flex-col bg-gray-100 p-4 md:p-8">
|
|
143
|
+
{renderContent()}
|
|
144
|
+
</div>
|
|
145
|
+
);
|
|
146
|
+
}
|
|
@@ -1,184 +1,113 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { HistoryEntry } from "../types";
|
|
4
|
-
import { useEffect, useState } from "react";
|
|
5
|
-
import { useEditContext } from "../editor/client/editContext";
|
|
6
|
-
import { SimpleTabs, Tab } from "../editor/ui/SimpleTabs";
|
|
7
|
-
import { ScrollingContentTree } from "../editor/ScrollingContentTree";
|
|
8
|
-
import { NewPage } from "./NewPage";
|
|
9
|
-
import { usePathname, useRouter } from "next/navigation";
|
|
10
|
-
import { SimpleIconButton } from "../editor/ui/SimpleIconButton";
|
|
11
|
-
import { Spinner } from "../editor/ui/Spinner";
|
|
12
|
-
import { ItemDescriptor } from "../editor/pageModel";
|
|
13
1
|
import { Card } from "../components/ui/card";
|
|
2
|
+
import { Logo } from "../editor/ui/Icons";
|
|
3
|
+
import { useEditContext } from "../editor/client/editContext";
|
|
4
|
+
import { useEffect, useState } from "react";
|
|
5
|
+
import { getWizards } from "../page-wizard/service";
|
|
6
|
+
import { Wizard } from "../page-wizard/PageWizard";
|
|
14
7
|
|
|
15
8
|
export function SplashScreen() {
|
|
16
|
-
const savedHistory =
|
|
17
|
-
typeof window !== "undefined"
|
|
18
|
-
? localStorage.getItem("editor.browseHistory")
|
|
19
|
-
: null;
|
|
20
|
-
const [selectedPage, setSelectedPage] = useState<HistoryEntry | null>(null);
|
|
21
|
-
const [activeTab, setActiveTab] = useState(0);
|
|
22
9
|
const editContext = useEditContext();
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
: [];
|
|
26
|
-
|
|
27
|
-
const searchParams = new URLSearchParams(window.location.search);
|
|
28
|
-
const [history, setHistory] = useState<HistoryEntry[]>();
|
|
29
|
-
const router = useRouter();
|
|
30
|
-
const pathname = usePathname();
|
|
31
|
-
|
|
32
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
10
|
+
const [demoId, setDemoId] = useState<string | null>(null);
|
|
11
|
+
const [demoWizard, setDemoWizard] = useState<Wizard | null>(null);
|
|
33
12
|
|
|
34
13
|
useEffect(() => {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
useEffect(() => {
|
|
43
|
-
if (recentPages.length > 0 && recentPages[0])
|
|
44
|
-
setSelectedPage(recentPages[0]);
|
|
45
|
-
if (searchParams.get("create") === "1") setActiveTab(1);
|
|
14
|
+
// Check for demoId in URL parameters
|
|
15
|
+
if (typeof window !== "undefined") {
|
|
16
|
+
const searchParams = new URLSearchParams(window.location.search);
|
|
17
|
+
const demoIdParam = searchParams.get("demoId");
|
|
18
|
+
setDemoId(demoIdParam);
|
|
19
|
+
}
|
|
46
20
|
}, []);
|
|
47
21
|
|
|
48
22
|
useEffect(() => {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
23
|
+
const loadDemoData = async () => {
|
|
24
|
+
if (!demoId || !editContext) return;
|
|
25
|
+
|
|
26
|
+
try {
|
|
27
|
+
// Get available wizards for this parent item
|
|
28
|
+
const wizards = await getWizards({
|
|
29
|
+
id: demoId,
|
|
30
|
+
language: "en",
|
|
31
|
+
version: 0,
|
|
32
|
+
});
|
|
33
|
+
if (wizards && wizards.length > 0) {
|
|
34
|
+
setDemoWizard(wizards[0] || null); // Choose the first available wizard
|
|
35
|
+
}
|
|
36
|
+
} catch (error) {
|
|
37
|
+
console.error("Failed to load demo data:", error);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
55
40
|
|
|
56
|
-
|
|
41
|
+
loadDemoData();
|
|
42
|
+
}, [demoId]);
|
|
57
43
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
<div className="flex h-full items-center justify-center bg-gray-100">
|
|
61
|
-
<Spinner />
|
|
62
|
-
</div>
|
|
63
|
-
);
|
|
64
|
-
}
|
|
44
|
+
const launchDemoWizard = () => {
|
|
45
|
+
if (!demoWizard || !demoId || !editContext) return;
|
|
65
46
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
47
|
+
editContext.executeCommand({
|
|
48
|
+
command: editContext.configuration.pageWizard.startWizardCommand,
|
|
49
|
+
data: {
|
|
50
|
+
wizard: demoWizard,
|
|
51
|
+
item: {
|
|
52
|
+
id: demoId,
|
|
53
|
+
language: "en",
|
|
54
|
+
version: 0,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
});
|
|
75
58
|
};
|
|
76
59
|
|
|
77
|
-
const tabs: Tab[] = [
|
|
78
|
-
{
|
|
79
|
-
content: (
|
|
80
|
-
<div className="flex flex-1 flex-col gap-4 text-sm md:flex-row">
|
|
81
|
-
<div className="flex-1">
|
|
82
|
-
<Card
|
|
83
|
-
icon={<i className="pi pi-sitemap text-sm"></i>}
|
|
84
|
-
title="Browse Content"
|
|
85
|
-
description="Navigate through your content structure"
|
|
86
|
-
noPadding
|
|
87
|
-
className="h-full"
|
|
88
|
-
>
|
|
89
|
-
<div className="relative h-full">
|
|
90
|
-
<ScrollingContentTree
|
|
91
|
-
selectedItemId={selectedPage?.id}
|
|
92
|
-
onSelectionChange={(selection) => {
|
|
93
|
-
const selectedItem = selection[0];
|
|
94
|
-
if (selectedItem) {
|
|
95
|
-
loadItem(selectedItem);
|
|
96
|
-
}
|
|
97
|
-
}}
|
|
98
|
-
/>
|
|
99
|
-
</div>
|
|
100
|
-
</Card>
|
|
101
|
-
</div>
|
|
102
|
-
<div className="flex-1 md:pl-4">
|
|
103
|
-
<Card
|
|
104
|
-
icon={<i className="pi pi-history text-sm"></i>}
|
|
105
|
-
title="Recent Pages"
|
|
106
|
-
description="Quick access to your recently viewed pages"
|
|
107
|
-
noPadding
|
|
108
|
-
className="h-full"
|
|
109
|
-
>
|
|
110
|
-
<div className="relative h-full">
|
|
111
|
-
<ul className="absolute inset-0 overflow-auto p-6 pt-0">
|
|
112
|
-
{history?.map((page, index) => (
|
|
113
|
-
<li
|
|
114
|
-
key={index}
|
|
115
|
-
onMouseOver={() => setSelectedPage(page)}
|
|
116
|
-
onClick={() => loadItem(page)}
|
|
117
|
-
className="flex cursor-pointer items-center gap-2 rounded p-2 text-xs hover:bg-gray-100"
|
|
118
|
-
>
|
|
119
|
-
{page.icon && (
|
|
120
|
-
<img src={page.icon} width="16" height="16" />
|
|
121
|
-
)}{" "}
|
|
122
|
-
{page.name}{" "}
|
|
123
|
-
<span className="text-gray-500">({page.language})</span>
|
|
124
|
-
</li>
|
|
125
|
-
))}
|
|
126
|
-
</ul>
|
|
127
|
-
</div>
|
|
128
|
-
</Card>
|
|
129
|
-
</div>
|
|
130
|
-
</div>
|
|
131
|
-
),
|
|
132
|
-
label: "Open Page",
|
|
133
|
-
id: "open-page-tab",
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
content: (
|
|
137
|
-
<div className="relative flex flex-1 flex-col">
|
|
138
|
-
<NewPage selectedItemId={selectedPage?.id} />
|
|
139
|
-
</div>
|
|
140
|
-
),
|
|
141
|
-
label: "New Page",
|
|
142
|
-
id: "new-page-tab",
|
|
143
|
-
testId: "new-page-tab",
|
|
144
|
-
},
|
|
145
|
-
];
|
|
146
|
-
|
|
147
60
|
return (
|
|
148
|
-
<div className="flex h-full items-center justify-center bg-gray-100">
|
|
149
|
-
<
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
<div className="flex
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
onClick={
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
61
|
+
<div className="flex h-full w-full items-center justify-center bg-gray-100">
|
|
62
|
+
<Card
|
|
63
|
+
title="Welcome to the Editor Without A Name"
|
|
64
|
+
description="The easiest way to create and manage your content"
|
|
65
|
+
icon={<Logo />}
|
|
66
|
+
>
|
|
67
|
+
<div className="flex flex-col gap-4 text-sm text-gray-500">
|
|
68
|
+
Ewan is an editor for your favorite content management system. It
|
|
69
|
+
allows you to create and manage your content in a simple and intuitive
|
|
70
|
+
way.
|
|
71
|
+
<div className="flex flex-col gap-4">
|
|
72
|
+
{/* Show demo wizard button if demoId is present and wizard is available */}
|
|
73
|
+
{demoWizard && (
|
|
74
|
+
<CtaButton onClick={launchDemoWizard}>
|
|
75
|
+
Launch Page Wizard
|
|
76
|
+
</CtaButton>
|
|
77
|
+
)}
|
|
78
|
+
{!demoWizard && (
|
|
79
|
+
<>
|
|
80
|
+
<CtaButton onClick={() => editContext?.switchView("new-page")}>
|
|
81
|
+
Create New Page
|
|
82
|
+
</CtaButton>
|
|
83
|
+
</>
|
|
84
|
+
)}
|
|
85
|
+
<CtaButton onClick={() => editContext?.switchView("open-page")}>
|
|
86
|
+
Open Existing Page
|
|
87
|
+
</CtaButton>
|
|
88
|
+
{/* <CtaButton onClick={() => editContext?.switchView("new-page")}>
|
|
89
|
+
Take a Tour
|
|
90
|
+
</CtaButton> */}
|
|
165
91
|
</div>
|
|
166
92
|
</div>
|
|
167
|
-
|
|
168
|
-
<div className="absolute top-0 right-0 hidden p-2 md:block">
|
|
169
|
-
<SimpleIconButton
|
|
170
|
-
icon="pi pi-times"
|
|
171
|
-
onClick={() =>
|
|
172
|
-
editContext?.switchView(
|
|
173
|
-
editContext.contentEditorItem?.hasLayout
|
|
174
|
-
? "page-editor"
|
|
175
|
-
: "content-editor",
|
|
176
|
-
)
|
|
177
|
-
}
|
|
178
|
-
label="Close"
|
|
179
|
-
/>
|
|
180
|
-
</div>
|
|
181
|
-
</div>
|
|
93
|
+
</Card>
|
|
182
94
|
</div>
|
|
183
95
|
);
|
|
184
96
|
}
|
|
97
|
+
|
|
98
|
+
function CtaButton({
|
|
99
|
+
children,
|
|
100
|
+
onClick,
|
|
101
|
+
}: {
|
|
102
|
+
children: React.ReactNode;
|
|
103
|
+
onClick: () => void;
|
|
104
|
+
}) {
|
|
105
|
+
return (
|
|
106
|
+
<button
|
|
107
|
+
className="border-theme-secondary hover:bg-theme-secondary-light flex cursor-pointer flex-col gap-4 rounded-lg border p-8 text-2xl"
|
|
108
|
+
onClick={onClick}
|
|
109
|
+
>
|
|
110
|
+
{children}
|
|
111
|
+
</button>
|
|
112
|
+
);
|
|
113
|
+
}
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useState, useCallback } from "react";
|
|
3
|
-
import { executePrompt } from "../../editor/services/aiService";
|
|
4
|
-
import { createWizardAiContext } from "../service";
|
|
5
|
-
import { useEditContext } from "../../editor/client/editContext";
|
|
6
|
-
import { LanguageSelector } from "../../editor/menubar/LanguageSelector";
|
|
7
|
-
import { InputText } from "primereact/inputtext";
|
|
8
|
-
import { InputTextarea } from "primereact/inputtextarea";
|
|
9
|
-
import { WizardBox } from "../WizardBox";
|
|
10
|
-
import { WizardBoxConnector } from "../WizardBoxConnector";
|
|
11
|
-
import { Settings, FileText } from "lucide-react";
|
|
12
|
-
import Generate from "./Generate";
|
|
13
|
-
import { getChildren } from "../../editor/services/contentService";
|
|
14
|
-
export function SetupPageStep({ wizard, parentItem, pageModel, setPageModel, step, data, setStepCompleted, }) {
|
|
15
|
-
const [isGenerating, setIsGenerating] = useState(false);
|
|
16
|
-
const [language, setLanguage] = useState(parentItem?.language || "en");
|
|
17
|
-
const [previousLanguage, setPreviousLanguage] = useState(language);
|
|
18
|
-
const [fullParentItem, setFullParentItem] = useState();
|
|
19
|
-
const [nameValidation, setNameValidation] = useState({ isValid: false });
|
|
20
|
-
const editContext = useEditContext();
|
|
21
|
-
const checkPageName = useCallback(async () => {
|
|
22
|
-
if (!parentItem) {
|
|
23
|
-
setNameValidation({ isValid: false, message: "No parent item" });
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
// Check if page name is valid
|
|
27
|
-
if (!pageModel.name || pageModel.name.trim().length < 3) {
|
|
28
|
-
setNameValidation({
|
|
29
|
-
isValid: false,
|
|
30
|
-
message: "Page name must be at least 3 characters long",
|
|
31
|
-
});
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
try {
|
|
35
|
-
// Check if page with same name already exists
|
|
36
|
-
const children = await getChildren(parentItem.id, editContext?.sessionId ?? "", [], false, editContext?.contentEditorItem?.language || "en");
|
|
37
|
-
if (children.find((x) => x.name.toLocaleLowerCase() ===
|
|
38
|
-
pageModel.name.trim().toLocaleLowerCase())) {
|
|
39
|
-
setNameValidation({
|
|
40
|
-
isValid: false,
|
|
41
|
-
message: "A page with this name already exists",
|
|
42
|
-
});
|
|
43
|
-
return false;
|
|
44
|
-
}
|
|
45
|
-
setNameValidation({ isValid: true });
|
|
46
|
-
return true;
|
|
47
|
-
}
|
|
48
|
-
catch (error) {
|
|
49
|
-
setNameValidation({
|
|
50
|
-
isValid: false,
|
|
51
|
-
message: "Error checking page name",
|
|
52
|
-
});
|
|
53
|
-
return false;
|
|
54
|
-
}
|
|
55
|
-
}, [
|
|
56
|
-
parentItem,
|
|
57
|
-
pageModel.name,
|
|
58
|
-
editContext?.sessionId,
|
|
59
|
-
editContext?.contentEditorItem?.language,
|
|
60
|
-
]);
|
|
61
|
-
// Check page name whenever it changes
|
|
62
|
-
useEffect(() => {
|
|
63
|
-
if (pageModel.name) {
|
|
64
|
-
checkPageName();
|
|
65
|
-
}
|
|
66
|
-
}, [pageModel.name, checkPageName]);
|
|
67
|
-
// Mark step as completed when page name is valid
|
|
68
|
-
useEffect(() => {
|
|
69
|
-
if (nameValidation.isValid) {
|
|
70
|
-
setStepCompleted(true);
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
setStepCompleted(false);
|
|
74
|
-
}
|
|
75
|
-
}, [nameValidation.isValid, setStepCompleted]);
|
|
76
|
-
useEffect(() => {
|
|
77
|
-
if (!editContext)
|
|
78
|
-
return;
|
|
79
|
-
if (editContext.mode !== "edit") {
|
|
80
|
-
editContext.setMode("edit");
|
|
81
|
-
}
|
|
82
|
-
}, [editContext]);
|
|
83
|
-
useEffect(() => {
|
|
84
|
-
if (!editContext)
|
|
85
|
-
return;
|
|
86
|
-
const generateNameAndMetaDescription = async () => {
|
|
87
|
-
const metaInstructions = step["Instructions for generating item name and meta fields"];
|
|
88
|
-
setIsGenerating(true);
|
|
89
|
-
try {
|
|
90
|
-
const abortController = new AbortController();
|
|
91
|
-
const result = await executePrompt([
|
|
92
|
-
{
|
|
93
|
-
content: `${metaInstructions?.trim()} Reply with a json object of type PageModel = { name: string; metaDescription: string; metaKeywords: string; };
|
|
94
|
-
The item name should be a valid sitecore item name. Spaces are allowed but no special characters or Umlaute.
|
|
95
|
-
The language of the page is ${language}.
|
|
96
|
-
Input data: ${JSON.stringify(data)}`,
|
|
97
|
-
name: "system",
|
|
98
|
-
role: "system",
|
|
99
|
-
},
|
|
100
|
-
], editContext, createWizardAiContext, {}, { signal: abortController.signal }, "o3-mini-low", (response) => {
|
|
101
|
-
try {
|
|
102
|
-
const newLayout = JSON.parse(response.content);
|
|
103
|
-
setPageModel({
|
|
104
|
-
...pageModel,
|
|
105
|
-
name: newLayout.name,
|
|
106
|
-
metaDescription: newLayout.metaDescription,
|
|
107
|
-
metaKeywords: newLayout.metaKeywords,
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
catch (parseError) { }
|
|
111
|
-
});
|
|
112
|
-
const pageModel = JSON.parse(result.content);
|
|
113
|
-
setPageModel({
|
|
114
|
-
...pageModel,
|
|
115
|
-
name: pageModel.name,
|
|
116
|
-
metaDescription: pageModel.metaDescription,
|
|
117
|
-
metaKeywords: pageModel.metaKeywords,
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
catch (error) {
|
|
121
|
-
console.error("Error generating name and meta description", error);
|
|
122
|
-
}
|
|
123
|
-
finally {
|
|
124
|
-
setIsGenerating(false);
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
if (!pageModel.name)
|
|
128
|
-
generateNameAndMetaDescription();
|
|
129
|
-
}, []);
|
|
130
|
-
useEffect(() => {
|
|
131
|
-
const loadParentItem = async () => {
|
|
132
|
-
if (!parentItem)
|
|
133
|
-
return;
|
|
134
|
-
const item = await editContext?.itemsRepository.getItem(parentItem);
|
|
135
|
-
setFullParentItem(item);
|
|
136
|
-
};
|
|
137
|
-
loadParentItem();
|
|
138
|
-
}, [parentItem]);
|
|
139
|
-
const handleInputChange = (field, value) => {
|
|
140
|
-
const updatedPageModel = {
|
|
141
|
-
...pageModel,
|
|
142
|
-
[field]: value,
|
|
143
|
-
};
|
|
144
|
-
setPageModel(updatedPageModel);
|
|
145
|
-
};
|
|
146
|
-
return (_jsxs("div", { className: "flex h-full flex-col md:flex-row", children: [_jsx(WizardBox, { title: "Page Setup", icon: _jsx(Settings, {}), description: "Configure the target location and language for your new page", collapsible: "mobileOnly", defaultCollapsed: "mobileOnly", summary: _jsxs("div", { className: "text-xs text-gray-500", children: ["Folder: ", fullParentItem?.path, ", Language: ", language] }), children: _jsx("div", { className: "flex flex-col items-stretch", children: _jsxs("div", { className: "relative flex-1", children: [_jsxs("div", { className: "mb-4", children: [_jsx("div", { className: "mb-1 text-sm font-medium", children: "Target Parent Item" }), _jsx("div", { className: "mb-4 break-after-all text-xs", children: fullParentItem?.path })] }), _jsxs("div", { className: "relative mb-4", children: [_jsx("label", { htmlFor: "language", className: "mb-1 block text-sm font-medium", children: "Language" }), _jsx("div", { className: "w-fit", children: _jsx(LanguageSelector, { selectedLanguage: language, darkMode: true, disabled: isGenerating, onLanguageSelected: (language) => setLanguage(language.languageCode), showAllLanguages: true }) })] })] }) }) }), _jsx(WizardBoxConnector, {}), _jsx(WizardBox, { title: "Page Details", icon: _jsx(FileText, {}), description: "Define the page name and meta information for SEO optimization", className: "flex-1", children: _jsx("div", { className: "flex h-full flex-col items-stretch", children: _jsx("div", { className: "relative flex-1", children: isGenerating ? (_jsx("div", { className: "flex h-full items-center justify-center", children: _jsx(Generate, { title: "Generating page details..." }) })) : (_jsxs(_Fragment, { children: [_jsxs("div", { className: "mb-4", children: [_jsx("label", { htmlFor: "pageName", className: "mb-1 block text-sm font-medium", children: "Page Name" }), _jsx(InputText, { id: "pageName", type: "text", disabled: false, className: `w-full rounded border p-2 text-sm ${!nameValidation.isValid
|
|
147
|
-
? "border-red-500"
|
|
148
|
-
: nameValidation.isValid && pageModel.name
|
|
149
|
-
? "border-green-500"
|
|
150
|
-
: ""}`, value: pageModel.name, onChange: (e) => handleInputChange("name", e.target.value), placeholder: "Enter page name" }), nameValidation.message && !nameValidation.isValid && (_jsx("div", { className: "mt-1 text-xs text-red-600", children: nameValidation.message })), nameValidation.isValid && pageModel.name && (_jsx("div", { className: "mt-1 text-xs text-green-600", children: "\u2713 Page name is available" }))] }), _jsxs("div", { className: "mb-4", children: [_jsx("label", { htmlFor: "metaDescription", className: "mb-1 block text-sm font-medium", children: "Meta Description" }), _jsx(InputTextarea, { id: "metaDescription", className: "min-h-[100px] w-full rounded border p-2 text-sm", value: pageModel.metaDescription, onChange: (e) => handleInputChange("metaDescription", e.target.value), placeholder: "Enter meta description" })] }), _jsxs("div", { className: "mb-4", children: [_jsx("label", { htmlFor: "metaKeywords", className: "mb-1 block text-sm font-medium", children: "Meta Keywords" }), _jsx(InputTextarea, { id: "metaKeywords", className: "min-h-[100px] w-full rounded border p-2 text-sm", value: pageModel.metaKeywords, onChange: (e) => handleInputChange("metaKeywords", e.target.value), placeholder: "Enter meta keywords" })] })] })) }) }) })] }));
|
|
151
|
-
}
|
|
152
|
-
//# sourceMappingURL=SetupPageStep.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SetupPageStep.js","sourceRoot":"","sources":["../../../src/page-wizard/steps/SetupPageStep.t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