@uva-glass/component-library 1.65.0 → 2.0.1
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/Column-BUyVh2Oo.js.map +1 -1
- package/dist/{Lexical.prod-DeeCy7Xd.js → Lexical.prod-Bzma_w4s.js} +2 -2
- package/dist/{Lexical.prod-DeeCy7Xd.js.map → Lexical.prod-Bzma_w4s.js.map} +1 -1
- package/dist/{LexicalClipboard.prod-CayrMfkI.js → LexicalClipboard.prod-Dg23ixPD.js} +4 -4
- package/dist/{LexicalClipboard.prod-CayrMfkI.js.map → LexicalClipboard.prod-Dg23ixPD.js.map} +1 -1
- package/dist/{LexicalLink.prod-Biaqry-c.js → LexicalLink.prod-C1RDJLfo.js} +3 -3
- package/dist/{LexicalLink.prod-Biaqry-c.js.map → LexicalLink.prod-C1RDJLfo.js.map} +1 -1
- package/dist/{LexicalList.prod-Uk8UObU7.js → LexicalList.prod-BGzfDPU0.js} +3 -3
- package/dist/{LexicalList.prod-Uk8UObU7.js.map → LexicalList.prod-BGzfDPU0.js.map} +1 -1
- package/dist/{LexicalSelection.prod-C1TEIGhq.js → LexicalSelection.prod-CNWFGVlh.js} +2 -2
- package/dist/{LexicalSelection.prod-C1TEIGhq.js.map → LexicalSelection.prod-CNWFGVlh.js.map} +1 -1
- package/dist/{LexicalTable.prod-hx6rW3fc.js → LexicalTable.prod-D-4NN9o5.js} +500 -472
- package/dist/LexicalTable.prod-D-4NN9o5.js.map +1 -0
- package/dist/{LexicalUtils.prod-CCjlRAc-.js → LexicalUtils.prod-Cg2siy-c.js} +2 -2
- package/dist/{LexicalUtils.prod-CCjlRAc-.js.map → LexicalUtils.prod-Cg2siy-c.js.map} +1 -1
- package/dist/MultiSelectItem-D9PxdX43.js.map +1 -1
- package/dist/SortableProvider-BUsvniX7.js.map +1 -1
- package/dist/{TablePlugin-BbiBRjod.js → TablePlugin-DDlrU-7e.js} +30 -31
- package/dist/{TablePlugin-BbiBRjod.js.map → TablePlugin-DDlrU-7e.js.map} +1 -1
- package/dist/chunk-D52XG6IA-CQ2nAQyC.js +1701 -0
- package/dist/chunk-D52XG6IA-CQ2nAQyC.js.map +1 -0
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/Accordion/Accordion.stories.js.map +1 -1
- package/dist/components/AccordionCard/AccordionCard.js.map +1 -1
- package/dist/components/AccordionCard/AccordionCard.stories.js.map +1 -1
- package/dist/components/ActionList/ActionList.js.map +1 -1
- package/dist/components/ActionList/ActionList.stories.js.map +1 -1
- package/dist/components/AppStatusBar/AppStatusBar.stories.js.map +1 -1
- package/dist/components/Attention/Attention.stories.js.map +1 -1
- package/dist/components/Backdrop/Backdrop.stories.js.map +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.stories.js.map +1 -1
- package/dist/components/Buttons/Button.js.map +1 -1
- package/dist/components/Buttons/Button.stories.js +1 -1
- package/dist/components/Buttons/Button.stories.js.map +1 -1
- package/dist/components/Buttons/LinkButton.d.ts +1 -1
- package/dist/components/Buttons/LinkButton.js +1 -1
- package/dist/components/Buttons/LinkButton.js.map +1 -1
- package/dist/components/Buttons/LinkButton.stories.js +5 -5
- package/dist/components/Buttons/LinkButton.stories.js.map +1 -1
- package/dist/components/Buttons/MenuButton.js.map +1 -1
- package/dist/components/Buttons/MenuButton.stories.js +1 -1
- package/dist/components/Buttons/MenuButton.stories.js.map +1 -1
- package/dist/components/Card/Card.stories.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.stories.js +1 -1
- package/dist/components/Checkbox/Checkbox.stories.js.map +1 -1
- package/dist/components/CheckboxButton/CheckboxButton.js.map +1 -1
- package/dist/components/CheckboxButton/CheckboxButton.stories.js +1 -1
- package/dist/components/CheckboxButton/CheckboxButton.stories.js.map +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.js.map +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js.map +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.js +6 -7
- package/dist/components/CheckboxTree/CheckboxTree.js.map +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.stories.js +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.stories.js.map +1 -1
- package/dist/components/Drawer/Drawer.js.map +1 -1
- package/dist/components/Drawer/Drawer.stories.js +1 -1
- package/dist/components/Drawer/Drawer.stories.js.map +1 -1
- package/dist/components/EmptyStateDataDisplay/EmptyStateDataDisplay.js.map +1 -1
- package/dist/components/EmptyStateDataDisplay/EmptyStateDataDisplay.stories.js.map +1 -1
- package/dist/components/FeedbackBox/FeedbackBox.stories.js.map +1 -1
- package/dist/components/FieldHint/FieldHint.js.map +1 -1
- package/dist/components/FieldHint/FieldHint.stories.js.map +1 -1
- package/dist/components/Fieldset/Fieldset.stories.js.map +1 -1
- package/dist/components/FormField/FormField.stories.js.map +1 -1
- package/dist/components/FormInput/FormInput.js +8 -9
- package/dist/components/FormInput/FormInput.js.map +1 -1
- package/dist/components/FormInput/FormInput.stories.js +1 -1
- package/dist/components/FormInput/FormInput.stories.js.map +1 -1
- package/dist/components/GridRow/GridRow.js.map +1 -1
- package/dist/components/GridRow/GridRow.stories.js.map +1 -1
- package/dist/components/HorizontalList/HorizontalList.js.map +1 -1
- package/dist/components/HorizontalList/HorizontalList.stories.js.map +1 -1
- package/dist/components/Icon/Icon.stories.js.map +1 -1
- package/dist/components/Icon/icons/index.js.map +1 -1
- package/dist/components/IconButton/IconButton.js.map +1 -1
- package/dist/components/IconButton/IconButton.stories.js +1 -1
- package/dist/components/IconButton/IconButton.stories.js.map +1 -1
- package/dist/components/InfoMessage/InfoMessage.stories.js.map +1 -1
- package/dist/components/Input/Input.js.map +1 -1
- package/dist/components/Input/Input.stories.js.map +1 -1
- package/dist/components/InputField/InputField.js.map +1 -1
- package/dist/components/InputField/InputField.stories.js +4 -5
- package/dist/components/InputField/InputField.stories.js.map +1 -1
- package/dist/components/Label/Label.stories.js.map +1 -1
- package/dist/components/MenuLink/MenuLink.d.ts +1 -1
- package/dist/components/MenuLink/MenuLink.js +5 -5
- package/dist/components/MenuLink/MenuLink.js.map +1 -1
- package/dist/components/MenuLink/MenuLink.stories.d.ts +1 -1
- package/dist/components/MenuLink/MenuLink.stories.js +1 -1
- package/dist/components/MenuLink/MenuLink.stories.js.map +1 -1
- package/dist/components/MetaDataList/MetaDataList.js.map +1 -1
- package/dist/components/MetaDataList/MetaDataList.stories.js.map +1 -1
- package/dist/components/ModalDialog/ModalDialog.js.map +1 -1
- package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
- package/dist/components/ModalDialog/ModalDialog.stories.js.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +2 -2
- package/dist/components/MultiSelect/MultiSelect.stories.js.map +1 -1
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +2 -3
- package/dist/components/MultiSelect/components/MultiSelectHeader.js.map +1 -1
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/OverlayCloseButton/OverlayCloseButton.js.map +1 -1
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js.map +1 -1
- package/dist/components/PageOverlay/PageOverlay.js.map +1 -1
- package/dist/components/PageOverlay/PageOverlay.stories.js.map +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.js +3 -4
- package/dist/components/PeriodSelector/PeriodSelector.js.map +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.stories.js.map +1 -1
- package/dist/components/Periods/Periods.js.map +1 -1
- package/dist/components/Periods/Periods.stories.js.map +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.js.map +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +4 -5
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js.map +1 -1
- package/dist/components/RadioButton/RadioButton.stories.js.map +1 -1
- package/dist/components/Repeater/Repeater.js.map +1 -1
- package/dist/components/Repeater/Repeater.stories.js.map +1 -1
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +3 -4
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js.map +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +4 -5
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +3 -4
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js.map +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js.map +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +6 -7
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +3 -3
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +3 -3
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +2 -3
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +4 -5
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +10 -10
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +19 -19
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/index.js +1 -1
- package/dist/components/RteEditor/Providers/LanguageProvider.js.map +1 -1
- package/dist/components/RteEditor/RteEditor.js +77 -78
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/RteEditor.stories.js.map +1 -1
- package/dist/components/RteEditor/helpers.js +4 -4
- package/dist/components/RteEditor/helpers.js.map +1 -1
- package/dist/components/RteEditor/hooks/components/Flyout.js.map +1 -1
- package/dist/components/RteEditor/hooks/useFlyout.js.map +1 -1
- package/dist/components/RteEditor/hooks/useTranslation.js.map +1 -1
- package/dist/components/RteEditor/translations.js.map +1 -1
- package/dist/components/SectionNotification/SectionNotification.stories.js.map +1 -1
- package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
- package/dist/components/SelectListbox/SelectListBox.stories.js.map +1 -1
- package/dist/components/SelectListbox/SelectListbox.js.map +1 -1
- package/dist/components/SelectListbox/SelectProvider.js.map +1 -1
- package/dist/components/SelectListbox/components/SelectButton.js.map +1 -1
- package/dist/components/SelectListbox/components/SelectContainer.js.map +1 -1
- package/dist/components/SelectListbox/components/SelectOption.js.map +1 -1
- package/dist/components/SelectListbox/components/SelectOptionBox.js.map +1 -1
- package/dist/components/Sortable/Sortable.js.map +1 -1
- package/dist/components/Sortable/Sortable.stories.js +1 -1
- package/dist/components/Sortable/Sortable.stories.js.map +1 -1
- package/dist/components/Sortable/actions.js.map +1 -1
- package/dist/components/Sortable/components/SortableHandle.js.map +1 -1
- package/dist/components/Sortable/components/SortableItem.js.map +1 -1
- package/dist/components/Sortable/sortableReducer.js.map +1 -1
- package/dist/components/Spinner/Spinner.js.map +1 -1
- package/dist/components/Spinner/Spinner.stories.js.map +1 -1
- package/dist/components/StatusPill/StatusPill.js.map +1 -1
- package/dist/components/StatusPill/StatusPill.stories.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.stories.js.map +1 -1
- package/dist/components/hooks/useDebounce.js.map +1 -1
- package/dist/components/hooks/useOnClickOutside.js.map +1 -1
- package/dist/components/hooks/usePositionedFloaters.js.map +1 -1
- package/dist/components/hooks/useResponsive.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/{helpers-CgzuKnuq.js → helpers-BVGma1u6.js} +4 -4
- package/dist/{helpers-CgzuKnuq.js.map → helpers-BVGma1u6.js.map} +1 -1
- package/dist/index-0wq-B7do.js.map +1 -1
- package/dist/index-2mUSc_Ki.js.map +1 -1
- package/dist/index-B9BWML6P.js.map +1 -1
- package/dist/{index-DQyNeMuh.js → index-DWzkl4aY.js} +7 -7
- package/dist/{index-DQyNeMuh.js.map → index-DWzkl4aY.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/react-18-BIqxBxbW.js.map +1 -1
- package/dist/storyComponents/ClipboardButton/ClipboardButton.js.map +1 -1
- package/dist/storyComponents/Container/Container.js.map +1 -1
- package/dist/storybook__react.d.js.map +1 -1
- package/package.json +7 -7
- package/dist/LexicalTable.prod-hx6rW3fc.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LanguageProvider.js","sources":["../../../../src/components/RteEditor/Providers/LanguageProvider.tsx"],"sourcesContent":["import { createContext, useContext, useState } from 'react';\n\nimport type { ReactNode } from 'react';\n\ninterface LanguageContextProps {\n language: string;\n switchLanguage: (language: string) => void;\n}\n\nconst LanguageContext = createContext<LanguageContextProps | undefined>(undefined);\n\nexport const LanguageProvider = ({ children }: { children: ReactNode }) => {\n const [language, setLanguage] = useState<string>('en');\n\n const switchLanguage = (language: string) => {\n setLanguage(language);\n };\n\n return <LanguageContext.Provider value={{ language, switchLanguage }}>{children}</LanguageContext.Provider>;\n};\n\nexport const useLanguage = (): LanguageContextProps => {\n const context = useContext(LanguageContext);\n if (!context) {\n throw new Error('useLanguage must be used within a LanguageProvider');\n }\n return context;\n};\n"],"names":["LanguageContext","createContext","LanguageProvider","children","language","setLanguage","useState","switchLanguage","jsx","useLanguage","context","useContext"],"mappings":";;AASA,MAAMA,IAAkBC,EAAgD,MAAS,GAEpEC,IAAmB,CAAC,EAAE,UAAAC,QAAwC;AACzE,QAAM,CAACC,GAAUC,CAAW,IAAIC,EAAiB,IAAI,GAE/CC,IAAiB,CAACH,MAAqB;AAC3C,IAAAC,EAAYD,CAAQ;AAAA,
|
|
1
|
+
{"version":3,"file":"LanguageProvider.js","sources":["../../../../src/components/RteEditor/Providers/LanguageProvider.tsx"],"sourcesContent":["import { createContext, useContext, useState } from 'react';\n\nimport type { ReactNode } from 'react';\n\ninterface LanguageContextProps {\n language: string;\n switchLanguage: (language: string) => void;\n}\n\nconst LanguageContext = createContext<LanguageContextProps | undefined>(undefined);\n\nexport const LanguageProvider = ({ children }: { children: ReactNode }) => {\n const [language, setLanguage] = useState<string>('en');\n\n const switchLanguage = (language: string) => {\n setLanguage(language);\n };\n\n return <LanguageContext.Provider value={{ language, switchLanguage }}>{children}</LanguageContext.Provider>;\n};\n\nexport const useLanguage = (): LanguageContextProps => {\n const context = useContext(LanguageContext);\n if (!context) {\n throw new Error('useLanguage must be used within a LanguageProvider');\n }\n return context;\n};\n"],"names":["LanguageContext","createContext","LanguageProvider","children","language","setLanguage","useState","switchLanguage","jsx","useLanguage","context","useContext"],"mappings":";;AASA,MAAMA,IAAkBC,EAAgD,MAAS,GAEpEC,IAAmB,CAAC,EAAE,UAAAC,QAAwC;AACzE,QAAM,CAACC,GAAUC,CAAW,IAAIC,EAAiB,IAAI,GAE/CC,IAAiB,CAACH,MAAqB;AAC3C,IAAAC,EAAYD,CAAQ;AAAA,EACtB;AAEO,SAAA,gBAAAI,EAACR,EAAgB,UAAhB,EAAyB,OAAO,EAAE,UAAAI,GAAU,gBAAAG,KAAmB,UAAAJ,GAAS;AAClF,GAEaM,IAAc,MAA4B;AAC/C,QAAAC,IAAUC,EAAWX,CAAe;AAC1C,MAAI,CAACU;AACG,UAAA,IAAI,MAAM,oDAAoD;AAE/D,SAAAA;AACT;"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { jsx as y, jsxs as
|
|
1
|
+
import { jsx as y, jsxs as F, Fragment as Ke } from "react/jsx-runtime";
|
|
2
2
|
import { l as Ze, o as Ge, u as R } from "../../LexicalComposerContext.prod-Dyvim1tK.js";
|
|
3
|
-
import { ao as
|
|
3
|
+
import { ao as Fe, u as z, z as me, R as v, E as W, b as J, W as Qe, h as P, a as C, a0 as Ae, ap as et, a6 as g, B as tt, an as K, al as nt, aq as rt, ar as ot, as as it, f as ie, at as st, au as at, A as lt, V as ct, F as dt, l as ut, av as ft, aw as ge, o as he, M as mt, J as se, L as pt, a4 as ze, ax as ve, y as gt, x as ht, S as vt, a3 as Ce, w as Ct, ay as yt, az as Et, aA as wt, aj as bt, O as St, m as $t, aB as _t, n as xt, H as kt, D as Nt, a7 as Lt, e as Dt, K as ye, aC as Pt, C as Rt, a9 as Y, a8 as Z, aD as Tt, aE as Mt, ab as Ot, aa as It } from "../../Lexical.prod-Bzma_w4s.js";
|
|
4
4
|
import * as ae from "react";
|
|
5
|
-
import { useMemo as q, useLayoutEffect as
|
|
6
|
-
import { N as B, u as
|
|
5
|
+
import { useMemo as q, useLayoutEffect as H, useEffect as x, useState as O, useRef as Be, Suspense as Kt, forwardRef as Ue, useCallback as Ft } from "react";
|
|
6
|
+
import { N as B, u as A, n as At, o as pe, i as zt, d as Bt } from "../../LexicalUtils.prod-Cg2siy-c.js";
|
|
7
7
|
import { r as Ut } from "../../index-B9BWML6P.js";
|
|
8
|
-
import { N as Ee, O as we, h as
|
|
9
|
-
import { L as be, $ as Se } from "../../LexicalSelection.prod-
|
|
10
|
-
import { J as
|
|
11
|
-
import { a as We, U as $e, m as le, g as Jt, f as qt } from "../../LexicalLink.prod-
|
|
12
|
-
import {
|
|
13
|
-
import { a as on, F as sn, M as an } from "../../helpers-
|
|
8
|
+
import { N as Ee, O as we, h as Ht, m as jt } from "../../LexicalClipboard.prod-Dg23ixPD.js";
|
|
9
|
+
import { L as be, $ as Se } from "../../LexicalSelection.prod-CNWFGVlh.js";
|
|
10
|
+
import { J as He, I as je, Z as Wt } from "../../LexicalList.prod-BGzfDPU0.js";
|
|
11
|
+
import { a as We, U as $e, m as le, g as Jt, f as qt } from "../../LexicalLink.prod-C1RDJLfo.js";
|
|
12
|
+
import { k as Vt, K as re, r as oe, f as Je, P as Xt, s as _e, c as Yt, S as Zt, X as Gt, B as Qt, H as en, C as xe, i as tn, V as nn, n as rn } from "../../LexicalTable.prod-D-4NN9o5.js";
|
|
13
|
+
import { a as on, F as sn, M as an } from "../../helpers-BVGma1u6.js";
|
|
14
14
|
import { c as ln } from "../../clsx-OuTLNxxd.js";
|
|
15
15
|
import { exportMap as cn, isStartingWithHtmlTag as dn, mergeBoldStrongTags as un } from "./helpers.js";
|
|
16
16
|
import { s as M } from "../../RteEditor.module-oFMKEW6f.js";
|
|
17
17
|
import { ToolBarPlugin as fn } from "./Plugins/ToolbarPlugin/ToolbarPlugin.js";
|
|
18
18
|
import { useTranslation as mn } from "./hooks/useTranslation.js";
|
|
19
|
-
import "../../TablePlugin-
|
|
19
|
+
import "../../TablePlugin-DDlrU-7e.js";
|
|
20
20
|
import "./Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
21
21
|
import "./hooks/components/Flyout.js";
|
|
22
22
|
import "../Buttons/Button.js";
|
|
@@ -31,7 +31,6 @@ import "../GridRow/GridRow.js";
|
|
|
31
31
|
import "../IconButton/IconButton.js";
|
|
32
32
|
import "../Input/Input.js";
|
|
33
33
|
import "../InputField/InputField.js";
|
|
34
|
-
import "react-router-dom";
|
|
35
34
|
import "../SelectListbox/SelectListbox.js";
|
|
36
35
|
import "../SelectListbox/SelectProvider.js";
|
|
37
36
|
import "../Sortable/components/SortableItem.js";
|
|
@@ -40,10 +39,10 @@ import { UvaTheme as gn } from "./UvaTheme/UvaTheme.js";
|
|
|
40
39
|
import { EditorHeader as hn } from "./EditorHeader/EditorHeader.js";
|
|
41
40
|
import { useLanguage as vn, LanguageProvider as Cn } from "./Providers/LanguageProvider.js";
|
|
42
41
|
import { PasteHandlerPlugin as yn } from "./Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js";
|
|
43
|
-
const qe = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, En = qe ?
|
|
42
|
+
const qe = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, En = qe ? H : x, G = { tag: "history-merge" };
|
|
44
43
|
function wn({ initialConfig: t, children: e }) {
|
|
45
44
|
const n = q(() => {
|
|
46
|
-
const { theme: o, namespace: i, nodes: r, onError: s, editorState: a, html: l } = t, c = Ge(null, o), d =
|
|
45
|
+
const { theme: o, namespace: i, nodes: r, onError: s, editorState: a, html: l } = t, c = Ge(null, o), d = Fe({ editable: t.editable, html: l, namespace: i, nodes: r, onError: (f) => s(f, d), theme: o });
|
|
47
46
|
return function(f, u) {
|
|
48
47
|
if (u !== null) {
|
|
49
48
|
if (u === void 0) f.update(() => {
|
|
@@ -77,13 +76,13 @@ function wn({ initialConfig: t, children: e }) {
|
|
|
77
76
|
i.setEditable(o === void 0 || o);
|
|
78
77
|
}, []), y(Ze.Provider, { value: n, children: e });
|
|
79
78
|
}
|
|
80
|
-
const bn = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ?
|
|
79
|
+
const bn = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? H : x;
|
|
81
80
|
function Sn(t) {
|
|
82
81
|
return { initialValueFn: () => t.isEditable(), subscribe: (e) => t.registerEditableListener(e) };
|
|
83
82
|
}
|
|
84
83
|
function $n() {
|
|
85
84
|
return function(t) {
|
|
86
|
-
const [e] = R(), n = q(() => t(e), [e, t]), [o, i] =
|
|
85
|
+
const [e] = R(), n = q(() => t(e), [e, t]), [o, i] = O(() => n.initialValueFn()), r = Be(o);
|
|
87
86
|
return bn(() => {
|
|
88
87
|
const { initialValueFn: s, subscribe: a } = n, l = s();
|
|
89
88
|
return r.current !== l && (r.current = l, i(l)), a((c) => {
|
|
@@ -183,10 +182,10 @@ function Ne(t, e) {
|
|
|
183
182
|
}
|
|
184
183
|
return null;
|
|
185
184
|
}
|
|
186
|
-
const
|
|
185
|
+
const j = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Dn = j && "documentMode" in document ? document.documentMode : null, Pn = !(!j || !("InputEvent" in window) || Dn) && "getTargetRanges" in new window.InputEvent("input"), Rn = j && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), Le = j && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Tn = j && /^(?=.*Chrome).*/i.test(navigator.userAgent), Mn = j && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !Tn, De = Dt();
|
|
187
186
|
function Q(t) {
|
|
188
187
|
let e = null;
|
|
189
|
-
if (
|
|
188
|
+
if (A(t, DragEvent) ? e = t.dataTransfer : A(t, ClipboardEvent) && (e = t.clipboardData), e === null) return [!1, [], !1];
|
|
190
189
|
const n = e.types, o = n.includes("Files"), i = n.includes("text/html") || n.includes("text/plain");
|
|
191
190
|
return [o, Array.from(e.files), i];
|
|
192
191
|
}
|
|
@@ -208,10 +207,10 @@ function ee(t) {
|
|
|
208
207
|
const e = ie(t);
|
|
209
208
|
return W(e);
|
|
210
209
|
}
|
|
211
|
-
function
|
|
210
|
+
function On(t) {
|
|
212
211
|
return B(t.registerCommand(Lt, (e) => {
|
|
213
212
|
const n = v();
|
|
214
|
-
return !!
|
|
213
|
+
return !!K(n) && (n.clear(), !0);
|
|
215
214
|
}, 0), t.registerCommand(se, (e) => {
|
|
216
215
|
const n = v();
|
|
217
216
|
return !!C(n) && (n.deleteCharacter(e), !0);
|
|
@@ -242,7 +241,7 @@ function Fn(t) {
|
|
|
242
241
|
return !!C(n) && (n.formatText(e), !0);
|
|
243
242
|
}, g), t.registerCommand(St, (e) => {
|
|
244
243
|
const n = v();
|
|
245
|
-
if (!C(n) && !
|
|
244
|
+
if (!C(n) && !K(n)) return !1;
|
|
246
245
|
const o = n.getNodes();
|
|
247
246
|
for (const i of o) {
|
|
248
247
|
const r = pe(i, (s) => J(s) && !s.isInline());
|
|
@@ -263,7 +262,7 @@ function Fn(t) {
|
|
|
263
262
|
n > 0 && e.setIndent(n - 1);
|
|
264
263
|
}), g), t.registerCommand(Ct, (e) => {
|
|
265
264
|
const n = v();
|
|
266
|
-
if (
|
|
265
|
+
if (K(n) && !ee(e.target)) {
|
|
267
266
|
const o = n.getNodes();
|
|
268
267
|
if (o.length > 0) return o[0].selectPrevious(), !0;
|
|
269
268
|
} else if (C(n)) {
|
|
@@ -273,7 +272,7 @@ function Fn(t) {
|
|
|
273
272
|
return !1;
|
|
274
273
|
}, g), t.registerCommand(vt, (e) => {
|
|
275
274
|
const n = v();
|
|
276
|
-
if (
|
|
275
|
+
if (K(n)) {
|
|
277
276
|
const o = n.getNodes();
|
|
278
277
|
if (o.length > 0) return o[0].selectNext(0, 0), !0;
|
|
279
278
|
} else if (C(n)) {
|
|
@@ -287,7 +286,7 @@ function Fn(t) {
|
|
|
287
286
|
return !1;
|
|
288
287
|
}, g), t.registerCommand(ht, (e) => {
|
|
289
288
|
const n = v();
|
|
290
|
-
if (
|
|
289
|
+
if (K(n)) {
|
|
291
290
|
const o = n.getNodes();
|
|
292
291
|
if (o.length > 0) return e.preventDefault(), o[0].selectPrevious(), !0;
|
|
293
292
|
}
|
|
@@ -299,7 +298,7 @@ function Fn(t) {
|
|
|
299
298
|
return !1;
|
|
300
299
|
}, g), t.registerCommand(gt, (e) => {
|
|
301
300
|
const n = v();
|
|
302
|
-
if (
|
|
301
|
+
if (K(n) && !ee(e.target)) {
|
|
303
302
|
const i = n.getNodes();
|
|
304
303
|
if (i.length > 0) return e.preventDefault(), i[0].selectNext(0, 0), !0;
|
|
305
304
|
}
|
|
@@ -311,7 +310,7 @@ function Fn(t) {
|
|
|
311
310
|
const n = v();
|
|
312
311
|
if (!C(n)) return !1;
|
|
313
312
|
const { anchor: o } = n, i = o.getNode();
|
|
314
|
-
return n.isCollapsed() && o.offset === 0 && !ze(i) &&
|
|
313
|
+
return n.isCollapsed() && o.offset === 0 && !ze(i) && At(i).getIndent() > 0 ? (e.preventDefault(), t.dispatchCommand(ve, void 0)) : (!Le || navigator.language !== "ko-KR") && (e.preventDefault(), t.dispatchCommand(se, !0));
|
|
315
314
|
}, g), t.registerCommand(mt, (e) => {
|
|
316
315
|
if (ee(e.target)) return !1;
|
|
317
316
|
const n = v();
|
|
@@ -361,28 +360,28 @@ function Fn(t) {
|
|
|
361
360
|
W(r) && e.preventDefault();
|
|
362
361
|
}
|
|
363
362
|
return !0;
|
|
364
|
-
}, g), t.registerCommand(rt, () => (ot(), !0), g), t.registerCommand(nt, (e) => (we(t,
|
|
365
|
-
await we(o,
|
|
363
|
+
}, g), t.registerCommand(rt, () => (ot(), !0), g), t.registerCommand(nt, (e) => (we(t, A(e, ClipboardEvent) ? e : null), !0), g), t.registerCommand(tt, (e) => (async function(n, o) {
|
|
364
|
+
await we(o, A(n, ClipboardEvent) ? n : null), o.update(() => {
|
|
366
365
|
const i = v();
|
|
367
|
-
C(i) ? i.removeText() :
|
|
366
|
+
C(i) ? i.removeText() : K(i) && i.getNodes().forEach((r) => r.remove());
|
|
368
367
|
});
|
|
369
|
-
}(e, t), !0), g), t.registerCommand(
|
|
368
|
+
}(e, t), !0), g), t.registerCommand(Ae, (e) => {
|
|
370
369
|
const [, n, o] = Q(e);
|
|
371
370
|
return n.length > 0 && !o ? (t.dispatchCommand(De, n), !0) : et(e.target) ? !1 : v() !== null && (function(i, r) {
|
|
372
371
|
i.preventDefault(), r.update(() => {
|
|
373
|
-
const s = v(), a =
|
|
372
|
+
const s = v(), a = A(i, InputEvent) || A(i, KeyboardEvent) ? null : i.clipboardData;
|
|
374
373
|
a != null && s !== null && Ee(a, s, r);
|
|
375
374
|
}, { tag: "paste" });
|
|
376
375
|
}(e, t), !0);
|
|
377
376
|
}, g));
|
|
378
377
|
}
|
|
379
|
-
const ce = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ?
|
|
378
|
+
const ce = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? H : x;
|
|
380
379
|
function Re(t) {
|
|
381
380
|
return t.getEditorState().read(Ve(t.isComposing()));
|
|
382
381
|
}
|
|
383
|
-
function
|
|
382
|
+
function In({ contentEditable: t, placeholder: e = null, ErrorBoundary: n }) {
|
|
384
383
|
const [o] = R(), i = function(r, s) {
|
|
385
|
-
const [a, l] =
|
|
384
|
+
const [a, l] = O(() => r.getDecorators());
|
|
386
385
|
return ce(() => r.registerDecoratorListener((c) => {
|
|
387
386
|
ke.flushSync(() => {
|
|
388
387
|
l(c);
|
|
@@ -392,19 +391,19 @@ function On({ contentEditable: t, placeholder: e = null, ErrorBoundary: n }) {
|
|
|
392
391
|
}, [r]), q(() => {
|
|
393
392
|
const c = [], d = Object.keys(a);
|
|
394
393
|
for (let f = 0; f < d.length; f++) {
|
|
395
|
-
const u = d[f], m = y(s, { onError: (E) => r._onError(E), children: y(
|
|
394
|
+
const u = d[f], m = y(s, { onError: (E) => r._onError(E), children: y(Kt, { fallback: null, children: a[u] }) }), p = r.getElementByKey(u);
|
|
396
395
|
p !== null && c.push(ke.createPortal(m, p, u));
|
|
397
396
|
}
|
|
398
397
|
return c;
|
|
399
398
|
}, [s, a, r]);
|
|
400
399
|
}(o, n);
|
|
401
400
|
return function(r) {
|
|
402
|
-
ce(() => B(
|
|
403
|
-
}(o),
|
|
401
|
+
ce(() => B(On(r), Ln(r)), [r]);
|
|
402
|
+
}(o), F(Ke, { children: [t, y(Kn, { content: e }), i] });
|
|
404
403
|
}
|
|
405
|
-
function
|
|
404
|
+
function Kn({ content: t }) {
|
|
406
405
|
const [e] = R(), n = function(i) {
|
|
407
|
-
const [r, s] =
|
|
406
|
+
const [r, s] = O(() => Re(i));
|
|
408
407
|
return ce(() => {
|
|
409
408
|
function a() {
|
|
410
409
|
const l = Re(i);
|
|
@@ -419,9 +418,9 @@ function In({ content: t }) {
|
|
|
419
418
|
}(e), o = $n();
|
|
420
419
|
return n ? typeof t == "function" ? t(o) : t : null;
|
|
421
420
|
}
|
|
422
|
-
const Xe = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ?
|
|
423
|
-
function
|
|
424
|
-
const [_, T] =
|
|
421
|
+
const Xe = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? H : x;
|
|
422
|
+
function Fn({ editor: t, ariaActiveDescendant: e, ariaAutoComplete: n, ariaControls: o, ariaDescribedBy: i, ariaErrorMessage: r, ariaExpanded: s, ariaInvalid: a, ariaLabel: l, ariaLabelledBy: c, ariaMultiline: d, ariaOwns: f, ariaRequired: u, autoCapitalize: m, className: p, id: E, role: w = "textbox", spellCheck: h = !0, style: b, tabIndex: $, "data-testid": k, ...S }, N) {
|
|
423
|
+
const [_, T] = O(t.isEditable()), I = Ft((L) => {
|
|
425
424
|
L && L.ownerDocument && L.ownerDocument.defaultView ? t.setRootElement(L) : t.setRootElement(null);
|
|
426
425
|
}, [t]), U = q(() => /* @__PURE__ */ function(...L) {
|
|
427
426
|
return (V) => {
|
|
@@ -429,23 +428,23 @@ function An({ editor: t, ariaActiveDescendant: e, ariaAutoComplete: n, ariaContr
|
|
|
429
428
|
typeof X == "function" ? X(V) : X != null && (X.current = V);
|
|
430
429
|
});
|
|
431
430
|
};
|
|
432
|
-
}(N,
|
|
431
|
+
}(N, I), [I, N]);
|
|
433
432
|
return Xe(() => (T(t.isEditable()), t.registerEditableListener((L) => {
|
|
434
433
|
T(L);
|
|
435
434
|
})), [t]), y("div", { "aria-activedescendant": _ ? e : void 0, "aria-autocomplete": _ ? n : "none", "aria-controls": _ ? o : void 0, "aria-describedby": i, ...r != null ? { "aria-errormessage": r } : {}, "aria-expanded": _ && w === "combobox" ? !!s : void 0, ...a != null ? { "aria-invalid": a } : {}, "aria-label": l, "aria-labelledby": c, "aria-multiline": d, "aria-owns": _ ? f : void 0, "aria-readonly": !_ || void 0, "aria-required": u, autoCapitalize: m, className: p, contentEditable: _, "data-testid": k, id: E, ref: U, role: _ ? w : void 0, spellCheck: h, style: b, tabIndex: $, ...S });
|
|
436
435
|
}
|
|
437
|
-
const
|
|
436
|
+
const An = Ue(Fn);
|
|
438
437
|
function Te(t) {
|
|
439
438
|
return t.getEditorState().read(Ve(t.isComposing()));
|
|
440
439
|
}
|
|
441
440
|
const zn = Ue(Bn);
|
|
442
441
|
function Bn(t, e) {
|
|
443
442
|
const { placeholder: n, ...o } = t, [i] = R();
|
|
444
|
-
return
|
|
443
|
+
return F(Ke, { children: [y(An, { editor: i, ...o, ref: e }), n != null && y(Un, { editor: i, content: n })] });
|
|
445
444
|
}
|
|
446
445
|
function Un({ content: t, editor: e }) {
|
|
447
446
|
const n = function(s) {
|
|
448
|
-
const [a, l] =
|
|
447
|
+
const [a, l] = O(() => Te(s));
|
|
449
448
|
return Xe(() => {
|
|
450
449
|
function c() {
|
|
451
450
|
const d = Te(s);
|
|
@@ -457,8 +456,8 @@ function Un({ content: t, editor: e }) {
|
|
|
457
456
|
c();
|
|
458
457
|
}));
|
|
459
458
|
}, [s]), a;
|
|
460
|
-
}(e), [o, i] =
|
|
461
|
-
if (
|
|
459
|
+
}(e), [o, i] = O(e.isEditable());
|
|
460
|
+
if (H(() => (i(e.isEditable()), e.registerEditableListener((s) => {
|
|
462
461
|
i(s);
|
|
463
462
|
})), [e]), !n) return null;
|
|
464
463
|
let r = null;
|
|
@@ -469,7 +468,7 @@ function de(t, e) {
|
|
|
469
468
|
return n.__proto__ = o, n;
|
|
470
469
|
}, de(t, e);
|
|
471
470
|
}
|
|
472
|
-
var Me = { error: null },
|
|
471
|
+
var Me = { error: null }, Hn = function(t) {
|
|
473
472
|
var e, n;
|
|
474
473
|
function o() {
|
|
475
474
|
for (var r, s = arguments.length, a = new Array(s), l = 0; l < s; l++) a[l] = arguments[l];
|
|
@@ -504,10 +503,10 @@ var Me = { error: null }, jn = function(t) {
|
|
|
504
503
|
return this.props.children;
|
|
505
504
|
}, o;
|
|
506
505
|
}(ae.Component);
|
|
507
|
-
function
|
|
508
|
-
return y(
|
|
506
|
+
function jn({ children: t, onError: e }) {
|
|
507
|
+
return y(Hn, { fallback: y("div", { style: { border: "1px solid #f00", color: "#f00", padding: "8px" }, children: "An error was thrown." }), onError: e, children: t });
|
|
509
508
|
}
|
|
510
|
-
const Wn = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ?
|
|
509
|
+
const Wn = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? H : x;
|
|
511
510
|
function Jn({ ignoreHistoryMergeTagChange: t = !0, ignoreSelectionChange: e = !1, onChange: n }) {
|
|
512
511
|
const [o] = R();
|
|
513
512
|
return Wn(() => {
|
|
@@ -519,7 +518,7 @@ function Jn({ ignoreHistoryMergeTagChange: t = !0, ignoreSelectionChange: e = !1
|
|
|
519
518
|
function qn() {
|
|
520
519
|
const [t] = R();
|
|
521
520
|
return x(() => {
|
|
522
|
-
if (!t.hasNodes([
|
|
521
|
+
if (!t.hasNodes([He, je])) throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
|
|
523
522
|
}, [t]), function(e) {
|
|
524
523
|
x(() => Wt(e), [e]);
|
|
525
524
|
}(t), null;
|
|
@@ -535,9 +534,9 @@ function Vn({ validateUrl: t, attributes: e }) {
|
|
|
535
534
|
const { url: i, target: r, rel: s, title: a } = o;
|
|
536
535
|
return le(i, { ...e, rel: s, target: r, title: a }), !0;
|
|
537
536
|
}
|
|
538
|
-
}, ye), t !== void 0 ? n.registerCommand(
|
|
537
|
+
}, ye), t !== void 0 ? n.registerCommand(Ae, (o) => {
|
|
539
538
|
const i = v();
|
|
540
|
-
if (!C(i) || i.isCollapsed() || !
|
|
539
|
+
if (!C(i) || i.isCollapsed() || !A(o, ClipboardEvent)) return !1;
|
|
541
540
|
const r = o;
|
|
542
541
|
if (r.clipboardData === null) return !1;
|
|
543
542
|
const s = r.clipboardData.getData("text");
|
|
@@ -585,7 +584,7 @@ function Xn({ newTab: t = !0, disabled: e = !1 }) {
|
|
|
585
584
|
});
|
|
586
585
|
}, [n, t, e]), null;
|
|
587
586
|
}
|
|
588
|
-
const te = 0, ue = 1, fe = 2, D = 0, Yn = 1,
|
|
587
|
+
const te = 0, ue = 1, fe = 2, D = 0, Yn = 1, Oe = 2, Zn = 3, Gn = 4;
|
|
589
588
|
function Qn(t, e, n, o, i) {
|
|
590
589
|
if (t === null || n.size === 0 && o.size === 0 && !i) return D;
|
|
591
590
|
const r = e._selection, s = t._selection;
|
|
@@ -607,7 +606,7 @@ function Qn(t, e, n, o, i) {
|
|
|
607
606
|
if (a.length === 0) return D;
|
|
608
607
|
if (a.length > 1) {
|
|
609
608
|
const h = e._nodeMap, b = h.get(r.anchor.key), $ = h.get(s.anchor.key);
|
|
610
|
-
return b && $ && !t._nodeMap.has(b.__key) && P(b) && b.__text.length === 1 && r.anchor.offset === 1 ?
|
|
609
|
+
return b && $ && !t._nodeMap.has(b.__key) && P(b) && b.__text.length === 1 && r.anchor.offset === 1 ? Oe : D;
|
|
611
610
|
}
|
|
612
611
|
const l = a[0], c = t._nodeMap.get(l.__key);
|
|
613
612
|
if (!P(c) || !P(l) || c.__mode !== l.__mode) return D;
|
|
@@ -616,7 +615,7 @@ function Qn(t, e, n, o, i) {
|
|
|
616
615
|
const u = r.anchor, m = s.anchor;
|
|
617
616
|
if (u.key !== m.key || u.type !== "text") return D;
|
|
618
617
|
const p = u.offset, E = m.offset, w = f.length - d.length;
|
|
619
|
-
return w === 1 && E === p - 1 ?
|
|
618
|
+
return w === 1 && E === p - 1 ? Oe : w === -1 && E === p + 1 ? Zn : w === -1 && E === p ? Gn : D;
|
|
620
619
|
}
|
|
621
620
|
function er(t, e) {
|
|
622
621
|
let n = Date.now(), o = D;
|
|
@@ -636,18 +635,18 @@ function er(t, e) {
|
|
|
636
635
|
return n = d, o = f, u;
|
|
637
636
|
};
|
|
638
637
|
}
|
|
639
|
-
function
|
|
638
|
+
function Ie(t) {
|
|
640
639
|
t.undoStack = [], t.redoStack = [], t.current = null;
|
|
641
640
|
}
|
|
642
641
|
function tr(t, e, n) {
|
|
643
642
|
const o = er(t, n);
|
|
644
|
-
return B(t.registerCommand(
|
|
643
|
+
return B(t.registerCommand(It, () => (function(r, s) {
|
|
645
644
|
const a = s.redoStack, l = s.undoStack;
|
|
646
645
|
if (l.length !== 0) {
|
|
647
646
|
const c = s.current, d = l.pop();
|
|
648
647
|
c !== null && (a.push(c), r.dispatchCommand(Y, !0)), l.length === 0 && r.dispatchCommand(Z, !1), s.current = d || null, d && d.editor.setEditorState(d.editorState, { tag: "historic" });
|
|
649
648
|
}
|
|
650
|
-
}(t, e), !0), g), t.registerCommand(
|
|
649
|
+
}(t, e), !0), g), t.registerCommand(Ot, () => (function(r, s) {
|
|
651
650
|
const a = s.redoStack, l = s.undoStack;
|
|
652
651
|
if (a.length !== 0) {
|
|
653
652
|
const c = s.current;
|
|
@@ -655,7 +654,7 @@ function tr(t, e, n) {
|
|
|
655
654
|
const d = a.pop();
|
|
656
655
|
a.length === 0 && r.dispatchCommand(Y, !1), s.current = d || null, d && d.editor.setEditorState(d.editorState, { tag: "historic" });
|
|
657
656
|
}
|
|
658
|
-
}(t, e), !0), g), t.registerCommand(Mt, () => (
|
|
657
|
+
}(t, e), !0), g), t.registerCommand(Mt, () => (Ie(e), !1), g), t.registerCommand(Tt, () => (Ie(e), t.dispatchCommand(Y, !1), t.dispatchCommand(Z, !1), !0), g), t.registerUpdateListener(({ editorState: r, prevEditorState: s, dirtyLeaves: a, dirtyElements: l, tags: c }) => {
|
|
659
658
|
const d = e.current, f = e.redoStack, u = e.undoStack, m = d === null ? null : d.editorState;
|
|
660
659
|
if (d !== null && r === m) return;
|
|
661
660
|
const p = o(s, r, d, a, l, c);
|
|
@@ -763,7 +762,7 @@ const Ye = 200, sr = ({
|
|
|
763
762
|
maxWords: l = Ye,
|
|
764
763
|
onChange: c
|
|
765
764
|
}) => {
|
|
766
|
-
const { switchLanguage: d } = vn(), f = mn(), [u] =
|
|
765
|
+
const { switchLanguage: d } = vn(), f = mn(), [u] = O(() => Fe()), [m, p] = O(0), [E, w] = O(0), h = Be(null), b = {
|
|
767
766
|
html: {
|
|
768
767
|
export: cn
|
|
769
768
|
},
|
|
@@ -773,24 +772,24 @@ const Ye = 200, sr = ({
|
|
|
773
772
|
onError(S) {
|
|
774
773
|
throw S;
|
|
775
774
|
},
|
|
776
|
-
nodes: [
|
|
775
|
+
nodes: [He, je, We, qt, oe, Je, re],
|
|
777
776
|
editorState: (S) => {
|
|
778
|
-
const _ = new DOMParser().parseFromString(e, "text/html"), T =
|
|
779
|
-
if (
|
|
777
|
+
const _ = new DOMParser().parseFromString(e, "text/html"), T = Ht(S, _), I = z();
|
|
778
|
+
if (I.clear(), dn(e))
|
|
780
779
|
T.forEach((U) => {
|
|
781
|
-
|
|
780
|
+
I.append(U);
|
|
782
781
|
});
|
|
783
782
|
else {
|
|
784
783
|
const U = me();
|
|
785
784
|
T.forEach((L, V) => {
|
|
786
|
-
V === 0 ? (U.append(L),
|
|
785
|
+
V === 0 ? (U.append(L), I.append(U)) : I.append(L);
|
|
787
786
|
});
|
|
788
787
|
}
|
|
789
788
|
}
|
|
790
789
|
}, $ = (S) => S.trim().length === 0 ? 0 : S.split(" ").length, k = (S, N) => {
|
|
791
790
|
S.read(() => {
|
|
792
791
|
let _ = "";
|
|
793
|
-
p($(z().getTextContent().replace(/\s+/g, " ").trim())), _ = un(
|
|
792
|
+
p($(z().getTextContent().replace(/\s+/g, " ").trim())), _ = un(jt(N)), c(_);
|
|
794
793
|
});
|
|
795
794
|
};
|
|
796
795
|
return x(() => {
|
|
@@ -798,20 +797,20 @@ const Ye = 200, sr = ({
|
|
|
798
797
|
}, [t, d]), x(() => {
|
|
799
798
|
const S = e.replace(/<br\s*\/?>| /gi, " ").replace(/<\/?[^>]+(>|$)|&[a-z]+;/g, "").replace(/\s+/g, " ").trim();
|
|
800
799
|
p($(S));
|
|
801
|
-
}, []), /* @__PURE__ */
|
|
802
|
-
/* @__PURE__ */
|
|
800
|
+
}, []), /* @__PURE__ */ F("div", { className: M.editor__container, children: [
|
|
801
|
+
/* @__PURE__ */ F("div", { className: M.editor__header, children: [
|
|
803
802
|
/* @__PURE__ */ y(hn, { label: o, info: i, required: r }),
|
|
804
|
-
/* @__PURE__ */
|
|
803
|
+
/* @__PURE__ */ F("div", { className: M["editor__header-word-count"], children: [
|
|
805
804
|
/* @__PURE__ */ y("span", { className: ln({ [M["editor__header-word-count--alert"]]: m > l }), children: m }),
|
|
806
805
|
" / ",
|
|
807
806
|
l
|
|
808
807
|
] })
|
|
809
808
|
] }),
|
|
810
|
-
/* @__PURE__ */ y("div", { className: M.editor, children: /* @__PURE__ */
|
|
809
|
+
/* @__PURE__ */ y("div", { className: M.editor, children: /* @__PURE__ */ F(wn, { initialConfig: b, children: [
|
|
811
810
|
/* @__PURE__ */ y(fn, { editorScrollPosition: E }),
|
|
812
|
-
/* @__PURE__ */
|
|
811
|
+
/* @__PURE__ */ F("div", { className: M["editor__field-wrapper"], children: [
|
|
813
812
|
/* @__PURE__ */ y(
|
|
814
|
-
|
|
813
|
+
In,
|
|
815
814
|
{
|
|
816
815
|
contentEditable: /* @__PURE__ */ y(
|
|
817
816
|
zn,
|
|
@@ -829,7 +828,7 @@ const Ye = 200, sr = ({
|
|
|
829
828
|
}
|
|
830
829
|
),
|
|
831
830
|
placeholder: /* @__PURE__ */ y("div", { className: M.editor__placeholder, children: n }),
|
|
832
|
-
ErrorBoundary:
|
|
831
|
+
ErrorBoundary: jn
|
|
833
832
|
}
|
|
834
833
|
),
|
|
835
834
|
/* @__PURE__ */ y(ir, {}),
|
|
@@ -844,7 +843,7 @@ const Ye = 200, sr = ({
|
|
|
844
843
|
] }) }),
|
|
845
844
|
s !== "" && /* @__PURE__ */ y(pn, { level: "error", feedback: s })
|
|
846
845
|
] });
|
|
847
|
-
},
|
|
846
|
+
}, qr = ({
|
|
848
847
|
currentLanguage: t = "NL",
|
|
849
848
|
initialValue: e = "",
|
|
850
849
|
placeholder: n = "",
|
|
@@ -870,6 +869,6 @@ const Ye = 200, sr = ({
|
|
|
870
869
|
) });
|
|
871
870
|
export {
|
|
872
871
|
sr as Rte,
|
|
873
|
-
|
|
872
|
+
qr as RteEditor
|
|
874
873
|
};
|
|
875
874
|
//# sourceMappingURL=RteEditor.js.map
|