@uva-glass/component-library
Version:
React components UvA
82 lines (81 loc) • 2.98 kB
JavaScript
import { jsxs as f, jsx as i } from "react/jsx-runtime";
import { c as e } from "../../../../clsx-OuTLNxxd.js";
import { o as h } from "../../../../LexicalComposerContext.prod-DOyoZx0P.js";
import { at as _, au as y, av as C, aw as k } from "../../../../Lexical.prod-BAE-wnll.js";
import { useState as m, useEffect as s } from "react";
import "../../../Accordion/Accordion.js";
import { Icon as n } from "../../../Icon/Icon.js";
import "../../../Buttons/Button.js";
import "../../../Buttons/LinkButton.js";
import "@react-aria/button";
import "../../../Checkbox/Checkbox.js";
import "@react-aria/dialog";
import "@react-aria/focus";
import "@react-aria/overlays";
import "../../../OverlayCloseButton/OverlayCloseButton.js";
import "../../../GridRow/GridRow.js";
import "../../../IconButton/IconButton.js";
import "../../../Input/Input.js";
import "../../../InputField/InputField.js";
import "react-router";
import "../../../../TablePlugin-BLbsvcuu.js";
import { s as r } from "../../../../RteEditor.module-CUi7Vqe8.js";
import { useTranslation as g } from "../../hooks/useTranslation.js";
import "../LinkPlugin/LinkContextMenu/LinkContextMenu.js";
import "../../hooks/components/Flyout.js";
import "react-dom";
import "../../../../index-yEhaxKq-.js";
import "../../Providers/LanguageProvider.js";
import "../../../SearchField/SearchField.js";
import "../../../SelectListbox/SelectListbox.js";
import "../../../SelectListbox/SelectProvider.js";
import "../../../Sortable/components/SortableItem.js";
import "../../../../SortableProvider-BbwlEPIr.js";
import "../../../WeekSelector/components/WeekSelectorOptionContainer.js";
const ro = () => {
const o = g(), [t] = h(), [p, d] = m(!1), [l, c] = m(!1), u = () => {
t.dispatchCommand(C, void 0);
}, b = () => {
t.dispatchCommand(k, void 0);
};
return s(() => t.registerCommand(
_,
(a) => (d(a), !1),
1
), [t]), s(() => t.registerCommand(
y,
(a) => (c(a), !1),
1
), [t]), /* @__PURE__ */ f("div", { className: r["editor__toolbar-button-group"], children: [
/* @__PURE__ */ i(
"button",
{
onClick: u,
className: e(r["editor__toolbar-button"], r["editor__toolbar-button--undo"]),
"aria-label": o.aria.labels.undo,
"aria-keyshortcuts": o.aria.keyshortcuts.undo,
disabled: !p,
title: o.format.undoTooltip,
type: "button",
children: /* @__PURE__ */ i(n, { name: "StepBack", size: 24 })
}
),
/* @__PURE__ */ i(
"button",
{
onClick: b,
className: e(r["editor__toolbar-button"], r["editor__toolbar-button--redo"]),
"aria-label": o.aria.labels.redo,
"aria-keyshortcuts": o.aria.keyshortcuts.redo,
disabled: !l,
title: o.format.redoTooltip,
type: "button",
children: /* @__PURE__ */ i(n, { name: "StepForwards", size: 24 })
}
)
] });
};
export {
ro as HistoryPlugin
};
//# sourceMappingURL=HistoryPlugin.js.map