@uva-glass/component-library 1.62.8 → 1.62.9

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.
Files changed (44) hide show
  1. package/dist/TablePlugin-DQR5VWGq.js +301 -0
  2. package/dist/TablePlugin-DQR5VWGq.js.map +1 -0
  3. package/dist/assets/favicon/android-chrome-192x192.png +0 -0
  4. package/dist/assets/favicon/android-chrome-512x512.png +0 -0
  5. package/dist/assets/favicon/apple-touch-icon.png +0 -0
  6. package/dist/assets/favicon/favicon-16x16.png +0 -0
  7. package/dist/assets/favicon/favicon-32x32.png +0 -0
  8. package/dist/assets/favicon/favicon.ico +0 -0
  9. package/dist/assets/favicon/favicon.svg +27 -0
  10. package/dist/assets/favicon/site.webmanifest +19 -0
  11. package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
  12. package/dist/components/FormInput/FormInput.js +1 -1
  13. package/dist/components/InputField/InputField.stories.js +1 -1
  14. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  15. package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
  16. package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
  17. package/dist/components/MultiSelect/index.js +1 -1
  18. package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
  19. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
  20. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
  21. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +1 -1
  22. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkFrom.js +1 -1
  23. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +1 -1
  24. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
  25. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +2 -2
  26. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +7 -6
  27. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js.map +1 -1
  28. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  29. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +50 -37
  30. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js.map +1 -1
  31. package/dist/components/RteEditor/Plugins/index.js +1 -1
  32. package/dist/components/RteEditor/RteEditor.d.ts +1 -1
  33. package/dist/components/RteEditor/RteEditor.js +96 -94
  34. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  35. package/dist/components/RteEditor/RteEditor.stories.js +1 -1
  36. package/dist/components/RteEditor/RteEditor.stories.js.map +1 -1
  37. package/dist/components/index.js +1 -1
  38. package/dist/{helpers-pUTvcL4e.js → helpers-CVB_4CnL.js} +70 -68
  39. package/dist/helpers-CVB_4CnL.js.map +1 -0
  40. package/dist/index.js +1 -1
  41. package/package.json +5 -5
  42. package/dist/TablePlugin-B-yAWpsC.js +0 -310
  43. package/dist/TablePlugin-B-yAWpsC.js.map +0 -1
  44. package/dist/helpers-pUTvcL4e.js.map +0 -1
