@parhelia/core 0.1.12928 → 0.1.12931
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/agents-view/AgentCard.js +4 -1
- package/dist/agents-view/AgentCard.js.map +1 -1
- package/dist/agents-view/AgentProfileIcon.js +8 -8
- package/dist/agents-view/AgentProfileIcon.js.map +1 -1
- package/dist/agents-view/AgentsView.js +1 -1
- package/dist/components/WorkspaceHomeView.d.ts +13 -0
- package/dist/components/WorkspaceHomeView.js +13 -0
- package/dist/components/WorkspaceHomeView.js.map +1 -0
- package/dist/components/ui/styled-dialog-title.d.ts +3 -1
- package/dist/components/ui/styled-dialog-title.js +2 -2
- package/dist/components/ui/styled-dialog-title.js.map +1 -1
- package/dist/config/config.js +7 -19
- package/dist/config/config.js.map +1 -1
- package/dist/config/notificationRoutes.js +1 -1
- package/dist/config/notificationRoutes.js.map +1 -1
- package/dist/editor/ConfirmationDialog.js +1 -1
- package/dist/editor/ConfirmationDialog.js.map +1 -1
- package/dist/editor/ImageEditButton.js +14 -2
- package/dist/editor/ImageEditButton.js.map +1 -1
- package/dist/editor/ImageEditor.js +1 -1
- package/dist/editor/ImageEditor.js.map +1 -1
- package/dist/editor/PictureEditor.js +1 -1
- package/dist/editor/PictureEditor.js.map +1 -1
- package/dist/editor/ai/Agents.js +15 -79
- package/dist/editor/ai/Agents.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentMemoryPanel.d.ts +12 -0
- package/dist/editor/ai/terminal/components/AgentMemoryPanel.js +131 -0
- package/dist/editor/ai/terminal/components/AgentMemoryPanel.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentPromptTrayPopovers.js +10 -2
- package/dist/editor/ai/terminal/components/AgentPromptTrayPopovers.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalContextPanels.js +11 -0
- package/dist/editor/ai/terminal/components/AgentTerminalContextPanels.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.js +27 -20
- package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSettingsData.js +4 -4
- package/dist/editor/ai/terminal/useAgentSettingsData.js.map +1 -1
- package/dist/editor/client/EditorShell.js +11 -51
- package/dist/editor/client/EditorShell.js.map +1 -1
- package/dist/editor/client/editContext.d.ts +3 -1
- package/dist/editor/client/operations.js +20 -1
- package/dist/editor/client/operations.js.map +1 -1
- package/dist/editor/commands/componentCommands.js +2 -1
- package/dist/editor/commands/componentCommands.js.map +1 -1
- package/dist/editor/context-menu/InsertMenu.js +1 -1
- package/dist/editor/context-menu/InsertMenu.js.map +1 -1
- package/dist/editor/menubar/PageSelector.js +1 -1
- package/dist/editor/menubar/PageSelector.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/EditControls.js +1 -2
- package/dist/editor/menubar/toolbar-sections/EditControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/ManualBrowser.js +6 -0
- package/dist/editor/menubar/toolbar-sections/ManualBrowser.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/UtilityControls.js +5 -5
- package/dist/editor/menubar/toolbar-sections/UtilityControls.js.map +1 -1
- package/dist/editor/page-editor-chrome/DragInsertionOverlay.d.ts +8 -1
- package/dist/editor/page-editor-chrome/DragInsertionOverlay.js +154 -34
- package/dist/editor/page-editor-chrome/DragInsertionOverlay.js.map +1 -1
- package/dist/editor/page-editor-chrome/EmptyImageFieldIndicators.d.ts +10 -0
- package/dist/editor/page-editor-chrome/EmptyImageFieldIndicators.js +236 -0
- package/dist/editor/page-editor-chrome/EmptyImageFieldIndicators.js.map +1 -0
- package/dist/editor/page-editor-chrome/PageEditorChrome.js +2 -1
- package/dist/editor/page-editor-chrome/PageEditorChrome.js.map +1 -1
- package/dist/editor/page-editor-chrome/PictureEditorOverlay.d.ts +3 -0
- package/dist/editor/page-editor-chrome/PictureEditorOverlay.js +1 -1
- package/dist/editor/page-editor-chrome/PictureEditorOverlay.js.map +1 -1
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.js +6 -2
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.js.map +1 -1
- package/dist/editor/page-editor-chrome/overlay/placeholderZones.d.ts +10 -0
- package/dist/editor/page-editor-chrome/overlay/placeholderZones.js +18 -0
- package/dist/editor/page-editor-chrome/overlay/placeholderZones.js.map +1 -1
- package/dist/editor/page-viewer/EditorForm.js +40 -2
- package/dist/editor/page-viewer/EditorForm.js.map +1 -1
- package/dist/editor/page-viewer/MiniMap.js +70 -5
- package/dist/editor/page-viewer/MiniMap.js.map +1 -1
- package/dist/editor/page-viewer/PageViewerFrame.js +123 -29
- package/dist/editor/page-viewer/PageViewerFrame.js.map +1 -1
- package/dist/editor/page-viewer/minimapVisibility.d.ts +33 -0
- package/dist/editor/page-viewer/minimapVisibility.js +72 -0
- package/dist/editor/page-viewer/minimapVisibility.js.map +1 -0
- package/dist/editor/page-viewer/renderUrl.js +29 -7
- package/dist/editor/page-viewer/renderUrl.js.map +1 -1
- package/dist/editor/reviews/CreateReviewConfirmStep.js +5 -4
- package/dist/editor/reviews/CreateReviewConfirmStep.js.map +1 -1
- package/dist/editor/reviews/CreateReviewDialog.js +120 -202
- package/dist/editor/reviews/CreateReviewDialog.js.map +1 -1
- package/dist/editor/reviews/CreateReviewItemsStep.d.ts +18 -0
- package/dist/editor/reviews/CreateReviewItemsStep.js +6 -0
- package/dist/editor/reviews/CreateReviewItemsStep.js.map +1 -0
- package/dist/editor/reviews/CreateReviewLanguagesStep.d.ts +9 -0
- package/dist/editor/reviews/CreateReviewLanguagesStep.js +36 -0
- package/dist/editor/reviews/CreateReviewLanguagesStep.js.map +1 -0
- package/dist/editor/reviews/CreateReviewReviewersStep.d.ts +17 -0
- package/dist/editor/reviews/CreateReviewReviewersStep.js +33 -0
- package/dist/editor/reviews/CreateReviewReviewersStep.js.map +1 -0
- package/dist/editor/reviews/CreateReviewSettingsStep.d.ts +21 -0
- package/dist/editor/reviews/CreateReviewSettingsStep.js +33 -0
- package/dist/editor/reviews/CreateReviewSettingsStep.js.map +1 -0
- package/dist/editor/reviews/MultiReviewManager.js +1 -4
- package/dist/editor/reviews/MultiReviewManager.js.map +1 -1
- package/dist/editor/reviews/openCommentsFeedback.d.ts +2 -6
- package/dist/editor/reviews/openCommentsFeedback.js +3 -11
- package/dist/editor/reviews/openCommentsFeedback.js.map +1 -1
- package/dist/editor/services/agentService.d.ts +36 -0
- package/dist/editor/services/agentService.js +42 -0
- package/dist/editor/services/agentService.js.map +1 -1
- package/dist/editor/services/aiService.d.ts +4 -2
- package/dist/editor/services/aiService.js.map +1 -1
- package/dist/editor/services/editService.d.ts +1 -1
- package/dist/editor/services/editService.js +2 -2
- package/dist/editor/services/editService.js.map +1 -1
- package/dist/editor/services/reviewsService.d.ts +6 -0
- package/dist/editor/services/reviewsService.js +15 -0
- package/dist/editor/services/reviewsService.js.map +1 -1
- package/dist/editor/settings/panels/AgentProfileConfigPanel.js +2 -1
- package/dist/editor/settings/panels/AgentProfileConfigPanel.js.map +1 -1
- package/dist/editor/sidebar/ComponentTree.js +21 -1
- package/dist/editor/sidebar/ComponentTree.js.map +1 -1
- package/dist/editor/tree-indicators/GutterColumns.js +24 -6
- package/dist/editor/tree-indicators/GutterColumns.js.map +1 -1
- package/dist/editor/ui/ItemCollectionEditor.js +4 -4
- package/dist/editor/ui/ItemCollectionEditor.js.map +1 -1
- package/dist/editor/ui/PerfectTree.js +5 -5
- package/dist/editor/ui/PerfectTree.js.map +1 -1
- package/dist/editor/ui/PublishItemDialog.js +1 -1
- package/dist/editor/ui/PublishItemDialog.js.map +1 -1
- package/dist/editor/ui/PublishRestrictionsDialog.js +179 -148
- package/dist/editor/ui/PublishRestrictionsDialog.js.map +1 -1
- package/dist/editor/utils/keyboardNavigation.js +7 -0
- package/dist/editor/utils/keyboardNavigation.js.map +1 -1
- package/dist/editor/views/SingleEditView.js +32 -2
- package/dist/editor/views/SingleEditView.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/revision.d.ts +2 -2
- package/dist/revision.js +2 -2
- package/dist/task-board/components/TaskBoardHomeView.js +3 -6
- package/dist/task-board/components/TaskBoardHomeView.js.map +1 -1
- package/package.json +1 -1
|
@@ -134,7 +134,7 @@ export function PublishItemDialog({ item, onClose }) {
|
|
|
134
134
|
return (_jsx(Dialog, { open: true, onOpenChange: (open) => {
|
|
135
135
|
if (!open)
|
|
136
136
|
onClose(null);
|
|
137
|
-
}, children: _jsxs(DialogContent, { className: "flex max-w-4xl flex-col overflow-hidden border-none p-0 shadow-2xl", style: { maxHeight: "90vh" }, showCloseButton: true, children: [_jsx(StyledDialogTitle, { icon: _jsx(Rocket, { strokeWidth: 1 }), title: "Publish Item", subtitle: item.displayName || item.name }), _jsx("div", { className: "flex min-h-0 flex-1 flex-col overflow-y-auto px-6 py-5", children: isLoading ? (_jsx(LoadingState, { message: "Loading publish options..." })) : (_jsxs("div", { className: "space-y-5", children: [!item.isFinalState && item.workflowState && (_jsxs("div", { className: "border-feedback-orange bg-feedback-orange-light text-feedback-orange flex items-start gap-2 rounded-lg border px-4 py-3 text-sm", children: [_jsx(AlertTriangle, { className: "mt-0.5 h-4 w-4 shrink-0" }), _jsxs("span", { children: ["This item is in the \"", item.workflowState, "\" workflow state. Move it to a final workflow state before publishing."] })] })), loadError && (_jsx("div", { className: "border-feedback-red bg-feedback-red-light text-feedback-red rounded-lg border px-4 py-3 text-sm", children: loadError })), !item.canWriteItem || !item.canWriteLanguage ? (_jsx("div", { className: "border-feedback-orange bg-feedback-orange-light text-feedback-orange rounded-lg border px-4 py-3 text-sm", children: "You do not have permission to publish this item in the current language." })) : null, _jsxs("section", { className: "space-y-3", children: [_jsx(Label, { htmlFor: "publish-mode", children: "Publish mode" }), _jsx(Select, { id: "publish-mode", "data-testid": "publish-mode-select", value: publishMode, onValueChange: (value) => setPublishMode(value || "smart"), options: publishModeOptions, placeholder: "Select publish mode" })] }), _jsxs("section", { className: "space-y-3", children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsxs("div", { children: [_jsx("div", { className: "text-sm font-medium", children: "Languages" }), _jsx("div", { className: "text-2xs text-muted-foreground", children: "Choose which languages to publish." })] }), languages.length > 1 && (_jsxs("label", { className: "text-neutral-grey-50 hover:text-neutral-grey-100 flex cursor-pointer items-center gap-1.5 text-[11px] font-medium transition-colors", children: [_jsx("input", { type: "checkbox", checked: areAllLanguagesSelected, ref: (input) => {
|
|
137
|
+
}, children: _jsxs(DialogContent, { className: "flex max-w-4xl flex-col overflow-hidden border-none p-0 shadow-2xl", style: { maxHeight: "90vh" }, showCloseButton: true, children: [_jsx(StyledDialogTitle, { icon: _jsx(Rocket, { strokeWidth: 1 }), title: "Publish Item", subtitle: item.displayName || item.name }), _jsx("div", { className: "flex min-h-0 flex-1 flex-col overflow-y-auto px-6 py-5", children: isLoading ? (_jsx(LoadingState, { message: "Loading publish options..." })) : (_jsxs("div", { className: "space-y-5", children: [!item.isFinalState && item.workflowState && (_jsxs("div", { className: "border-feedback-orange bg-feedback-orange-light text-feedback-orange flex items-start gap-2 rounded-lg border px-4 py-3 text-sm", children: [_jsx(AlertTriangle, { className: "mt-0.5 h-4 w-4 shrink-0" }), _jsxs("span", { children: ["This item is in the \"", item.workflowState, "\" workflow state. Move it to a final workflow state before publishing."] })] })), loadError && (_jsx("div", { className: "border-feedback-red bg-feedback-red-light text-feedback-red rounded-lg border px-4 py-3 text-sm", children: loadError })), !item.canWriteItem || !item.canWriteLanguage ? (_jsx("div", { className: "border-feedback-orange bg-feedback-orange-light text-feedback-orange rounded-lg border px-4 py-3 text-sm", children: "You do not have permission to publish this item in the current language." })) : null, _jsxs("section", { className: "space-y-3", children: [_jsx(Label, { htmlFor: "publish-mode", className: "text-sm", children: "Publish mode" }), _jsx(Select, { id: "publish-mode", "data-testid": "publish-mode-select", value: publishMode, onValueChange: (value) => setPublishMode(value || "smart"), options: publishModeOptions, placeholder: "Select publish mode" })] }), _jsxs("section", { className: "space-y-3", children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsxs("div", { children: [_jsx("div", { className: "text-sm font-medium", children: "Languages" }), _jsx("div", { className: "text-2xs text-muted-foreground", children: "Choose which languages to publish." })] }), languages.length > 1 && (_jsxs("label", { className: "text-neutral-grey-50 hover:text-neutral-grey-100 flex cursor-pointer items-center gap-1.5 text-[11px] font-medium transition-colors", children: [_jsx("input", { type: "checkbox", checked: areAllLanguagesSelected, ref: (input) => {
|
|
138
138
|
if (input) {
|
|
139
139
|
input.indeterminate =
|
|
140
140
|
areSomeLanguagesSelected &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublishItemDialog.js","sourceRoot":"","sources":["../../../src/editor/ui/PublishItemDialog.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,IAAI,MAAM,YAAY,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAe,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EACL,MAAM,EACN,aAAa,EACb,YAAY,GACb,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAqB,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAg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AC,CAAC,CAAC,CACd,8BACE,KAAC,OAAO,IAAC,SAAS,EAAC,2BAA2B,GAAG,mBAEhD,CACJ,CAAC,CAAC,CAAC,CACF,SAAS,CACV,GACM,IACI,IACD,GACT,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
3
|
-
import { CalendarClock, CalendarOff,
|
|
3
|
+
import { CalendarClock, CalendarOff, X } from "lucide-react";
|
|
4
4
|
import { useEditContext } from "../client/editContext";
|
|
5
5
|
import { Dialog, DialogContent } from "../../components/ui/dialog";
|
|
6
6
|
import { Button } from "../../components/ui/button";
|
|
@@ -8,7 +8,6 @@ import { Input } from "../../components/ui/input";
|
|
|
8
8
|
import { Switch } from "../../components/ui/switch";
|
|
9
9
|
import { Badge } from "../../components/ui/badge";
|
|
10
10
|
import { StyledDialogTitle } from "../../components/ui/styled-dialog-title";
|
|
11
|
-
import { Tooltip, TooltipContent, TooltipTrigger, } from "../../components/ui/tooltip";
|
|
12
11
|
import DialogButtons from "./DialogButtons";
|
|
13
12
|
import { LoadingState } from "./LoadingState";
|
|
14
13
|
import { getLanguagesAndVersions } from "../services/contentService";
|
|
@@ -17,6 +16,20 @@ const TIMELINE_DAY_MS = 24 * 60 * 60 * 1000;
|
|
|
17
16
|
const MIN_TIMELINE_ZOOM_DAYS = 7;
|
|
18
17
|
const DEFAULT_TIMELINE_ZOOM_DAYS = 180;
|
|
19
18
|
const MAX_TIMELINE_ZOOM_DAYS = 3650;
|
|
19
|
+
const TIMELINE_ZOOM_PRESETS = [
|
|
20
|
+
{ label: "2W", days: 14 },
|
|
21
|
+
{ label: "1M", days: 30 },
|
|
22
|
+
{ label: "5M", days: 150 },
|
|
23
|
+
{ label: "1Y", days: 365 },
|
|
24
|
+
{ label: "2Y", days: 730 },
|
|
25
|
+
{ label: "5Y", days: 1825 },
|
|
26
|
+
{ label: "10Y", days: 3650 },
|
|
27
|
+
];
|
|
28
|
+
const CHART_PAD_X = 8;
|
|
29
|
+
const CHART_BAR_Y = 6;
|
|
30
|
+
const CHART_BAR_HEIGHT = 14;
|
|
31
|
+
const CHART_AXIS_Y = 44;
|
|
32
|
+
const CHART_HEIGHT = 64;
|
|
20
33
|
function parseSitecoreDate(rawValue) {
|
|
21
34
|
const value = rawValue?.trim();
|
|
22
35
|
if (!value)
|
|
@@ -67,19 +80,6 @@ function updateLabel(value) {
|
|
|
67
80
|
const timestamp = timestampFromUnknown(value);
|
|
68
81
|
return timestamp !== undefined ? new Date(timestamp).toLocaleString() : "-";
|
|
69
82
|
}
|
|
70
|
-
function getNowDateTimeValue() {
|
|
71
|
-
return toDateTimeLocalValue(new Date());
|
|
72
|
-
}
|
|
73
|
-
function formatTimelineEventLabel(timestamp, includeTime) {
|
|
74
|
-
const date = new Date(timestamp);
|
|
75
|
-
if (!includeTime) {
|
|
76
|
-
return date.toLocaleDateString();
|
|
77
|
-
}
|
|
78
|
-
return `${date.toLocaleDateString()} ${date.toLocaleTimeString([], {
|
|
79
|
-
hour: "2-digit",
|
|
80
|
-
minute: "2-digit",
|
|
81
|
-
})}`;
|
|
82
|
-
}
|
|
83
83
|
function formatTimelineRangeLabel(start, end, includeTime) {
|
|
84
84
|
const options = includeTime
|
|
85
85
|
? {
|
|
@@ -99,17 +99,25 @@ function formatTimelineRangeLabel(start, end, includeTime) {
|
|
|
99
99
|
}
|
|
100
100
|
function getVersionColor(index) {
|
|
101
101
|
const palette = [
|
|
102
|
-
"var(--color-feedback-blue)",
|
|
103
102
|
"var(--color-component-suggestions)",
|
|
103
|
+
"var(--color-feedback-blue)",
|
|
104
104
|
"var(--color-component-shared)",
|
|
105
105
|
"var(--color-highlight-100)",
|
|
106
|
-
"var(--color-feedback-orange)",
|
|
107
|
-
"var(--color-highlight-100)",
|
|
108
106
|
"var(--color-feedback-green)",
|
|
107
|
+
"var(--color-feedback-orange)",
|
|
108
|
+
"var(--color-component-layout)",
|
|
109
109
|
"var(--color-feedback-red)",
|
|
110
110
|
];
|
|
111
111
|
return palette[index % palette.length];
|
|
112
112
|
}
|
|
113
|
+
function getUserInitials(name) {
|
|
114
|
+
const cleaned = name.split("\\").pop()?.trim() ?? "";
|
|
115
|
+
if (!cleaned)
|
|
116
|
+
return "?";
|
|
117
|
+
const parts = cleaned.split(/[\s._-]+/).filter(Boolean);
|
|
118
|
+
const initials = parts.length >= 2 ? `${parts[0][0]}${parts[1][0]}` : cleaned.slice(0, 1);
|
|
119
|
+
return initials.toUpperCase();
|
|
120
|
+
}
|
|
113
121
|
function pushTimestamp(timestamps, timestamp) {
|
|
114
122
|
if (timestamp !== undefined && Number.isFinite(timestamp)) {
|
|
115
123
|
timestamps.push(timestamp);
|
|
@@ -146,9 +154,25 @@ function getInitialTimelineViewport(itemState, versionRows) {
|
|
|
146
154
|
zoomDays,
|
|
147
155
|
};
|
|
148
156
|
}
|
|
149
|
-
function
|
|
150
|
-
const
|
|
151
|
-
return
|
|
157
|
+
function DateTimeField({ icon: Icon, value, onChange, disabled, dimmed, invalid, }) {
|
|
158
|
+
const inputRef = useRef(null);
|
|
159
|
+
return (_jsxs("div", { className: cn("group/field relative transition-opacity", dimmed && !invalid && "opacity-50"), children: [_jsx("button", { type: "button", tabIndex: -1, disabled: disabled, className: "text-muted-foreground hover:text-foreground absolute top-1/2 left-2 z-10 -translate-y-1/2 disabled:pointer-events-none", onClick: () => {
|
|
160
|
+
try {
|
|
161
|
+
inputRef.current?.showPicker();
|
|
162
|
+
}
|
|
163
|
+
catch {
|
|
164
|
+
inputRef.current?.focus();
|
|
165
|
+
}
|
|
166
|
+
}, children: _jsx(Icon, { className: "h-3.5 w-3.5" }) }), _jsx(Input, { ref: inputRef, type: "datetime-local", className: cn("h-8 bg-white pr-6 pl-7 text-xs [&::-webkit-calendar-picker-indicator]:hidden", dimmed && "bg-neutral-grey-5", invalid && "border-feedback-red focus-visible:border-feedback-red"), value: value, disabled: disabled, onChange: (event) => onChange(event.target.value) }), value && !disabled && (_jsx("button", { type: "button", tabIndex: -1, className: "text-muted-foreground hover:text-foreground absolute top-1/2 right-1.5 -translate-y-1/2 opacity-0 transition-opacity group-hover/field:opacity-100", onClick: () => onChange(""), children: _jsx(X, { className: "h-3 w-3" }) }))] }));
|
|
167
|
+
}
|
|
168
|
+
function UserCell({ name }) {
|
|
169
|
+
if (!name) {
|
|
170
|
+
return _jsx("span", { className: "text-muted-foreground text-xs", children: "—" });
|
|
171
|
+
}
|
|
172
|
+
return (_jsxs("span", { className: "flex items-center justify-end gap-2", children: [_jsx("span", { className: "text-foreground truncate text-xs", children: name }), _jsx("span", { className: "bg-neutral-grey-50 flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-[10px] font-medium text-white", children: getUserInitials(name) })] }));
|
|
173
|
+
}
|
|
174
|
+
function TableColumns() {
|
|
175
|
+
return (_jsxs("colgroup", { children: [_jsx("col", { style: { width: 88 } }), _jsx("col", { style: { width: 104 } }), _jsx("col", {}), _jsx("col", {}), _jsx("col", { style: { width: 176 } }), _jsx("col", { style: { width: 160 } })] }));
|
|
152
176
|
}
|
|
153
177
|
export function PublishRestrictionsDialog({ item, onClose, }) {
|
|
154
178
|
const editContext = useEditContext();
|
|
@@ -169,9 +193,10 @@ export function PublishRestrictionsDialog({ item, onClose, }) {
|
|
|
169
193
|
const [zoomDays, setZoomDays] = useState(DEFAULT_TIMELINE_ZOOM_DAYS);
|
|
170
194
|
const [centerTs, setCenterTs] = useState(() => Date.now());
|
|
171
195
|
const chartContainerRef = useRef(null);
|
|
172
|
-
const timelineInteractionRef = useRef(null);
|
|
173
196
|
const [chartWidth, setChartWidth] = useState(900);
|
|
174
|
-
const
|
|
197
|
+
const [chartHover, setChartHover] = useState(null);
|
|
198
|
+
const dragStateRef = useRef(null);
|
|
199
|
+
const [isDraggingChart, setIsDraggingChart] = useState(false);
|
|
175
200
|
useEffect(() => {
|
|
176
201
|
let cancelled = false;
|
|
177
202
|
async function loadData() {
|
|
@@ -227,18 +252,15 @@ export function PublishRestrictionsDialog({ item, onClose, }) {
|
|
|
227
252
|
const resize = () => {
|
|
228
253
|
if (!chartContainerRef.current)
|
|
229
254
|
return;
|
|
230
|
-
setChartWidth(Math.max(
|
|
255
|
+
setChartWidth(Math.max(600, chartContainerRef.current.clientWidth));
|
|
231
256
|
};
|
|
232
257
|
resize();
|
|
233
258
|
window.addEventListener("resize", resize);
|
|
234
259
|
return () => window.removeEventListener("resize", resize);
|
|
235
|
-
}, []);
|
|
236
|
-
useEffect(() => {
|
|
237
|
-
setZoomDays((prev) => Math.max(MIN_TIMELINE_ZOOM_DAYS, Math.min(timelineMaxZoomDays, prev)));
|
|
238
|
-
}, [timelineMaxZoomDays]);
|
|
260
|
+
}, [isLoading]);
|
|
239
261
|
useEffect(() => {
|
|
240
|
-
const
|
|
241
|
-
if (!
|
|
262
|
+
const chartEl = chartContainerRef.current;
|
|
263
|
+
if (!chartEl)
|
|
242
264
|
return;
|
|
243
265
|
const handleWheel = (event) => {
|
|
244
266
|
if (!event.altKey)
|
|
@@ -246,14 +268,14 @@ export function PublishRestrictionsDialog({ item, onClose, }) {
|
|
|
246
268
|
event.preventDefault();
|
|
247
269
|
setZoomDays((prev) => {
|
|
248
270
|
const next = event.deltaY > 0 ? prev * 1.15 : prev * 0.85;
|
|
249
|
-
return Math.max(MIN_TIMELINE_ZOOM_DAYS, Math.min(
|
|
271
|
+
return Math.max(MIN_TIMELINE_ZOOM_DAYS, Math.min(MAX_TIMELINE_ZOOM_DAYS, Math.round(next)));
|
|
250
272
|
});
|
|
251
273
|
};
|
|
252
|
-
|
|
274
|
+
chartEl.addEventListener("wheel", handleWheel, { passive: false });
|
|
253
275
|
return () => {
|
|
254
|
-
|
|
276
|
+
chartEl.removeEventListener("wheel", handleWheel);
|
|
255
277
|
};
|
|
256
|
-
}, [isLoading
|
|
278
|
+
}, [isLoading]);
|
|
257
279
|
const itemWindowInvalid = useMemo(() => {
|
|
258
280
|
const from = fromDateTimeLocalValue(itemState.itemPublishFrom);
|
|
259
281
|
const to = fromDateTimeLocalValue(itemState.itemUnpublishAt);
|
|
@@ -303,17 +325,26 @@ export function PublishRestrictionsDialog({ item, onClose, }) {
|
|
|
303
325
|
itemState.itemUnpublishAt,
|
|
304
326
|
versionRows,
|
|
305
327
|
]);
|
|
306
|
-
const effectiveNowVersion = useMemo(() => evaluateActiveVersionAt(Date.now()), [
|
|
328
|
+
const effectiveNowVersion = useMemo(() => evaluateActiveVersionAt(Date.now()), [evaluateActiveVersionAt]);
|
|
307
329
|
const effectiveStatus = useMemo(() => {
|
|
308
330
|
if (!itemState.itemPublishable) {
|
|
309
|
-
return {
|
|
331
|
+
return {
|
|
332
|
+
label: "Blocked by item",
|
|
333
|
+
variant: "destructive",
|
|
334
|
+
className: undefined,
|
|
335
|
+
};
|
|
310
336
|
}
|
|
311
337
|
if (effectiveNowVersion === 0) {
|
|
312
|
-
return {
|
|
338
|
+
return {
|
|
339
|
+
label: "No publishable version",
|
|
340
|
+
variant: "secondary",
|
|
341
|
+
className: undefined,
|
|
342
|
+
};
|
|
313
343
|
}
|
|
314
344
|
return {
|
|
315
345
|
label: `Will publish v${effectiveNowVersion}`,
|
|
316
346
|
variant: "default",
|
|
347
|
+
className: "bg-feedback-green-light text-feedback-green",
|
|
317
348
|
};
|
|
318
349
|
}, [effectiveNowVersion, itemState.itemPublishable]);
|
|
319
350
|
const timelineModel = useMemo(() => {
|
|
@@ -339,71 +370,38 @@ export function PublishRestrictionsDialog({ item, onClose, }) {
|
|
|
339
370
|
});
|
|
340
371
|
const points = Array.from(boundaries).sort((a, b) => a - b);
|
|
341
372
|
const segments = [];
|
|
342
|
-
const effectiveChangePoints = [];
|
|
343
373
|
for (let i = 0; i < points.length - 1; i++) {
|
|
344
374
|
const start = points[i];
|
|
345
375
|
const end = points[i + 1];
|
|
346
376
|
if (end <= start)
|
|
347
377
|
continue;
|
|
348
378
|
const midpoint = start + (end - start) / 2;
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
effectiveVersion
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
current &&
|
|
359
|
-
previous.effectiveVersion !== current.effectiveVersion) {
|
|
360
|
-
effectiveChangePoints.push(start);
|
|
361
|
-
}
|
|
379
|
+
const effectiveVersion = evaluateActiveVersionAt(midpoint);
|
|
380
|
+
const previous = segments[segments.length - 1];
|
|
381
|
+
if (previous &&
|
|
382
|
+
previous.effectiveVersion === effectiveVersion &&
|
|
383
|
+
previous.end === start) {
|
|
384
|
+
previous.end = end;
|
|
385
|
+
}
|
|
386
|
+
else {
|
|
387
|
+
segments.push({ start, end, effectiveVersion });
|
|
362
388
|
}
|
|
363
389
|
}
|
|
364
390
|
const versions = [...versionRows].sort((a, b) => b.version - a.version);
|
|
365
|
-
const versionMin = versions.length
|
|
366
|
-
? versions[versions.length - 1].version
|
|
367
|
-
: 0;
|
|
368
|
-
const versionMax = versions.length ? versions[0].version : 1;
|
|
369
391
|
return {
|
|
370
392
|
viewStart,
|
|
371
393
|
viewEnd,
|
|
372
394
|
versions,
|
|
373
395
|
segments,
|
|
374
|
-
effectiveChangePoints,
|
|
375
|
-
versionMin,
|
|
376
|
-
versionMax,
|
|
377
396
|
};
|
|
378
|
-
}, [
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
timestamp,
|
|
387
|
-
x: 40 +
|
|
388
|
-
((timestamp - timelineModel.viewStart) /
|
|
389
|
-
(timelineModel.viewEnd - timelineModel.viewStart)) *
|
|
390
|
-
(chartWidth - 50),
|
|
391
|
-
}))
|
|
392
|
-
.filter((marker) => {
|
|
393
|
-
if (marker.x < edgePaddingPx || marker.x > chartWidth - edgePaddingPx) {
|
|
394
|
-
return false;
|
|
395
|
-
}
|
|
396
|
-
if (marker.x - lastX < minGapPx) {
|
|
397
|
-
return false;
|
|
398
|
-
}
|
|
399
|
-
lastX = marker.x;
|
|
400
|
-
return true;
|
|
401
|
-
})
|
|
402
|
-
.map((marker) => ({
|
|
403
|
-
...marker,
|
|
404
|
-
label: formatTimelineEventLabel(marker.timestamp, includeTime),
|
|
405
|
-
}));
|
|
406
|
-
}, [chartWidth, timelineModel, zoomDays]);
|
|
397
|
+
}, [
|
|
398
|
+
centerTs,
|
|
399
|
+
evaluateActiveVersionAt,
|
|
400
|
+
itemStartTs,
|
|
401
|
+
itemState,
|
|
402
|
+
versionRows,
|
|
403
|
+
zoomDays,
|
|
404
|
+
]);
|
|
407
405
|
const versionColorByNumber = useMemo(() => {
|
|
408
406
|
const map = new Map();
|
|
409
407
|
timelineModel.versions.forEach((row, index) => {
|
|
@@ -515,74 +513,107 @@ export function PublishRestrictionsDialog({ item, onClose, }) {
|
|
|
515
513
|
!item.canWriteLanguage;
|
|
516
514
|
const spanMs = zoomDays * TIMELINE_DAY_MS;
|
|
517
515
|
const includeTimeInTooltips = zoomDays <= 31;
|
|
516
|
+
const chartInnerWidth = chartWidth - CHART_PAD_X * 2;
|
|
517
|
+
const timestampToChartX = (timestamp) => CHART_PAD_X +
|
|
518
|
+
((timestamp - timelineModel.viewStart) /
|
|
519
|
+
(timelineModel.viewEnd - timelineModel.viewStart)) *
|
|
520
|
+
chartInnerWidth;
|
|
521
|
+
const chartXToTimestamp = (x) => timelineModel.viewStart +
|
|
522
|
+
((x - CHART_PAD_X) / chartInnerWidth) *
|
|
523
|
+
(timelineModel.viewEnd - timelineModel.viewStart);
|
|
524
|
+
const hoveredSegment = chartHover
|
|
525
|
+
? timelineModel.segments.find((segment) => chartHover.ts >= segment.start && chartHover.ts <= segment.end)
|
|
526
|
+
: undefined;
|
|
527
|
+
const handleChartPointerDown = (event) => {
|
|
528
|
+
event.currentTarget.setPointerCapture(event.pointerId);
|
|
529
|
+
dragStateRef.current = { startX: event.clientX, startCenter: centerTs };
|
|
530
|
+
setIsDraggingChart(true);
|
|
531
|
+
};
|
|
532
|
+
const handleChartPointerMove = (event) => {
|
|
533
|
+
const rect = event.currentTarget.getBoundingClientRect();
|
|
534
|
+
const localX = event.clientX - rect.left;
|
|
535
|
+
const dragState = dragStateRef.current;
|
|
536
|
+
if (dragState) {
|
|
537
|
+
const deltaX = event.clientX - dragState.startX;
|
|
538
|
+
setCenterTs(dragState.startCenter - deltaX * (spanMs / chartInnerWidth));
|
|
539
|
+
setChartHover(null);
|
|
540
|
+
return;
|
|
541
|
+
}
|
|
542
|
+
const clampedX = Math.max(CHART_PAD_X, Math.min(chartWidth - CHART_PAD_X, localX));
|
|
543
|
+
setChartHover({ x: clampedX, ts: chartXToTimestamp(clampedX) });
|
|
544
|
+
};
|
|
545
|
+
const handleChartPointerUp = (event) => {
|
|
546
|
+
if (event.currentTarget.hasPointerCapture(event.pointerId)) {
|
|
547
|
+
event.currentTarget.releasePointerCapture(event.pointerId);
|
|
548
|
+
}
|
|
549
|
+
dragStateRef.current = null;
|
|
550
|
+
setIsDraggingChart(false);
|
|
551
|
+
};
|
|
552
|
+
const renderRestrictionCells = (options) => (_jsxs(_Fragment, { children: [_jsx("td", { className: "px-4 py-2.5", children: _jsx(Switch, { checked: options.publishable, disabled: options.publishableDisabled, onCheckedChange: (checked) => options.onPublishableChange(Boolean(checked)) }) }), _jsx("td", { className: "py-2.5 pl-4", children: _jsx(DateTimeField, { icon: CalendarClock, value: options.from, disabled: options.fromDisabled, dimmed: !options.publishable, onChange: options.onFromChange }) }), _jsxs("td", { className: "relative py-2.5 pr-4 pl-6", children: [_jsx("span", { className: "text-muted-foreground absolute top-1/2 left-1.5 -translate-y-1/2 text-xs", children: "–" }), _jsx(DateTimeField, { icon: CalendarOff, value: options.to, disabled: options.toDisabled, dimmed: !options.publishable, invalid: options.invalid, onChange: options.onToChange })] })] }));
|
|
518
553
|
return (_jsx(Dialog, { open: true, onOpenChange: (open) => {
|
|
519
554
|
if (!open)
|
|
520
555
|
onClose(null);
|
|
521
|
-
}, children: _jsxs(DialogContent, { className: "flex max-w-5xl flex-col overflow-hidden border-none p-0 shadow-2xl", style: { maxHeight: "90vh" }, showCloseButton: true, children: [_jsx(StyledDialogTitle, { icon: _jsx(
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
...prev,
|
|
526
|
-
itemPublishable: Boolean(checked),
|
|
527
|
-
})) })] })] }), _jsxs("div", { className: "group rounded-xl border bg-white p-4 transition-shadow hover:shadow-sm", children: [_jsxs("div", { className: "mb-3 flex items-center gap-2", children: [_jsx("div", { className: "bg-feedback-blue-light text-feedback-blue flex h-7 w-7 shrink-0 items-center justify-center rounded-lg", children: _jsx(CalendarClock, { className: "h-4 w-4" }) }), _jsx("span", { className: "text-sm font-medium", children: "Publish from" })] }), _jsx(Input, { type: "datetime-local", className: "text-xs", value: itemState.itemPublishFrom, disabled: !itemState.publishFieldId, onChange: (event) => setItemState((prev) => ({
|
|
528
|
-
...prev,
|
|
529
|
-
itemPublishFrom: event.target.value,
|
|
530
|
-
})) }), _jsxs("div", { className: "mt-2 flex gap-1.5", children: [_jsx(Button, { variant: "ghost", size: "sm", className: "text-2xs h-6 px-2", disabled: !itemState.publishFieldId, onClick: () => setItemState((prev) => ({
|
|
556
|
+
}, children: _jsxs(DialogContent, { className: "flex max-w-5xl flex-col overflow-hidden border-none p-0 shadow-2xl", style: { maxHeight: "90vh" }, showCloseButton: true, children: [_jsx(StyledDialogTitle, { icon: _jsx(CalendarClock, { strokeWidth: 1 }), title: "Publish Restrictions", subtitle: item.displayName || item.name, trailing: !isLoading && (_jsx(Badge, { variant: effectiveStatus.variant, className: effectiveStatus.className, children: effectiveStatus.label })) }), isLoading ? (_jsx(LoadingState, { message: "Loading restrictions...", className: "py-20" })) : (_jsx("div", { className: "flex min-h-0 flex-1 flex-col overflow-y-auto", children: _jsxs("div", { className: "space-y-6 px-6 pt-2 pb-5", children: [_jsxs("section", { children: [_jsxs("div", { className: "mb-3", children: [_jsx("h3", { className: "text-base font-medium", children: "Item restrictions" }), _jsx("span", { className: "text-muted-foreground text-xs", children: "Applies to all versions" })] }), _jsxs("div", { className: "flex flex-wrap items-end gap-x-8 gap-y-3", children: [_jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: "Publishable" }), _jsx("div", { className: "flex h-8 items-center", children: _jsx(Switch, { checked: itemState.itemPublishable, disabled: !itemState.neverPublishFieldId, onCheckedChange: (checked) => setItemState((prev) => ({
|
|
557
|
+
...prev,
|
|
558
|
+
itemPublishable: Boolean(checked),
|
|
559
|
+
})) }) })] }), _jsxs("div", { className: "flex items-end gap-2", children: [_jsxs("div", { className: "flex w-44 flex-col gap-1", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: "Publish from" }), _jsx(DateTimeField, { icon: CalendarClock, value: itemState.itemPublishFrom, disabled: !itemState.publishFieldId, dimmed: !itemState.itemPublishable, onChange: (value) => setItemState((prev) => ({
|
|
531
560
|
...prev,
|
|
532
|
-
itemPublishFrom:
|
|
533
|
-
})), children: "
|
|
534
|
-
!itemState.itemPublishFrom, onClick: () => setItemState((prev) => ({
|
|
561
|
+
itemPublishFrom: value,
|
|
562
|
+
})) })] }), _jsx("span", { className: "text-muted-foreground pb-2 text-xs", children: "–" }), _jsxs("div", { className: "flex w-44 flex-col gap-1", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: "Unpublish at" }), _jsx(DateTimeField, { icon: CalendarOff, value: itemState.itemUnpublishAt, disabled: !itemState.unpublishFieldId, dimmed: !itemState.itemPublishable, invalid: itemWindowInvalid, onChange: (value) => setItemState((prev) => ({
|
|
535
563
|
...prev,
|
|
536
|
-
|
|
537
|
-
})), children: "
|
|
538
|
-
...prev,
|
|
539
|
-
itemUnpublishAt: event.target.value,
|
|
540
|
-
})) }), _jsx("div", { className: "mt-2 flex gap-1.5", children: _jsx(Button, { variant: "ghost", size: "sm", className: "text-muted-foreground h-6 px-2 text-[11px]", disabled: !itemState.unpublishFieldId ||
|
|
541
|
-
!itemState.itemUnpublishAt, onClick: () => setItemState((prev) => ({
|
|
542
|
-
...prev,
|
|
543
|
-
itemUnpublishAt: "",
|
|
544
|
-
})), children: "Clear" }) })] })] })] }), _jsxs("section", { children: [_jsx("h3", { className: "text-muted-foreground mb-3 text-xs font-medium tracking-wider", children: "Version Restrictions" }), _jsx("div", { className: "overflow-hidden rounded-xl border", children: _jsx("div", { className: "max-h-[280px] overflow-auto", children: _jsxs("table", { className: "w-full text-sm", children: [_jsx("thead", { className: "bg-neutral-grey-5/90 sticky top-0 z-10 border-b backdrop-blur-sm", children: _jsxs("tr", { className: "text-muted-foreground text-left text-[11px] font-medium tracking-wider", children: [_jsx("th", { className: "px-4 py-2.5 whitespace-nowrap", children: "Ver." }), _jsx("th", { className: "px-4 py-2.5 whitespace-nowrap", children: "Publishable" }), _jsx("th", { className: "px-4 py-2.5 whitespace-nowrap", children: "Valid from" }), _jsx("th", { className: "px-4 py-2.5 whitespace-nowrap", children: "Valid to" }), _jsx("th", { className: "px-4 py-2.5 whitespace-nowrap", children: "Updated" }), _jsx("th", { className: "px-4 py-2.5 whitespace-nowrap", children: "By" })] }) }), _jsx("tbody", { className: "divide-y", children: versionRows.map((row, rowIdx) => {
|
|
564
|
+
itemUnpublishAt: value,
|
|
565
|
+
})) })] })] })] }), itemWindowInvalid && (_jsx("div", { className: "text-feedback-red mt-2 text-xs font-medium", children: "Unpublish date must be after publish date." }))] }), _jsxs("section", { children: [_jsxs("div", { className: "mb-3", children: [_jsx("h3", { className: "text-base font-medium", children: "Version restrictions" }), _jsx("span", { className: "text-muted-foreground text-xs", children: "Applies to individual versions" })] }), _jsx("div", { className: "overflow-hidden rounded-xl border", children: _jsx("div", { className: "max-h-[300px] overflow-y-auto", children: _jsxs("table", { className: "w-full table-fixed text-sm", children: [_jsx(TableColumns, {}), _jsx("thead", { className: "sticky top-0 z-10 border-b bg-white/95 backdrop-blur-sm", children: _jsxs("tr", { className: "text-muted-foreground text-left text-xs font-medium", children: [_jsx("th", { className: "px-4 py-2.5 font-medium", children: "Version" }), _jsx("th", { className: "px-4 py-2.5 font-medium", children: "Publishable" }), _jsx("th", { className: "py-2.5 pl-4 font-medium", children: "Valid from" }), _jsx("th", { className: "py-2.5 pl-6 font-medium", children: "Valid to" }), _jsx("th", { className: "px-4 py-2.5 font-medium", children: "Updated" }), _jsx("th", { className: "px-4 py-2.5 text-right font-medium", children: "By" })] }) }), _jsx("tbody", { className: "divide-y", children: versionRows.map((row) => {
|
|
545
566
|
const invalidWindow = !!toTimestamp(row.versionValidFrom) &&
|
|
546
567
|
!!toTimestamp(row.versionValidTo) &&
|
|
547
568
|
toTimestamp(row.versionValidFrom) >
|
|
548
569
|
toTimestamp(row.versionValidTo);
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
(
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
570
|
+
const isEffective = row.version === effectiveNowVersion;
|
|
571
|
+
const versionColor = versionColorByNumber.get(row.version);
|
|
572
|
+
return (_jsxs("tr", { className: cn("bg-white align-middle transition-colors", invalidWindow && "bg-feedback-red-light/40"), children: [_jsx("td", { className: "px-4 py-2.5 whitespace-nowrap", children: _jsxs("span", { className: "bg-neutral-grey-5 inline-flex h-6 min-w-9 items-center justify-center rounded-md px-1.5 text-xs font-medium tabular-nums", style: isEffective && versionColor
|
|
573
|
+
? {
|
|
574
|
+
backgroundColor: `color-mix(in srgb, ${versionColor} 18%, white)`,
|
|
575
|
+
color: `color-mix(in srgb, ${versionColor} 85%, black)`,
|
|
576
|
+
}
|
|
577
|
+
: undefined, title: isEffective
|
|
578
|
+
? "Currently effective version"
|
|
579
|
+
: undefined, children: ["V", row.version] }) }), renderRestrictionCells({
|
|
580
|
+
publishable: row.versionPublishable,
|
|
581
|
+
publishableDisabled: !row.hideVersionFieldId,
|
|
582
|
+
onPublishableChange: (checked) => setVersionRows((prev) => prev.map((x) => x.version === row.version
|
|
583
|
+
? { ...x, versionPublishable: checked }
|
|
584
|
+
: x)),
|
|
585
|
+
from: row.versionValidFrom,
|
|
586
|
+
fromDisabled: !row.validFromFieldId,
|
|
587
|
+
onFromChange: (value) => setVersionRows((prev) => prev.map((x) => x.version === row.version
|
|
588
|
+
? { ...x, versionValidFrom: value }
|
|
589
|
+
: x)),
|
|
590
|
+
to: row.versionValidTo,
|
|
591
|
+
toDisabled: !row.validToFieldId,
|
|
592
|
+
onToChange: (value) => setVersionRows((prev) => prev.map((x) => x.version === row.version
|
|
593
|
+
? { ...x, versionValidTo: value }
|
|
594
|
+
: x)),
|
|
595
|
+
invalid: invalidWindow,
|
|
596
|
+
}), _jsx("td", { className: "text-muted-foreground px-4 py-2.5 text-xs whitespace-nowrap", children: row.updatedLabel }), _jsx("td", { className: "px-4 py-2.5", children: _jsx(UserCell, { name: row.updatedBy }) })] }, row.version));
|
|
597
|
+
}) })] }) }) }), versionWindowInvalidCount > 0 && (_jsxs("div", { className: "text-feedback-red mt-2 text-xs font-medium", children: [versionWindowInvalidCount, " version(s) have invalid date ranges."] }))] }), _jsxs("section", { children: [_jsxs("div", { className: "mb-1 flex items-center justify-between", children: [_jsx("h3", { className: "text-foreground text-base font-medium", children: "Timeline" }), _jsx("div", { className: "flex items-center gap-1", children: TIMELINE_ZOOM_PRESETS.map((preset) => (_jsx("button", { type: "button", className: cn("border-b-2 px-2 pt-1 pb-1.5 text-xs transition-colors", zoomDays === preset.days
|
|
598
|
+
? "border-neutral-grey-100 text-foreground font-medium"
|
|
599
|
+
: "text-muted-foreground hover:text-foreground border-transparent"), onClick: () => setZoomDays(preset.days), children: preset.label }, preset.label))) })] }), _jsxs("div", { ref: chartContainerRef, className: cn("relative touch-none pt-9 select-none", isDraggingChart ? "cursor-grabbing" : "cursor-grab"), onPointerDown: handleChartPointerDown, onPointerMove: handleChartPointerMove, onPointerUp: handleChartPointerUp, onPointerLeave: () => setChartHover(null), children: [chartHover && hoveredSegment && (_jsxs("div", { className: "pointer-events-none absolute top-0 z-10 -translate-x-1/2 rounded-lg border bg-white px-3 py-1 text-xs whitespace-nowrap shadow-md", style: {
|
|
600
|
+
left: Math.max(100, Math.min(chartWidth - 100, chartHover.x)),
|
|
601
|
+
}, children: [_jsx("span", { className: "font-medium", children: hoveredSegment.effectiveVersion
|
|
602
|
+
? `V${hoveredSegment.effectiveVersion}`
|
|
603
|
+
: "Not published" }), _jsxs("span", { className: "text-muted-foreground", children: [" / ", formatTimelineRangeLabel(hoveredSegment.start, hoveredSegment.end, includeTimeInTooltips)] })] })), _jsxs("svg", { width: chartWidth, height: CHART_HEIGHT, children: [timelineModel.segments.map((segment, index) => {
|
|
604
|
+
if (!segment.effectiveVersion)
|
|
605
|
+
return null;
|
|
606
|
+
const x1 = timestampToChartX(segment.start);
|
|
607
|
+
const x2 = timestampToChartX(segment.end);
|
|
608
|
+
const fillColor = versionColorByNumber.get(segment.effectiveVersion) ??
|
|
609
|
+
"var(--color-feedback-blue)";
|
|
610
|
+
return (_jsx("rect", { x: x1 + 1, y: CHART_BAR_Y, width: Math.max(0, x2 - x1 - 2), height: CHART_BAR_HEIGHT, fill: fillColor, opacity: hoveredSegment === segment ? 1 : 0.85, rx: 4 }, `segment-${index}`));
|
|
611
|
+
}), _jsx("line", { x1: CHART_PAD_X, y1: CHART_AXIS_Y, x2: chartWidth - CHART_PAD_X, y2: CHART_AXIS_Y, stroke: "var(--color-neutral-grey-10)" }), [
|
|
612
|
+
CHART_PAD_X,
|
|
613
|
+
chartWidth / 2,
|
|
614
|
+
chartWidth - CHART_PAD_X,
|
|
615
|
+
].map((tickX) => (_jsx("line", { x1: tickX, y1: CHART_AXIS_Y - 4, x2: tickX, y2: CHART_AXIS_Y, stroke: "var(--color-neutral-grey-15)" }, `tick-${tickX}`))), chartHover && (_jsxs("g", { children: [_jsx("line", { x1: chartHover.x, y1: 0, x2: chartHover.x, y2: CHART_AXIS_Y, stroke: "var(--color-neutral-grey-50)", strokeDasharray: "2 3" }), _jsx("circle", { cx: chartHover.x, cy: CHART_AXIS_Y, r: 3.5, fill: (hoveredSegment?.effectiveVersion
|
|
616
|
+
? versionColorByNumber.get(hoveredSegment.effectiveVersion)
|
|
617
|
+
: undefined) ?? "var(--color-neutral-grey-50)" })] })), _jsx("text", { x: CHART_PAD_X, y: CHART_AXIS_Y + 16, fontSize: 11, fill: "var(--color-neutral-grey-50)", children: new Date(timelineModel.viewStart).toLocaleDateString() }), _jsx("text", { x: chartWidth / 2, y: CHART_AXIS_Y + 16, fontSize: 11, fill: "var(--color-neutral-grey-50)", textAnchor: "middle", children: new Date(centerTs).toLocaleDateString() }), _jsx("text", { x: chartWidth - CHART_PAD_X, y: CHART_AXIS_Y + 16, fontSize: 11, fill: "var(--color-neutral-grey-50)", textAnchor: "end", children: new Date(timelineModel.viewEnd).toLocaleDateString() })] })] }), _jsx("div", { className: "text-muted-foreground mt-1 text-right text-[10px]", children: "Drag to pan \u00B7 Alt+scroll to zoom" })] })] }) })), _jsxs(DialogButtons, { children: [_jsx(Button, { variant: "outline", size: "sm", onClick: () => onClose(null), children: "Cancel" }), _jsx(Button, { size: "sm", onClick: save, disabled: isSaveDisabled, children: isSaving ? "Saving..." : "Save" })] })] }) }));
|
|
587
618
|
}
|
|
588
619
|
//# sourceMappingURL=PublishRestrictionsDialog.js.map
|