@alpaca-editor/core 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.prettierrc +3 -0
- package/eslint.config.mjs +4 -0
- package/images/bg-shape-black.webp +0 -0
- package/package.json +52 -0
- package/src/client-components/api.ts +6 -0
- package/src/client-components/index.ts +19 -0
- package/src/components/ActionButton.tsx +43 -0
- package/src/components/Error.tsx +57 -0
- package/src/config/config.tsx +737 -0
- package/src/config/types.ts +263 -0
- package/src/editor/ComponentInfo.tsx +77 -0
- package/src/editor/ConfirmationDialog.tsx +103 -0
- package/src/editor/ContentTree.tsx +654 -0
- package/src/editor/ContextMenu.tsx +155 -0
- package/src/editor/Editor.tsx +91 -0
- package/src/editor/EditorWarning.tsx +34 -0
- package/src/editor/EditorWarnings.tsx +33 -0
- package/src/editor/FieldEditorPopup.tsx +65 -0
- package/src/editor/FieldHistory.tsx +74 -0
- package/src/editor/FieldList.tsx +190 -0
- package/src/editor/FieldListField.tsx +387 -0
- package/src/editor/FieldListFieldWithFallbacks.tsx +211 -0
- package/src/editor/FloatingToolbar.tsx +163 -0
- package/src/editor/ImageEditor.tsx +129 -0
- package/src/editor/InsertMenu.tsx +332 -0
- package/src/editor/ItemInfo.tsx +90 -0
- package/src/editor/LinkEditorDialog.tsx +192 -0
- package/src/editor/MainLayout.tsx +94 -0
- package/src/editor/NewEditorClient.tsx +11 -0
- package/src/editor/PictureCropper.tsx +505 -0
- package/src/editor/PictureEditor.tsx +206 -0
- package/src/editor/PictureEditorDialog.tsx +381 -0
- package/src/editor/PublishDialog.ignore +74 -0
- package/src/editor/ScrollingContentTree.tsx +47 -0
- package/src/editor/Terminal.tsx +215 -0
- package/src/editor/Titlebar.tsx +23 -0
- package/src/editor/ai/AiPopup.tsx +59 -0
- package/src/editor/ai/AiResponseMessage.tsx +82 -0
- package/src/editor/ai/AiTerminal.tsx +450 -0
- package/src/editor/ai/AiToolCall.tsx +46 -0
- package/src/editor/ai/EditorAiTerminal.tsx +20 -0
- package/src/editor/ai/editorAiContext.ts +18 -0
- package/src/editor/client/DialogContext.tsx +49 -0
- package/src/editor/client/EditorClient.tsx +1831 -0
- package/src/editor/client/GenericDialog.tsx +50 -0
- package/src/editor/client/editContext.ts +330 -0
- package/src/editor/client/helpers.ts +44 -0
- package/src/editor/client/itemsRepository.ts +391 -0
- package/src/editor/client/operations.ts +610 -0
- package/src/editor/client/pageModelBuilder.ts +182 -0
- package/src/editor/commands/commands.ts +23 -0
- package/src/editor/commands/componentCommands.tsx +408 -0
- package/src/editor/commands/createVersionCommand.ts +33 -0
- package/src/editor/commands/deleteVersionCommand.ts +71 -0
- package/src/editor/commands/itemCommands.tsx +186 -0
- package/src/editor/commands/localizeItem/LocalizeItemDialog.tsx +201 -0
- package/src/editor/commands/undo.ts +39 -0
- package/src/editor/component-designer/ComponentDesigner.tsx +70 -0
- package/src/editor/component-designer/ComponentDesignerAiTerminal.tsx +11 -0
- package/src/editor/component-designer/ComponentDesignerMenu.tsx +91 -0
- package/src/editor/component-designer/ComponentEditor.tsx +97 -0
- package/src/editor/component-designer/ComponentRenderingCodeEditor.tsx +31 -0
- package/src/editor/component-designer/ComponentRenderingEditor.tsx +104 -0
- package/src/editor/component-designer/ComponentsDropdown.tsx +39 -0
- package/src/editor/component-designer/PlaceholdersEditor.tsx +183 -0
- package/src/editor/component-designer/RenderingsDropdown.tsx +36 -0
- package/src/editor/component-designer/TemplateEditor.tsx +236 -0
- package/src/editor/component-designer/aiContext.ts +23 -0
- package/src/editor/componentTreeHelper.tsx +114 -0
- package/src/editor/control-center/ControlCenterMenu.tsx +71 -0
- package/src/editor/control-center/IndexOverview.tsx +50 -0
- package/src/editor/control-center/IndexSettings.tsx +266 -0
- package/src/editor/control-center/Status.tsx +7 -0
- package/src/editor/editor-warnings/ItemLocked.tsx +63 -0
- package/src/editor/editor-warnings/NoLanguageWriteAccess.tsx +22 -0
- package/src/editor/editor-warnings/NoWorkflowWriteAccess.tsx +23 -0
- package/src/editor/editor-warnings/NoWriteAccess.tsx +15 -0
- package/src/editor/editor-warnings/ValidationErrors.tsx +54 -0
- package/src/editor/field-types/AttachmentEditor.tsx +9 -0
- package/src/editor/field-types/CheckboxEditor.tsx +47 -0
- package/src/editor/field-types/DropLinkEditor.tsx +75 -0
- package/src/editor/field-types/DropListEditor.tsx +84 -0
- package/src/editor/field-types/ImageFieldEditor.tsx +65 -0
- package/src/editor/field-types/InternalLinkFieldEditor.tsx +112 -0
- package/src/editor/field-types/LinkFieldEditor.tsx +85 -0
- package/src/editor/field-types/MultiLineText.tsx +63 -0
- package/src/editor/field-types/PictureFieldEditor.tsx +121 -0
- package/src/editor/field-types/RawEditor.tsx +53 -0
- package/src/editor/field-types/ReactQuill.tsx +580 -0
- package/src/editor/field-types/RichTextEditor.tsx +22 -0
- package/src/editor/field-types/RichTextEditorComponent.tsx +108 -0
- package/src/editor/field-types/SingleLineText.tsx +150 -0
- package/src/editor/field-types/TreeListEditor.tsx +261 -0
- package/src/editor/fieldTypes.ts +140 -0
- package/src/editor/media-selector/AiImageSearch.tsx +186 -0
- package/src/editor/media-selector/AiImageSearchPrompt.tsx +95 -0
- package/src/editor/media-selector/MediaSelector.tsx +42 -0
- package/src/editor/media-selector/Preview.tsx +14 -0
- package/src/editor/media-selector/Thumbnails.tsx +48 -0
- package/src/editor/media-selector/TreeSelector.tsx +292 -0
- package/src/editor/media-selector/UploadZone.tsx +137 -0
- package/src/editor/menubar/ActionsMenu.tsx +47 -0
- package/src/editor/menubar/ActiveUsers.tsx +17 -0
- package/src/editor/menubar/ApproveAndPublish.tsx +18 -0
- package/src/editor/menubar/BrowseHistory.tsx +37 -0
- package/src/editor/menubar/ItemLanguageVersion.tsx +52 -0
- package/src/editor/menubar/LanguageSelector.tsx +152 -0
- package/src/editor/menubar/Menu.tsx +83 -0
- package/src/editor/menubar/NavButtons.tsx +74 -0
- package/src/editor/menubar/PageSelector.tsx +139 -0
- package/src/editor/menubar/PageViewerControls.tsx +99 -0
- package/src/editor/menubar/Separator.tsx +12 -0
- package/src/editor/menubar/SiteInfo.tsx +53 -0
- package/src/editor/menubar/User.tsx +27 -0
- package/src/editor/menubar/VersionSelector.tsx +143 -0
- package/src/editor/page-editor-chrome/CommentHighlighting.tsx +287 -0
- package/src/editor/page-editor-chrome/CommentHighlightings.tsx +35 -0
- package/src/editor/page-editor-chrome/FieldActionIndicator.tsx +44 -0
- package/src/editor/page-editor-chrome/FieldActionIndicators.tsx +23 -0
- package/src/editor/page-editor-chrome/FieldEditedIndicator.tsx +64 -0
- package/src/editor/page-editor-chrome/FieldEditedIndicators.tsx +35 -0
- package/src/editor/page-editor-chrome/FrameMenu.tsx +263 -0
- package/src/editor/page-editor-chrome/FrameMenus.tsx +48 -0
- package/src/editor/page-editor-chrome/InlineEditor.tsx +147 -0
- package/src/editor/page-editor-chrome/LockedFieldIndicator.tsx +61 -0
- package/src/editor/page-editor-chrome/NoLayout.tsx +36 -0
- package/src/editor/page-editor-chrome/PageEditorChrome.tsx +119 -0
- package/src/editor/page-editor-chrome/PictureEditorOverlay.tsx +154 -0
- package/src/editor/page-editor-chrome/PlaceholderDropZone.tsx +171 -0
- package/src/editor/page-editor-chrome/PlaceholderDropZones.tsx +233 -0
- package/src/editor/page-viewer/DeviceToolbar.tsx +70 -0
- package/src/editor/page-viewer/EditorForm.tsx +247 -0
- package/src/editor/page-viewer/MiniMap.tsx +351 -0
- package/src/editor/page-viewer/PageViewer.tsx +127 -0
- package/src/editor/page-viewer/PageViewerFrame.tsx +1030 -0
- package/src/editor/page-viewer/pageViewContext.ts +186 -0
- package/src/editor/pageModel.ts +191 -0
- package/src/editor/picture-shared.tsx +53 -0
- package/src/editor/reviews/Comment.tsx +265 -0
- package/src/editor/reviews/Comments.tsx +50 -0
- package/src/editor/reviews/PreviewInfo.tsx +35 -0
- package/src/editor/reviews/Reviews.tsx +280 -0
- package/src/editor/reviews/reviewCommands.tsx +47 -0
- package/src/editor/reviews/useReviews.tsx +70 -0
- package/src/editor/services/aiService.ts +155 -0
- package/src/editor/services/componentDesignerService.ts +151 -0
- package/src/editor/services/contentService.ts +159 -0
- package/src/editor/services/editService.ts +462 -0
- package/src/editor/services/indexService.ts +24 -0
- package/src/editor/services/reviewsService.ts +45 -0
- package/src/editor/services/serviceHelper.ts +95 -0
- package/src/editor/services/systemService.ts +5 -0
- package/src/editor/services/translationService.ts +21 -0
- package/src/editor/services-server/api.ts +150 -0
- package/src/editor/services-server/graphQL.ts +106 -0
- package/src/editor/sidebar/ComponentPalette.tsx +146 -0
- package/src/editor/sidebar/ComponentTree.tsx +512 -0
- package/src/editor/sidebar/ComponentTree2.tsxx +490 -0
- package/src/editor/sidebar/Debug.tsx +105 -0
- package/src/editor/sidebar/DictionaryEditor.tsx +261 -0
- package/src/editor/sidebar/EditHistory.tsx +134 -0
- package/src/editor/sidebar/GraphQL.tsx +164 -0
- package/src/editor/sidebar/Insert.tsx +35 -0
- package/src/editor/sidebar/MainContentTree.tsx +95 -0
- package/src/editor/sidebar/Performance.tsx +53 -0
- package/src/editor/sidebar/Sessions.tsx +35 -0
- package/src/editor/sidebar/Sidebar.tsx +20 -0
- package/src/editor/sidebar/SidebarView.tsx +150 -0
- package/src/editor/sidebar/Translations.tsx +276 -0
- package/src/editor/sidebar/Validation.tsx +102 -0
- package/src/editor/sidebar/ViewSelector.tsx +49 -0
- package/src/editor/sidebar/Workbox.tsx +209 -0
- package/src/editor/ui/CenteredMessage.tsx +7 -0
- package/src/editor/ui/CopyToClipboardButton.tsx +23 -0
- package/src/editor/ui/DialogButtons.tsx +11 -0
- package/src/editor/ui/Icons.tsx +585 -0
- package/src/editor/ui/ItemNameDialog.tsx +94 -0
- package/src/editor/ui/ItemNameDialogNew.tsx +118 -0
- package/src/editor/ui/ItemSearch.tsx +173 -0
- package/src/editor/ui/PerfectTree.tsx +550 -0
- package/src/editor/ui/Section.tsx +35 -0
- package/src/editor/ui/SimpleIconButton.tsx +43 -0
- package/src/editor/ui/SimpleMenu.tsx +48 -0
- package/src/editor/ui/SimpleTable.tsx +63 -0
- package/src/editor/ui/SimpleTabs.tsx +55 -0
- package/src/editor/ui/SimpleToolbar.tsx +7 -0
- package/src/editor/ui/Spinner.tsx +7 -0
- package/src/editor/ui/Splitter.tsx +247 -0
- package/src/editor/ui/StackedPanels.tsx +134 -0
- package/src/editor/ui/Toolbar.tsx +7 -0
- package/src/editor/utils/id-helper.ts +3 -0
- package/src/editor/utils/insertOptions.ts +69 -0
- package/src/editor/utils/itemutils.ts +29 -0
- package/src/editor/utils/useMemoDebug.ts +28 -0
- package/src/editor/utils.ts +435 -0
- package/src/editor/views/CompareView.tsx +256 -0
- package/src/editor/views/EditView.tsx +27 -0
- package/src/editor/views/ItemEditor.tsx +58 -0
- package/src/editor/views/SingleEditView.tsx +44 -0
- package/src/fonts/Geist-Black.woff2 +0 -0
- package/src/fonts/Geist-Bold.woff2 +0 -0
- package/src/fonts/Geist-ExtraBold.woff2 +0 -0
- package/src/fonts/Geist-ExtraLight.woff2 +0 -0
- package/src/fonts/Geist-Light.woff2 +0 -0
- package/src/fonts/Geist-Medium.woff2 +0 -0
- package/src/fonts/Geist-Regular.woff2 +0 -0
- package/src/fonts/Geist-SemiBold.woff2 +0 -0
- package/src/fonts/Geist-Thin.woff2 +0 -0
- package/src/fonts/Geist[wght].woff2 +0 -0
- package/src/index.ts +7 -0
- package/src/page-wizard/PageWizard.tsx +163 -0
- package/src/page-wizard/SelectWizard.tsx +109 -0
- package/src/page-wizard/WizardSteps.tsx +207 -0
- package/src/page-wizard/service.ts +35 -0
- package/src/page-wizard/startPageWizardCommand.ts +27 -0
- package/src/page-wizard/steps/BuildPageStep.tsx +266 -0
- package/src/page-wizard/steps/CollectStep.tsx +233 -0
- package/src/page-wizard/steps/ComponentTypesSelector.tsx +443 -0
- package/src/page-wizard/steps/Components.tsx +193 -0
- package/src/page-wizard/steps/CreatePage.tsx +285 -0
- package/src/page-wizard/steps/CreatePageAndLayoutStep.tsx +384 -0
- package/src/page-wizard/steps/EditButton.tsx +34 -0
- package/src/page-wizard/steps/FieldEditor.tsx +102 -0
- package/src/page-wizard/steps/Generate.tsx +32 -0
- package/src/page-wizard/steps/ImagesStep.tsx +318 -0
- package/src/page-wizard/steps/LayoutStep.tsx +228 -0
- package/src/page-wizard/steps/SelectStep.tsx +256 -0
- package/src/page-wizard/steps/schema.ts +180 -0
- package/src/page-wizard/steps/usePageCreator.ts +279 -0
- package/src/splash-screen/NewPage.tsx +232 -0
- package/src/splash-screen/SectionHeadline.tsx +21 -0
- package/src/splash-screen/SplashScreen.tsx +156 -0
- package/src/tour/Tour.tsx +558 -0
- package/src/tour/default-tour.tsx +300 -0
- package/src/tour/preview-tour.tsx +127 -0
- package/src/types.ts +302 -0
- package/styles.css +476 -0
- package/tsconfig.build.json +21 -0
- package/tsconfig.json +11 -0
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { useEffect, useRef, useState } from "react";
|
|
2
|
+
|
|
3
|
+
import { ItemDescriptor, Page, PageSkeleton } from "../pageModel";
|
|
4
|
+
import { usePageModel } from "../client/pageModelBuilder";
|
|
5
|
+
import { ItemsRepository } from "../client/itemsRepository";
|
|
6
|
+
import { EditorConfiguration } from "../../config/types";
|
|
7
|
+
import { useDebouncedCallback } from "use-debounce";
|
|
8
|
+
import { resolvePageAndSite } from "../services/contentService";
|
|
9
|
+
import { Site } from "../../types";
|
|
10
|
+
|
|
11
|
+
export type PageViewContext = {
|
|
12
|
+
device: string;
|
|
13
|
+
setDevice: React.Dispatch<React.SetStateAction<string>>;
|
|
14
|
+
zoom: number;
|
|
15
|
+
setZoom: React.Dispatch<React.SetStateAction<number>>;
|
|
16
|
+
scroll: number;
|
|
17
|
+
setScroll: React.Dispatch<React.SetStateAction<number>>;
|
|
18
|
+
fullscreen: boolean;
|
|
19
|
+
setFullscreen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
20
|
+
editorIframeRef: React.RefObject<HTMLIFrameElement | null>;
|
|
21
|
+
deviceWidth?: number;
|
|
22
|
+
deviceHeight?: number;
|
|
23
|
+
setDeviceWidth: React.Dispatch<React.SetStateAction<number | undefined>>;
|
|
24
|
+
setDeviceHeight: React.Dispatch<React.SetStateAction<number | undefined>>;
|
|
25
|
+
lockHeight: boolean;
|
|
26
|
+
setLockHeight: React.Dispatch<React.SetStateAction<boolean>>;
|
|
27
|
+
rotate: boolean;
|
|
28
|
+
setRotate: React.Dispatch<React.SetStateAction<boolean>>;
|
|
29
|
+
page?: Page;
|
|
30
|
+
pageItemDescriptor?: ItemDescriptor;
|
|
31
|
+
setPageSkeleton: React.Dispatch<
|
|
32
|
+
React.SetStateAction<PageSkeleton | undefined>
|
|
33
|
+
>;
|
|
34
|
+
viewport: { width: number; height: number };
|
|
35
|
+
setWorkaround: React.Dispatch<React.SetStateAction<boolean>>;
|
|
36
|
+
isHeadless: boolean;
|
|
37
|
+
site?: Site;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export function usePageViewContext({
|
|
41
|
+
pageItemDescriptor,
|
|
42
|
+
itemsRepository,
|
|
43
|
+
configuration,
|
|
44
|
+
}: {
|
|
45
|
+
pageItemDescriptor?: ItemDescriptor;
|
|
46
|
+
itemsRepository?: ItemsRepository;
|
|
47
|
+
configuration?: EditorConfiguration;
|
|
48
|
+
}) {
|
|
49
|
+
const [device, setDevice] = useState<string>("desktop");
|
|
50
|
+
const [zoom, setZoom] = useState<number>(1);
|
|
51
|
+
const [scroll, setScroll] = useState<number>(0);
|
|
52
|
+
const [fullscreen, setFullscreen] = useState<boolean>(false);
|
|
53
|
+
const editorIframeRef = useRef<HTMLIFrameElement | null>(null);
|
|
54
|
+
const [deviceWidth, setDeviceWidth] = useState<number>();
|
|
55
|
+
const [deviceHeight, setDeviceHeight] = useState<number>();
|
|
56
|
+
const [lockHeight, setLockHeight] = useState(true);
|
|
57
|
+
const [rotate, setRotate] = useState(false);
|
|
58
|
+
const [viewportRect, setViewportRect] = useState({ width: 0, height: 0 });
|
|
59
|
+
const [workaround, setWorkaround] = useState(false);
|
|
60
|
+
const [site, setSite] = useState<Site>();
|
|
61
|
+
const [resolvedPageItemDescriptor, setResolvedPageItemDescriptor] =
|
|
62
|
+
useState<ItemDescriptor>();
|
|
63
|
+
const [isHeadless, setIsHeadless] = useState(false);
|
|
64
|
+
|
|
65
|
+
const { page, setPageSkeleton } = usePageModel(
|
|
66
|
+
itemsRepository,
|
|
67
|
+
pageItemDescriptor
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
useEffect(() => {
|
|
71
|
+
var deviceConfig = configuration?.devices.find((x) => x.name === device);
|
|
72
|
+
|
|
73
|
+
let width = deviceConfig?.width;
|
|
74
|
+
let height = deviceConfig?.height;
|
|
75
|
+
|
|
76
|
+
if (rotate) {
|
|
77
|
+
[width, height] = [height, width];
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (device) {
|
|
81
|
+
setDeviceWidth(width);
|
|
82
|
+
setDeviceHeight(lockHeight ? height : undefined);
|
|
83
|
+
}
|
|
84
|
+
}, [rotate, device, lockHeight, configuration]);
|
|
85
|
+
|
|
86
|
+
useEffect(() => {
|
|
87
|
+
updateViewportRect();
|
|
88
|
+
}, [fullscreen, device, deviceHeight, deviceWidth]);
|
|
89
|
+
|
|
90
|
+
const updateViewportRectDebounced = useDebouncedCallback(() => {
|
|
91
|
+
updateViewportRect();
|
|
92
|
+
}, 100);
|
|
93
|
+
|
|
94
|
+
useEffect(() => {
|
|
95
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
96
|
+
updateViewportRectDebounced();
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
if (editorIframeRef.current) {
|
|
100
|
+
resizeObserver.observe(editorIframeRef.current);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Cleanup function
|
|
104
|
+
return () => {
|
|
105
|
+
if (editorIframeRef.current) {
|
|
106
|
+
resizeObserver.disconnect();
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
}, [editorIframeRef.current, workaround]);
|
|
110
|
+
|
|
111
|
+
useEffect(() => {
|
|
112
|
+
if (!pageItemDescriptor) return;
|
|
113
|
+
|
|
114
|
+
async function resolvePage() {
|
|
115
|
+
if (!pageItemDescriptor) {
|
|
116
|
+
setSite(undefined);
|
|
117
|
+
setResolvedPageItemDescriptor(undefined);
|
|
118
|
+
setPageSkeleton(undefined);
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
if (!itemsRepository) return;
|
|
122
|
+
|
|
123
|
+
const item = await itemsRepository.getItem(pageItemDescriptor);
|
|
124
|
+
if (!item?.hasLayout) {
|
|
125
|
+
setSite(undefined);
|
|
126
|
+
setResolvedPageItemDescriptor(undefined);
|
|
127
|
+
setPageSkeleton(undefined);
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
console.log(
|
|
132
|
+
"resolve page",
|
|
133
|
+
pageItemDescriptor.id,
|
|
134
|
+
pageItemDescriptor.language,
|
|
135
|
+
pageItemDescriptor.version
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
const result = await resolvePageAndSite(
|
|
139
|
+
pageItemDescriptor.id,
|
|
140
|
+
pageItemDescriptor.language,
|
|
141
|
+
pageItemDescriptor.version
|
|
142
|
+
);
|
|
143
|
+
|
|
144
|
+
if (result) {
|
|
145
|
+
setIsHeadless(result.isHeadless);
|
|
146
|
+
setSite(result.site);
|
|
147
|
+
setResolvedPageItemDescriptor(result.pageItem);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
resolvePage();
|
|
151
|
+
}, [pageItemDescriptor]);
|
|
152
|
+
|
|
153
|
+
function updateViewportRect() {
|
|
154
|
+
const rect = editorIframeRef.current?.getBoundingClientRect();
|
|
155
|
+
if (rect) setViewportRect({ width: rect.width, height: rect.height });
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
const pageViewContext: PageViewContext = {
|
|
159
|
+
device,
|
|
160
|
+
setDevice,
|
|
161
|
+
deviceWidth,
|
|
162
|
+
setDeviceWidth,
|
|
163
|
+
deviceHeight,
|
|
164
|
+
setDeviceHeight,
|
|
165
|
+
lockHeight,
|
|
166
|
+
setLockHeight,
|
|
167
|
+
scroll,
|
|
168
|
+
setScroll,
|
|
169
|
+
zoom,
|
|
170
|
+
setZoom,
|
|
171
|
+
fullscreen,
|
|
172
|
+
setFullscreen,
|
|
173
|
+
editorIframeRef,
|
|
174
|
+
rotate,
|
|
175
|
+
setRotate,
|
|
176
|
+
page,
|
|
177
|
+
setPageSkeleton,
|
|
178
|
+
viewport: viewportRect,
|
|
179
|
+
pageItemDescriptor: resolvedPageItemDescriptor,
|
|
180
|
+
setWorkaround,
|
|
181
|
+
isHeadless,
|
|
182
|
+
site,
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
return pageViewContext;
|
|
186
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { InsertOption } from "../types";
|
|
2
|
+
|
|
3
|
+
export type PageSkeleton = {
|
|
4
|
+
editRevision: string;
|
|
5
|
+
item: ItemDescriptor;
|
|
6
|
+
rootComponent: ComponentSkeleton;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export type PlaceholderSkeleton = {
|
|
10
|
+
name: string;
|
|
11
|
+
key: string;
|
|
12
|
+
description: string;
|
|
13
|
+
components: ComponentSkeleton[];
|
|
14
|
+
parentComponent: ComponentSkeleton;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type ComponentSkeleton = {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
type: string;
|
|
21
|
+
typeId: string;
|
|
22
|
+
items: RenderedItemSkeleton[];
|
|
23
|
+
placeholders: PlaceholderSkeleton[];
|
|
24
|
+
datasourceItem?: RenderedItemSkeleton;
|
|
25
|
+
isRemovedFromMasterLanguage?: boolean;
|
|
26
|
+
isInheritedFromMasterLanguage?: boolean;
|
|
27
|
+
visible?: boolean;
|
|
28
|
+
parentPlaceholder?: PlaceholderSkeleton;
|
|
29
|
+
renderedDictionaryKeys: string[];
|
|
30
|
+
layoutId?: string;
|
|
31
|
+
editorFields: EditorFields;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type RenderedItemSkeleton = ItemDescriptor & {
|
|
35
|
+
renderedFieldIds: string[];
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export type ItemDescriptor = {
|
|
39
|
+
id: string;
|
|
40
|
+
language: string;
|
|
41
|
+
version: number;
|
|
42
|
+
name?: string;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export type Field = {
|
|
46
|
+
id: string;
|
|
47
|
+
value: unknown;
|
|
48
|
+
rawValue?: string | null;
|
|
49
|
+
name?: string;
|
|
50
|
+
type: string;
|
|
51
|
+
descriptor: FieldDescriptor;
|
|
52
|
+
displayName?: string;
|
|
53
|
+
sortOrder?: number;
|
|
54
|
+
sectionSortOrder?: number;
|
|
55
|
+
customProperties?: any;
|
|
56
|
+
canWrite?: boolean;
|
|
57
|
+
hasLock?: boolean;
|
|
58
|
+
canLock?: boolean;
|
|
59
|
+
lockedBy?: LockSession;
|
|
60
|
+
section?: string;
|
|
61
|
+
isFallback?: boolean;
|
|
62
|
+
isStandardValue?: boolean;
|
|
63
|
+
isShared?: boolean;
|
|
64
|
+
sourceItems: ItemRef[];
|
|
65
|
+
buttons?: FieldButton[];
|
|
66
|
+
fallbackChain?: FieldDescriptor[];
|
|
67
|
+
isHistoric?: boolean;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export type ItemRef = {
|
|
71
|
+
id: string;
|
|
72
|
+
name?: string;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export type FieldButton = {
|
|
76
|
+
id: string;
|
|
77
|
+
label: string;
|
|
78
|
+
description: string;
|
|
79
|
+
action?: string;
|
|
80
|
+
icon?: string;
|
|
81
|
+
isGenerator: boolean;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export type LockSession = {
|
|
85
|
+
sessionId: string;
|
|
86
|
+
name: string;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export type FieldDescriptor = {
|
|
90
|
+
item: ItemDescriptor;
|
|
91
|
+
fieldId: string;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export type Language = {
|
|
95
|
+
name: string;
|
|
96
|
+
versions: number;
|
|
97
|
+
icon: string;
|
|
98
|
+
languageCode: string;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export type Version = {
|
|
102
|
+
version: number;
|
|
103
|
+
updated: Date;
|
|
104
|
+
updatedBy: string;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export type Timings = {
|
|
108
|
+
[key: string]: number;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
export type FullItem = ItemDescriptor & {
|
|
112
|
+
descriptor: ItemDescriptor;
|
|
113
|
+
name: string;
|
|
114
|
+
templateId: string;
|
|
115
|
+
templateName: string;
|
|
116
|
+
icon: string;
|
|
117
|
+
largeIcon: string;
|
|
118
|
+
thumbnail: string;
|
|
119
|
+
path: string;
|
|
120
|
+
masterLanguages?: string[];
|
|
121
|
+
translations?: string[];
|
|
122
|
+
fields: Field[];
|
|
123
|
+
canWriteItem: boolean;
|
|
124
|
+
canWriteLanguage: boolean;
|
|
125
|
+
canWriteWorkflow: boolean;
|
|
126
|
+
workflowState: string;
|
|
127
|
+
hasLock: boolean;
|
|
128
|
+
hasLayout: boolean;
|
|
129
|
+
idPath: string;
|
|
130
|
+
canLock: boolean;
|
|
131
|
+
lockedBy: string;
|
|
132
|
+
isInheritedFromMasterLanguage: boolean;
|
|
133
|
+
mainItemId?: string;
|
|
134
|
+
hasChildren: boolean;
|
|
135
|
+
parentId: string;
|
|
136
|
+
versions: number;
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
export type Page = {
|
|
140
|
+
editRevision: string;
|
|
141
|
+
item: FullItem;
|
|
142
|
+
rootComponent: Component;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
export type RenderedItem = RenderedItemSkeleton & FullItem;
|
|
146
|
+
|
|
147
|
+
type EditorFields = {
|
|
148
|
+
[group: string]: {
|
|
149
|
+
addFields: string[];
|
|
150
|
+
removeFields: string[];
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
export type Component = {
|
|
155
|
+
id: string;
|
|
156
|
+
name: string;
|
|
157
|
+
type: string;
|
|
158
|
+
typeId: string;
|
|
159
|
+
items: RenderedItem[];
|
|
160
|
+
placeholders: Placeholder[];
|
|
161
|
+
datasourceItem?: RenderedItem;
|
|
162
|
+
isRemovedFromMasterLanguage?: boolean;
|
|
163
|
+
isInheritedFromMasterLanguage?: boolean;
|
|
164
|
+
visible?: boolean;
|
|
165
|
+
parentPlaceholder?: Placeholder;
|
|
166
|
+
renderedDictionaryKeys: string[];
|
|
167
|
+
isShared: boolean;
|
|
168
|
+
rendering?: RenderingReference;
|
|
169
|
+
layoutId?: string;
|
|
170
|
+
editorFields: EditorFields;
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
export type Placeholder = {
|
|
174
|
+
key: string;
|
|
175
|
+
name: string;
|
|
176
|
+
description: string;
|
|
177
|
+
components: Component[];
|
|
178
|
+
parentComponent: Component;
|
|
179
|
+
canSynchronize: boolean;
|
|
180
|
+
insertOptions: InsertOption[];
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
export interface RenderingReference {
|
|
184
|
+
id: string;
|
|
185
|
+
revision: string;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export type ItemIdAndName = {
|
|
189
|
+
name: string;
|
|
190
|
+
id: string;
|
|
191
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { PictureVariant } from "./fieldTypes";
|
|
2
|
+
|
|
3
|
+
export type PictureParams = {
|
|
4
|
+
variant?: string;
|
|
5
|
+
aspectRatio?: number;
|
|
6
|
+
scales?: number[];
|
|
7
|
+
maxWidth?: number;
|
|
8
|
+
custom?: { [paramName: string]: string | number | boolean | undefined };
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export type MediaPictureParams = {
|
|
12
|
+
default: PictureParams;
|
|
13
|
+
[mediaQuery: string]: PictureParams;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export function getRenderedPictureVariant(
|
|
17
|
+
params: PictureParams,
|
|
18
|
+
variants: PictureVariant[]
|
|
19
|
+
) {
|
|
20
|
+
const variantName = params.variant ?? "auto";
|
|
21
|
+
|
|
22
|
+
const variant =
|
|
23
|
+
variantName.toLocaleLowerCase() === "auto" && params.aspectRatio
|
|
24
|
+
? getBestMatchingVariant(variants, params.aspectRatio)
|
|
25
|
+
: variants.find(
|
|
26
|
+
(v) => v.name.toLowerCase() == variantName.toLowerCase()
|
|
27
|
+
) ?? variants[0];
|
|
28
|
+
return variant;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function getBestMatchingVariant(
|
|
32
|
+
variants: PictureVariant[],
|
|
33
|
+
aspectRatio: number | undefined
|
|
34
|
+
) {
|
|
35
|
+
if (!aspectRatio)
|
|
36
|
+
return (
|
|
37
|
+
variants.find((v) => v.name.toLowerCase() == "default") ?? variants[0]
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
let minDistance = 1000000;
|
|
41
|
+
let bestMatch = undefined;
|
|
42
|
+
for (let i = 0; i < variants.length; i++) {
|
|
43
|
+
const variant = variants[i];
|
|
44
|
+
if (!variant.src) continue;
|
|
45
|
+
const distance = Math.abs(aspectRatio - variant.aspectRatio);
|
|
46
|
+
if (distance < minDistance) {
|
|
47
|
+
minDistance = distance;
|
|
48
|
+
bestMatch = variant;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return bestMatch ?? variants[0];
|
|
53
|
+
}
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
import { Comment as CommentType } from "../../types";
|
|
2
|
+
import { useEffect, useRef, useState } from "react";
|
|
3
|
+
import { useEditContext } from "../client/editContext";
|
|
4
|
+
import {
|
|
5
|
+
createOrUpdateComment,
|
|
6
|
+
deleteComment,
|
|
7
|
+
resolveComment,
|
|
8
|
+
} from "../services/reviewsService";
|
|
9
|
+
import { Button } from "primereact/button";
|
|
10
|
+
import { formatDate } from "../utils";
|
|
11
|
+
import { SimpleIconButton } from "../ui/SimpleIconButton";
|
|
12
|
+
import { OverlayPanel } from "primereact/overlaypanel";
|
|
13
|
+
import { ProgressSpinner } from "primereact/progressspinner";
|
|
14
|
+
export function Comment({ comment }: { comment: CommentType }) {
|
|
15
|
+
const editContext = useEditContext();
|
|
16
|
+
const [commentText, setCommentText] = useState(comment.text);
|
|
17
|
+
const [isEditing, setIsEditing] = useState(false);
|
|
18
|
+
const [isSaving, setIsSaving] = useState(false);
|
|
19
|
+
const ref = useRef<HTMLDivElement>(null);
|
|
20
|
+
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (comment.isNew) setIsEditing(true);
|
|
23
|
+
}, [comment]);
|
|
24
|
+
|
|
25
|
+
const isSelected = comment.id === editContext?.selectedComment?.id;
|
|
26
|
+
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
if (isSelected) {
|
|
29
|
+
if (ref.current) {
|
|
30
|
+
ref.current.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}, [isSelected]);
|
|
34
|
+
|
|
35
|
+
const renderContextInfo = () => {
|
|
36
|
+
const showItemName =
|
|
37
|
+
comment.itemId && comment.mainItemId !== comment.itemId;
|
|
38
|
+
|
|
39
|
+
const showFieldName = comment.fieldId;
|
|
40
|
+
|
|
41
|
+
if (!showItemName && !showFieldName) return null;
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<div className="mt-3 flex items-center border-t pt-3">
|
|
45
|
+
{showItemName && (
|
|
46
|
+
<div className="text-2xs text-gray-500 ">{comment.itemName}</div>
|
|
47
|
+
)}
|
|
48
|
+
|
|
49
|
+
{showFieldName && showItemName && (
|
|
50
|
+
<div className="text-2xs text-gray-500 mx-2">></div>
|
|
51
|
+
)}
|
|
52
|
+
|
|
53
|
+
{showFieldName && (
|
|
54
|
+
<div className="text-2xs text-gray-500 ">{comment.fieldName}</div>
|
|
55
|
+
)}
|
|
56
|
+
</div>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const canDelete =
|
|
61
|
+
!comment.isNew && comment.author === editContext?.user?.name;
|
|
62
|
+
|
|
63
|
+
const canEdit =
|
|
64
|
+
!comment.isNew &&
|
|
65
|
+
!comment.isResolved &&
|
|
66
|
+
comment.author === editContext?.user?.name;
|
|
67
|
+
|
|
68
|
+
const canResolve = !comment.isNew && !editContext?.readonly;
|
|
69
|
+
|
|
70
|
+
const renderHeader = () => {
|
|
71
|
+
const overlayPanelRef = useRef<OverlayPanel>(null);
|
|
72
|
+
return (
|
|
73
|
+
<>
|
|
74
|
+
<div className="flex justify-between items-start mb-3">
|
|
75
|
+
<div>
|
|
76
|
+
<div
|
|
77
|
+
className="text-xs text-gray-900 font-bold"
|
|
78
|
+
title={comment.author}
|
|
79
|
+
>
|
|
80
|
+
{comment.authorDisplayName}
|
|
81
|
+
</div>
|
|
82
|
+
<div className="text-xs text-gray-500">
|
|
83
|
+
{comment.created ? formatDate(new Date(comment.created)) : ""}
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
<div className="text-xs text-gray-500">
|
|
87
|
+
{!isEditing && canEdit && (
|
|
88
|
+
<SimpleIconButton
|
|
89
|
+
icon="pi pi-pencil"
|
|
90
|
+
label="Edit"
|
|
91
|
+
onClick={() => setIsEditing(true)}
|
|
92
|
+
/>
|
|
93
|
+
)}
|
|
94
|
+
{canDelete && (
|
|
95
|
+
<SimpleIconButton
|
|
96
|
+
icon="pi pi-trash"
|
|
97
|
+
label="Delete"
|
|
98
|
+
onClick={(e) => {
|
|
99
|
+
overlayPanelRef.current?.toggle(e);
|
|
100
|
+
}}
|
|
101
|
+
/>
|
|
102
|
+
)}
|
|
103
|
+
<OverlayPanel ref={overlayPanelRef}>
|
|
104
|
+
<Button
|
|
105
|
+
className="m-2"
|
|
106
|
+
icon="pi pi-trash"
|
|
107
|
+
label="Delete"
|
|
108
|
+
onClick={async () => {
|
|
109
|
+
await deleteComment(comment);
|
|
110
|
+
}}
|
|
111
|
+
/>
|
|
112
|
+
</OverlayPanel>
|
|
113
|
+
{canResolve && !comment.isResolved && (
|
|
114
|
+
<SimpleIconButton
|
|
115
|
+
icon="pi pi-check"
|
|
116
|
+
label="Resolve"
|
|
117
|
+
onClick={async () => {
|
|
118
|
+
await resolveComment(comment);
|
|
119
|
+
}}
|
|
120
|
+
/>
|
|
121
|
+
)}
|
|
122
|
+
{comment.isResolved && (
|
|
123
|
+
<i
|
|
124
|
+
className="pi pi-check text-green-500 text-xs px-1"
|
|
125
|
+
style={{ fontWeight: "bold" }}
|
|
126
|
+
title={
|
|
127
|
+
"Resolved by " +
|
|
128
|
+
comment.resolvedBy +
|
|
129
|
+
" (" +
|
|
130
|
+
formatDate(new Date(comment.resolvedDate!)) +
|
|
131
|
+
")"
|
|
132
|
+
}
|
|
133
|
+
></i>
|
|
134
|
+
)}
|
|
135
|
+
{canResolve && !comment.isResolved && (
|
|
136
|
+
<SimpleIconButton
|
|
137
|
+
icon="pi pi-sparkles"
|
|
138
|
+
label="AI"
|
|
139
|
+
onClick={async (event) => {
|
|
140
|
+
console.log("showing ai popup", comment.text);
|
|
141
|
+
editContext?.showAiPopup(event as any, {
|
|
142
|
+
initialPrompt:
|
|
143
|
+
'Please help me resolve this comment: "' +
|
|
144
|
+
comment.text +
|
|
145
|
+
'"',
|
|
146
|
+
hiddenSystemPrompt:
|
|
147
|
+
"Please make suggestions how to resolve a review comment. Ask the user whether you should apply the suggested changes.",
|
|
148
|
+
});
|
|
149
|
+
}}
|
|
150
|
+
/>
|
|
151
|
+
)}
|
|
152
|
+
</div>
|
|
153
|
+
</div>
|
|
154
|
+
</>
|
|
155
|
+
);
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
return !isEditing ? (
|
|
159
|
+
<div
|
|
160
|
+
ref={ref}
|
|
161
|
+
key={comment.id}
|
|
162
|
+
className={`bg-white rounded-lg p-3 mb-3 shadow-sm cursor-pointer hover:bg-gray-50 border-2 ${
|
|
163
|
+
isSelected ? " border-blue-500" : "border-transparent"
|
|
164
|
+
}`}
|
|
165
|
+
onClick={() => {
|
|
166
|
+
editContext?.setSelectedComment(comment);
|
|
167
|
+
editContext?.setScrollIntoView(comment.itemId);
|
|
168
|
+
editContext?.select([comment.itemId]);
|
|
169
|
+
if (comment.fieldId) {
|
|
170
|
+
editContext?.setFocusedField(
|
|
171
|
+
{
|
|
172
|
+
fieldId: comment.fieldId,
|
|
173
|
+
item: {
|
|
174
|
+
id: comment.itemId,
|
|
175
|
+
language: comment.language,
|
|
176
|
+
version: comment.version,
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
false
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
}}
|
|
183
|
+
>
|
|
184
|
+
{renderHeader()}
|
|
185
|
+
<div className="text-gray-700 text-sm whitespace-pre-wrap">
|
|
186
|
+
{comment.text}
|
|
187
|
+
</div>
|
|
188
|
+
{renderContextInfo()}
|
|
189
|
+
</div>
|
|
190
|
+
) : (
|
|
191
|
+
<div
|
|
192
|
+
key="new-comment"
|
|
193
|
+
className="bg-white rounded-lg p-3 mb-3 shadow-sm"
|
|
194
|
+
>
|
|
195
|
+
{renderHeader()}
|
|
196
|
+
<textarea
|
|
197
|
+
className="w-full min-h-[100px] p-2 text-sm border border-gray-200 rounded focus:outline-none focus:ring-2 focus:ring-blue-500 mt-2"
|
|
198
|
+
placeholder="Add a comment..."
|
|
199
|
+
value={commentText}
|
|
200
|
+
onChange={async (e) => {
|
|
201
|
+
if (!editContext) return;
|
|
202
|
+
setCommentText(e.target.value);
|
|
203
|
+
|
|
204
|
+
if (editContext?.setComments) {
|
|
205
|
+
editContext.setComments([...editContext.comments]);
|
|
206
|
+
}
|
|
207
|
+
}}
|
|
208
|
+
autoFocus
|
|
209
|
+
/>
|
|
210
|
+
{isSaving && (
|
|
211
|
+
<div className="flex justify-end gap-2 mt-1">
|
|
212
|
+
<div className="text-xs text-gray-500 flex items-center gap-2">
|
|
213
|
+
<ProgressSpinner className="w-4 h-4" />
|
|
214
|
+
Saving...
|
|
215
|
+
</div>
|
|
216
|
+
</div>
|
|
217
|
+
)}
|
|
218
|
+
{!isSaving && (
|
|
219
|
+
<div className="flex justify-end gap-2 mt-1">
|
|
220
|
+
<Button
|
|
221
|
+
severity="secondary"
|
|
222
|
+
onClick={() => {
|
|
223
|
+
if (comment.isNew) {
|
|
224
|
+
if (editContext?.setComments) {
|
|
225
|
+
editContext.setComments([
|
|
226
|
+
...editContext.comments.filter((c) => c.id !== comment.id),
|
|
227
|
+
]);
|
|
228
|
+
}
|
|
229
|
+
} else {
|
|
230
|
+
setIsEditing(false);
|
|
231
|
+
}
|
|
232
|
+
}}
|
|
233
|
+
label="Cancel"
|
|
234
|
+
/>
|
|
235
|
+
|
|
236
|
+
<Button
|
|
237
|
+
className="tour-submit-comment-button"
|
|
238
|
+
onClick={async () => {
|
|
239
|
+
comment.text = commentText;
|
|
240
|
+
setIsSaving(true);
|
|
241
|
+
const item = await editContext?.itemsRepository?.getItem({
|
|
242
|
+
id: comment.itemId,
|
|
243
|
+
language: comment.language,
|
|
244
|
+
version: comment.version,
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
if (item) {
|
|
248
|
+
comment.fieldValue = item.fields.find(
|
|
249
|
+
(f) => f.id === comment.fieldId
|
|
250
|
+
)?.rawValue;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
await createOrUpdateComment(comment);
|
|
254
|
+
|
|
255
|
+
setIsSaving(false);
|
|
256
|
+
setIsEditing(false);
|
|
257
|
+
}}
|
|
258
|
+
label={comment.isNew ? "Comment" : "Save"}
|
|
259
|
+
/>
|
|
260
|
+
</div>
|
|
261
|
+
)}
|
|
262
|
+
{renderContextInfo()}
|
|
263
|
+
</div>
|
|
264
|
+
);
|
|
265
|
+
}
|