@@ -0,0 +1,301 @@
1
+ import { jsxs as u, jsx as e, Fragment as X } from "react/jsx-runtime";
2
+ import { u as Z } from "./LexicalComposerContext.prod-Dyvim1tK.js";
3
+ import { c as $ } from "./clsx-OuTLNxxd.js";
4
+ import { g as ee, o as te, d as oe, a as re, i as le, b as ne, c as ae, e as ie } from "./helpers-CVB_4CnL.js";
5
+ import { _ as se, O as ce, M as H, v as V, w as me } from "./Lexical.prod-B6kL_nwF.js";
6
+ import { forwardRef as A, useState as N, useRef as T, useId as M, useImperativeHandle as U, useEffect as S } from "react";
7
+ import { Button as R } from "./components/Buttons/Button.js";
8
+ import "./components/Buttons/LinkButton.js";
9
+ import "@react-aria/button";
10
+ import { Label as E } from "./components/Label/Label.js";
11
+ import "@react-aria/dialog";
12
+ import "@react-aria/focus";
13
+ import "@react-aria/overlays";
14
+ import "./components/OverlayCloseButton/OverlayCloseButton.js";
15
+ import { FormField as O } from "./components/FormField/FormField.js";
16
+ import "./components/GridRow/GridRow.js";
17
+ import "./components/IconButton/IconButton.js";
18
+ import "./components/Input/Input.js";
19
+ import { InputField as D } from "./components/InputField/InputField.js";
20
+ import "react-router-dom";
21
+ import { s as g, M as ue } from "./MultiSelectItem-D9PxdX43.js";
22
+ import "./components/RteEditor/Providers/LanguageProvider.js";
23
+ import { e as de, v as fe } from "./helpers-C7Yo7VY3.js";
24
+ import { Icon as j } from "./components/Icon/Icon.js";
25
+ import { FeedbackBox as K } from "./components/FeedbackBox/FeedbackBox.js";
26
+ import { useTranslation as B } from "./components/RteEditor/hooks/useTranslation.js";
27
+ import "./components/RteEditor/hooks/components/Flyout.js";
28
+ import { useFlyout as _e } from "./components/RteEditor/hooks/useFlyout.js";
29
+ import { s as q } from "./RteEditor.module-CHbWzGpE.js";
30
+ import "./components/SelectListbox/SelectListbox.js";
31
+ import "./components/SelectListbox/SelectProvider.js";
32
+ import "./components/Sortable/components/SortableItem.js";
33
+ import "./SortableProvider-BUsvniX7.js";
34
+ import './assets/TablePlugin.css';function pe({ label: b, clearTrigger: f, onClear: s }) {
35
+ return /* @__PURE__ */ u("header", { className: g["multi-select__header"], children: [
36
+ /* @__PURE__ */ e(E, { htmlFor: "multi-select-list", children: b }),
37
+ f && /* @__PURE__ */ e(R, { variant: "blank", onClick: s, children: f })
38
+ ] });
39
+ }
40
+ const z = ({ scrollable: b = !0, noBorder: f, header: s, children: t }) => /* @__PURE__ */ u(X, { children: [
41
+ s,
42
+ /* @__PURE__ */ e(
43
+ "div",
44
+ {
45
+ className: $(g["multi-select"], {
46
+ [g["multi-select--no-border"]]: f
47
+ }),
48
+ children: /* @__PURE__ */ e(
49
+ "ul",
50
+ {
51
+ className: $(g["multi-select__list"], {
52
+ [g["multi-select__list--scrollable"]]: b
53
+ }),
54
+ id: "multi-select-list",
55
+ children: t
56
+ }
57
+ )
58
+ }
59
+ )
60
+ ] });
61
+ z.MultiSelectHeader = pe;
62
+ z.MultiSelectItem = ue;
63
+ const be = "_linkform_x5q7m_1", he = "_linkform__footer_x5q7m_12", x = {
64
+ linkform: be,
65
+ "linkform__input-field": "_linkform__input-field_x5q7m_5",
66
+ linkform__footer: he,
67
+ "linkform__input-url-wrapper": "_linkform__input-url-wrapper_x5q7m_19",
68
+ "linkform__open-url-button": "_linkform__open-url-button_x5q7m_31",
69
+ "editor__toolbar-button": "_editor__toolbar-button_x5q7m_55"
70
+ }, tt = A(
71
+ ({
72
+ onCloseHandler: b,
73
+ onSaveHandler: f,
74
+ onRemoveHandler: s,
75
+ isLink: t = { active: !1, url: "", linktext: "" }
76
+ }, h) => {
77
+ const l = B(), [n, c] = N(t.url || ""), [d, F] = N(t.linktext || ""), [k, _] = N(null), [y, p] = N(null), v = T(null), i = `link_${M()}`, w = `text_${M()}`, o = () => {
78
+ window.open(de(n), "_blank");
79
+ }, r = (a) => {
80
+ c(a.target.value);
81
+ }, C = (a) => {
82
+ F(a.target.value);
83
+ }, m = (a) => fe(a) === !1 || a.trim() === "" ? (_(l.errortext.urlNotValid), !1) : (_(null), !0), I = (a) => a.trim() === "" ? (p(l.errortext.linkTextNotValid), !1) : (p(null), !0), W = () => {
84
+ if (t.url !== "" && n === "" && typeof s == "function") {
85
+ s();
86
+ return;
87
+ }
88
+ !m(n) || !I(d) || (f(n, d), P());
89
+ }, Y = () => {
90
+ b(), P();
91
+ }, P = () => {
92
+ c(""), F(""), _(null), p(null);
93
+ }, G = (a, Q) => {
94
+ c(a), F(Q);
95
+ }, J = () => {
96
+ v.current && v.current.focus();
97
+ };
98
+ return U(h, () => ({
99
+ clearForm: P,
100
+ focusFirstField: J,
101
+ setDefaults: G
102
+ })), /* @__PURE__ */ u("div", { className: x.linkform, children: [
103
+ /* @__PURE__ */ u(O, { className: x["linkform__input-field"], children: [
104
+ /* @__PURE__ */ e(E, { htmlFor: i, children: l.links.linkLabel }),
105
+ /* @__PURE__ */ u("div", { className: x["linkform__input-url-wrapper"], children: [
106
+ /* @__PURE__ */ e(
107
+ D,
108
+ {
109
+ id: i,
110
+ placeholder: l.links.linkPlaceholder,
111
+ value: n,
112
+ onChange: (a) => r(a),
113
+ onFocus: () => _(null),
114
+ ref: v,
115
+ "aria-label": l.aria.labels.linkField
116
+ }
117
+ ),
118
+ n && /* @__PURE__ */ e("button", { type: "button", onClick: o, className: x["linkform__open-url-button"], children: /* @__PURE__ */ e(j, { name: "ArrowTopRightOnSquare", size: 20 }) })
119
+ ] }),
120
+ k && /* @__PURE__ */ e(K, { level: "error", feedback: k })
121
+ ] }),
122
+ /* @__PURE__ */ u(O, { className: x["linkform__input-field"], children: [
123
+ /* @__PURE__ */ e(E, { htmlFor: w, children: l.links.linkText }),
124
+ /* @__PURE__ */ e(
125
+ D,
126
+ {
127
+ id: w,
128
+ value: d,
129
+ onChange: (a) => C(a),
130
+ onFocus: () => p(null),
131
+ "aria-label": l.aria.labels.linkTextfield
132
+ }
133
+ ),
134
+ y && /* @__PURE__ */ e(K, { level: "error", feedback: y })
135
+ ] }),
136
+ /* @__PURE__ */ u("div", { className: x.linkform__footer, children: [
137
+ /* @__PURE__ */ e(R, { variant: "secondary", onClick: Y, "aria-label": l.common.cancel, type: "button", children: l.common.cancel }),
138
+ /* @__PURE__ */ e(R, { variant: "primary", onClick: W, "aria-label": l.aria.labels.linkOkButton, type: "button", children: l.links.addLink })
139
+ ] })
140
+ ] });
141
+ }
142
+ ), ke = "_tableform_t5fpq_1", ve = "_tableform__footer_t5fpq_12", L = {
143
+ tableform: ke,
144
+ "tableform__input-field": "_tableform__input-field_t5fpq_5",
145
+ tableform__footer: ve
146
+ }, Fe = A(({ onCloseHandler: b, onSaveHandler: f }, s) => {
147
+ const t = B(), [h, l] = N(), [n, c] = N(), d = T(null), F = `row_${M()}`, k = `column_${M()}`, _ = (i, w) => {
148
+ const o = i.target.value;
149
+ w === "row" ? l(parseInt(o)) : c(parseInt(o));
150
+ }, y = () => {
151
+ h !== void 0 && n !== void 0 && (f(h, n), v());
152
+ }, p = () => {
153
+ b(), v();
154
+ }, v = () => {
155
+ l(void 0), c(void 0);
156
+ };
157
+ return U(s, () => ({
158
+ clearForm: v,
159
+ focusFirstField: () => {
160
+ var i;
161
+ return (i = d.current) == null ? void 0 : i.focus();
162
+ }
163
+ })), /* @__PURE__ */ u("div", { className: L.tableform, children: [
164
+ /* @__PURE__ */ u(O, { className: L["tableform__input-field"], children: [
165
+ /* @__PURE__ */ e(E, { htmlFor: F, children: t.table.nrofRows }),
166
+ /* @__PURE__ */ e(
167
+ D,
168
+ {
169
+ id: F,
170
+ placeholder: t.table.nrofRowsPlaceholder,
171
+ value: h || "",
172
+ onChange: (i) => _(i, "row"),
173
+ "aria-label": t.aria.labels.tableRowfield,
174
+ ref: d
175
+ }
176
+ )
177
+ ] }),
178
+ /* @__PURE__ */ u(O, { className: L["tableform__input-field"], children: [
179
+ /* @__PURE__ */ e(E, { htmlFor: k, children: t.table.nrofColumns }),
180
+ /* @__PURE__ */ e(
181
+ D,
182
+ {
183
+ id: k,
184
+ placeholder: t.table.nrofColumnsPlaceholder,
185
+ value: n || "",
186
+ onChange: (i) => _(i, "column"),
187
+ "aria-label": t.aria.labels.tableColumnfield
188
+ }
189
+ )
190
+ ] }),
191
+ /* @__PURE__ */ u("div", { className: L.tableform__footer, children: [
192
+ /* @__PURE__ */ e(R, { variant: "secondary", onClick: p, "aria-label": t.common.cancel, children: t.common.cancel }),
193
+ /* @__PURE__ */ e(
194
+ R,
195
+ {
196
+ variant: "primary",
197
+ onClick: y,
198
+ disabled: !h || !n,
199
+ "aria-label": t.aria.labels.tableOkButton,
200
+ children: t.common.add
201
+ }
202
+ )
203
+ ] })
204
+ ] });
205
+ }), we = 200, ot = A(({ isActive: b }, f) => {
206
+ const s = B(), [t] = Z(), { flyout: h, showFlyout: l, hideFlyout: n, isVisible: c } = _e(), d = T(), F = T(null), k = T(!1), _ = T(c), y = () => {
207
+ k.current || l(w);
208
+ }, p = () => {
209
+ n();
210
+ }, v = (o, r) => {
211
+ t.update(() => {
212
+ const C = H(), m = ie(o, r);
213
+ V(C) ? C.insertNodes([m]) : me().append(m);
214
+ const I = m.getFirstDescendant();
215
+ I && I.select();
216
+ }), p();
217
+ }, i = (o) => {
218
+ t.update(() => {
219
+ const r = H();
220
+ if (V(r)) {
221
+ const C = r.anchor.getNode(), m = ee(C);
222
+ if (te(m))
223
+ switch (o) {
224
+ case "insertRowAbove":
225
+ case "insertRowBelow":
226
+ ae(m, o);
227
+ break;
228
+ case "deleteRow":
229
+ ne(m);
230
+ break;
231
+ case "insertColumnLeft":
232
+ case "insertColumnRight":
233
+ le(m, o);
234
+ break;
235
+ case "deleteColumn":
236
+ re(m);
237
+ break;
238
+ case "deleteTable":
239
+ oe(m);
240
+ break;
241
+ }
242
+ }
243
+ });
244
+ }, w = {
245
+ children: /* @__PURE__ */ e(
246
+ Fe,
247
+ {
248
+ onCloseHandler: p,
249
+ onSaveHandler: (o, r) => v(o, r),
250
+ ref: d
251
+ }
252
+ )
253
+ };
254
+ return S(() => {
255
+ var o, r;
256
+ c ? (k.current = !0, (r = d.current) == null || r.focusFirstField()) : ((o = d.current) == null || o.clearForm(), setTimeout(() => k.current = !1, we));
257
+ }, [d, c]), S(() => {
258
+ const o = t.registerCommand(
259
+ se,
260
+ (r) => r.ctrlKey && r.shiftKey && r.code === "Digit9" ? (r.preventDefault(), l(w), !0) : !1,
261
+ ce
262
+ );
263
+ return () => {
264
+ o();
265
+ };
266
+ }, [t]), S(() => {
267
+ _.current = c;
268
+ }, [c]), S(() => {
269
+ const o = (r) => {
270
+ r.key === "Escape" && _.current && (r.preventDefault(), r.stopPropagation(), p());
271
+ };
272
+ return document.addEventListener("keydown", o, { capture: !0 }), () => {
273
+ document.removeEventListener("keydown", o);
274
+ };
275
+ }, []), U(f, () => ({
276
+ mutateTable: i
277
+ })), /* @__PURE__ */ e("div", { className: q["editor__toolbar-button-group"], children: /* @__PURE__ */ u("div", { className: q["editor__toolbar-button-flyoutwrapper"], children: [
278
+ /* @__PURE__ */ e(
279
+ "button",
280
+ {
281
+ onClick: y,
282
+ title: s.table.tableTooltip,
283
+ className: $(q["editor__toolbar-button"], b && q["editor__toolbar-button--active"]),
284
+ "aria-label": s.aria.labels.table,
285
+ "aria-keyshortcuts": s.aria.keyshortcuts.table,
286
+ ref: F,
287
+ type: "button",
288
+ children: /* @__PURE__ */ e(j, { name: "Table", size: 24 })
289
+ }
290
+ ),
291
+ h
292
+ ] }) });
293
+ });
294
+ export {
295
+ tt as A,
296
+ z as M,
297
+ ot as T,
298
+ pe as a,
299
+ Fe as b
300
+ };
301
+ //# sourceMappingURL=TablePlugin-DQR5VWGq.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TablePlugin-DQR5VWGq.js","sources":["../src/components/MultiSelect/components/MultiSelectHeader.tsx","../src/components/MultiSelect/MultiSelect.tsx","../src/components/RteEditor/Plugins/LinkPlugin/AddLinkFrom.tsx","../src/components/RteEditor/Plugins/TablePlugin/AddTableFrom.tsx","../src/components/RteEditor/Plugins/TablePlugin/TablePlugin.tsx"],"sourcesContent":["import styles from 'components/MultiSelect/MultiSelect.module.css';\nimport { Label } from 'components/Label';\nimport { Button } from 'components';\n\nexport interface MultiSelectHeaderProps {\n label: string;\n clearTrigger?: string;\n onClear?: () => void;\n}\n\nexport function MultiSelectHeader({ label, clearTrigger, onClear }: MultiSelectHeaderProps) {\n return (\n <header className={styles['multi-select__header']}>\n <Label htmlFor=\"multi-select-list\">{label}</Label>\n {clearTrigger && (\n <Button variant={'blank'} onClick={onClear}>\n {clearTrigger}\n </Button>\n )}\n </header>\n );\n}\n","import clsx from 'clsx';\n\nimport type { PropsWithChildren, ReactNode } from 'react';\n\nimport styles from './MultiSelect.module.css';\n\nimport { MultiSelectItem } from 'components/MultiSelect/components/MultiSelectItem';\nimport { MultiSelectHeader } from 'components/MultiSelect/components/MultiSelectHeader';\n\nexport interface MultiSelectProps {\n /** `true` if the container should scroll on overflow; otherwise, `false` to resize the container to its contents. The default is `true`. */\n scrollable?: boolean;\n /** `true` to disable the border around the container; otherwise, `false`. The default is `false`. */\n noBorder?: boolean;\n /** The header contents. */\n header?: ReactNode;\n}\n\n/** Represents a component to list a number of checkboxes. */\nexport const MultiSelect = ({ scrollable = true, noBorder, header, children }: PropsWithChildren<MultiSelectProps>) => (\n <>\n {header}\n <div\n className={clsx(styles['multi-select'], {\n [styles['multi-select--no-border']]: noBorder,\n })}\n >\n <ul\n className={clsx(styles['multi-select__list'], {\n [styles['multi-select__list--scrollable']]: scrollable,\n })}\n id=\"multi-select-list\"\n >\n {children}\n </ul>\n </div>\n </>\n);\n\nMultiSelect.MultiSelectHeader = MultiSelectHeader;\nMultiSelect.MultiSelectItem = MultiSelectItem;\n","import { useState, forwardRef, useImperativeHandle, useRef, useId } from 'react';\n\nimport type { ChangeEvent } from 'react';\nimport type { LinkType } from 'components/RteEditor/Plugins/LinkPlugin';\n\nimport { ensureHttps, validateUrlWithProtocol } from './helpers';\nimport styles from './AddLinkForm.module.css';\n\nimport { Button, FeedbackBox, FormField, Icon, InputField, Label } from 'components';\nimport { useTranslation } from 'components/RteEditor/hooks/useTranslation';\n\ninterface AddLinkFormProps {\n onCloseHandler: () => void;\n onSaveHandler: (url: string, linktext: string) => void;\n onRemoveHandler?: () => void;\n isLink: LinkType;\n}\n\nexport interface addLinkFormMethods {\n clearForm: () => void;\n focusFirstField: () => void;\n setDefaults: (url: string, linktext: string) => void;\n}\n\nexport const AddLinkForm = forwardRef(\n (\n {\n onCloseHandler,\n onSaveHandler,\n onRemoveHandler,\n isLink = { active: false, url: '', linktext: '' },\n }: AddLinkFormProps,\n ref\n ): JSX.Element => {\n const t = useTranslation();\n const [url, setUrl] = useState<string>(isLink.url || '');\n const [linkText, setLinkText] = useState<string>(isLink.linktext || '');\n const [urlError, setUrlError] = useState<string | null>(null);\n const [linkTextError, setLinkTextError] = useState<string | null>(null);\n const firstField = useRef<HTMLInputElement>(null);\n const linkId = `link_${useId()}`;\n const textId = `text_${useId()}`;\n\n const handleOpenUrl = () => {\n window.open(ensureHttps(url), '_blank');\n };\n\n const handleUrl = (event: ChangeEvent<HTMLInputElement>) => {\n setUrl(event.target.value);\n };\n\n const handleLinkText = (event: ChangeEvent<HTMLInputElement>) => {\n setLinkText(event.target.value);\n };\n\n const validateUrl = (url: string): boolean => {\n if (validateUrlWithProtocol(url) === false || url.trim() === '') {\n setUrlError(t.errortext.urlNotValid);\n return false;\n }\n setUrlError(null);\n return true;\n };\n\n const validateLinkText = (linkText: string): boolean => {\n if (linkText.trim() === '') {\n setLinkTextError(t.errortext.linkTextNotValid);\n return false;\n }\n setLinkTextError(null);\n return true;\n };\n\n const handleSave = () => {\n if (isLink.url !== '' && url === '' && typeof onRemoveHandler === 'function') {\n onRemoveHandler();\n return;\n }\n\n if (!validateUrl(url) || !validateLinkText(linkText)) {\n return;\n }\n\n onSaveHandler(url, linkText);\n resetForm();\n };\n\n const handleClose = () => {\n onCloseHandler();\n resetForm();\n };\n\n const resetForm = () => {\n setUrl('');\n setLinkText('');\n setUrlError(null);\n setLinkTextError(null);\n };\n\n const setDefaults = (url: string, linktext: string) => {\n setUrl(url);\n setLinkText(linktext);\n };\n\n const focusFirstField = () => {\n if (firstField.current) {\n firstField.current.focus();\n }\n };\n\n useImperativeHandle(ref, () => ({\n clearForm: resetForm,\n focusFirstField,\n setDefaults,\n }));\n\n return (\n <div className={styles['linkform']}>\n <FormField className={styles['linkform__input-field']}>\n <Label htmlFor={linkId}>{t.links.linkLabel}</Label>\n <div className={styles['linkform__input-url-wrapper']}>\n <InputField\n id={linkId}\n placeholder={t.links.linkPlaceholder}\n value={url}\n onChange={(event) => handleUrl(event)}\n onFocus={() => setUrlError(null)}\n ref={firstField}\n aria-label={t.aria.labels.linkField}\n />\n {url && (\n <button type=\"button\" onClick={handleOpenUrl} className={styles['linkform__open-url-button']}>\n <Icon name=\"ArrowTopRightOnSquare\" size={20} />\n </button>\n )}\n </div>\n {urlError && <FeedbackBox level=\"error\" feedback={urlError} />}\n </FormField>\n <FormField className={styles['linkform__input-field']}>\n <Label htmlFor={textId}>{t.links.linkText}</Label>\n <InputField\n id={textId}\n value={linkText}\n onChange={(event) => handleLinkText(event)}\n onFocus={() => setLinkTextError(null)}\n aria-label={t.aria.labels.linkTextfield}\n />\n {linkTextError && <FeedbackBox level=\"error\" feedback={linkTextError} />}\n </FormField>\n <div className={styles['linkform__footer']}>\n <Button variant={'secondary'} onClick={handleClose} aria-label={t.common.cancel} type=\"button\">\n {t.common.cancel}\n </Button>\n <Button variant={'primary'} onClick={handleSave} aria-label={t.aria.labels.linkOkButton} type=\"button\">\n {t.links.addLink}\n </Button>\n </div>\n </div>\n );\n }\n);\n","import { useState, forwardRef, useImperativeHandle, useRef, useId } from 'react';\n\nimport type { ChangeEvent } from 'react';\n\nimport styles from './AddTableFrom.module.css';\n\nimport { Button, FormField, InputField, Label } from 'components';\nimport { useTranslation } from 'components/RteEditor/hooks/useTranslation';\n\ninterface AddTableFormProps {\n onCloseHandler: () => void;\n onSaveHandler: (nrfOfRows: number, nrOfColumns: number) => void;\n}\n\nexport interface addTableForm {\n clearForm: () => void;\n focusFirstField: () => void;\n}\n\nexport const AddTableForm = forwardRef(({ onCloseHandler, onSaveHandler }: AddTableFormProps, ref) => {\n const t = useTranslation();\n const [rowCount, setRowCount] = useState<number>();\n const [columnCount, setColumnCount] = useState<number>();\n const firstField = useRef<HTMLInputElement>(null);\n const rowId = `row_${useId()}`;\n const columnId = `column_${useId()}`;\n\n const handleDimentionChange = (event: ChangeEvent<HTMLInputElement>, type: string) => {\n const value = event.target.value;\n type === 'row' ? setRowCount(parseInt(value)) : setColumnCount(parseInt(value));\n };\n\n const handleSave = () => {\n if (rowCount !== undefined && columnCount !== undefined) {\n onSaveHandler(rowCount, columnCount);\n resetForm();\n }\n };\n\n const handleClose = () => {\n onCloseHandler();\n resetForm();\n };\n\n const resetForm = () => {\n setRowCount(undefined);\n setColumnCount(undefined);\n };\n\n useImperativeHandle(ref, () => ({\n clearForm: resetForm,\n focusFirstField: () => firstField.current?.focus(),\n }));\n\n return (\n <div className={styles['tableform']}>\n <FormField className={styles['tableform__input-field']}>\n <Label htmlFor={rowId}>{t.table.nrofRows}</Label>\n <InputField\n id={rowId}\n placeholder={t.table.nrofRowsPlaceholder}\n value={rowCount ? rowCount : ''}\n onChange={(event) => handleDimentionChange(event, 'row')}\n aria-label={t.aria.labels.tableRowfield}\n ref={firstField}\n />\n </FormField>\n <FormField className={styles['tableform__input-field']}>\n <Label htmlFor={columnId}>{t.table.nrofColumns}</Label>\n <InputField\n id={columnId}\n placeholder={t.table.nrofColumnsPlaceholder}\n value={columnCount ? columnCount : ''}\n onChange={(event) => handleDimentionChange(event, 'column')}\n aria-label={t.aria.labels.tableColumnfield}\n />\n </FormField>\n <div className={styles['tableform__footer']}>\n <Button variant={'secondary'} onClick={handleClose} aria-label={t.common.cancel}>\n {t.common.cancel}\n </Button>\n <Button\n variant={'primary'}\n onClick={handleSave}\n disabled={!rowCount || !columnCount}\n aria-label={t.aria.labels.tableOkButton}\n >\n {t.common.add}\n </Button>\n </div>\n </div>\n );\n});\n","import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';\nimport clsx from 'clsx';\nimport { $getTableCellNodeFromLexicalNode, $isTableCellNode } from '@lexical/table';\nimport { $getSelection, $isRangeSelection, $getRoot, KEY_DOWN_COMMAND, COMMAND_PRIORITY_EDITOR } from 'lexical';\nimport { useRef, useEffect, useImperativeHandle, forwardRef } from 'react';\n\nimport type { TextNode } from 'lexical';\nimport type { addTableForm } from './AddTableFrom';\nimport type { Actions } from './TableCellContextMenu';\n\nimport { AddTableForm } from './AddTableFrom';\nimport { createTable, deleteColumn, deleteRow, deleteTable, insertColumn, insertRow } from './helpers';\n\nimport { useFlyout } from 'components/RteEditor/hooks/useFlyout';\nimport { Icon } from 'components';\nimport styles from 'components/RteEditor/RteEditor.module.css';\nimport { useTranslation } from 'components/RteEditor/hooks/useTranslation';\n\nconst PREVENT_OPEN_DELAY = 200;\n\ninterface TablePluginProps {\n isActive: boolean;\n}\n\nexport interface TableMutation {\n mutateTable: (type: Actions) => void;\n}\n\nexport const TablePlugin = forwardRef(({ isActive }: TablePluginProps, ref): JSX.Element => {\n const t = useTranslation();\n const [editor] = useLexicalComposerContext();\n const { flyout, showFlyout, hideFlyout, isVisible } = useFlyout();\n const addTableForm = useRef<addTableForm>();\n const buttonRef = useRef<HTMLButtonElement>(null);\n const preventOpen = useRef(false);\n const isVisibleRef = useRef(isVisible);\n\n const openFlyout = () => {\n if (!preventOpen.current) {\n showFlyout(flyoutOptions);\n }\n };\n\n const closeFlyout = () => {\n hideFlyout();\n };\n\n const insertTable = (nrOfRows: number, nrOfColumns: number) => {\n editor.update(() => {\n const selection = $getSelection();\n const tableNode = createTable(nrOfRows, nrOfColumns);\n if ($isRangeSelection(selection)) {\n selection.insertNodes([tableNode]);\n } else {\n $getRoot().append(tableNode);\n }\n const firstDescendant = tableNode.getFirstDescendant();\n if (firstDescendant) {\n (firstDescendant as TextNode).select();\n }\n });\n\n closeFlyout();\n };\n\n const mutateTable = (action: Actions) => {\n editor.update(() => {\n const selection = $getSelection();\n if ($isRangeSelection(selection)) {\n const anchorNode = selection.anchor.getNode();\n const currentNode = $getTableCellNodeFromLexicalNode(anchorNode);\n\n if ($isTableCellNode(currentNode)) {\n switch (action) {\n case 'insertRowAbove':\n case 'insertRowBelow':\n insertRow(currentNode, action);\n break;\n case 'deleteRow':\n deleteRow(currentNode);\n break;\n case 'insertColumnLeft':\n case 'insertColumnRight':\n insertColumn(currentNode, action);\n break;\n case 'deleteColumn':\n deleteColumn(currentNode);\n break;\n case 'deleteTable':\n deleteTable(currentNode);\n break;\n }\n }\n }\n });\n };\n\n const flyoutOptions = {\n children: (\n <AddTableForm\n onCloseHandler={closeFlyout}\n onSaveHandler={(rows, columns) => insertTable(rows, columns)}\n ref={addTableForm}\n />\n ),\n };\n\n useEffect(() => {\n if (!isVisible) {\n addTableForm.current?.clearForm();\n setTimeout(() => (preventOpen.current = false), PREVENT_OPEN_DELAY);\n } else {\n preventOpen.current = true;\n addTableForm.current?.focusFirstField();\n }\n }, [addTableForm, isVisible]);\n\n useEffect(() => {\n const removeKeyboardShortcut = editor.registerCommand(\n KEY_DOWN_COMMAND,\n (event: KeyboardEvent) => {\n if (event.ctrlKey && event.shiftKey && event.code === 'Digit9') {\n event.preventDefault();\n showFlyout(flyoutOptions);\n return true;\n }\n return false;\n },\n COMMAND_PRIORITY_EDITOR\n );\n\n return () => {\n removeKeyboardShortcut();\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [editor]);\n\n useEffect(() => {\n isVisibleRef.current = isVisible;\n }, [isVisible]);\n\n useEffect(() => {\n const removeKeydown = (event: KeyboardEvent) => {\n if (event.key === 'Escape' && isVisibleRef.current) {\n event.preventDefault();\n event.stopPropagation();\n closeFlyout();\n }\n };\n\n document.addEventListener('keydown', removeKeydown, { capture: true });\n\n return () => {\n document.removeEventListener('keydown', removeKeydown);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useImperativeHandle(ref, () => ({\n mutateTable,\n }));\n\n return (\n <div className={styles['editor__toolbar-button-group']}>\n <div className={styles['editor__toolbar-button-flyoutwrapper']}>\n <button\n onClick={openFlyout}\n title={t.table.tableTooltip}\n className={clsx(styles['editor__toolbar-button'], isActive && styles[`editor__toolbar-button--active`])}\n aria-label={t.aria.labels.table}\n aria-keyshortcuts={t.aria.keyshortcuts.table}\n ref={buttonRef}\n type=\"button\"\n >\n <Icon name=\"Table\" size={24} />\n </button>\n {flyout}\n </div>\n </div>\n );\n});\n"],"names":["MultiSelectHeader","label","clearTrigger","onClear","jsxs","styles","jsx","Label","Button","MultiSelect","scrollable","noBorder","header","children","Fragment","clsx","MultiSelectItem","AddLinkForm","forwardRef","onCloseHandler","onSaveHandler","onRemoveHandler","isLink","ref","t","useTranslation","url","setUrl","useState","linkText","setLinkText","urlError","setUrlError","linkTextError","setLinkTextError","firstField","useRef","linkId","useId","textId","handleOpenUrl","ensureHttps","handleUrl","event","handleLinkText","validateUrl","validateUrlWithProtocol","validateLinkText","handleSave","resetForm","handleClose","setDefaults","linktext","focusFirstField","useImperativeHandle","FormField","InputField","Icon","FeedbackBox","AddTableForm","rowCount","setRowCount","columnCount","setColumnCount","rowId","columnId","handleDimentionChange","type","value","_a","PREVENT_OPEN_DELAY","TablePlugin","isActive","editor","useLexicalComposerContext","flyout","showFlyout","hideFlyout","isVisible","useFlyout","addTableForm","buttonRef","preventOpen","isVisibleRef","openFlyout","flyoutOptions","closeFlyout","insertTable","nrOfRows","nrOfColumns","selection","$getSelection","tableNode","createTable","$isRangeSelection","$getRoot","firstDescendant","mutateTable","action","anchorNode","currentNode","$getTableCellNodeFromLexicalNode","$isTableCellNode","insertRow","deleteRow","insertColumn","deleteColumn","deleteTable","rows","columns","useEffect","_b","removeKeyboardShortcut","KEY_DOWN_COMMAND","COMMAND_PRIORITY_EDITOR","removeKeydown"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUO,SAASA,GAAkB,EAAE,OAAAC,GAAO,cAAAC,GAAc,SAAAC,KAAmC;AAC1F,SACG,gBAAAC,EAAA,UAAA,EAAO,WAAWC,EAAO,sBAAsB,GAC9C,UAAA;AAAA,IAAC,gBAAAC,EAAAC,GAAA,EAAM,SAAQ,qBAAqB,UAAMN,GAAA;AAAA,IACzCC,KACE,gBAAAI,EAAAE,GAAA,EAAO,SAAS,SAAS,SAASL,GAChC,UACHD,GAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ;ACFa,MAAAO,IAAc,CAAC,EAAE,YAAAC,IAAa,IAAM,UAAAC,GAAU,QAAAC,GAAQ,UAAAC,QAE9D,gBAAAT,EAAAU,GAAA,EAAA,UAAA;AAAA,EAAAF;AAAA,EACD,gBAAAN;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWS,EAAKV,EAAO,cAAc,GAAG;AAAA,QACtC,CAACA,EAAO,yBAAyB,CAAC,GAAGM;AAAA,MAAA,CACtC;A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gC,CAAC;AAAA,QACtG,cAAYmB,EAAE,KAAK,OAAO;AAAA,QAC1B,qBAAmBA,EAAE,KAAK,aAAa;AAAA,QACvC,KAAKyD;AAAA,QACL,MAAK;AAAA,QAEL,UAAC,gBAAA3E,EAAAmD,GAAA,EAAK,MAAK,SAAQ,MAAM,IAAI;AAAA,MAAA;AAAA,IAC/B;AAAA,IACCkB;AAAA,EAAA,EACH,CAAA,EACF,CAAA;AAEJ,CAAC;"}
Binary file
@@ -0,0 +1,27 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="1080" height="1080" viewBox="0 0 1080 1080" xml:space="preserve">
4
+ <desc>Created with Fabric.js 5.2.4</desc>
5
+ <defs>
6
+ </defs>
7
+ <g transform="matrix(0 0 0 0 0 0)" id="a71a6624-8e96-4e62-a48c-36a1521ec996" >
8
+ </g>
9
+ <g transform="matrix(1 0 0 1 540 540)" id="0879d169-d054-46a9-9d4b-70c4f183f02c" >
10
+ <rect style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(255,255,255); fill-rule: nonzero; opacity: 1; visibility: hidden;" vector-effect="non-scaling-stroke" x="-540" y="-540" rx="0" ry="0" width="1080" height="1080" />
11
+ </g>
12
+ <g transform="matrix(1.46 0 0 -1.46 539.76 541.02)" >
13
+ <path style="stroke: rgb(0,0,0); stroke-opacity: 0; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(0,0,0); fill-rule: nonzero; opacity: 1;" vector-effect="non-scaling-stroke" transform=" translate(-283.46, -283.47)" d="M 566.93 0 L 0 0 L 0 566.934 L 566.93 566.934 L 566.93 0" stroke-linecap="round" />
14
+ </g>
15
+ <g transform="matrix(1.46 0 0 -1.46 545.59 265.89)" >
16
+ <path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(255,255,255); fill-rule: nonzero; opacity: 1;" vector-effect="non-scaling-stroke" transform=" translate(-283.47, -472)" d="M 240.66 405.496 L 283.473 448.30899999999997 L 326.293 405.496 L 349.973 429.18399999999997 L 307.172 472.01199999999994 L 349.973 514.809 L 326.293 538.512 L 283.473 495.703 L 240.66000000000003 538.512 L 216.96500000000003 514.809 L 259.785 472.01199999999994 L 216.96500000000003 429.18399999999997 L 240.66000000000003 405.496" stroke-linecap="round" />
17
+ </g>
18
+ <g transform="matrix(1.46 0 0 -1.46 545.59 500.68)" >
19
+ <path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(255,255,255); fill-rule: nonzero; opacity: 1;" vector-effect="non-scaling-stroke" transform=" translate(-283.47, -314.45)" d="M 240.66 247.938 L 283.473 290.754 L 326.293 247.93800000000002 L 349.973 271.62100000000004 L 307.172 314.45300000000003 L 349.973 357.25 L 326.293 380.953 L 283.473 338.145 L 240.66000000000003 380.953 L 216.96500000000003 357.25 L 259.785 314.453 L 216.96500000000003 271.621 L 240.66000000000003 247.938" stroke-linecap="round" />
20
+ </g>
21
+ <g transform="matrix(1.46 0 0 -1.46 545.59 827.44)" >
22
+ <path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(255,255,255); fill-rule: nonzero; opacity: 1;" vector-effect="non-scaling-stroke" transform=" translate(-283.47, -95.16)" d="M 240.66 28.6523 L 283.473 71.4648 L 326.293 28.652299999999997 L 349.973 52.3438 L 307.172 95.1641 L 349.973 137.969 L 326.293 161.66 L 283.473 118.85499999999999 L 240.66000000000003 161.66 L 216.96500000000003 137.969 L 259.785 95.16409999999999 L 216.96500000000003 52.34379999999999 L 240.66000000000003 28.652299999999986" stroke-linecap="round" />
23
+ </g>
24
+ <g transform="matrix(1.46 0 0 -1.46 543.83 535.42)" >
25
+ <path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(255,255,255); fill-rule: nonzero; opacity: 1;" vector-effect="non-scaling-stroke" transform=" translate(-283.47, -290.22)" d="M 412.328 406.121 L 363.07 403.85499999999996 C 363.07 403.85499999999996 370.102 351.84399999999994 367.125 299.30499999999995 C 364.262 249.14099999999996 356.355 240.31999999999994 356.355 240.31999999999994 C 345.22700000000003 219.43399999999994 310.77000000000004 214.34399999999994 293.15200000000004 212.98799999999994 C 275.48 211.60199999999995 267.59000000000003 212.55899999999994 267.59000000000003 212.55899999999994 C 267.59000000000003 212.55899999999994 216.75400000000002 214.51199999999994 205.35200000000003 238.18399999999994 C 198.85500000000002 251.67199999999994 197.48400000000004 278.1449999999999 197.48400000000004 278.1449999999999 C 197.48400000000004 278.1449999999999 197.18400000000003 402.2029999999999 196.73400000000004 405.0039999999999 C 196.44900000000004 406.5039999999999 186.44900000000004 403.9099999999999 174.86700000000005 403.9799999999999 C 165.43800000000005 404.0079999999999 151.64100000000005 404.6249999999999 151.64100000000005 404.6249999999999 L 155.72700000000006 313.4919999999999 L 155.17600000000007 259.6289999999999 C 155.17600000000007 259.6289999999999 155.17600000000007 230.7299999999999 162.59000000000006 219.2069999999999 C 175.09800000000007 199.6479999999999 189.02300000000005 192.65599999999992 196.93000000000006 188.95299999999992 C 204.82000000000005 185.20299999999992 217.36300000000006 181.47299999999993 231.30100000000007 178.69099999999992 C 245.22700000000006 175.8789999999999 268.4800000000001 174.45299999999992 299.1170000000001 182.30499999999992 C 329.7730000000001 190.20299999999992 343.3280000000001 204.10199999999992 343.3280000000001 204.10199999999992 L 366.5630000000001 225.93799999999993 L 366.4920000000001 174.32399999999993 L 415.29300000000006 188.69099999999992 C 415.29300000000006 188.69099999999992 408.8520000000001 229.58999999999992 408.9220000000001 299.2729999999999 C 408.9920000000001 368.9799999999999 412.3280000000001 406.1209999999999 412.3280000000001 406.1209999999999" stroke-linecap="round" />
26
+ </g>
27
+ </svg>
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "",
3
+ "short_name": "",
4
+ "icons": [
5
+ {
6
+ "src": "/android-chrome-192x192.png",
7
+ "sizes": "192x192",
8
+ "type": "image/png"
9
+ },
10
+ {
11
+ "src": "/android-chrome-512x512.png",
12
+ "sizes": "512x512",
13
+ "type": "image/png"
14
+ }
15
+ ],
16
+ "theme_color": "#ffffff",
17
+ "background_color": "#ffffff",
18
+ "display": "standalone"
19
+ }
@@ -17,7 +17,7 @@ import "../IconButton/IconButton.js";
17
17
  import "../Input/Input.js";
18
18
  import "../InputField/InputField.js";
19
19
  import "react-router-dom";
20
- import "../../TablePlugin-B-yAWpsC.js";
20
+ import "../../TablePlugin-DQR5VWGq.js";
21
21
  import "../RteEditor/Providers/LanguageProvider.js";
22
22
  import "../RteEditor/hooks/components/Flyout.js";
23
23
  import "../SelectListbox/SelectListbox.js";
@@ -15,7 +15,7 @@ import "../IconButton/IconButton.js";
15
15
  import "../Input/Input.js";
16
16
  import "../InputField/InputField.js";
17
17
  import "react-router-dom";
18
- import "../../TablePlugin-B-yAWpsC.js";
18
+ import "../../TablePlugin-DQR5VWGq.js";
19
19
  import "../RteEditor/Providers/LanguageProvider.js";
20
20
  import "../RteEditor/hooks/components/Flyout.js";
21
21
  import "../SelectListbox/SelectListbox.js";
@@ -15,7 +15,7 @@ import "../GridRow/GridRow.js";
15
15
  import "../IconButton/IconButton.js";
16
16
  import "../Input/Input.js";
17
17
  import "react-router-dom";
18
- import "../../TablePlugin-B-yAWpsC.js";
18
+ import "../../TablePlugin-DQR5VWGq.js";
19
19
  import "../RteEditor/Providers/LanguageProvider.js";
20
20
  import "../RteEditor/hooks/components/Flyout.js";
21
21
  import "../SelectListbox/SelectListbox.js";
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "../../clsx-OuTLNxxd.js";
3
3
  import "../../MultiSelectItem-D9PxdX43.js";
4
- import { M as p } from "../../TablePlugin-B-yAWpsC.js";
4
+ import { M as p } from "../../TablePlugin-DQR5VWGq.js";
5
5
  export {
6
6
  p as MultiSelect
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import { jsxs as S, jsx as r } from "react/jsx-runtime";
2
2
  import { fn as d } from "../../index-C9QoqAAt.js";
3
3
  import { useState as p } from "react";
4
- import { M as e } from "../../TablePlugin-B-yAWpsC.js";
4
+ import { M as e } from "../../TablePlugin-DQR5VWGq.js";
5
5
  import { Container as M } from "../../storyComponents/Container/Container.js";
6
6
  const C = `
7
7
  // MultiSelectHeader can be added optionally
@@ -14,7 +14,7 @@ import "../../IconButton/IconButton.js";
14
14
  import "../../Input/Input.js";
15
15
  import "../../InputField/InputField.js";
16
16
  import "react-router-dom";
17
- import { a as q } from "../../../TablePlugin-B-yAWpsC.js";
17
+ import { a as q } from "../../../TablePlugin-DQR5VWGq.js";
18
18
  import "../../RteEditor/Providers/LanguageProvider.js";
19
19
  import "../../RteEditor/hooks/components/Flyout.js";
20
20
  import "../../SelectListbox/SelectListbox.js";
@@ -1,4 +1,4 @@
1
- import { M as l } from "../../TablePlugin-B-yAWpsC.js";
1
+ import { M as l } from "../../TablePlugin-DQR5VWGq.js";
2
2
  export {
3
3
  l as MultiSelect
4
4
  };
@@ -16,7 +16,7 @@ import "../Input/Input.js";
16
16
  import "../InputField/InputField.js";
17
17
  import { Label as D } from "../Label/Label.js";
18
18
  import "react-router-dom";
19
- import "../../TablePlugin-B-yAWpsC.js";
19
+ import "../../TablePlugin-DQR5VWGq.js";
20
20
  import "../RteEditor/Providers/LanguageProvider.js";
21
21
  import "../RteEditor/hooks/components/Flyout.js";
22
22
  import "../SelectListbox/SelectListbox.js";
@@ -16,7 +16,7 @@ import "../IconButton/IconButton.js";
16
16
  import "../Input/Input.js";
17
17
  import "../InputField/InputField.js";
18
18
  import "react-router-dom";
19
- import "../../TablePlugin-B-yAWpsC.js";
19
+ import "../../TablePlugin-DQR5VWGq.js";
20
20
  import { Repeater as i } from "../Repeater/Repeater.js";
21
21
  import "../RteEditor/Providers/LanguageProvider.js";
22
22
  import "../RteEditor/hooks/components/Flyout.js";
@@ -13,7 +13,7 @@ import "../../IconButton/IconButton.js";
13
13
  import "../../Input/Input.js";
14
14
  import "../../InputField/InputField.js";
15
15
  import "react-router-dom";
16
- import "../../../TablePlugin-B-yAWpsC.js";
16
+ import "../../../TablePlugin-DQR5VWGq.js";
17
17
  import "../Providers/LanguageProvider.js";
18
18
  import "../hooks/components/Flyout.js";
19
19
  import "../../SelectListbox/SelectListbox.js";
@@ -16,7 +16,7 @@ import "../../../IconButton/IconButton.js";
16
16
  import "../../../Input/Input.js";
17
17
  import "../../../InputField/InputField.js";
18
18
  import "react-router-dom";
19
- import "../../../../TablePlugin-B-yAWpsC.js";
19
+ import "../../../../TablePlugin-DQR5VWGq.js";
20
20
  import { s as r } from "../../../../RteEditor.module-CHbWzGpE.js";
21
21
  import { useTranslation as g } from "../../hooks/useTranslation.js";
22
22
  import "../../hooks/components/Flyout.js";
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../../../../helpers-C7Yo7VY3.js";
4
- import { A as z } from "../../../../TablePlugin-B-yAWpsC.js";
4
+ import { A as z } from "../../../../TablePlugin-DQR5VWGq.js";
5
5
  import "../../../Icon/Icon.js";
6
6
  import "../../../Buttons/Button.js";
7
7
  import "../../../Buttons/LinkButton.js";
@@ -4,7 +4,7 @@ import { c as j } from "../../../../clsx-OuTLNxxd.js";
4
4
  import { g as D, m as M, e as z, U as W } from "../../../../helpers-C7Yo7VY3.js";
5
5
  import { useRef as m, useState as Y, useEffect as g } from "react";
6
6
  import { e as q, M as f, r as B, v as x, _ as G, O as J, c as Q, E as X } from "../../../../Lexical.prod-B6kL_nwF.js";
7
- import { A as Z } from "../../../../TablePlugin-B-yAWpsC.js";
7
+ import { A as Z } from "../../../../TablePlugin-DQR5VWGq.js";
8
8
  import { useFlyout as $ } from "../../hooks/useFlyout.js";
9
9
  import { Icon as tt } from "../../../Icon/Icon.js";
10
10
  import "../../../Buttons/Button.js";
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { b as v } from "../../../../TablePlugin-B-yAWpsC.js";
3
+ import { b as v } from "../../../../TablePlugin-DQR5VWGq.js";
4
4
  import "../../../Buttons/Button.js";
5
5
  import "../../../Buttons/LinkButton.js";
6
6
  import "@react-aria/button";
@@ -1,10 +1,10 @@
1
1
  import "react/jsx-runtime";
2
2
  import "../../../../LexicalComposerContext.prod-Dyvim1tK.js";
3
3
  import "../../../../clsx-OuTLNxxd.js";
4
- import "../../../../helpers-pUTvcL4e.js";
4
+ import "../../../../helpers-CVB_4CnL.js";
5
5
  import "../../../../Lexical.prod-B6kL_nwF.js";
6
6
  import "react";
7
- import { T as B } from "../../../../TablePlugin-B-yAWpsC.js";
7
+ import { T as B } from "../../../../TablePlugin-DQR5VWGq.js";
8
8
  import "../../hooks/useFlyout.js";
9
9
  import "../../../Icon/Icon.js";
10
10
  import "../../../Buttons/Button.js";
@@ -1,10 +1,11 @@
1
- import { e as s, a as l, b as t, d as o, i as r, c as d } from "../../../../helpers-pUTvcL4e.js";
1
+ import { e as t, a as l, b as o, d as r, i as d, c as i } from "../../../../helpers-CVB_4CnL.js";
2
+ import "../../../../Lexical.prod-B6kL_nwF.js";
2
3
  export {
3
- s as createTable,
4
+ t as createTable,
4
5
  l as deleteColumn,
5
- t as deleteRow,
6
- o as deleteTable,
7
- r as insertColumn,
8
- d as insertRow
6
+ o as deleteRow,
7
+ r as deleteTable,
8
+ d as insertColumn,
9
+ i as insertRow
9
10
  };
10
11
  //# sourceMappingURL=helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"helpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1,4 +1,4 @@
1
- import { T as o } from "../../../../TablePlugin-B-yAWpsC.js";
1
+ import { T as o } from "../../../../TablePlugin-DQR5VWGq.js";
2
2
  import { TableCellContextMenu as t } from "./TableCellContextMenu/TableCellContextMenu.js";
3
3
  export {
4
4
  t as TableCellContextMenu,